]> gcc.gnu.org Git - gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 15 Jul 2009 10:03:34 +0000 (12:03 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 15 Jul 2009 10:03:34 +0000 (12:03 +0200)
2009-07-15  Robert Dewar  <dewar@adacore.com>

* exp_ch7.adb, exp_util.adb, tbuild.adb, tbuild.ads, exp_ch4.adb,
exp_aggr.adb: Minor code reorganization (better calling sequence for
Make_Temporary).

2009-07-15  Thomas Quinot  <quinot@adacore.com>

* opt.ads: Minor comment edits

From-SVN: r149672

gcc/ada/ChangeLog
gcc/ada/exp_aggr.adb
gcc/ada/exp_ch4.adb
gcc/ada/exp_ch7.adb
gcc/ada/exp_util.adb
gcc/ada/opt.ads
gcc/ada/tbuild.adb
gcc/ada/tbuild.ads

index fa15e6c24fe345f94711d76a295c856bdafc4def..e4b6bf661bc2e39046ff29c070f314f615ceef7e 100644 (file)
@@ -1,3 +1,13 @@
+2009-07-15  Robert Dewar  <dewar@adacore.com>
+
+       * exp_ch7.adb, exp_util.adb, tbuild.adb, tbuild.ads, exp_ch4.adb,
+       exp_aggr.adb: Minor code reorganization (better calling sequence for
+       Make_Temporary).
+
+2009-07-15  Thomas Quinot  <quinot@adacore.com>
+
+       * opt.ads: Minor comment edits
+
 2009-07-15  Tristan Gingold  <gingold@adacore.com>
 
        * gcc-interface/Makefile.in: Special rule for seh_init.o no longer
index 694663802f87cde0e7a5d4f3cb77f235afcdaf40..dfb164b025320da5a4e2417c86cea429a82ac8f8 100644 (file)
@@ -2996,8 +2996,7 @@ package body Exp_Aggr is
                      --  Create a temporary array of the above subtype which
                      --  will be used to capture the aggregate assignments.
 
-                     TmpE : constant Entity_Id :=
-                              Make_Temporary (Loc, New_Internal_Name ('A'), N);
+                     TmpE : constant Entity_Id := Make_Temporary (Loc, 'A', N);
 
                      TmpD : constant Node_Id :=
                               Make_Object_Declaration (Loc,
@@ -3587,7 +3586,7 @@ package body Exp_Aggr is
          Rewrite (Parent (N), Make_Null_Statement (Loc));
 
       else
-         Temp := Make_Temporary (Loc, New_Internal_Name ('A'), N);
+         Temp := Make_Temporary (Loc, 'A', N);
 
          --  If the type inherits unknown discriminants, use the view with
          --  known discriminants if available.
@@ -5202,7 +5201,7 @@ package body Exp_Aggr is
 
       else
          Maybe_In_Place_OK := False;
-         Tmp := Make_Temporary (Loc, New_Internal_Name ('A'), N);
+         Tmp := Make_Temporary (Loc, 'A', N);
          Tmp_Decl :=
            Make_Object_Declaration
              (Loc,
index f8f2caa79b38dfb52da6f5cc5c601a3017459ae4..8343ea19b70bc4b6f74942f7a202ee79d00505c0 100644 (file)
@@ -4043,7 +4043,7 @@ package body Exp_Ch4 is
       --  and replace the conditional expresion by a reference to Cnn.all ???
 
       if Present (Then_Actions (N)) or else Present (Else_Actions (N)) then
-         Cnn := Make_Temporary (Loc, New_Internal_Name ('C'), N);
+         Cnn := Make_Temporary (Loc, 'C', N);
 
          New_If :=
            Make_Implicit_If_Statement (N,
index 9dd585742142a5b96624d911d242545eeb45aab5..a8a32fb5114b477e299feb03c40b24c4ecad1852 100644 (file)
@@ -3551,9 +3551,8 @@ package body Exp_Ch7 is
 
    procedure Wrap_Transient_Expression (N : Node_Id) is
       Loc  : constant Source_Ptr := Sloc (N);
-      E    : constant Entity_Id :=
-               Make_Temporary (Loc, New_Internal_Name ('E'), N);
-      Etyp : constant Entity_Id := Etype (N);
+      E    : constant Entity_Id  := Make_Temporary (Loc, 'E', N);
+      Etyp : constant Entity_Id  := Etype (N);
 
    begin
       Insert_Actions (N, New_List (
index bd7f90cbe39fe7d527abd2226573a7975b90bdaf..b396ee5dac74170d519f3822d8cd2560c6acfe99 100644 (file)
@@ -4588,7 +4588,7 @@ package body Exp_Util is
                    or else Nkind (Exp) in N_Op
                    or else (not Name_Req and then Is_Volatile_Reference (Exp)))
       then
-         Def_Id := Make_Temporary (Loc, New_Internal_Name ('R'), Exp);
+         Def_Id := Make_Temporary (Loc, 'R', Exp);
          Set_Etype (Def_Id, Exp_Type);
          Res := New_Reference_To (Def_Id, Loc);
 
@@ -4606,7 +4606,7 @@ package body Exp_Util is
       --  the pointer, and then do an explicit dereference on the result.
 
       elsif Nkind (Exp) = N_Explicit_Dereference then
-         Def_Id := Make_Temporary (Loc, New_Internal_Name ('R'), Exp);
+         Def_Id := Make_Temporary (Loc, 'R', Exp);
          Res :=
            Make_Explicit_Dereference (Loc, New_Reference_To (Def_Id, Loc));
 
@@ -4650,7 +4650,7 @@ package body Exp_Util is
             --  Use a renaming to capture the expression, rather than create
             --  a controlled temporary.
 
-            Def_Id := Make_Temporary (Loc, New_Internal_Name ('R'), Exp);
+            Def_Id := Make_Temporary (Loc, 'R', Exp);
             Res := New_Reference_To (Def_Id, Loc);
 
             Insert_Action (Exp,
@@ -4660,7 +4660,7 @@ package body Exp_Util is
                 Name                => Relocate_Node (Exp)));
 
          else
-            Def_Id := Make_Temporary (Loc, New_Internal_Name ('R'), Exp);
+            Def_Id := Make_Temporary (Loc, 'R', Exp);
             Set_Etype (Def_Id, Exp_Type);
             Res := New_Reference_To (Def_Id, Loc);
 
@@ -4683,7 +4683,7 @@ package body Exp_Util is
         and then Nkind (Exp) /= N_Function_Call
         and then (Name_Req or else not Is_Volatile_Reference (Exp))
       then
-         Def_Id := Make_Temporary (Loc, New_Internal_Name ('R'), Exp);
+         Def_Id := Make_Temporary (Loc, 'R', Exp);
 
          if Nkind (Exp) = N_Selected_Component
            and then Nkind (Prefix (Exp)) = N_Function_Call
@@ -4750,8 +4750,7 @@ package body Exp_Util is
            and then Ada_Version >= Ada_05
          then
             declare
-               Obj  : constant Entity_Id :=
-                        Make_Temporary (Loc, New_Internal_Name ('F'), Exp);
+               Obj  : constant Entity_Id := Make_Temporary (Loc, 'F', Exp);
                Decl : Node_Id;
 
             begin
@@ -4781,7 +4780,7 @@ package body Exp_Util is
          E := Exp;
          Insert_Action (Exp, Ptr_Typ_Decl);
 
-         Def_Id := Make_Temporary (Loc, New_Internal_Name ('R'), Exp);
+         Def_Id := Make_Temporary (Loc, 'R', Exp);
          Set_Etype (Def_Id, Exp_Type);
 
          Res :=
index ca5d7fb27555f78226e2b889065faa7533864e25..d184da9aa5483c3dcac293323e184e9c2296fa3e 100644 (file)
@@ -554,7 +554,7 @@ package Opt is
    --  GNAT
    --  True when switch -gnateS is used. When True, Source Coverage Obligation
    --  (SCO) information is generated and output in the ALI file. See unit
-   --  Sem_SCO for full details.
+   --  Par_SCO for full details.
 
    Generating_Code : Boolean := False;
    --  GNAT
index 9049827bf81e5e3d3e6c05c0f23361d35f3e2634..7273fde67036430cc3a98a3a2b417276a3ddbb3f 100644 (file)
@@ -442,10 +442,12 @@ package body Tbuild is
 
    function Make_Temporary
      (Loc          : Source_Ptr;
-      Id           : Name_Id;
+      Id           : Character;
       Related_Node : Node_Id := Empty) return Node_Id
    is
-      Temp : constant Node_Id := Make_Defining_Identifier (Loc, Id);
+      Temp : constant Node_Id :=
+               Make_Defining_Identifier (Loc,
+                 Chars => New_Internal_Name (Id));
    begin
       Set_Related_Expression (Temp, Related_Node);
       return Temp;
index d02f7ac8ecdedbac8d9091ed33fa3591793e2fbf..261776df78f96b5cbb67ac3bfb7345581965f306 100644 (file)
@@ -177,11 +177,12 @@ package Tbuild is
 
    function Make_Temporary
      (Loc          : Source_Ptr;
-      Id           : Name_Id;
+      Id           : Character;
       Related_Node : Node_Id := Empty) return Node_Id;
    --  Create a defining identifier to capture the value of an expression
    --  or aggregate, and link it to the expression that it replaces, in
-   --  order to provide better CodePeer reports.
+   --  order to provide better CodePeer reports. The defining identifier
+   --  name is obtained by Make_Internal_Name (Id).
 
    function Make_Unsuppress_Block
      (Loc   : Source_Ptr;
This page took 0.105543 seconds and 5 git commands to generate.