aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinput.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2020-01-01 15:19:05 -0500
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-03 06:01:26 -0400
commitba2034610fcc0d56dd52cb20c26f9ab1997b520e (patch)
tree5260826d088dfa1346429c93e923ffd7866428bb /gcc/ada/sinput.adb
parentbad8184e3e16dfd4d30099e18e443c4a54b97c83 (diff)
downloadgcc-ba2034610fcc0d56dd52cb20c26f9ab1997b520e.zip
gcc-ba2034610fcc0d56dd52cb20c26f9ab1997b520e.tar.gz
gcc-ba2034610fcc0d56dd52cb20c26f9ab1997b520e.tar.bz2
[Ada] Remove ASIS tree generation
2020-06-03 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * aspects.adb, aspects.ads, atree.adb, atree.ads, elists.adb, elists.ads, fname.adb, fname.ads, gnat1drv.adb, lib.adb, lib.ads, namet.adb, namet.ads, nlists.adb, nlists.ads, opt.adb, opt.ads, osint-c.adb, osint-c.ads, repinfo.adb, repinfo.ads, sem_aux.adb, sem_aux.ads, sinput.adb, sinput.ads, stand.ads, stringt.adb, stringt.ads, switch-c.adb, table.adb, table.ads, uintp.adb, uintp.ads, urealp.adb, urealp.ads (Tree_Read, Tree_Write): Remove generation of ASIS trees. * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Remove -gnatt and -gnatct documentation. * gnat_ugn.texi: Regenerate. * tree_in.ads, tree_in.adb, tree_io.ads, tree_io.adb, tree_gen.ads, tree_gen.adb, stand.adb: Remove. * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Remove references to tree_gen.o tree_in.o tree_io.o.
Diffstat (limited to 'gcc/ada/sinput.adb')
-rw-r--r--gcc/ada/sinput.adb155
1 files changed, 0 insertions, 155 deletions
diff --git a/gcc/ada/sinput.adb b/gcc/ada/sinput.adb
index 0c51bbd..4c342d9 100644
--- a/gcc/ada/sinput.adb
+++ b/gcc/ada/sinput.adb
@@ -37,7 +37,6 @@ with Debug; use Debug;
with Opt; use Opt;
with Output; use Output;
with Scans; use Scans;
-with Tree_IO; use Tree_IO;
with Widechar; use Widechar;
with GNAT.Byte_Order_Mark; use GNAT.Byte_Order_Mark;
@@ -1004,160 +1003,6 @@ package body Sinput is
return Oldloc;
end Top_Level_Location;
- ---------------
- -- Tree_Read --
- ---------------
-
- procedure Tree_Read is
- begin
- -- First we must free any old source buffer pointers
-
- for J in Source_File.First .. Source_File.Last loop
- declare
- S : Source_File_Record renames Source_File.Table (J);
- begin
- if S.Instance = No_Instance_Id then
- Free_Source_Buffer (S.Source_Text);
-
- if S.Lines_Table /= null then
- Memory.Free (To_Address (S.Lines_Table));
- S.Lines_Table := null;
- end if;
-
- if S.Logical_Lines_Table /= null then
- Memory.Free (To_Address (S.Logical_Lines_Table));
- S.Logical_Lines_Table := null;
- end if;
-
- else
- Free_Dope (S.Source_Text'Address);
- S.Source_Text := null;
- end if;
- end;
- end loop;
-
- -- Read in source file table and instance table
-
- Source_File.Tree_Read;
- Instances.Tree_Read;
-
- -- The pointers we read in there for the source buffer and lines table
- -- pointers are junk. We now read in the actual data that is referenced
- -- by these two fields.
-
- for J in Source_File.First .. Source_File.Last loop
- declare
- S : Source_File_Record renames Source_File.Table (J);
- begin
- -- Normal case (non-instantiation)
-
- if S.Instance = No_Instance_Id then
- S.Lines_Table := null;
- S.Logical_Lines_Table := null;
- Alloc_Line_Tables (S, Int (S.Last_Source_Line));
-
- for J in 1 .. S.Last_Source_Line loop
- Tree_Read_Int (Int (S.Lines_Table (J)));
- end loop;
-
- if S.Num_SRef_Pragmas /= 0 then
- for J in 1 .. S.Last_Source_Line loop
- Tree_Read_Int (Int (S.Logical_Lines_Table (J)));
- end loop;
- end if;
-
- -- Allocate source buffer and read in the data
-
- declare
- T : constant Source_Buffer_Ptr_Var :=
- new Source_Buffer (S.Source_First .. S.Source_Last);
- begin
- Tree_Read_Data (T (S.Source_First)'Address,
- Int (S.Source_Last) - Int (S.Source_First) + 1);
- S.Source_Text := T.all'Access;
- end;
-
- -- For the instantiation case, we do not read in any data. Instead
- -- we share the data for the generic template entry. Since the
- -- template always occurs first, we can safely refer to its data.
-
- else
- declare
- ST : Source_File_Record renames
- Source_File.Table (S.Template);
-
- begin
- -- The lines tables are copied from the template entry
-
- S.Lines_Table := ST.Lines_Table;
- S.Logical_Lines_Table := ST.Logical_Lines_Table;
-
- -- The Source_Text of the instance is the same data as that
- -- of the template, but with different bounds.
-
- declare
- Dope : constant Dope_Ptr :=
- new Dope_Rec'(S.Source_First, S.Source_Last);
- begin
- S.Source_Text := ST.Source_Text;
- Set_Dope (S.Source_Text'Address, Dope);
- end;
- end;
- end if;
- end;
-
- Set_Source_File_Index_Table (J);
- end loop;
- end Tree_Read;
-
- ----------------
- -- Tree_Write --
- ----------------
-
- procedure Tree_Write is
- begin
- Source_File.Tree_Write;
- Instances.Tree_Write;
-
- -- The pointers we wrote out there for the source buffer and lines
- -- table pointers are junk, we now write out the actual data that
- -- is referenced by these two fields.
-
- for J in Source_File.First .. Source_File.Last loop
- declare
- S : Source_File_Record renames Source_File.Table (J);
-
- begin
- -- For instantiations, there is nothing to do, since the data is
- -- shared with the generic template. When the tree is read, the
- -- pointers must be set, but no extra data needs to be written.
- -- For the normal case, write out the data of the tables.
-
- if S.Instance = No_Instance_Id then
- -- Lines table
-
- for J in 1 .. S.Last_Source_Line loop
- Tree_Write_Int (Int (S.Lines_Table (J)));
- end loop;
-
- -- Logical lines table if present
-
- if S.Num_SRef_Pragmas /= 0 then
- for J in 1 .. S.Last_Source_Line loop
- Tree_Write_Int (Int (S.Logical_Lines_Table (J)));
- end loop;
- end if;
-
- -- Source buffer
-
- Tree_Write_Data
- (S.Source_Text (S.Source_First)'Address,
- Int (S.Source_Last) - Int (S.Source_First) + 1);
- end if;
- end;
- end loop;
- end Tree_Write;
-
--------------------
-- Write_Location --
--------------------