XCSG:Function

From AtlasWiki
Revision as of 19:04, 14 April 2014 by TheodoreMurdock (Talk | contribs) (Created page with "The semantics of Function are those common to functions in C/C++, and methods in C++/Java. A method of a class is considered to be a function with an implicit <code>this<...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The semantics of Function are those common to functions in C/C++, and methods in C++/Java. A method of a class is considered to be a function with an implicit this parameter, which is reified in an XCSG graph; inner classes have additional implicit parameters, which are likewise reified.

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 BehavioralFeatureMethodType
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 method will be inlined if possible.