aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinfo.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r--gcc/ada/sinfo.adb292
1 files changed, 235 insertions, 57 deletions
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb
index 4eb1c8c..e4f8608 100644
--- a/gcc/ada/sinfo.adb
+++ b/gcc/ada/sinfo.adb
@@ -61,19 +61,6 @@ package body Sinfo is
-- uniform format of the conditions following this. Note that csinfo
-- expects this uniform format.
- function ABE_Is_Certain
- (N : Node_Id) return Boolean is
- begin
- pragma Assert (False
- or else NT (N).Nkind = N_Formal_Package_Declaration
- or else NT (N).Nkind = N_Function_Call
- or else NT (N).Nkind = N_Function_Instantiation
- or else NT (N).Nkind = N_Package_Instantiation
- or else NT (N).Nkind = N_Procedure_Call_Statement
- or else NT (N).Nkind = N_Procedure_Instantiation);
- return Flag18 (N);
- end ABE_Is_Certain;
-
function Abort_Present
(N : Node_Id) return Boolean is
begin
@@ -439,7 +426,7 @@ package body Sinfo is
end Classifications;
function Cleanup_Actions
- (N : Node_Id) return List_Id is
+ (N : Node_Id) return List_Id is
begin
pragma Assert (False
or else NT (N).Nkind = N_Block_Statement);
@@ -447,7 +434,7 @@ package body Sinfo is
end Cleanup_Actions;
function Comes_From_Extended_Return_Statement
- (N : Node_Id) return Boolean is
+ (N : Node_Id) return Boolean is
begin
pragma Assert (False
or else NT (N).Nkind = N_Simple_Return_Statement);
@@ -951,7 +938,7 @@ package body Sinfo is
or else NT (N).Nkind = N_Assignment_Statement
or else NT (N).Nkind = N_Selected_Component
or else NT (N).Nkind = N_Type_Conversion);
- return Flag1 (N);
+ return Flag3 (N);
end Do_Discriminant_Check;
function Do_Division_Check
@@ -1856,14 +1843,16 @@ package body Sinfo is
return Flag16 (N);
end Is_Controlling_Actual;
- function Is_Disabled
+ function Is_Declaration_Level_Node
(N : Node_Id) return Boolean is
begin
pragma Assert (False
- or else NT (N).Nkind = N_Aspect_Specification
- or else NT (N).Nkind = N_Pragma);
- return Flag15 (N);
- end Is_Disabled;
+ or else NT (N).Nkind = N_Call_Marker
+ or else NT (N).Nkind = N_Function_Instantiation
+ or else NT (N).Nkind = N_Package_Instantiation
+ or else NT (N).Nkind = N_Procedure_Instantiation);
+ return Flag5 (N);
+ end Is_Declaration_Level_Node;
function Is_Delayed_Aspect
(N : Node_Id) return Boolean is
@@ -1875,6 +1864,23 @@ package body Sinfo is
return Flag14 (N);
end Is_Delayed_Aspect;
+ function Is_Disabled
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Aspect_Specification
+ or else NT (N).Nkind = N_Pragma);
+ return Flag15 (N);
+ end Is_Disabled;
+
+ function Is_Dispatching_Call
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Call_Marker);
+ return Flag3 (N);
+ end Is_Dispatching_Call;
+
function Is_Dynamic_Coextension
(N : Node_Id) return Boolean is
begin
@@ -1892,8 +1898,27 @@ package body Sinfo is
return Flag1 (N);
end Is_Effective_Use_Clause;
+ function Is_Elaboration_Checks_OK_Node
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Assignment_Statement
+ or else NT (N).Nkind = N_Attribute_Reference
+ or else NT (N).Nkind = N_Call_Marker
+ or else NT (N).Nkind = N_Entry_Call_Statement
+ or else NT (N).Nkind = N_Expanded_Name
+ or else NT (N).Nkind = N_Function_Call
+ or else NT (N).Nkind = N_Function_Instantiation
+ or else NT (N).Nkind = N_Identifier
+ or else NT (N).Nkind = N_Package_Instantiation
+ or else NT (N).Nkind = N_Procedure_Call_Statement
+ or else NT (N).Nkind = N_Procedure_Instantiation
+ or else NT (N).Nkind = N_Requeue_Statement);
+ return Flag1 (N);
+ end Is_Elaboration_Checks_OK_Node;
+
function Is_Elsif
- (N : Node_Id) return Boolean is
+ (N : Node_Id) return Boolean is
begin
pragma Assert (False
or else NT (N).Nkind = N_If_Expression);
@@ -1982,6 +2007,25 @@ package body Sinfo is
return Flag4 (N);
end Is_Inherited_Pragma;
+ function Is_Initialization_Block
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Block_Statement);
+ return Flag1 (N);
+ end Is_Initialization_Block;
+
+ function Is_Known_Guaranteed_ABE
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Call_Marker
+ or else NT (N).Nkind = N_Function_Instantiation
+ or else NT (N).Nkind = N_Package_Instantiation
+ or else NT (N).Nkind = N_Procedure_Instantiation);
+ return Flag18 (N);
+ end Is_Known_Guaranteed_ABE;
+
function Is_Machine_Number
(N : Node_Id) return Boolean is
begin
@@ -2038,6 +2082,44 @@ package body Sinfo is
return Flag4 (N);
end Is_Qualified_Universal_Literal;
+ function Is_Recorded_Scenario
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Call_Marker
+ or else NT (N).Nkind = N_Function_Instantiation
+ or else NT (N).Nkind = N_Package_Instantiation
+ or else NT (N).Nkind = N_Procedure_Instantiation);
+ return Flag6 (N);
+ end Is_Recorded_Scenario;
+
+ function Is_Source_Call
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Call_Marker);
+ return Flag4 (N);
+ end Is_Source_Call;
+
+ function Is_SPARK_Mode_On_Node
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Assignment_Statement
+ or else NT (N).Nkind = N_Attribute_Reference
+ or else NT (N).Nkind = N_Call_Marker
+ or else NT (N).Nkind = N_Entry_Call_Statement
+ or else NT (N).Nkind = N_Expanded_Name
+ or else NT (N).Nkind = N_Function_Call
+ or else NT (N).Nkind = N_Function_Instantiation
+ or else NT (N).Nkind = N_Identifier
+ or else NT (N).Nkind = N_Package_Instantiation
+ or else NT (N).Nkind = N_Procedure_Call_Statement
+ or else NT (N).Nkind = N_Procedure_Instantiation
+ or else NT (N).Nkind = N_Requeue_Statement);
+ return Flag2 (N);
+ end Is_SPARK_Mode_On_Node;
+
function Is_Static_Coextension
(N : Node_Id) return Boolean is
begin
@@ -2425,15 +2507,6 @@ package body Sinfo is
return Flag7 (N);
end No_Ctrl_Actions;
- function No_Elaboration_Check
- (N : Node_Id) return Boolean is
- begin
- pragma Assert (False
- or else NT (N).Nkind = N_Function_Call
- or else NT (N).Nkind = N_Procedure_Call_Statement);
- return Flag14 (N);
- end No_Elaboration_Check;
-
function No_Entities_Ref_In_Spec
(N : Node_Id) return Boolean is
begin
@@ -2465,7 +2538,7 @@ package body Sinfo is
begin
pragma Assert (False
or else NT (N).Nkind = N_Function_Call);
- return Flag1 (N);
+ return Flag17 (N);
end No_Side_Effect_Removal;
function No_Truncation
@@ -3192,6 +3265,14 @@ package body Sinfo is
return Flag15 (N);
end Tagged_Present;
+ function Target
+ (N : Node_Id) return Entity_Id is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Call_Marker);
+ return Node1 (N);
+ end Target;
+
function Target_Type
(N : Node_Id) return Entity_Id is
begin
@@ -3364,6 +3445,14 @@ package body Sinfo is
return Elist2 (N);
end Used_Operations;
+ function Was_Attribute_Reference
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Subprogram_Body);
+ return Flag2 (N);
+ end Was_Attribute_Reference;
+
function Was_Expression_Function
(N : Node_Id) return Boolean is
begin
@@ -3395,19 +3484,6 @@ package body Sinfo is
-- Field Set Procedures --
--------------------------
- procedure Set_ABE_Is_Certain
- (N : Node_Id; Val : Boolean := True) is
- begin
- pragma Assert (False
- or else NT (N).Nkind = N_Formal_Package_Declaration
- or else NT (N).Nkind = N_Function_Call
- or else NT (N).Nkind = N_Function_Instantiation
- or else NT (N).Nkind = N_Package_Instantiation
- or else NT (N).Nkind = N_Procedure_Call_Statement
- or else NT (N).Nkind = N_Procedure_Instantiation);
- Set_Flag18 (N, Val);
- end Set_ABE_Is_Certain;
-
procedure Set_Abort_Present
(N : Node_Id; Val : Boolean := True) is
begin
@@ -4285,7 +4361,7 @@ package body Sinfo is
or else NT (N).Nkind = N_Assignment_Statement
or else NT (N).Nkind = N_Selected_Component
or else NT (N).Nkind = N_Type_Conversion);
- Set_Flag1 (N, Val);
+ Set_Flag3 (N, Val);
end Set_Do_Discriminant_Check;
procedure Set_Do_Division_Check
@@ -5181,6 +5257,17 @@ package body Sinfo is
Set_Flag16 (N, Val);
end Set_Is_Controlling_Actual;
+ procedure Set_Is_Declaration_Level_Node
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Call_Marker
+ or else NT (N).Nkind = N_Function_Instantiation
+ or else NT (N).Nkind = N_Package_Instantiation
+ or else NT (N).Nkind = N_Procedure_Instantiation);
+ Set_Flag5 (N, Val);
+ end Set_Is_Declaration_Level_Node;
+
procedure Set_Is_Delayed_Aspect
(N : Node_Id; Val : Boolean := True) is
begin
@@ -5200,6 +5287,14 @@ package body Sinfo is
Set_Flag15 (N, Val);
end Set_Is_Disabled;
+ procedure Set_Is_Dispatching_Call
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Call_Marker);
+ Set_Flag3 (N, Val);
+ end Set_Is_Dispatching_Call;
+
procedure Set_Is_Dynamic_Coextension
(N : Node_Id; Val : Boolean := True) is
begin
@@ -5217,8 +5312,27 @@ package body Sinfo is
Set_Flag1 (N, Val);
end Set_Is_Effective_Use_Clause;
+ procedure Set_Is_Elaboration_Checks_OK_Node
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Assignment_Statement
+ or else NT (N).Nkind = N_Attribute_Reference
+ or else NT (N).Nkind = N_Call_Marker
+ or else NT (N).Nkind = N_Entry_Call_Statement
+ or else NT (N).Nkind = N_Expanded_Name
+ or else NT (N).Nkind = N_Function_Call
+ or else NT (N).Nkind = N_Function_Instantiation
+ or else NT (N).Nkind = N_Identifier
+ or else NT (N).Nkind = N_Package_Instantiation
+ or else NT (N).Nkind = N_Procedure_Call_Statement
+ or else NT (N).Nkind = N_Procedure_Instantiation
+ or else NT (N).Nkind = N_Requeue_Statement);
+ Set_Flag1 (N, Val);
+ end Set_Is_Elaboration_Checks_OK_Node;
+
procedure Set_Is_Elsif
- (N : Node_Id; Val : Boolean := True) is
+ (N : Node_Id; Val : Boolean := True) is
begin
pragma Assert (False
or else NT (N).Nkind = N_If_Expression);
@@ -5307,6 +5421,25 @@ package body Sinfo is
Set_Flag4 (N, Val);
end Set_Is_Inherited_Pragma;
+ procedure Set_Is_Initialization_Block
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Block_Statement);
+ Set_Flag1 (N, Val);
+ end Set_Is_Initialization_Block;
+
+ procedure Set_Is_Known_Guaranteed_ABE
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Call_Marker
+ or else NT (N).Nkind = N_Function_Instantiation
+ or else NT (N).Nkind = N_Package_Instantiation
+ or else NT (N).Nkind = N_Procedure_Instantiation);
+ Set_Flag18 (N, Val);
+ end Set_Is_Known_Guaranteed_ABE;
+
procedure Set_Is_Machine_Number
(N : Node_Id; Val : Boolean := True) is
begin
@@ -5363,6 +5496,44 @@ package body Sinfo is
Set_Flag4 (N, Val);
end Set_Is_Qualified_Universal_Literal;
+ procedure Set_Is_Recorded_Scenario
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Call_Marker
+ or else NT (N).Nkind = N_Function_Instantiation
+ or else NT (N).Nkind = N_Package_Instantiation
+ or else NT (N).Nkind = N_Procedure_Instantiation);
+ Set_Flag6 (N, Val);
+ end Set_Is_Recorded_Scenario;
+
+ procedure Set_Is_Source_Call
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Call_Marker);
+ Set_Flag4 (N, Val);
+ end Set_Is_Source_Call;
+
+ procedure Set_Is_SPARK_Mode_On_Node
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Assignment_Statement
+ or else NT (N).Nkind = N_Attribute_Reference
+ or else NT (N).Nkind = N_Call_Marker
+ or else NT (N).Nkind = N_Entry_Call_Statement
+ or else NT (N).Nkind = N_Expanded_Name
+ or else NT (N).Nkind = N_Function_Call
+ or else NT (N).Nkind = N_Function_Instantiation
+ or else NT (N).Nkind = N_Identifier
+ or else NT (N).Nkind = N_Package_Instantiation
+ or else NT (N).Nkind = N_Procedure_Call_Statement
+ or else NT (N).Nkind = N_Procedure_Instantiation
+ or else NT (N).Nkind = N_Requeue_Statement);
+ Set_Flag2 (N, Val);
+ end Set_Is_SPARK_Mode_On_Node;
+
procedure Set_Is_Static_Coextension
(N : Node_Id; Val : Boolean := True) is
begin
@@ -5750,15 +5921,6 @@ package body Sinfo is
Set_Flag7 (N, Val);
end Set_No_Ctrl_Actions;
- procedure Set_No_Elaboration_Check
- (N : Node_Id; Val : Boolean := True) is
- begin
- pragma Assert (False
- or else NT (N).Nkind = N_Function_Call
- or else NT (N).Nkind = N_Procedure_Call_Statement);
- Set_Flag14 (N, Val);
- end Set_No_Elaboration_Check;
-
procedure Set_No_Entities_Ref_In_Spec
(N : Node_Id; Val : Boolean := True) is
begin
@@ -5790,7 +5952,7 @@ package body Sinfo is
begin
pragma Assert (False
or else NT (N).Nkind = N_Function_Call);
- Set_Flag1 (N, Val);
+ Set_Flag17 (N, Val);
end Set_No_Side_Effect_Removal;
procedure Set_No_Truncation
@@ -6517,6 +6679,14 @@ package body Sinfo is
Set_Flag15 (N, Val);
end Set_Tagged_Present;
+ procedure Set_Target
+ (N : Node_Id; Val : Entity_Id) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Call_Marker);
+ Set_Node1 (N, Val); -- semantic field, no parent set
+ end Set_Target;
+
procedure Set_Target_Type
(N : Node_Id; Val : Entity_Id) is
begin
@@ -6689,6 +6859,14 @@ package body Sinfo is
Set_Elist2 (N, Val);
end Set_Used_Operations;
+ procedure Set_Was_Attribute_Reference
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Subprogram_Body);
+ Set_Flag2 (N, Val);
+ end Set_Was_Attribute_Reference;
+
procedure Set_Was_Expression_Function
(N : Node_Id; Val : Boolean := True) is
begin