]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 30 Aug 2011 14:06:25 +0000 (16:06 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 30 Aug 2011 14:06:25 +0000 (16:06 +0200)
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.

From-SVN: r178313

21 files changed:
gcc/ada/ChangeLog
gcc/ada/exp_ch4.adb
gcc/ada/exp_ch9.adb
gcc/ada/exp_disp.adb
gcc/ada/opt.adb
gcc/ada/opt.ads
gcc/ada/s-parame-hpux.ads
gcc/ada/s-parame-vms-alpha.ads
gcc/ada/s-parame-vms-ia64.ads
gcc/ada/s-parame-vxworks.ads
gcc/ada/s-parame.ads
gcc/ada/s-secsta.adb
gcc/ada/s-secsta.ads
gcc/ada/s-soflin.adb
gcc/ada/s-tarest.adb
gcc/ada/s-tassta.adb
gcc/ada/sem_ch10.adb
gcc/ada/sem_ch12.adb
gcc/ada/sem_ch6.adb
gcc/ada/sem_ch9.adb
gcc/ada/sem_res.adb

index 27462db9f4060579f771a378d7274882894dbd49..47a989f6698652d6dcb3916444ec56f6915e1049 100644 (file)
@@ -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
index a36c0afd7e687ac6ce5de33f705b724b418808b0..e2aff22052943bfc71673315be71e64f308b5507 100644 (file)
@@ -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,
index db76edddf792551b9a940d1e82cd66be60f8ee71..7620236b82fdf1c07ea497b98d2862fc1fb6ce9b 100644 (file)
@@ -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.
 
index 46db2dc192a9df0a2fec6185976bc156f945c804..5f9cd8326f1f0262f59392e94144d7d43674ce90 100644 (file)
@@ -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
index ed76923d5f04c68f3d93756d6499ff1bedbd53d8..ce7237a55c7bd15e4cdd464a86fd13e0ea9d2844 100644 (file)
@@ -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 --
    ----------------------------------
index 96c868a999221c79456400965a7c0efc2092ddd7..3bc4ad9a5317a98a590acc4fd2f2cf1fd69f1a58 100644 (file)
@@ -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 --
    -----------------------
index da771d90c108cfffbfbdda6e106765679457781a..b8511162fff7c7dfc58ffba94dc03143ef105b34 100644 (file)
@@ -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;
index 7799dc1e8b8f5645565cfd4d82af1977a61d9ecc..359e694d4c500bfff0cdd444ffe5bf6d0f78db1c 100644 (file)
@@ -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;
index 8612e4283c171c4fa463bcee1ccfb38d958ec3b0..2726f34b2c4fdd9cce0bdff50d0b2d7c1c0ba0f2 100644 (file)
@@ -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;
index 6e959c84ef246f522de34f35a788797579d5fca2..748e7d81b39cab22382adb1e5ff04cb311e5312a 100644 (file)
@@ -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;
index 01e52b2e34f0f8dcf68d01815facd1e849514c04..e4317fafcf6b29c6f6cbf4a56a63e7a6778a3fde 100644 (file)
@@ -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;
index 16e9fa0c9fb6b49058c912f5c1dd72b953fee695..1a4aa788c411c162152a2c9595d576f84329b7bc 100644 (file)
@@ -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
index 7e6d11d51fbb5f820d702e48082cc31a1d3b8657..d2da2bcffb16a16fdb243e0efd9dba6ec556700c 100644 (file)
@@ -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
index 27f6e54a5752b497db0bc7c07de13dd54584b93e..f12ed9a329ae4d3e4f3c3d24cb7cc02c601c6b6e 100644 (file)
@@ -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
index 5c83412435fa6f82f72933374deecb02a2e41ad0..8375b73f64dcd0176121714214f6dae14ae4a314 100644 (file)
@@ -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;
index 61f0c16c63e70fe2e0482dc3e14841e3ba4df1ca..be295eb858237bee2715c11e2e2a258d25a23ae2 100644 (file)
@@ -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);
 
index ce7c9b360e0c480152070a2b5d82382efd8d96ea..063da58f6490ba04ee09286a624845cef23a9065 100644 (file)
@@ -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 =>
index b9c8ab1598135b85b8677e4c09c8dd56f253442f..d48dcae87fe0d8748390a61315f9c6d938754e3f 100644 (file)
@@ -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
index 9fe7fdfa678eb160851ec852c9641bc7934db321..f1cb60e2d310ae22ffaf82c87e98519f792889e2 100644 (file)
@@ -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));
index 4757560c59185ba6425eb57c0147ff4d580bb031..86a8fe6f48313093c026626b749fd3e99dd22158 100644 (file)
@@ -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);
index 3844ff713f5866d70cde61899db21da2107fafec..bf3814c7caf71104f9ec0c170cb26153a7938c6a 100644 (file)
@@ -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