diff options
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r-- | gcc/ada/sinfo.adb | 376 |
1 files changed, 67 insertions, 309 deletions
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb index 41cb8c8..082f06f 100644 --- a/gcc/ada/sinfo.adb +++ b/gcc/ada/sinfo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2019, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1278,6 +1278,7 @@ package body Sinfo is or else NT (N).Nkind = N_Expression_With_Actions or else NT (N).Nkind = N_Free_Statement or else NT (N).Nkind = N_Iterated_Component_Association + or else NT (N).Nkind = N_Iterated_Element_Association or else NT (N).Nkind = N_Mod_Clause or else NT (N).Nkind = N_Modular_Type_Definition or else NT (N).Nkind = N_Number_Declaration @@ -1523,15 +1524,6 @@ package body Sinfo is return Flag10 (N); end Has_Dynamic_Length_Check; - function Has_Dynamic_Range_Check - (N : Node_Id) return Boolean is - begin - pragma Assert (False - or else NT (N).Nkind = N_Subtype_Declaration - or else NT (N).Nkind in N_Subexpr); - return Flag12 (N); - end Has_Dynamic_Range_Check; - function Has_Init_Expression (N : Node_Id) return Boolean is begin @@ -2089,22 +2081,6 @@ package body Sinfo is return Flag16 (N); end Is_Null_Loop; - function Is_OpenAcc_Environment - (N : Node_Id) return Boolean is - begin - pragma Assert (False - or else NT (N).Nkind = N_Loop_Statement); - return Flag13 (N); - end Is_OpenAcc_Environment; - - function Is_OpenAcc_Loop - (N : Node_Id) return Boolean is - begin - pragma Assert (False - or else NT (N).Nkind = N_Loop_Statement); - return Flag14 (N); - end Is_OpenAcc_Loop; - function Is_Overloaded (N : Node_Id) return Boolean is begin @@ -2121,6 +2097,14 @@ package body Sinfo is return Flag13 (N); end Is_Power_Of_2_For_Shift; + function Is_Preelaborable_Call + (N : Node_Id) return Boolean is + begin + pragma Assert (False + or else NT (N).Nkind = N_Call_Marker); + return Flag7 (N); + end Is_Preelaborable_Call; + function Is_Prefixed_Call (N : Node_Id) return Boolean is begin @@ -2240,6 +2224,15 @@ package body Sinfo is return Flag5 (N); end Is_Write; + function Iterator_Filter + (N : Node_Id) return Node_Id is + begin + pragma Assert (False + or else NT (N).Nkind = N_Iterator_Specification + or else NT (N).Nkind = N_Loop_Parameter_Specification); + return Node3 (N); + end Iterator_Filter; + function Iteration_Scheme (N : Node_Id) return Node_Id is begin @@ -2252,6 +2245,8 @@ package body Sinfo is (N : Node_Id) return Node_Id is begin pragma Assert (False + or else NT (N).Nkind = N_Iterated_Component_Association + or else NT (N).Nkind = N_Iterated_Element_Association or else NT (N).Nkind = N_Iteration_Scheme or else NT (N).Nkind = N_Quantified_Expression); return Node2 (N); @@ -2265,6 +2260,14 @@ package body Sinfo is return Node1 (N); end Itype; + function Key_Expression + (N : Node_Id) return Node_Id is + begin + pragma Assert (False + or else NT (N).Nkind = N_Iterated_Element_Association); + return Node1 (N); + end Key_Expression; + function Kill_Range_Check (N : Node_Id) return Boolean is begin @@ -2374,14 +2377,16 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Component_Association - or else NT (N).Nkind = N_Iterated_Component_Association); - return List2 (N); + or else NT (N).Nkind = N_Iterated_Component_Association + or else NT (N).Nkind = N_Iterated_Element_Association); + return List5 (N); end Loop_Actions; function Loop_Parameter_Specification (N : Node_Id) return Node_Id is begin pragma Assert (False + or else NT (N).Nkind = N_Iterated_Element_Association or else NT (N).Nkind = N_Iteration_Scheme or else NT (N).Nkind = N_Quantified_Expression); return Node4 (N); @@ -2554,6 +2559,7 @@ package body Sinfo is or else NT (N).Nkind = N_Aspect_Specification or else NT (N).Nkind = N_Attribute_Definition_Clause or else NT (N).Nkind = N_Enumeration_Representation_Clause + or else NT (N).Nkind = N_Null_Statement or else NT (N).Nkind = N_Pragma or else NT (N).Nkind = N_Record_Representation_Clause); return Node5 (N); @@ -3411,17 +3417,6 @@ package body Sinfo is return List2 (N); end Then_Statements; - function Treat_Fixed_As_Integer - (N : Node_Id) return Boolean is - begin - pragma Assert (False - or else NT (N).Nkind = N_Op_Divide - or else NT (N).Nkind = N_Op_Mod - or else NT (N).Nkind = N_Op_Multiply - or else NT (N).Nkind = N_Op_Rem); - return Flag14 (N); - end Treat_Fixed_As_Integer; - function Triggering_Alternative (N : Node_Id) return Node_Id is begin @@ -4779,6 +4774,7 @@ package body Sinfo is or else NT (N).Nkind = N_Expression_With_Actions or else NT (N).Nkind = N_Free_Statement or else NT (N).Nkind = N_Iterated_Component_Association + or else NT (N).Nkind = N_Iterated_Element_Association or else NT (N).Nkind = N_Mod_Clause or else NT (N).Nkind = N_Modular_Type_Definition or else NT (N).Nkind = N_Number_Declaration @@ -5024,15 +5020,6 @@ package body Sinfo is Set_Flag10 (N, Val); end Set_Has_Dynamic_Length_Check; - procedure Set_Has_Dynamic_Range_Check - (N : Node_Id; Val : Boolean := True) is - begin - pragma Assert (False - or else NT (N).Nkind = N_Subtype_Declaration - or else NT (N).Nkind in N_Subexpr); - Set_Flag12 (N, Val); - end Set_Has_Dynamic_Range_Check; - procedure Set_Has_Init_Expression (N : Node_Id; Val : Boolean := True) is begin @@ -5592,22 +5579,6 @@ package body Sinfo is Set_Flag16 (N, Val); end Set_Is_Null_Loop; - procedure Set_Is_OpenAcc_Environment - (N : Node_Id; Val : Boolean := True) is - begin - pragma Assert (False - or else NT (N).Nkind = N_Loop_Statement); - Set_Flag13 (N, Val); - end Set_Is_OpenAcc_Environment; - - procedure Set_Is_OpenAcc_Loop - (N : Node_Id; Val : Boolean := True) is - begin - pragma Assert (False - or else NT (N).Nkind = N_Loop_Statement); - Set_Flag14 (N, Val); - end Set_Is_OpenAcc_Loop; - procedure Set_Is_Overloaded (N : Node_Id; Val : Boolean := True) is begin @@ -5624,6 +5595,14 @@ package body Sinfo is Set_Flag13 (N, Val); end Set_Is_Power_Of_2_For_Shift; + procedure Set_Is_Preelaborable_Call + (N : Node_Id; Val : Boolean := True) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Call_Marker); + Set_Flag7 (N, Val); + end Set_Is_Preelaborable_Call; + procedure Set_Is_Prefixed_Call (N : Node_Id; Val : Boolean := True) is begin @@ -5745,6 +5724,15 @@ package body Sinfo is Set_Flag5 (N, Val); end Set_Is_Write; + procedure Set_Iterator_Filter + (N : Node_Id; Val : Node_Id) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Iterator_Specification + or else NT (N).Nkind = N_Loop_Parameter_Specification); + Set_Node3_With_Parent (N, Val); + end Set_Iterator_Filter; + procedure Set_Iteration_Scheme (N : Node_Id; Val : Node_Id) is begin @@ -5757,6 +5745,8 @@ package body Sinfo is (N : Node_Id; Val : Node_Id) is begin pragma Assert (False + or else NT (N).Nkind = N_Iterated_Component_Association + or else NT (N).Nkind = N_Iterated_Element_Association or else NT (N).Nkind = N_Iteration_Scheme or else NT (N).Nkind = N_Quantified_Expression); Set_Node2_With_Parent (N, Val); @@ -5770,6 +5760,14 @@ package body Sinfo is Set_Node1 (N, Val); -- no parent, semantic field end Set_Itype; + procedure Set_Key_Expression + (N : Node_Id; Val : Entity_Id) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Iterated_Element_Association); + Set_Node1_With_Parent (N, Val); + end Set_Key_Expression; + procedure Set_Kill_Range_Check (N : Node_Id; Val : Boolean := True) is begin @@ -5879,14 +5877,16 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Component_Association - or else NT (N).Nkind = N_Iterated_Component_Association); - Set_List2 (N, Val); -- semantic field, no parent set + or else NT (N).Nkind = N_Iterated_Component_Association + or else NT (N).Nkind = N_Iterated_Element_Association); + Set_List5 (N, Val); -- semantic field, no parent set end Set_Loop_Actions; procedure Set_Loop_Parameter_Specification (N : Node_Id; Val : Node_Id) is begin pragma Assert (False + or else NT (N).Nkind = N_Iterated_Element_Association or else NT (N).Nkind = N_Iteration_Scheme or else NT (N).Nkind = N_Quantified_Expression); Set_Node4_With_Parent (N, Val); @@ -6059,6 +6059,7 @@ package body Sinfo is or else NT (N).Nkind = N_Aspect_Specification or else NT (N).Nkind = N_Attribute_Definition_Clause or else NT (N).Nkind = N_Enumeration_Representation_Clause + or else NT (N).Nkind = N_Null_Statement or else NT (N).Nkind = N_Pragma or else NT (N).Nkind = N_Record_Representation_Clause); Set_Node5 (N, Val); -- semantic field, no parent set @@ -6916,17 +6917,6 @@ package body Sinfo is Set_List2_With_Parent (N, Val); end Set_Then_Statements; - procedure Set_Treat_Fixed_As_Integer - (N : Node_Id; Val : Boolean := True) is - begin - pragma Assert (False - or else NT (N).Nkind = N_Op_Divide - or else NT (N).Nkind = N_Op_Mod - or else NT (N).Nkind = N_Op_Multiply - or else NT (N).Nkind = N_Op_Rem); - Set_Flag14 (N, Val); - end Set_Treat_Fixed_As_Integer; - procedure Set_Triggering_Alternative (N : Node_Id; Val : Node_Id) is begin @@ -7133,238 +7123,6 @@ package body Sinfo is UI_From_Int (Int (S) - Int (Sloc (N)))); end Set_End_Location; - -------------- - -- Nkind_In -- - -------------- - - function Nkind_In - (T : Node_Kind; - V1 : Node_Kind; - V2 : Node_Kind) return Boolean - is - begin - return T = V1 or else - T = V2; - end Nkind_In; - - function Nkind_In - (T : Node_Kind; - V1 : Node_Kind; - V2 : Node_Kind; - V3 : Node_Kind) return Boolean - is - begin - return T = V1 or else - T = V2 or else - T = V3; - end Nkind_In; - - function Nkind_In - (T : Node_Kind; - V1 : Node_Kind; - V2 : Node_Kind; - V3 : Node_Kind; - V4 : Node_Kind) return Boolean - is - begin - return T = V1 or else - T = V2 or else - T = V3 or else - T = V4; - end Nkind_In; - - function Nkind_In - (T : Node_Kind; - V1 : Node_Kind; - V2 : Node_Kind; - V3 : Node_Kind; - V4 : Node_Kind; - V5 : Node_Kind) return Boolean - is - begin - return T = V1 or else - T = V2 or else - T = V3 or else - T = V4 or else - T = V5; - end Nkind_In; - - function Nkind_In - (T : Node_Kind; - V1 : Node_Kind; - V2 : Node_Kind; - V3 : Node_Kind; - V4 : Node_Kind; - V5 : Node_Kind; - V6 : Node_Kind) return Boolean - is - begin - return T = V1 or else - T = V2 or else - T = V3 or else - T = V4 or else - T = V5 or else - T = V6; - end Nkind_In; - - function Nkind_In - (T : Node_Kind; - V1 : Node_Kind; - V2 : Node_Kind; - V3 : Node_Kind; - V4 : Node_Kind; - V5 : Node_Kind; - V6 : Node_Kind; - V7 : Node_Kind) return Boolean - is - begin - return T = V1 or else - T = V2 or else - T = V3 or else - T = V4 or else - T = V5 or else - T = V6 or else - T = V7; - end Nkind_In; - - function Nkind_In - (T : Node_Kind; - V1 : Node_Kind; - V2 : Node_Kind; - V3 : Node_Kind; - V4 : Node_Kind; - V5 : Node_Kind; - V6 : Node_Kind; - V7 : Node_Kind; - V8 : Node_Kind) return Boolean - is - begin - return T = V1 or else - T = V2 or else - T = V3 or else - T = V4 or else - T = V5 or else - T = V6 or else - T = V7 or else - T = V8; - end Nkind_In; - - function Nkind_In - (T : Node_Kind; - V1 : Node_Kind; - V2 : Node_Kind; - V3 : Node_Kind; - V4 : Node_Kind; - V5 : Node_Kind; - V6 : Node_Kind; - V7 : Node_Kind; - V8 : Node_Kind; - V9 : Node_Kind) return Boolean - is - begin - return T = V1 or else - T = V2 or else - T = V3 or else - T = V4 or else - T = V5 or else - T = V6 or else - T = V7 or else - T = V8 or else - T = V9; - end Nkind_In; - - function Nkind_In - (T : Node_Kind; - V1 : Node_Kind; - V2 : Node_Kind; - V3 : Node_Kind; - V4 : Node_Kind; - V5 : Node_Kind; - V6 : Node_Kind; - V7 : Node_Kind; - V8 : Node_Kind; - V9 : Node_Kind; - V10 : Node_Kind) return Boolean - is - begin - return T = V1 or else - T = V2 or else - T = V3 or else - T = V4 or else - T = V5 or else - T = V6 or else - T = V7 or else - T = V8 or else - T = V9 or else - T = V10; - end Nkind_In; - - function Nkind_In - (T : Node_Kind; - V1 : Node_Kind; - V2 : Node_Kind; - V3 : Node_Kind; - V4 : Node_Kind; - V5 : Node_Kind; - V6 : Node_Kind; - V7 : Node_Kind; - V8 : Node_Kind; - V9 : Node_Kind; - V10 : Node_Kind; - V11 : Node_Kind) return Boolean - is - begin - return T = V1 or else - T = V2 or else - T = V3 or else - T = V4 or else - T = V5 or else - T = V6 or else - T = V7 or else - T = V8 or else - T = V9 or else - T = V10 or else - T = V11; - end Nkind_In; - - function Nkind_In - (T : Node_Kind; - V1 : Node_Kind; - V2 : Node_Kind; - V3 : Node_Kind; - V4 : Node_Kind; - V5 : Node_Kind; - V6 : Node_Kind; - V7 : Node_Kind; - V8 : Node_Kind; - V9 : Node_Kind; - V10 : Node_Kind; - V11 : Node_Kind; - V12 : Node_Kind; - V13 : Node_Kind; - V14 : Node_Kind; - V15 : Node_Kind; - V16 : Node_Kind) return Boolean - is - begin - return T = V1 or else - T = V2 or else - T = V3 or else - T = V4 or else - T = V5 or else - T = V6 or else - T = V7 or else - T = V8 or else - T = V9 or else - T = V10 or else - T = V11 or else - T = V12 or else - T = V13 or else - T = V14 or else - T = V15 or else - T = V16; - end Nkind_In; - -------------------------- -- Pragma_Name_Unmapped -- -------------------------- |