diff options
-rw-r--r-- | gcc/ada/ChangeLog | 17 | ||||
-rw-r--r-- | gcc/ada/exp_ch4.adb | 12 | ||||
-rw-r--r-- | gcc/ada/exp_ch9.adb | 99 | ||||
-rw-r--r-- | gcc/ada/exp_disp.adb | 6 | ||||
-rw-r--r-- | gcc/ada/opt.adb | 9 | ||||
-rw-r--r-- | gcc/ada/opt.ads | 8 | ||||
-rw-r--r-- | gcc/ada/s-parame-hpux.ads | 8 | ||||
-rw-r--r-- | gcc/ada/s-parame-vms-alpha.ads | 8 | ||||
-rw-r--r-- | gcc/ada/s-parame-vms-ia64.ads | 8 | ||||
-rw-r--r-- | gcc/ada/s-parame-vxworks.ads | 8 | ||||
-rw-r--r-- | gcc/ada/s-parame.ads | 8 | ||||
-rw-r--r-- | gcc/ada/s-secsta.adb | 4 | ||||
-rw-r--r-- | gcc/ada/s-secsta.ads | 14 | ||||
-rw-r--r-- | gcc/ada/s-soflin.adb | 2 | ||||
-rw-r--r-- | gcc/ada/s-tarest.adb | 4 | ||||
-rw-r--r-- | gcc/ada/s-tassta.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_ch10.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_ch12.adb | 3 | ||||
-rw-r--r-- | gcc/ada/sem_ch6.adb | 11 | ||||
-rw-r--r-- | gcc/ada/sem_ch9.adb | 14 | ||||
-rw-r--r-- | gcc/ada/sem_res.adb | 17 |
21 files changed, 88 insertions, 176 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 27462db9f40..47a989f6698 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,20 @@ +2011-08-30 Yannick Moy <moy@adacore.com> + + * opt.adb, opt.ads (Full_Expander_Active): New function defines a + common shorthand for (Expander_Active and not ALFA_Mode) that can be + used for testing full expansion, that is active expansion not in the + reduced mode for Alfa + * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb, + sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead + of the verbose (Expander_Active and not ALFA_Mode) + +2011-08-30 Tristan Gingold <gingold@adacore.com> + + * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb, + s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb, + s-secsta.ads, s-parame.ads, s-parame-vxworks.ads: Renames Ratio to + Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage. + 2011-08-30 Gary Dismukes <dismukes@adacore.com> * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index a36c0afd7e6..e2aff220529 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -7258,10 +7258,9 @@ package body Exp_Ch4 is end; end if; - -- Only array types need any other processing. In formal verification - -- mode, no other processing is done. + -- Only array types need any other processing - if not Is_Array_Type (Typ) or else ALFA_Mode then + if not Is_Array_Type (Typ) then return; end if; @@ -7717,13 +7716,6 @@ package body Exp_Ch4 is Test : Node_Id; begin - -- Do not expand quantified expressions in ALFA mode - -- why not??? - - if ALFA_Mode then - return; - end if; - Decl := Make_Object_Declaration (Loc, Defining_Identifier => Tnn, diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index db76edddf79..7620236b82f 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -4904,9 +4904,7 @@ package body Exp_Ch9 is Ldecl2 : Node_Id; begin - if Expander_Active - and then not ALFA_Mode - then + if Full_Expander_Active then -- If we have no handled statement sequence, we may need to build -- a dummy sequence consisting of a null statement. This can be -- skipped if the trivial accept optimization is permitted. @@ -5227,9 +5225,7 @@ package body Exp_Ch9 is -- barrier just as a protected function, and discard the protected -- version of it because it is never called. - if Expander_Active - and then not ALFA_Mode - then + if Full_Expander_Active then B_F := Build_Barrier_Function (N, Ent, Prot); Func := Barrier_Function (Ent); Set_Corresponding_Spec (B_F, Func); @@ -5267,8 +5263,7 @@ package body Exp_Ch9 is -- condition does not reference any of the generated renamings -- within the function. - if Expander_Active - and then not ALFA_Mode + if Full_Expander_Active and then Scope (Entity (Cond)) /= Func then Set_Declarations (B_F, Empty_List); @@ -5320,12 +5315,6 @@ package body Exp_Ch9 is Tasknm : Node_Id; begin - -- Do not expand tasking constructs in formal verification mode - - if ALFA_Mode then - return; - end if; - Aggr := Make_Aggregate (Loc, Component_Associations => New_List); Count := 0; @@ -5457,12 +5446,6 @@ package body Exp_Ch9 is -- Start of processing for Expand_N_Accept_Statement begin - -- Do not expand tasking constructs in formal verification mode - - if ALFA_Mode then - return; - end if; - -- If accept statement is not part of a list, then its parent must be -- an accept alternative, and, as described above, we do not do any -- expansion for such accept statements at this level. @@ -5913,12 +5896,6 @@ package body Exp_Ch9 is T : Entity_Id; -- Additional status flag begin - -- Do not expand tasking constructs in formal verification mode - - if ALFA_Mode then - return; - end if; - Process_Statements_For_Controlled_Objects (Trig); Process_Statements_For_Controlled_Objects (Abrt); @@ -6868,12 +6845,6 @@ package body Exp_Ch9 is S : Entity_Id; -- Primitive operation slot begin - -- Do not expand tasking constructs in formal verification mode - - if ALFA_Mode then - return; - end if; - Process_Statements_For_Controlled_Objects (N); if Ada_Version >= Ada_2005 @@ -7190,12 +7161,6 @@ package body Exp_Ch9 is procedure Expand_N_Delay_Relative_Statement (N : Node_Id) is Loc : constant Source_Ptr := Sloc (N); begin - -- Do not expand tasking constructs in formal verification mode - - if ALFA_Mode then - return; - end if; - Rewrite (N, Make_Procedure_Call_Statement (Loc, Name => New_Reference_To (RTE (RO_CA_Delay_For), Loc), @@ -7215,12 +7180,6 @@ package body Exp_Ch9 is Typ : Entity_Id; begin - -- Do not expand tasking constructs in formal verification mode - - if ALFA_Mode then - return; - end if; - if Is_RTE (Base_Type (Etype (Expression (N))), RO_CA_Time) then Typ := RTE (RO_CA_Delay_Until); else @@ -7241,12 +7200,6 @@ package body Exp_Ch9 is procedure Expand_N_Entry_Body (N : Node_Id) is begin - -- Do not expand tasking constructs in formal verification mode - - if ALFA_Mode then - return; - end if; - -- Associate discriminals with the next protected operation body to be -- expanded. @@ -7268,12 +7221,6 @@ package body Exp_Ch9 is Index : Node_Id; begin - -- Do not expand tasking constructs in formal verification mode - - if ALFA_Mode then - return; - end if; - if No_Run_Time_Mode then Error_Msg_CRT ("entry call", N); return; @@ -7330,12 +7277,6 @@ package body Exp_Ch9 is Acc_Ent : Entity_Id; begin - -- Do not expand tasking constructs in formal verification mode - - if ALFA_Mode then - return; - end if; - Formal := First_Formal (Entry_Ent); Last_Decl := N; @@ -7604,12 +7545,6 @@ package body Exp_Ch9 is -- Start of processing for Expand_N_Protected_Body begin - -- Do not expand tasking constructs in formal verification mode - - if ALFA_Mode then - return; - end if; - if No_Run_Time_Mode then Error_Msg_CRT ("protected body", N); return; @@ -9162,12 +9097,6 @@ package body Exp_Ch9 is -- Start of processing for Expand_N_Requeue_Statement begin - -- Do not expand tasking constructs in formal verification mode - - if ALFA_Mode then - return; - end if; - -- Extract the components of the entry call Extract_Entry (N, Concval, Ename, Index); @@ -9754,12 +9683,6 @@ package body Exp_Ch9 is -- Start of processing for Expand_N_Selective_Accept begin - -- Do not expand tasking constructs in formal verification mode - - if ALFA_Mode then - return; - end if; - Process_Statements_For_Controlled_Objects (N); -- First insert some declarations before the select. The first is: @@ -10390,12 +10313,6 @@ package body Exp_Ch9 is -- Used to determine the proper location of wrapper body insertions begin - -- Do not expand tasking constructs in formal verification mode - - if ALFA_Mode then - return; - end if; - -- Add renaming declarations for discriminals and a declaration for the -- entry family index (if applicable). @@ -11142,12 +11059,6 @@ package body Exp_Ch9 is S : Entity_Id; -- Primitive operation slot begin - -- Do not expand tasking constructs in formal verification mode - - if ALFA_Mode then - return; - end if; - -- Under the Ravenscar profile, timed entry calls are excluded. An error -- was already reported on spec, so do not attempt to expand the call. @@ -11592,9 +11503,7 @@ package body Exp_Ch9 is Error_Msg_CRT ("protected body", N); return; - elsif Expander_Active - and then not ALFA_Mode - then + elsif Full_Expander_Active then -- Associate discriminals with the first subprogram or entry body to -- be expanded. diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index 46db2dc192a..5f9cd8326f1 100644 --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -697,11 +697,7 @@ package body Exp_Disp is -- Expand_Dispatching_Call is called directly from the semantics, -- so we only proceed if the expander is active. - if not Expander_Active - - -- And this expansion is not required in special ALFA mode expansion - - or else ALFA_Mode + if not Full_Expander_Active -- And there is no need to expand the call if we are compiling under -- restriction No_Dispatching_Calls; the semantic analyzer has diff --git a/gcc/ada/opt.adb b/gcc/ada/opt.adb index ed76923d5f0..ce7237a55c7 100644 --- a/gcc/ada/opt.adb +++ b/gcc/ada/opt.adb @@ -38,6 +38,15 @@ package body Opt is SU : constant := Storage_Unit; -- Shorthand for System.Storage_Unit + -------------------------- + -- Full_Expander_Active -- + -------------------------- + + function Full_Expander_Active return Boolean is + begin + return Expander_Active and not ALFA_Mode; + end Full_Expander_Active; + ---------------------------------- -- Register_Opt_Config_Switches -- ---------------------------------- diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index 96c868a9992..3bc4ad9a531 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -1832,6 +1832,14 @@ package Opt is -- behavior can be disabled using switch -gnatd.t which will set this flag -- to False and revert to the previous dynamic behavior. + function Full_Expander_Active return Boolean; + -- Returns the value of (Expander_Active and not ALFA_Mode). This "flag" + -- indicates that expansion is fully active, that is, not in the reduced + -- mode for Alfa (True) or that expansion is either deactivated, or active + -- in the reduced mode for Alfa (False). For more information on full + -- expansion, see package Expander. For more information on reduced + -- Alfa expansion, see package Exp_Alfa. + ----------------------- -- Tree I/O Routines -- ----------------------- diff --git a/gcc/ada/s-parame-hpux.ads b/gcc/ada/s-parame-hpux.ads index da771d90c10..b8511162fff 100644 --- a/gcc/ada/s-parame-hpux.ads +++ b/gcc/ada/s-parame-hpux.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2011, 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- -- @@ -62,7 +62,7 @@ package System.Parameters is Unspecified_Size : constant Size_Type := Size_Type'First; -- Value used to indicate that no size type is set - subtype Ratio is Size_Type range -1 .. 100; + subtype Percentage is Size_Type range -1 .. 100; Dynamic : constant Size_Type := -1; -- The secondary stack ratio is a constant between 0 and 100 which -- determines the percentage of the allocated task stack that is @@ -70,10 +70,10 @@ package System.Parameters is -- The special value of minus one indicates that the secondary -- stack is to be allocated from the heap instead. - Sec_Stack_Ratio : constant Ratio := Dynamic; + Sec_Stack_Percentage : constant Percentage := Dynamic; -- This constant defines the handling of the secondary stack - Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Ratio = Dynamic; + Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Percentage = Dynamic; -- Convenient Boolean for testing for dynamic secondary stack function Default_Stack_Size return Size_Type; diff --git a/gcc/ada/s-parame-vms-alpha.ads b/gcc/ada/s-parame-vms-alpha.ads index 7799dc1e8b8..359e694d4c5 100644 --- a/gcc/ada/s-parame-vms-alpha.ads +++ b/gcc/ada/s-parame-vms-alpha.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2011, 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- -- @@ -62,7 +62,7 @@ package System.Parameters is Unspecified_Size : constant Size_Type := Size_Type'First; -- Value used to indicate that no size type is set - subtype Ratio is Size_Type range -1 .. 100; + subtype Percentage is Size_Type range -1 .. 100; Dynamic : constant Size_Type := -1; -- The secondary stack ratio is a constant between 0 and 100 which -- determines the percentage of the allocated task stack that is @@ -70,10 +70,10 @@ package System.Parameters is -- The special value of minus one indicates that the secondary -- stack is to be allocated from the heap instead. - Sec_Stack_Ratio : constant Ratio := Dynamic; + Sec_Stack_Percentage : constant Percentage := Dynamic; -- This constant defines the handling of the secondary stack - Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Ratio = Dynamic; + Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Percentage = Dynamic; -- Convenient Boolean for testing for dynamic secondary stack function Default_Stack_Size return Size_Type; diff --git a/gcc/ada/s-parame-vms-ia64.ads b/gcc/ada/s-parame-vms-ia64.ads index 8612e4283c1..2726f34b2c4 100644 --- a/gcc/ada/s-parame-vms-ia64.ads +++ b/gcc/ada/s-parame-vms-ia64.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2011, 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- -- @@ -62,7 +62,7 @@ package System.Parameters is Unspecified_Size : constant Size_Type := Size_Type'First; -- Value used to indicate that no size type is set - subtype Ratio is Size_Type range -1 .. 100; + subtype Percentage is Size_Type range -1 .. 100; Dynamic : constant Size_Type := -1; -- The secondary stack ratio is a constant between 0 and 100 which -- determines the percentage of the allocated task stack that is @@ -70,10 +70,10 @@ package System.Parameters is -- The special value of minus one indicates that the secondary -- stack is to be allocated from the heap instead. - Sec_Stack_Ratio : constant Ratio := Dynamic; + Sec_Stack_Percentage : constant Percentage := Dynamic; -- This constant defines the handling of the secondary stack - Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Ratio = Dynamic; + Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Percentage = Dynamic; -- Convenient Boolean for testing for dynamic secondary stack function Default_Stack_Size return Size_Type; diff --git a/gcc/ada/s-parame-vxworks.ads b/gcc/ada/s-parame-vxworks.ads index 6e959c84ef2..748e7d81b39 100644 --- a/gcc/ada/s-parame-vxworks.ads +++ b/gcc/ada/s-parame-vxworks.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2011, 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- -- @@ -62,7 +62,7 @@ package System.Parameters is Unspecified_Size : constant Size_Type := Size_Type'First; -- Value used to indicate that no size type is set - subtype Ratio is Size_Type range -1 .. 100; + subtype Percentage is Size_Type range -1 .. 100; Dynamic : constant Size_Type := -1; -- The secondary stack ratio is a constant between 0 and 100 which -- determines the percentage of the allocated task stack that is @@ -70,10 +70,10 @@ package System.Parameters is -- The special value of minus one indicates that the secondary -- stack is to be allocated from the heap instead. - Sec_Stack_Ratio : constant Ratio := Dynamic; + Sec_Stack_Percentage : constant Percentage := Dynamic; -- This constant defines the handling of the secondary stack - Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Ratio = Dynamic; + Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Percentage = Dynamic; -- Convenient Boolean for testing for dynamic secondary stack function Default_Stack_Size return Size_Type; diff --git a/gcc/ada/s-parame.ads b/gcc/ada/s-parame.ads index 01e52b2e34f..e4317fafcf6 100644 --- a/gcc/ada/s-parame.ads +++ b/gcc/ada/s-parame.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2011, 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- -- @@ -64,7 +64,7 @@ package System.Parameters is Unspecified_Size : constant Size_Type := Size_Type'First; -- Value used to indicate that no size type is set - subtype Ratio is Size_Type range -1 .. 100; + subtype Percentage is Size_Type range -1 .. 100; Dynamic : constant Size_Type := -1; -- The secondary stack ratio is a constant between 0 and 100 which -- determines the percentage of the allocated task stack that is @@ -72,10 +72,10 @@ package System.Parameters is -- The special value of minus one indicates that the secondary -- stack is to be allocated from the heap instead. - Sec_Stack_Ratio : constant Ratio := Dynamic; + Sec_Stack_Percentage : constant Percentage := Dynamic; -- This constant defines the handling of the secondary stack - Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Ratio = Dynamic; + Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Percentage = Dynamic; -- Convenient Boolean for testing for dynamic secondary stack function Default_Stack_Size return Size_Type; diff --git a/gcc/ada/s-secsta.adb b/gcc/ada/s-secsta.adb index 16e9fa0c9fb..1a4aa788c41 100644 --- a/gcc/ada/s-secsta.adb +++ b/gcc/ada/s-secsta.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2011, 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- -- @@ -44,7 +44,7 @@ package body System.Secondary_Stack is use type System.Parameters.Size_Type; SS_Ratio_Dynamic : constant Boolean := - Parameters.Sec_Stack_Ratio = Parameters.Dynamic; + Parameters.Sec_Stack_Percentage = Parameters.Dynamic; -- There are two entirely different implementations of the secondary -- stack mechanism in this unit, and this Boolean is used to select -- between them (at compile time, so the generated code will contain diff --git a/gcc/ada/s-secsta.ads b/gcc/ada/s-secsta.ads index 7e6d11d51fb..d2da2bcffb1 100644 --- a/gcc/ada/s-secsta.ads +++ b/gcc/ada/s-secsta.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2011, 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- -- @@ -47,17 +47,17 @@ package System.Secondary_Stack is Size : Natural := Default_Secondary_Stack_Size); -- Initialize the secondary stack with a main stack of the given Size. -- - -- If System.Parameters.Sec_Stack_Ratio equals Dynamic, Stk is really an - -- OUT parameter that will be allocated on the heap. Then all further + -- If System.Parameters.Sec_Stack_Percentage equals Dynamic, Stk is really + -- an OUT parameter that will be allocated on the heap. Then all further -- allocations which do not overflow the main stack will not generate -- dynamic (de)allocation calls. If the main Stack overflows, a new -- chuck of at least the same size will be allocated and linked to the -- previous chunk. -- - -- Otherwise (Sec_Stack_Ratio between 0 and 100), Stk is an IN parameter - -- that is already pointing to a Stack_Id. The secondary stack in this case - -- is fixed, and any attempt to allocate more than the initial size will - -- result in a Storage_Error being raised. + -- Otherwise (Sec_Stack_Percentage between 0 and 100), Stk is an IN + -- parameter that is already pointing to a Stack_Id. The secondary stack + -- in this case is fixed, and any attempt to allocate more than the initial + -- size will result in a Storage_Error being raised. -- -- Note: the reason that Stk is passed is that SS_Init is called before -- the proper interface is established to obtain the address of the diff --git a/gcc/ada/s-soflin.adb b/gcc/ada/s-soflin.adb index 27f6e54a575..f12ed9a329a 100644 --- a/gcc/ada/s-soflin.adb +++ b/gcc/ada/s-soflin.adb @@ -123,7 +123,7 @@ package body System.Soft_Links is use type Parameters.Size_Type; SS_Ratio_Dynamic : constant Boolean := - Parameters.Sec_Stack_Ratio = Parameters.Dynamic; + Parameters.Sec_Stack_Percentage = Parameters.Dynamic; begin if SS_Ratio_Dynamic then diff --git a/gcc/ada/s-tarest.adb b/gcc/ada/s-tarest.adb index 5c83412435f..8375b73f64d 100644 --- a/gcc/ada/s-tarest.adb +++ b/gcc/ada/s-tarest.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2011, Free Software Foundation, Inc. -- -- -- -- GNARL 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- -- @@ -184,7 +184,7 @@ package body System.Tasking.Restricted.Stages is Secondary_Stack : aliased SSE.Storage_Array (1 .. Self_ID.Common.Compiler_Data.Pri_Stack_Info.Size * - SSE.Storage_Offset (Parameters.Sec_Stack_Ratio) / 100); + SSE.Storage_Offset (Parameters.Sec_Stack_Percentage) / 100); pragma Warnings (Off); Secondary_Stack_Address : System.Address := Secondary_Stack'Address; diff --git a/gcc/ada/s-tassta.adb b/gcc/ada/s-tassta.adb index 61f0c16c63e..be295eb8582 100644 --- a/gcc/ada/s-tassta.adb +++ b/gcc/ada/s-tassta.adb @@ -1023,7 +1023,7 @@ package body System.Tasking.Stages is Secondary_Stack_Size : constant SSE.Storage_Offset := Self_ID.Common.Compiler_Data.Pri_Stack_Info.Size * - SSE.Storage_Offset (Parameters.Sec_Stack_Ratio) / 100; + SSE.Storage_Offset (Parameters.Sec_Stack_Percentage) / 100; Secondary_Stack : aliased SSE.Storage_Array (1 .. Secondary_Stack_Size); diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb index ce7c9b360e0..063da58f649 100644 --- a/gcc/ada/sem_ch10.adb +++ b/gcc/ada/sem_ch10.adb @@ -2289,7 +2289,7 @@ package body Sem_Ch10 is -- expansion is active, because the context may be generic and the -- flag not defined yet. - if Expander_Active then + if Full_Expander_Active then Insert_After (N, Make_Assignment_Statement (Loc, Name => diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index b9c8ab15981..d48dcae87fe 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -4050,11 +4050,10 @@ package body Sem_Ch12 is if (Is_In_Main_Unit (N) or else Is_Inlined (Subp) or else Is_Inlined (Alias (Subp))) - and then not ALFA_Mode and then (Operating_Mode = Generate_Code or else (Operating_Mode = Check_Semantics and then ASIS_Mode)) - and then (Expander_Active or else ASIS_Mode) + and then (Full_Expander_Active or else ASIS_Mode) and then not ABE_Is_Certain (N) and then not Is_Eliminated (Subp) then diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 9fe7fdfa678..f1cb60e2d31 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -2709,8 +2709,7 @@ package body Sem_Ch6 is -- when the Expander is active because Install_Private_Data_Declarations -- references entities which were created during regular expansion. - if Expander_Active - and then not ALFA_Mode + if Full_Expander_Active and then Comes_From_Source (N) and then Present (Prot_Typ) and then Present (Spec_Id) @@ -9787,10 +9786,9 @@ package body Sem_Ch6 is -- If expansion is active, the formal is replaced by a local -- variable that renames the corresponding entry of the -- parameter block, and it is this local variable that may - -- require an actual subtype. In ALFA mode, expansion of accept - -- statements is skipped. + -- require an actual subtype. - if Expander_Active and not ALFA_Mode then + if Full_Expander_Active then Decl := Build_Actual_Subtype (T, Renamed_Object (Formal)); else Decl := Build_Actual_Subtype (T, Formal); @@ -9829,8 +9827,7 @@ package body Sem_Ch6 is end if; if Nkind (N) = N_Accept_Statement - and then Expander_Active - and then not ALFA_Mode + and then Full_Expander_Active then Set_Actual_Subtype (Renamed_Object (Formal), Defining_Identifier (Decl)); diff --git a/gcc/ada/sem_ch9.adb b/gcc/ada/sem_ch9.adb index 4757560c591..86a8fe6f483 100644 --- a/gcc/ada/sem_ch9.adb +++ b/gcc/ada/sem_ch9.adb @@ -727,8 +727,7 @@ package body Sem_Ch9 is -- for the discriminals and privals and finally a declaration for the -- entry family index (if applicable). - if Expander_Active - and then not ALFA_Mode + if Full_Expander_Active and then Is_Protected_Type (P_Type) then Install_Private_Data_Declarations @@ -1283,11 +1282,7 @@ package body Sem_Ch9 is -- Also skip if expander is not active - and then Expander_Active - - -- Also skip if in ALFA mode, this expansion is not needed - - and then not ALFA_Mode + and then Full_Expander_Active then Expand_N_Protected_Type_Declaration (N); Process_Full_View (N, T, Def_Id); @@ -2094,10 +2089,7 @@ package body Sem_Ch9 is -- Also skip if expander is not active - and then Expander_Active - - -- Or if in ALFA mode, this expansion is not needed - and then not ALFA_Mode + and then Full_Expander_Active then Expand_N_Task_Type_Declaration (N); Process_Full_View (N, T, Def_Id); diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 3844ff713f5..bf3814c7caf 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -3442,8 +3442,7 @@ package body Sem_Res is elsif Nkind (A) = N_Function_Call and then Is_Limited_Record (Etype (F)) and then not Is_Constrained (Etype (F)) - and then Expander_Active - and then not ALFA_Mode + and then Full_Expander_Active and then (Is_Controlled (Etype (F)) or else Has_Task (Etype (F))) then Establish_Transient_Scope (A, False); @@ -3458,8 +3457,7 @@ package body Sem_Res is elsif Nkind (A) = N_Op_Concat and then Nkind (N) = N_Procedure_Call_Statement - and then Expander_Active - and then not ALFA_Mode + and then Full_Expander_Active and then not (Is_Intrinsic_Subprogram (Nam) and then Chars (Nam) = Name_Asm) @@ -3522,8 +3520,7 @@ package body Sem_Res is -- be removed in the expansion of the wrapped construct. if (Is_Controlled (DDT) or else Has_Task (DDT)) - and then Expander_Active - and then not ALFA_Mode + and then Full_Expander_Active then Establish_Transient_Scope (A, False); end if; @@ -5494,8 +5491,7 @@ package body Sem_Res is then null; - elsif Expander_Active - and then not ALFA_Mode + elsif Full_Expander_Active and then Is_Type (Etype (Nam)) and then Requires_Transient_Scope (Etype (Nam)) and then @@ -6616,8 +6612,7 @@ package body Sem_Res is -- Protected functions can return on the secondary stack, in which -- case we must trigger the transient scope mechanism. - elsif Expander_Active - and then not ALFA_Mode + elsif Full_Expander_Active and then Requires_Transient_Scope (Etype (Nam)) then Establish_Transient_Scope (N, Sec_Stack => True); @@ -8088,8 +8083,6 @@ package body Sem_Res is procedure Resolve_Quantified_Expression (N : Node_Id; Typ : Entity_Id) is begin - -- Normal mode (not ALFA) - if not ALFA_Mode then -- The loop structure is already resolved during its analysis, only |