[Ada] Remove unused node N_Subprogram_Info

Arnaud Charlet charlet@adacore.com
Thu Jan 23 16:36:00 GMT 2014


This is an internal change only, does not affect functionality,
so no test needed.

Tested on x86_64-pc-linux-gnu, committed on trunk

2014-01-23  Robert Dewar  <dewar@adacore.com>

	* exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
	expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
	sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.

-------------- next part --------------
Index: exp_util.adb
===================================================================
--- exp_util.adb	(revision 206922)
+++ exp_util.adb	(working copy)
@@ -3829,7 +3829,6 @@
                N_Single_Protected_Declaration           |
                N_Slice                                  |
                N_String_Literal                         |
-               N_Subprogram_Info                        |
                N_Subtype_Indication                     |
                N_Subunit                                |
                N_Task_Definition                        |
Index: sinfo.adb
===================================================================
--- sinfo.adb	(revision 206918)
+++ sinfo.adb	(working copy)
@@ -1627,8 +1627,7 @@
         or else NT (N).Nkind = N_Enumeration_Representation_Clause
         or else NT (N).Nkind = N_Label
         or else NT (N).Nkind = N_Loop_Statement
-        or else NT (N).Nkind = N_Record_Representation_Clause
-        or else NT (N).Nkind = N_Subprogram_Info);
+        or else NT (N).Nkind = N_Record_Representation_Clause);
       return Node1 (N);
    end Identifier;
 
@@ -4768,8 +4767,7 @@
         or else NT (N).Nkind = N_Enumeration_Representation_Clause
         or else NT (N).Nkind = N_Label
         or else NT (N).Nkind = N_Loop_Statement
-        or else NT (N).Nkind = N_Record_Representation_Clause
-        or else NT (N).Nkind = N_Subprogram_Info);
+        or else NT (N).Nkind = N_Record_Representation_Clause);
       Set_Node1_With_Parent (N, Val);
    end Set_Identifier;
 
Index: sinfo.ads
===================================================================
--- sinfo.ads	(revision 206918)
+++ sinfo.ads	(working copy)
@@ -7683,23 +7683,6 @@
       --  with the N_In node (or a rewriting thereof) corresponding to a
       --  classwide membership test.
 
-      ---------------------
-      -- Subprogram_Info --
-      ---------------------
-
-      --  This node generates the appropriate Subprogram_Info value for a
-      --  given procedure. See Ada.Exceptions for further details
-
-      --  Sprint syntax: subprog'subprogram_info
-
-      --  N_Subprogram_Info
-      --  Sloc points to the entity for the procedure
-      --  Identifier (Node1) identifier referencing the procedure
-      --  Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc)
-
-      --  Note: in the case where a debug source file is generated, the Sloc
-      --  for this node points to the quote in the Sprint file output.
-
       --------------------------
       -- Unchecked Expression --
       --------------------------
@@ -7977,7 +7960,6 @@
       N_Reference,
       N_Selected_Component,
       N_Slice,
-      N_Subprogram_Info,
       N_Type_Conversion,
       N_Unchecked_Expression,
       N_Unchecked_Type_Conversion,
@@ -12080,13 +12062,6 @@
         4 => False,   --  unused
         5 => False),  --  Etype (Node5-Sem)
 
