+2009-04-22 Robert Dewar <dewar@adacore.com>
+
+ * lib-load.adb: MInor reformatting
+
+ * lib-load.ads: Minor reformatting
+
+ * sinfo.ads: Minor reformatting
+
2009-04-22 Bob Duff <duff@adacore.com>
* exp_pakd.adb: Minor comment fixes.
procedure Make_Instance_Unit (N : Node_Id; In_Main : Boolean) is
Sind : constant Source_File_Index := Source_Index (Main_Unit);
+
begin
Units.Increment_Last;
Units.Table (Main_Unit).Version := Source_Checksum (Sind);
else
- -- Duplicate information from instance unit, for the body.
- Units.Table (Units.Last) :=
- Units.Table (Get_Cunit_Unit_Number (Library_Unit (N)));
+ -- Duplicate information from instance unit, for the body
+ -- The unit node N has been rewritten as a body, but it was placed
+ -- in the units table when first loaded as a declaration.
+
+ Units.Table (Units.Last) := Units.Table (Get_Cunit_Unit_Number (N));
Units.Table (Units.Last).Cunit := N;
end if;
end Make_Instance_Unit;
-- We create an additional entry for the body, so that the binder can
-- generate the proper elaboration calls to both. The argument N is the
-- compilation unit node created for the body.
+ --
-- If the instance is not the main program, we still generate the instance
-- body even though we do not generate code for it. In that case we still
-- generate a compilation unit node for it, and we need to make an entry
-- package provides a basic tree structure. Sinfo describes how this structure
-- is used to represent the syntax of an Ada program.
--- The grammar in the RM is followed very closely in the tree
--- design, and is repeated as part of this source file.
+-- The grammar in the RM is followed very closely in the tree design, and is
+-- repeated as part of this source file.
-- The tree contains not only the full syntactic representation of the
-- program, but also the results of semantic analysis. In particular, the