[multiple changes]
2009-10-27 Thomas Quinot <quinot@adacore.com> * sem_ch12.adb (Install_Formal_Packages): Do not omit installation of visible entities when the formal package doesn't have a box. * checks.adb: Minor reformatting. 2009-10-27 Vincent Celier <celier@adacore.com> * prj-part.adb (Parse): Catch exception Types.Unrecoverable_Error and set Project to Empty_Node. 2009-10-27 Robert Dewar <dewar@adacore.com> * gnatbind.adb: Minor reformatting From-SVN: r153593
This commit is contained in:
parent
fdfcc66302
commit
0c0c6f49d5
@ -1,3 +1,19 @@
|
||||
2009-10-27 Thomas Quinot <quinot@adacore.com>
|
||||
|
||||
* sem_ch12.adb (Install_Formal_Packages): Do not omit installation of
|
||||
visible entities when the formal package doesn't have a box.
|
||||
|
||||
* checks.adb: Minor reformatting.
|
||||
|
||||
2009-10-27 Vincent Celier <celier@adacore.com>
|
||||
|
||||
* prj-part.adb (Parse): Catch exception Types.Unrecoverable_Error and
|
||||
set Project to Empty_Node.
|
||||
|
||||
2009-10-27 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* gnatbind.adb: Minor reformatting
|
||||
|
||||
2009-10-27 Arnaud Charlet <charlet@adacore.com>
|
||||
|
||||
* exp_aggr.adb: Fix comment.
|
||||
|
@ -848,7 +848,7 @@ package body Checks is
|
||||
-- is not set anyway, or we are not doing code expansion, or the
|
||||
-- parent node is a type conversion whose operand is an arithmetic
|
||||
-- operation on signed integers on which the expander can promote
|
||||
-- later the operands to type integer (see Expand_N_Type_Conversion).
|
||||
-- later the operands to type Integer (see Expand_N_Type_Conversion).
|
||||
|
||||
-- Special case CLI target, where arithmetic overflow checks can be
|
||||
-- performed for integer and long_integer
|
||||
|
@ -838,12 +838,14 @@ begin
|
||||
end if;
|
||||
end loop;
|
||||
|
||||
-- Subunits do not appear in the elaboration table because
|
||||
-- they are subsumed by their parent units, but we need to
|
||||
-- list them for other tools. For now they are listed after
|
||||
-- other files, rather than following immediately their parent,
|
||||
-- because there is no cheap link between the elaboration table
|
||||
-- and the ALIs table.
|
||||
-- Subunits do not appear in the elaboration table because they
|
||||
-- are subsumed by their parent units, but we need to list them
|
||||
-- for other tools. For now they are listed after other files,
|
||||
-- rather than right after their parent, since there is no easy
|
||||
-- link between the elaboration table and the ALIs table ???
|
||||
-- Note also that subunits may appear repeatedly in the list,
|
||||
-- if the parent unit appears in the context of several units
|
||||
-- in the closure.
|
||||
|
||||
for J in Sdep.First .. Sdep.Last loop
|
||||
if Sdep.Table (J).Subunit_Name /= No_Name
|
||||
@ -853,8 +855,7 @@ begin
|
||||
Write_Str (" ");
|
||||
end if;
|
||||
|
||||
Write_Str
|
||||
(Get_Name_String (Sdep.Table (J).Sfile));
|
||||
Write_Str (Get_Name_String (Sdep.Table (J).Sfile));
|
||||
Write_Eol;
|
||||
end if;
|
||||
end loop;
|
||||
|
@ -485,19 +485,27 @@ package body Prj.Part is
|
||||
return;
|
||||
end if;
|
||||
|
||||
Parse_Single_Project
|
||||
(In_Tree => In_Tree,
|
||||
Project => Project,
|
||||
Extends_All => Dummy,
|
||||
Path_Name => Path_Name,
|
||||
Extended => False,
|
||||
From_Extended => None,
|
||||
In_Limited => False,
|
||||
Packages_To_Check => Packages_To_Check,
|
||||
Depth => 0,
|
||||
Current_Dir => Current_Directory,
|
||||
Is_Config_File => Is_Config_File,
|
||||
Flags => Flags);
|
||||
begin
|
||||
Parse_Single_Project
|
||||
(In_Tree => In_Tree,
|
||||
Project => Project,
|
||||
Extends_All => Dummy,
|
||||
Path_Name => Path_Name,
|
||||
Extended => False,
|
||||
From_Extended => None,
|
||||
In_Limited => False,
|
||||
Packages_To_Check => Packages_To_Check,
|
||||
Depth => 0,
|
||||
Current_Dir => Current_Directory,
|
||||
Is_Config_File => Is_Config_File,
|
||||
Flags => Flags);
|
||||
|
||||
exception
|
||||
when Types.Unrecoverable_Error =>
|
||||
-- Unrecoverable_Error is raised when a line is too long.
|
||||
-- A meaningful error message will be displayed later.
|
||||
Project := Empty_Node;
|
||||
end;
|
||||
|
||||
-- If Project is an extending-all project, create the eventual
|
||||
-- virtual extending projects and check that there are no illegally
|
||||
|
@ -540,12 +540,9 @@ package body Sem_Ch12 is
|
||||
-- initialized before call to Check_Generic_Child_Unit.
|
||||
|
||||
procedure Install_Formal_Packages (Par : Entity_Id);
|
||||
-- If any of the formals of the parent are formal packages with box,
|
||||
-- their formal parts are visible in the parent and thus in the child
|
||||
-- unit as well. Analogous to what is done in Check_Generic_Actuals
|
||||
-- for the unit itself. This procedure is also used in an instance, to
|
||||
-- make visible the proper entities of the actual for a formal package
|
||||
-- declared with a box.
|
||||
-- Install the visible part of any formal of the parent that is a formal
|
||||
-- package. Note that for the case of a formal package with a box, this
|
||||
-- includes the formal part of the formal package (12.7(10/2)).
|
||||
|
||||
procedure Install_Parent (P : Entity_Id; In_Body : Boolean := False);
|
||||
-- When compiling an instance of a child unit the parent (which is
|
||||
@ -5217,11 +5214,10 @@ package body Sem_Ch12 is
|
||||
|
||||
elsif In_Open_Scopes (Inst_Par) then
|
||||
|
||||
-- If the parent is already installed verify that the
|
||||
-- actuals for its formal packages declared with a box
|
||||
-- are already installed. This is necessary when the
|
||||
-- child instance is a child of the parent instance.
|
||||
-- In this case the parent is placed on the scope stack
|
||||
-- If the parent is already installed, install the actuals
|
||||
-- for its formal packages. This is necessary when the
|
||||
-- child instance is a child of the parent instance:
|
||||
-- in this case, the parent is placed on the scope stack
|
||||
-- but the formal packages are not made visible.
|
||||
|
||||
Install_Formal_Packages (Inst_Par);
|
||||
@ -7191,24 +7187,20 @@ package body Sem_Ch12 is
|
||||
if Renamed_Object (E) = Par then
|
||||
exit;
|
||||
|
||||
-- The visibility of a formal of an enclosing generic is
|
||||
-- already correct.
|
||||
-- The visibility of a formal of an enclosing generic is already
|
||||
-- correct.
|
||||
|
||||
elsif Denotes_Formal_Package (E) then
|
||||
null;
|
||||
|
||||
elsif Present (Associated_Formal_Package (E))
|
||||
and then Box_Present (Parent (Associated_Formal_Package (E)))
|
||||
then
|
||||
elsif Present (Associated_Formal_Package (E)) then
|
||||
Check_Generic_Actuals (Renamed_Object (E), True);
|
||||
Set_Is_Hidden (E, False);
|
||||
|
||||
-- Find formal package in generic unit that corresponds to
|
||||
-- (instance of) formal package in instance.
|
||||
|
||||
while Present (Gen_E)
|
||||
and then Chars (Gen_E) /= Chars (E)
|
||||
loop
|
||||
while Present (Gen_E) and then Chars (Gen_E) /= Chars (E) loop
|
||||
Next_Entity (Gen_E);
|
||||
end loop;
|
||||
|
||||
@ -8365,7 +8357,7 @@ package body Sem_Ch12 is
|
||||
"with volatile actual", Actual);
|
||||
end if;
|
||||
|
||||
-- formal in-parameter
|
||||
-- Formal in-parameter
|
||||
|
||||
else
|
||||
-- The instantiation of a generic formal in-parameter is constant
|
||||
|
Loading…
x
Reference in New Issue
Block a user