-     N_Subprogram_Info =>
-       (1 => True,    --  Identifier (Node1)
-        2 => False,   --  unused
-        3 => False,   --  unused
-        4 => False,   --  unused
-        5 => False),  --  Etype (Node5-Sem)
-
      N_Unchecked_Expression =>
        (1 => False,   --  unused
         2 => False,   --  unused
Index: sem.adb
===================================================================
--- sem.adb	(revision 206918)
+++ sem.adb	(working copy)
@@ -530,9 +530,6 @@
          when N_Subprogram_Declaration =>
             Analyze_Subprogram_Declaration (N);
 
-         when N_Subprogram_Info =>
-            Analyze_Subprogram_Info (N);
-
          when N_Subprogram_Renaming_Declaration =>
             Analyze_Subprogram_Renaming (N);
 
Index: sem_res.adb
===================================================================
--- sem_res.adb	(revision 206931)
+++ sem_res.adb	(working copy)
@@ -201,7 +201,6 @@
    procedure Resolve_Short_Circuit             (N : Node_Id; Typ : Entity_Id);
    procedure Resolve_Slice                     (N : Node_Id; Typ : Entity_Id);
    procedure Resolve_String_Literal            (N : Node_Id; Typ : Entity_Id);
-   procedure Resolve_Subprogram_Info           (N : Node_Id; Typ : Entity_Id);
    procedure Resolve_Type_Conversion           (N : Node_Id; Typ : Entity_Id);
    procedure Resolve_Unary_Op                  (N : Node_Id; Typ : Entity_Id);
    procedure Resolve_Unchecked_Expression      (N : Node_Id; Typ : Entity_Id);
@@ -2897,9 +2896,6 @@
             when N_String_Literal
                              => Resolve_String_Literal           (N, Ctx_Type);
 
-            when N_Subprogram_Info
-                             => Resolve_Subprogram_Info          (N, Ctx_Type);
-
             when N_Type_Conversion
                              => Resolve_Type_Conversion          (N, Ctx_Type);
 
@@ -9781,15 +9777,6 @@
    end Resolve_String_Literal;
 
    -----------------------------
-   -- Resolve_Subprogram_Info --
-   -----------------------------
-
-   procedure Resolve_Subprogram_Info (N : Node_Id; Typ : Entity_Id) is
-   begin
-      Set_Etype (N, Typ);
-   end Resolve_Subprogram_Info;
-
-   -----------------------------
    -- Resolve_Type_Conversion --
    -----------------------------
 
Index: expander.adb
===================================================================
--- expander.adb	(revision 206918)
+++ expander.adb	(working copy)
@@ -433,9 +433,6 @@
                   when N_Subprogram_Declaration =>
                      Expand_N_Subprogram_Declaration (N);
 
-                  when N_Subprogram_Info =>
-                     Expand_N_Subprogram_Info (N);
-
                   when N_Task_Body =>
                      Expand_N_Task_Body (N);
 
Index: exp_ch11.adb
===================================================================
--- exp_ch11.adb	(revision 206918)
+++ exp_ch11.adb	(working copy)
@@ -1882,27 +1882,6 @@
       end;
    end Possible_Local_Raise;
 
-   ------------------------------
-   -- Expand_N_Subprogram_Info --
-   ------------------------------
-
-   procedure Expand_N_Subprogram_Info (N : Node_Id) is
-      Loc : constant Source_Ptr := Sloc (N);
-
-   begin
-      --  For now, we replace an Expand_N_Subprogram_Info node with an
-      --  attribute reference that gives the address of the procedure.
-      --  This is because gigi does not yet recognize this node, and
-      --  for the initial targets, this is the right value anyway.
-
-      Rewrite (N,
-        Make_Attribute_Reference (Loc,
-          Prefix         => Identifier (N),
-          Attribute_Name => Name_Code_Address));
-
-      Analyze_And_Resolve (N, RTE (RE_Code_Loc));
-   end Expand_N_Subprogram_Info;
-
    ------------------------
    -- Find_Local_Handler --
    ------------------------
Index: exp_ch11.ads
===================================================================
--- exp_ch11.ads	(revision 206918)
+++ exp_ch11.ads	(working copy)
@@ -35,7 +35,6 @@
    procedure Expand_N_Raise_Program_Error            (N : Node_Id);
    procedure Expand_N_Raise_Statement                (N : Node_Id);
    procedure Expand_N_Raise_Storage_Error            (N : Node_Id);
-   procedure Expand_N_Subprogram_Info                (N : Node_Id);
 
    --  Data structures for gathering information to build exception tables
    --  See runtime routine Ada.Exceptions for full details on the format and
Index: sem_ch11.adb
===================================================================
--- sem_ch11.adb	(revision 206918)
+++ sem_ch11.adb	(working copy)
@@ -737,13 +737,4 @@
       end if;
    end Analyze_Raise_xxx_Error;
 
-   -----------------------------
-   -- Analyze_Subprogram_Info --
-   -----------------------------
-
-   procedure Analyze_Subprogram_Info (N : Node_Id) is
-   begin
-      Set_Etype (N, RTE (RE_Code_Loc));
-   end Analyze_Subprogram_Info;
-
 end Sem_Ch11;
Index: sem_ch11.ads
===================================================================
--- sem_ch11.ads	(revision 206918)
+++ sem_ch11.ads	(working copy)
@@ -30,7 +30,6 @@
    procedure Analyze_Raise_Expression                   (N : Node_Id);
    procedure Analyze_Raise_Statement                    (N : Node_Id);
    procedure Analyze_Raise_xxx_Error                    (N : Node_Id);
-   procedure Analyze_Subprogram_Info                    (N : Node_Id);
 
    procedure Analyze_Exception_Handlers (L : List_Id);
    --  Analyze list of exception handlers of a handled statement sequence
Index: sprint.adb
===================================================================
--- sprint.adb	(revision 206918)
+++ sprint.adb	(working copy)
@@ -3091,10 +3091,6 @@
 
             Write_Char (';');
 
-         when N_Subprogram_Info =>
-            Sprint_Node (Identifier (Node));
-            Write_Str_With_Col_Check_Sloc ("'subprogram_info");
-
          when N_Subprogram_Renaming_Declaration =>
             Write_Indent;
             Sprint_Node (Specification (Node));
Index: sprint.ads
===================================================================
--- sprint.ads	(revision 206918)
+++ sprint.ads	(working copy)
@@ -81,7 +81,6 @@
    --    Reference                           expression'reference
    --    Shift nodes                         shift_name!(expr, count)
    --    Static declaration                  name : static xxx
-   --    Subprogram_Info                     subprog'Subprogram_Info
    --    Unchecked conversion                target_type!(source_expression)
    --    Unchecked expression                `(expression)
    --    Validate_Unchecked_Conversion       validate unchecked_conversion


More information about the Gcc-patches mailing list