Difference between revisions of "XCSG:Function"
From AtlasWiki
(→Specification) |
|||
Line 1: | Line 1: | ||
− | The semantics of Function are those common to functions in C/C++, and methods in C++/Java | + | The semantics of Function are those common to functions in C/C++, and methods in C++/Java. |
The tag <code>inline</code> indicates the presence of a hint to the compiler that the function should be considered as a candidate for inlining. It does not guarantee that calls to the function will always be inlined. In particular, calls that involve dynamic dispatch are generally not inlined irrespective of the value of this attribute. | The tag <code>inline</code> indicates the presence of a hint to the compiler that the function should be considered as a candidate for inlining. It does not guarantee that calls to the function will always be inlined. In particular, calls that involve dynamic dispatch are generally not inlined irrespective of the value of this attribute. |
Revision as of 12:06, 17 April 2014
The semantics of Function are those common to functions in C/C++, and methods in C++/Java.
The tag inline
indicates the presence of a hint to the compiler that the function should be considered as a candidate for inlining. It does not guarantee that calls to the function will always be inlined. In particular, calls that involve dynamic dispatch are generally not inlined irrespective of the value of this attribute.
The inlining of a method should not affect its semantics.
Specification
Metaclass | Function |
---|---|
Extends | , BehavioralFeature, MethodType |
Description | The implementation of an operation. |
Direct Subkinds | Method |
---|
All Superkinds | Node, ModelElement |
---|
Specified In Edges | |||
---|---|---|---|
In Edge | Predecessor | Multiplicity | Description |
Call | Function | ✱ | Indicates the possibility of one or more calls to the Function pointed to within the Function that the edge comes from. |
InvokedFunction | StaticCallSite | ✱ | Connects a StaticCallSite to the exact Function called. |
ReadsFunctionAddress | Function | 1 | Connects a Function to a Function that it takes the address of. |
Specified Out Edges | |||
---|---|---|---|
Out Edge | Successor | Multiplicity | Description |
Call | Function | ✱ | Indicates the possibility of one or more calls to the Function pointed to within the Function that the edge comes from. |
HasControlFlow | ControlFlow (Node) | ✱ | Connects a Function to any ControlFlow (Node)s it contains. |
HasParameter | Parameter | ✱ | Connects a Function to a Parameter of that Function. |
HasReturnValue | ReturnValue | 0..1 | Connects a (non-void) Function to its MasterReturn node. |
ReadsFunctionAddress | Function | ✱ | Connects a Function to a Function that it takes the address of. |
ReadsVariable | InstanceVariable | ✱ | Connects a Function to a InstanceVariable or ProgramVariable that it reads. |
ProgramVariable | ✱ | ||
Returns | Type | 1 | Connects a Function to the Type of its return value (which may be Void). |
Known Possible In Edges
| ||||
---|---|---|---|---|
Inherited From | In Edge | Predecessor | Multiplicity | Description |
Node | Contains | Node | 1 | Indicates that the predecessor contains the successor in a sense specified by the specific type of Contains edge. |
Known Possible Out Edges
| ||||
---|---|---|---|---|
Inherited From | Out Edge | Successor | Multiplicity | Description |
Node | Contains | Node | ✱ | Indicates that the predecessor contains the successor in a sense specified by the specific type of Contains edge. |
Tag | inline |
---|---|
Description | Present if calls to the function will be inlined if possible. |