Subprogram Instantiation Body
The diagrams below draw one box per node kind, with one port per field. The edge colours say how a link is held; they
are listed in full on the Fields page.
digraph {
rankdir="LR"
nodesep=0.1
node [shape=point width=0.06 color="#888a85"]
edge [fontname="monospace" fontsize=10 minlen=3]
l0a -> l0b [label="owned" color="#000000"]
l1a -> l1b [label="ref" color="#3465a4" style=dashed]
l2a -> l2b [label="maybe ref" color="#3465a4" style=dotted]
l3a -> l3b [label="of ref" color="#3465a4" style=dashed]
l4a -> l4b [label="of maybe ref" color="#3465a4" style=dotted]
l5a -> l5b [label="forward ref" color="#f57900" style=dashed]
l6a -> l6b [label="maybe forward ref" color="#f57900" style=dotted]
l7a -> l7b [label="chain" color="#4e9a06"]
l8a -> l8b [label="chain next" color="#4e9a06" style=bold]
}
Iir_Kind_Subprogram_Instantiation_Body
LRM08 4.3 Subprogram bodies
subprogram_body : :=
subprogram_specification IS
subprogram_declarative_part
BEGIN
subprogram_statement_part
END [ subprogram_kind ] [ designator ] ;
subprogram_kind : := PROCEDURE | FUNCTION
Format: Medium
Accessor
Field
Type
Access
Description
Parent
Field0
Iir
ref
Get/Set the statement in which TARGET appears. This is used to check if next/exit is in a loop.
Declaration_Chain
Field1
Iir
chain
The parse stage always puts a declaration before a body. Sem will remove the declaration if there is a forward declaration.
Chain
Field2
Iir
chain next
—
Impure_Depth
Field3
Iir_Int32
owned
Depth of the deepest impure object.
Attribute_Value_Chain
Field5
Iir
ref
Chain of attribute values for declared items. To be used with Get/Set_Value_Chain. There is no order, therefore, a new attribute value may be always prepended.
Sequential_Statement_Chain
Field4
Iir
chain
—
Subprogram_Specification
Field6
Iir
ref
—
Callees_List
Field7
Iir_List
of ref
Returns the list of subprogram called in this subprogram or process. Note: implicit function (such as implicit operators) are omitted from this list, since the purpose of this list is to correctly set flags for side effects (purity_state, wait_state). Can return null_iir if there is no subprogram called.
End_Has_Reserved_Id
Flag8
Boolean
owned
Layout flag: true if ‘end’ is followed by the reserved identifier.
End_Has_Identifier
Flag9
Boolean
owned
Layout flag: true if ‘end’ is followed by the identifier.
Suspend_Flag
Flag11
Boolean
owned
Set on wait, procedure call and composite statements when there is a sub-statement that can suspend a procedure or a process. Also set on procedure declaration. Note that the flag is conservative: it must be true if the node contains directly or indirectly a wait statement, but need not to be false otherwise.
digraph {
rankdir="LR"
node [shape=record fontname="monospace" fontsize=10]
edge [fontname="monospace" fontsize=9]
"Subprogram_Instantiation_Body" [style=filled fillcolor="#eeeeec" label="{Subprogram_Instantiation_Body|{<Parent> Parent|<Declaration_Chain> Declaration_Chain|<Chain> Chain|<Impure_Depth> Impure_Depth|<Attribute_Value_Chain> Attribute_Value_Chain|<Sequential_Statement_Chain> Sequential_Statement_Chain|<Subprogram_Specification> Subprogram_Specification|<Callees_List> Callees_List|<End_Has_Reserved_Id> End_Has_Reserved_Id|<End_Has_Identifier> End_Has_Identifier|<Suspend_Flag> Suspend_Flag}}"]
"Subprogram_Instantiation_Body__Parent" [shape=box label="Iir"]
"Subprogram_Instantiation_Body":Parent -> "Subprogram_Instantiation_Body__Parent" [color="#3465a4" style=dashed]
"Subprogram_Instantiation_Body__Declaration_Chain" [shape=box label="Iir"]
"Subprogram_Instantiation_Body":Declaration_Chain -> "Subprogram_Instantiation_Body__Declaration_Chain" [color="#4e9a06"]
"Subprogram_Instantiation_Body__Chain" [shape=box label="Iir"]
"Subprogram_Instantiation_Body":Chain -> "Subprogram_Instantiation_Body__Chain" [color="#4e9a06" style=bold]
"Subprogram_Instantiation_Body__Attribute_Value_Chain" [shape=box label="Iir"]
"Subprogram_Instantiation_Body":Attribute_Value_Chain -> "Subprogram_Instantiation_Body__Attribute_Value_Chain" [color="#3465a4" style=dashed]
"Subprogram_Instantiation_Body__Sequential_Statement_Chain" [shape=box label="Iir"]
"Subprogram_Instantiation_Body":Sequential_Statement_Chain -> "Subprogram_Instantiation_Body__Sequential_Statement_Chain" [color="#4e9a06"]
"Subprogram_Instantiation_Body__Subprogram_Specification" [shape=box label="Iir"]
"Subprogram_Instantiation_Body":Subprogram_Specification -> "Subprogram_Instantiation_Body__Subprogram_Specification" [color="#3465a4" style=dashed]
"Subprogram_Instantiation_Body__Callees_List" [shape=box3d label="Iir_List"]
"Subprogram_Instantiation_Body":Callees_List -> "Subprogram_Instantiation_Body__Callees_List" [color="#3465a4" style=dashed]
}