Commit ac16e74c by Robert Dewar Committed by Arnaud Charlet

ali-util.adb, [...]: Minor change of name Name_Table_Info => Name_Table_Int.

2015-01-06  Robert Dewar  <dewar@adacore.com>

	* ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
	ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
	Minor change of name Name_Table_Info => Name_Table_Int.

From-SVN: r219230
parent 4b6f99f5
2015-01-06 Robert Dewar <dewar@adacore.com> 2015-01-06 Robert Dewar <dewar@adacore.com>
* ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
Minor change of name Name_Table_Info => Name_Table_Int.
2015-01-06 Robert Dewar <dewar@adacore.com>
* exp_strm.adb (Build_Elementary_Input_Call): Clarify comments * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
in previous checkin. in previous checkin.
* freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -194,7 +194,7 @@ package body ALI.Util is ...@@ -194,7 +194,7 @@ package body ALI.Util is
-- This loop is empty and harmless the first time in. -- This loop is empty and harmless the first time in.
for J in Source.First .. Source.Last loop for J in Source.First .. Source.Last loop
Set_Name_Table_Info (Source.Table (J).Sfile, 0); Set_Name_Table_Int (Source.Table (J).Sfile, 0);
Source.Table (J).Source_Found := False; Source.Table (J).Source_Found := False;
end loop; end loop;
...@@ -236,7 +236,7 @@ package body ALI.Util is ...@@ -236,7 +236,7 @@ package body ALI.Util is
-- file has not been processed already. -- file has not been processed already.
if Afile /= No_File if Afile /= No_File
and then Get_Name_Table_Info (Afile) = 0 and then Get_Name_Table_Int (Afile) = 0
then then
Text := Read_Library_Info (Afile); Text := Read_Library_Info (Afile);
...@@ -251,7 +251,7 @@ package body ALI.Util is ...@@ -251,7 +251,7 @@ package body ALI.Util is
Error_Msg_File_1 := Afile; Error_Msg_File_1 := Afile;
Error_Msg_File_2 := Withs.Table (W).Sfile; Error_Msg_File_2 := Withs.Table (W).Sfile;
Error_Msg ("{ not found, { must be compiled"); Error_Msg ("{ not found, { must be compiled");
Set_Name_Table_Info (Afile, Int (No_Unit_Id)); Set_Name_Table_Int (Afile, Int (No_Unit_Id));
return; return;
end if; end if;
...@@ -272,7 +272,7 @@ package body ALI.Util is ...@@ -272,7 +272,7 @@ package body ALI.Util is
then then
Error_Msg_File_1 := Withs.Table (W).Sfile; Error_Msg_File_1 := Withs.Table (W).Sfile;
Error_Msg ("{ had errors, must be fixed, and recompiled"); Error_Msg ("{ had errors, must be fixed, and recompiled");
Set_Name_Table_Info (Afile, Int (No_Unit_Id)); Set_Name_Table_Int (Afile, Int (No_Unit_Id));
-- In GNATprove mode, object files are never generated, so -- In GNATprove mode, object files are never generated, so
-- No_Object=True is not considered an error. -- No_Object=True is not considered an error.
...@@ -283,7 +283,7 @@ package body ALI.Util is ...@@ -283,7 +283,7 @@ package body ALI.Util is
then then
Error_Msg_File_1 := Withs.Table (W).Sfile; Error_Msg_File_1 := Withs.Table (W).Sfile;
Error_Msg ("{ must be recompiled"); Error_Msg ("{ must be recompiled");
Set_Name_Table_Info (Afile, Int (No_Unit_Id)); Set_Name_Table_Int (Afile, Int (No_Unit_Id));
end if; end if;
-- If the Unit is an Interface to a Stand-Alone Library, -- If the Unit is an Interface to a Stand-Alone Library,
...@@ -337,10 +337,10 @@ package body ALI.Util is ...@@ -337,10 +337,10 @@ package body ALI.Util is
-- If this is the first time we are seeing this source file, -- If this is the first time we are seeing this source file,
-- then make a new entry in the source table. -- then make a new entry in the source table.
if Get_Name_Table_Info (F) = 0 then if Get_Name_Table_Int (F) = 0 then
Source.Increment_Last; Source.Increment_Last;
S := Source.Last; S := Source.Last;
Set_Name_Table_Info (F, Int (S)); Set_Name_Table_Int (F, Int (S));
Source.Table (S).Sfile := F; Source.Table (S).Sfile := F;
Source.Table (S).All_Timestamps_Match := True; Source.Table (S).All_Timestamps_Match := True;
...@@ -393,7 +393,7 @@ package body ALI.Util is ...@@ -393,7 +393,7 @@ package body ALI.Util is
-- so that the source table entry is already constructed. -- so that the source table entry is already constructed.
else else
S := Source_Id (Get_Name_Table_Info (F)); S := Source_Id (Get_Name_Table_Int (F));
-- Update checksum flag -- Update checksum flag
...@@ -451,7 +451,7 @@ package body ALI.Util is ...@@ -451,7 +451,7 @@ package body ALI.Util is
-- Set the checksum value in the source table -- Set the checksum value in the source table
S := Source_Id (Get_Name_Table_Info (F)); S := Source_Id (Get_Name_Table_Int (F));
Source.Table (S).Checksum := Sdep.Table (D).Checksum; Source.Table (S).Checksum := Sdep.Table (D).Checksum;
end if; end if;
...@@ -482,7 +482,7 @@ package body ALI.Util is ...@@ -482,7 +482,7 @@ package body ALI.Util is
begin begin
for D in ALIs.Table (A).First_Sdep .. ALIs.Table (A).Last_Sdep loop for D in ALIs.Table (A).First_Sdep .. ALIs.Table (A).Last_Sdep loop
Src := Source_Id (Get_Name_Table_Info (Sdep.Table (D).Sfile)); Src := Source_Id (Get_Name_Table_Int (Sdep.Table (D).Sfile));
if Opt.Minimal_Recompilation if Opt.Minimal_Recompilation
and then Sdep.Table (D).Stamp /= Source.Table (Src).Stamp and then Sdep.Table (D).Stamp /= Source.Table (Src).Stamp
......
...@@ -72,11 +72,11 @@ package body ALI is ...@@ -72,11 +72,11 @@ package body ALI is
-- These two loops are empty and harmless the first time in. -- These two loops are empty and harmless the first time in.
for J in ALIs.First .. ALIs.Last loop for J in ALIs.First .. ALIs.Last loop
Set_Name_Table_Info (ALIs.Table (J).Afile, 0); Set_Name_Table_Int (ALIs.Table (J).Afile, 0);
end loop; end loop;
for J in Units.First .. Units.Last loop for J in Units.First .. Units.Last loop
Set_Name_Table_Info (Units.Table (J).Uname, 0); Set_Name_Table_Int (Units.Table (J).Uname, 0);
end loop; end loop;
-- Free argument table strings -- Free argument table strings
...@@ -867,7 +867,7 @@ package body ALI is ...@@ -867,7 +867,7 @@ package body ALI is
ALIs.Increment_Last; ALIs.Increment_Last;
Id := ALIs.Last; Id := ALIs.Last;
Set_Name_Table_Info (F, Int (Id)); Set_Name_Table_Int (F, Int (Id));
ALIs.Table (Id) := ( ALIs.Table (Id) := (
Afile => F, Afile => F,
...@@ -1737,7 +1737,7 @@ package body ALI is ...@@ -1737,7 +1737,7 @@ package body ALI is
-- Check for duplicated unit in different files -- Check for duplicated unit in different files
declare declare
Info : constant Int := Get_Name_Table_Info Info : constant Int := Get_Name_Table_Int
(Units.Table (Units.Last).Uname); (Units.Table (Units.Last).Uname);
begin begin
if Info /= 0 if Info /= 0
...@@ -1785,7 +1785,7 @@ package body ALI is ...@@ -1785,7 +1785,7 @@ package body ALI is
end if; end if;
end; end;
Set_Name_Table_Info Set_Name_Table_Int
(Units.Table (Units.Last).Uname, Int (Units.Last)); (Units.Table (Units.Last).Uname, Int (Units.Last));
-- Scan out possible version and other parameters -- Scan out possible version and other parameters
......
...@@ -170,7 +170,7 @@ package body Bcheck is ...@@ -170,7 +170,7 @@ package body Bcheck is
goto Continue; goto Continue;
end if; end if;
Src := Source_Id (Get_Name_Table_Info (Sdep.Table (D).Sfile)); Src := Source_Id (Get_Name_Table_Int (Sdep.Table (D).Sfile));
-- If the time stamps match, or all checksums match, then we -- If the time stamps match, or all checksums match, then we
-- are OK, otherwise we have a definite error. -- are OK, otherwise we have a definite error.
...@@ -468,12 +468,12 @@ package body Bcheck is ...@@ -468,12 +468,12 @@ package body Bcheck is
WR : With_Record renames Withs.Table (W); WR : With_Record renames Withs.Table (W);
begin begin
if Get_Name_Table_Info (WR.Uname) /= 0 then if Get_Name_Table_Int (WR.Uname) /= 0 then
declare declare
WU : Unit_Record renames WU : Unit_Record renames
Units.Table Units.Table
(Unit_Id (Unit_Id
(Get_Name_Table_Info (WR.Uname))); (Get_Name_Table_Int (WR.Uname)));
begin begin
-- Case 1. Elaborate_All for with'ed unit -- Case 1. Elaborate_All for with'ed unit
...@@ -1048,7 +1048,7 @@ package body Bcheck is ...@@ -1048,7 +1048,7 @@ package body Bcheck is
if AFN /= No_File then if AFN /= No_File then
declare declare
WAI : constant ALI_Id := WAI : constant ALI_Id :=
ALI_Id (Get_Name_Table_Info (AFN)); ALI_Id (Get_Name_Table_Int (AFN));
WTE : ALIs_Record renames ALIs.Table (WAI); WTE : ALIs_Record renames ALIs.Table (WAI);
begin begin
...@@ -1199,7 +1199,7 @@ package body Bcheck is ...@@ -1199,7 +1199,7 @@ package body Bcheck is
declare declare
Unit : constant Unit_Name_Type := Name_Find; Unit : constant Unit_Name_Type := Name_Find;
Info : constant Int := Get_Name_Table_Info (Unit); Info : constant Int := Get_Name_Table_Int (Unit);
begin begin
if Info /= 0 then if Info /= 0 then
......
...@@ -901,7 +901,7 @@ package body Binde is ...@@ -901,7 +901,7 @@ package body Binde is
then then
declare declare
Info : constant Int := Info : constant Int :=
Get_Name_Table_Info (Withs.Table (W).Uname); Get_Name_Table_Int (Withs.Table (W).Uname);
begin begin
-- If the unit is unknown, for some unknown reason, fail -- If the unit is unknown, for some unknown reason, fail
...@@ -1225,7 +1225,7 @@ package body Binde is ...@@ -1225,7 +1225,7 @@ package body Binde is
-- when we have a subprogram body with no spec, and some -- when we have a subprogram body with no spec, and some
-- obsolete unit with's a previous (now disappeared) spec. -- obsolete unit with's a previous (now disappeared) spec.
if Get_Name_Table_Info (Withs.Table (W).Uname) = 0 then if Get_Name_Table_Int (Withs.Table (W).Uname) = 0 then
Error_Msg_File_1 := Units.Table (U).Sfile; Error_Msg_File_1 := Units.Table (U).Sfile;
Error_Msg_Unit_1 := Withs.Table (W).Uname; Error_Msg_Unit_1 := Withs.Table (W).Uname;
Error_Msg ("{ depends on $ which no longer exists"); Error_Msg ("{ depends on $ which no longer exists");
...@@ -1602,7 +1602,7 @@ package body Binde is ...@@ -1602,7 +1602,7 @@ package body Binde is
---------------- ----------------
function Unit_Id_Of (Uname : Unit_Name_Type) return Unit_Id is function Unit_Id_Of (Uname : Unit_Name_Type) return Unit_Id is
Info : constant Int := Get_Name_Table_Info (Uname); Info : constant Int := Get_Name_Table_Int (Uname);
begin begin
pragma Assert (Info /= 0 and then Unit_Id (Info) /= No_Unit_Id); pragma Assert (Info /= 0 and then Unit_Id (Info) /= No_Unit_Id);
return Unit_Id (Info); return Unit_Id (Info);
......
...@@ -1816,7 +1816,7 @@ begin ...@@ -1816,7 +1816,7 @@ begin
else else
Ali_File := Strip_Directory (Ali_File); Ali_File := Strip_Directory (Ali_File);
if Get_Name_Table_Info (Ali_File) = 0 then if Get_Name_Table_Int (Ali_File) = 0 then
Text := Read_Library_Info (Ali_File, True); Text := Read_Library_Info (Ali_File, True);
declare declare
......
...@@ -726,14 +726,14 @@ package body Namet is ...@@ -726,14 +726,14 @@ package body Namet is
end Get_Name_Table_Byte; end Get_Name_Table_Byte;
------------------------- -------------------------
-- Get_Name_Table_Info -- -- Get_Name_Table_Int --
------------------------- -------------------------
function Get_Name_Table_Info (Id : Name_Id) return Int is function Get_Name_Table_Int (Id : Name_Id) return Int is
begin begin
pragma Assert (Id in Name_Entries.First .. Name_Entries.Last); pragma Assert (Id in Name_Entries.First .. Name_Entries.Last);
return Name_Entries.Table (Id).Int_Info; return Name_Entries.Table (Id).Int_Info;
end Get_Name_Table_Info; end Get_Name_Table_Int;
----------------------------------------- -----------------------------------------
-- Get_Unqualified_Decoded_Name_String -- -- Get_Unqualified_Decoded_Name_String --
...@@ -1321,14 +1321,14 @@ package body Namet is ...@@ -1321,14 +1321,14 @@ package body Namet is
end Set_Name_Table_Byte; end Set_Name_Table_Byte;
------------------------- -------------------------
-- Set_Name_Table_Info -- -- Set_Name_Table_Int --
------------------------- -------------------------
procedure Set_Name_Table_Info (Id : Name_Id; Val : Int) is procedure Set_Name_Table_Int (Id : Name_Id; Val : Int) is
begin begin
pragma Assert (Id in Name_Entries.First .. Name_Entries.Last); pragma Assert (Id in Name_Entries.First .. Name_Entries.Last);
Name_Entries.Table (Id).Int_Info := Val; Name_Entries.Table (Id).Int_Info := Val;
end Set_Name_Table_Info; end Set_Name_Table_Int;
----------------------------- -----------------------------
-- Store_Encoded_Character -- -- Store_Encoded_Character --
......
...@@ -363,8 +363,8 @@ package Namet is ...@@ -363,8 +363,8 @@ package Namet is
pragma Inline (Get_Name_Table_Byte); pragma Inline (Get_Name_Table_Byte);
-- Fetches the Byte value associated with the given name -- Fetches the Byte value associated with the given name
function Get_Name_Table_Info (Id : Name_Id) return Int; function Get_Name_Table_Int (Id : Name_Id) return Int;
pragma Inline (Get_Name_Table_Info); pragma Inline (Get_Name_Table_Int);
-- Fetches the Int value associated with the given name -- Fetches the Int value associated with the given name
function Get_Name_Table_Boolean (Id : Name_Id) return Boolean; function Get_Name_Table_Boolean (Id : Name_Id) return Boolean;
...@@ -409,7 +409,7 @@ package Namet is ...@@ -409,7 +409,7 @@ package Namet is
-- in Name_Len (i.e. the characters of the name are in subscript positions -- in Name_Len (i.e. the characters of the name are in subscript positions
-- 1 to Name_Len in Name_Buffer). It searches the names table to see if the -- 1 to Name_Len in Name_Buffer). It searches the names table to see if the
-- string has already been stored. If so the Id of the existing entry is -- string has already been stored. If so the Id of the existing entry is
-- returned. Otherwise a new entry is created with its Name_Table_Info -- returned. Otherwise a new entry is created with its Name_Table_Int
-- fields set to zero/false. The contents of Name_Buffer and Name_Len are -- fields set to zero/false. The contents of Name_Buffer and Name_Len are
-- not modified by this call. Note that it is permissible for Name_Len to -- not modified by this call. Note that it is permissible for Name_Len to
-- be set to zero to lookup the null name string. -- be set to zero to lookup the null name string.
...@@ -496,8 +496,8 @@ package Namet is ...@@ -496,8 +496,8 @@ package Namet is
-- for the given character code. On return Name_Buffer and Name_Len are -- for the given character code. On return Name_Buffer and Name_Len are
-- set to reflect the stored name. -- set to reflect the stored name.
procedure Set_Name_Table_Info (Id : Name_Id; Val : Int); procedure Set_Name_Table_Int (Id : Name_Id; Val : Int);
pragma Inline (Set_Name_Table_Info); pragma Inline (Set_Name_Table_Int);
-- Sets the Int value associated with the given name -- Sets the Int value associated with the given name
procedure Set_Name_Table_Byte (Id : Name_Id; Val : Byte); procedure Set_Name_Table_Byte (Id : Name_Id; Val : Byte);
......
...@@ -1309,7 +1309,7 @@ package body Rtsfind is ...@@ -1309,7 +1309,7 @@ package body Rtsfind is
RE_Str (RE_Str'First + 3 .. RE_Str'Last); RE_Str (RE_Str'First + 3 .. RE_Str'Last);
Nam := Name_Find; Nam := Name_Find;
Ent := Entity_Id (Get_Name_Table_Info (Nam)); Ent := Entity_Id (Get_Name_Table_Int (Nam));
Name_Len := Save_Nam'Length; Name_Len := Save_Nam'Length;
Name_Buffer (1 .. Name_Len) := Save_Nam; Name_Buffer (1 .. Name_Len) := Save_Nam;
......
...@@ -8563,7 +8563,7 @@ package body Sem_Prag is ...@@ -8563,7 +8563,7 @@ package body Sem_Prag is
if Prag_Id = Pragma_Import then if Prag_Id = Pragma_Import then
String_To_Name_Buffer (Strval (Expr_Value_S (Ext_Nam))); String_To_Name_Buffer (Strval (Expr_Value_S (Ext_Nam)));
Nam := Name_Find; Nam := Name_Find;
E := Entity_Id (Get_Name_Table_Info (Nam)); E := Entity_Id (Get_Name_Table_Int (Nam));
if Nam /= Chars (Subprogram_Def) if Nam /= Chars (Subprogram_Def)
and then Present (E) and then Present (E)
......
...@@ -86,10 +86,10 @@ package body Sem_Res is ...@@ -86,10 +86,10 @@ package body Sem_Res is
----------------------- -----------------------
-- Second pass (top-down) type checking and overload resolution procedures -- Second pass (top-down) type checking and overload resolution procedures
-- Typ is the type required by context. These procedures propagate the type -- Typ is the type required by context. These procedures propagate the
-- information recursively to the descendants of N. If the node is not -- type information recursively to the descendants of N. If the node is not
-- overloaded, its Etype is established in the first pass. If overloaded, -- overloaded, its Etype is established in the first pass. If overloaded,
-- the Resolve routines set the correct type. For arith. operators, the -- the Resolve routines set the correct type. For arithmetic operators, the
-- Etype is the base type of the context. -- Etype is the base type of the context.
-- Note that Resolve_Attribute is separated off in Sem_Attr -- Note that Resolve_Attribute is separated off in Sem_Attr
...@@ -245,9 +245,9 @@ package body Sem_Res is ...@@ -245,9 +245,9 @@ package body Sem_Res is
Typ : Entity_Id; Typ : Entity_Id;
Op_Id : Entity_Id); Op_Id : Entity_Id);
-- Inverse transformation: if an operator is given in functional notation, -- Inverse transformation: if an operator is given in functional notation,
-- then after resolving the node, transform into an operator node, so -- then after resolving the node, transform into an operator node, so that
-- that operands are resolved properly. Recall that predefined operators -- operands are resolved properly. Recall that predefined operators do not
-- do not have a full signature and special resolution rules apply. -- have a full signature and special resolution rules apply.
procedure Rewrite_Renamed_Operator procedure Rewrite_Renamed_Operator
(N : Node_Id; (N : Node_Id;
......
...@@ -7247,7 +7247,7 @@ package body Sem_Util is ...@@ -7247,7 +7247,7 @@ package body Sem_Util is
function Get_Name_Entity_Id (Id : Name_Id) return Entity_Id is function Get_Name_Entity_Id (Id : Name_Id) return Entity_Id is
begin begin
return Entity_Id (Get_Name_Table_Info (Id)); return Entity_Id (Get_Name_Table_Int (Id));
end Get_Name_Entity_Id; end Get_Name_Entity_Id;
------------------------------ ------------------------------
...@@ -17271,7 +17271,7 @@ package body Sem_Util is ...@@ -17271,7 +17271,7 @@ package body Sem_Util is
procedure Set_Name_Entity_Id (Id : Name_Id; Val : Entity_Id) is procedure Set_Name_Entity_Id (Id : Name_Id; Val : Entity_Id) is
begin begin
Set_Name_Table_Info (Id, Int (Val)); Set_Name_Table_Int (Id, Int (Val));
end Set_Name_Entity_Id; end Set_Name_Entity_Id;
--------------------- ---------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment