Commit 852dba80 by Arnaud Charlet

[multiple changes]

2009-06-24  Javier Miranda  <miranda@adacore.com>

	* exp_ch4.adb (Expand_N_Type_Conversion): Handle entities that are
	visible through limited-with context clauses. In addition, avoid an
	extra tag check that is not required when the class-wide
	designated types of the operand and target types are
	the same entity.
	(Tagged_Membership): Handle entities from the limited view.

2009-06-24  Emmanuel Briot  <briot@adacore.com>

	* gnatcmd.adb, make.adb, mlib-prj.adb, prj.ads, clean.adb,
	prj-nmsc.adb, prj-env.adb (File_Name_Data): removed
	(Spec_Or_Body): now a subtype of Source_Kind, to avoid using two
	different vocabularies for similar concepts (Impl/Body_Part and
	Spec/Specification).
	(Unit_Data): now points directly to a Source_Id, rather than duplicating
	some of the information in File_Name_Data. This also saves a bit of
	memory. However, since we are now using a pointer we need to test
	for null explicitly in several places of the code

From-SVN: r148900
parent 950d217a
2009-06-24 Javier Miranda <miranda@adacore.com> 2009-06-24 Javier Miranda <miranda@adacore.com>
* exp_ch4.adb (Expand_N_Type_Conversion): Handle entities that are
visible through limited-with context clauses. In addition, avoid an
extra tag check that is not required when the class-wide
designated types of the operand and target types are
the same entity.
(Tagged_Membership): Handle entities from the limited view.
2009-06-24 Emmanuel Briot <briot@adacore.com>
* gnatcmd.adb, make.adb, mlib-prj.adb, prj.ads, clean.adb,
prj-nmsc.adb, prj-env.adb (File_Name_Data): removed
(Spec_Or_Body): now a subtype of Source_Kind, to avoid using two
different vocabularies for similar concepts (Impl/Body_Part and
Spec/Specification).
(Unit_Data): now points directly to a Source_Id, rather than duplicating
some of the information in File_Name_Data. This also saves a bit of
memory. However, since we are now using a pointer we need to test
for null explicitly in several places of the code
2009-06-24 Javier Miranda <miranda@adacore.com>
* exp_ch4.adb (Expand_N_Type_Conversion): return immediately * exp_ch4.adb (Expand_N_Type_Conversion): return immediately
from processing the type conversion when the node is from processing the type conversion when the node is
replaced by an N_Raise_Program_Error node. replaced by an N_Raise_Program_Error node.
......
...@@ -577,22 +577,23 @@ package body Clean is ...@@ -577,22 +577,23 @@ package body Clean is
loop loop
Unit := Project_Tree.Units.Table (Index); Unit := Project_Tree.Units.Table (Index);
if Ultimate_Extending_Project_Of if Unit.File_Names (Impl) /= null
(Unit.File_Names (Body_Part).Project) = Project and then Ultimate_Extending_Project_Of
(Unit.File_Names (Impl).Project) = Project
and then and then
Get_Name_String Get_Name_String (Unit.File_Names (Impl).File)
(Unit.File_Names (Body_Part).Name) = = Name (1 .. Last)
Name (1 .. Last)
then then
Delete_File := True; Delete_File := True;
exit; exit;
end if; end if;
if Ultimate_Extending_Project_Of if Unit.File_Names (Spec) /= null
(Unit.File_Names (Specification).Project) = Project and then Ultimate_Extending_Project_Of
(Unit.File_Names (Spec).Project) = Project
and then and then
Get_Name_String Get_Name_String
(Unit.File_Names (Specification).Name) = (Unit.File_Names (Spec).File) =
Name (1 .. Last) Name (1 .. Last)
then then
Delete_File := True; Delete_File := True;
...@@ -741,15 +742,16 @@ package body Clean is ...@@ -741,15 +742,16 @@ package body Clean is
loop loop
Unit := Project_Tree.Units.Table (Index); Unit := Project_Tree.Units.Table (Index);
if Unit.File_Names (Body_Part).Project /= if Unit.File_Names (Impl) /= null
and then Unit.File_Names (Impl).Project /=
No_Project No_Project
then then
if Ultimate_Extending_Project_Of if Ultimate_Extending_Project_Of
(Unit.File_Names (Body_Part).Project) = (Unit.File_Names (Impl).Project) =
Project Project
then then
Get_Name_String Get_Name_String
(Unit.File_Names (Body_Part).Name); (Unit.File_Names (Impl).File);
Name_Len := Name_Len - Name_Len := Name_Len -
File_Extension File_Extension
(Name (1 .. Name_Len))'Length; (Name (1 .. Name_Len))'Length;
...@@ -761,12 +763,13 @@ package body Clean is ...@@ -761,12 +763,13 @@ package body Clean is
end if; end if;
end if; end if;
elsif Ultimate_Extending_Project_Of elsif Unit.File_Names (Spec) /= null
(Unit.File_Names (Specification).Project) = and then Ultimate_Extending_Project_Of
(Unit.File_Names (Spec).Project) =
Project Project
then then
Get_Name_String Get_Name_String
(Unit.File_Names (Specification).Name); (Unit.File_Names (Spec).File);
Name_Len := Name_Len - Name_Len := Name_Len -
File_Extension File_Extension
(Name (1 .. Name_Len))'Length; (Name (1 .. Name_Len))'Length;
...@@ -887,16 +890,33 @@ package body Clean is ...@@ -887,16 +890,33 @@ package body Clean is
-- project, check for the corresponding ALI file in the -- project, check for the corresponding ALI file in the
-- object directory. -- object directory.
if In_Extension_Chain if (U_Data.File_Names (Impl) /= null
(U_Data.File_Names (Body_Part).Project, Project) and then
In_Extension_Chain
(U_Data.File_Names (Impl).Project, Project))
or else or else
In_Extension_Chain (U_Data.File_Names (Spec) /= null
(U_Data.File_Names (Specification).Project, Project) and then In_Extension_Chain
(U_Data.File_Names
(Spec).Project, Project))
then then
File_Name1 := U_Data.File_Names (Body_Part).Name; if U_Data.File_Names (Impl) /= null then
Index1 := U_Data.File_Names (Body_Part).Index; File_Name1 := U_Data.File_Names (Impl).File;
File_Name2 := U_Data.File_Names (Specification).Name; Index1 := U_Data.File_Names (Impl).Index;
Index2 := U_Data.File_Names (Specification).Index; else
File_Name1 := No_File;
Index1 := 0;
end if;
if U_Data.File_Names (Spec) /= null then
File_Name2 :=
U_Data.File_Names (Spec).File;
Index2 :=
U_Data.File_Names (Spec).Index;
else
File_Name2 := No_File;
Index2 := 0;
end if;
-- If there is no body file name, then there may be -- If there is no body file name, then there may be
-- only a spec. -- only a spec.
......
...@@ -7955,9 +7955,13 @@ package body Exp_Ch4 is ...@@ -7955,9 +7955,13 @@ package body Exp_Ch4 is
begin begin
if Is_Access_Type (Target_Type) then if Is_Access_Type (Target_Type) then
Actual_Op_Typ := Designated_Type (Operand_Type);
Actual_Targ_Typ := Designated_Type (Target_Type);
-- Handle entities from the limited view
Actual_Op_Typ :=
Available_View (Designated_Type (Operand_Type));
Actual_Targ_Typ :=
Available_View (Designated_Type (Target_Type));
else else
Actual_Op_Typ := Operand_Type; Actual_Op_Typ := Operand_Type;
Actual_Targ_Typ := Target_Type; Actual_Targ_Typ := Target_Type;
...@@ -7978,6 +7982,7 @@ package body Exp_Ch4 is ...@@ -7978,6 +7982,7 @@ package body Exp_Ch4 is
-- conversion. -- conversion.
if Is_Class_Wide_Type (Actual_Op_Typ) if Is_Class_Wide_Type (Actual_Op_Typ)
and then Actual_Op_Typ /= Actual_Targ_Typ
and then Root_Op_Typ /= Actual_Targ_Typ and then Root_Op_Typ /= Actual_Targ_Typ
and then Is_Ancestor (Root_Op_Typ, Actual_Targ_Typ) and then Is_Ancestor (Root_Op_Typ, Actual_Targ_Typ)
then then
...@@ -9486,8 +9491,10 @@ package body Exp_Ch4 is ...@@ -9486,8 +9491,10 @@ package body Exp_Ch4 is
Obj_Tag : Node_Id; Obj_Tag : Node_Id;
begin begin
Left_Type := Etype (Left); -- Handle entities from the limited view
Right_Type := Etype (Right);
Left_Type := Available_View (Etype (Left));
Right_Type := Available_View (Etype (Right));
if Is_Class_Wide_Type (Left_Type) then if Is_Class_Wide_Type (Left_Type) then
Left_Type := Root_Type (Left_Type); Left_Type := Root_Type (Left_Type);
......
...@@ -418,21 +418,18 @@ procedure GNATCmd is ...@@ -418,21 +418,18 @@ procedure GNATCmd is
-- spec, but not the subunits. -- spec, but not the subunits.
if The_Command = List then if The_Command = List then
if if Unit_Data.File_Names (Impl) /= null
Unit_Data.File_Names (Body_Part).Name /= No_File and then Unit_Data.File_Names (Impl).Path.Name /= Slash
and then
Unit_Data.File_Names (Body_Part).Path.Name /= Slash
then then
-- There is a body, check if it is for this project -- There is a body, check if it is for this project
if All_Projects or else if All_Projects or else
Unit_Data.File_Names (Body_Part).Project = Project Unit_Data.File_Names (Impl).Project = Project
then then
Subunit := False; Subunit := False;
if Unit_Data.File_Names (Specification).Name = No_File if Unit_Data.File_Names (Spec) = null
or else Unit_Data.File_Names or else Unit_Data.File_Names (Spec).Path.Name = Slash
(Specification).Path.Name = Slash
then then
-- We have a body with no spec: we need to check if -- We have a body with no spec: we need to check if
-- this is a subunit, because gnatls will complain -- this is a subunit, because gnatls will complain
...@@ -443,7 +440,7 @@ procedure GNATCmd is ...@@ -443,7 +440,7 @@ procedure GNATCmd is
Sinput.P.Load_Project_File Sinput.P.Load_Project_File
(Get_Name_String (Get_Name_String
(Unit_Data.File_Names (Unit_Data.File_Names
(Body_Part).Path.Name)); (Impl).Path.Name));
begin begin
Subunit := Subunit :=
Sinput.P.Source_File_Is_Subunit (Src_Ind); Sinput.P.Source_File_Is_Subunit (Src_Ind);
...@@ -456,27 +453,25 @@ procedure GNATCmd is ...@@ -456,27 +453,25 @@ procedure GNATCmd is
new String' new String'
(Get_Name_String (Get_Name_String
(Unit_Data.File_Names (Unit_Data.File_Names
(Body_Part).Display_Name)); (Impl).Display_File));
end if; end if;
end if; end if;
elsif elsif Unit_Data.File_Names (Spec) /= null
Unit_Data.File_Names (Specification).Name /= No_File and then Unit_Data.File_Names (Spec).Path.Name /= Slash
and then
Unit_Data.File_Names (Specification).Path.Name /= Slash
then then
-- We have a spec with no body. Check if it is for this -- We have a spec with no body. Check if it is for this
-- project. -- project.
if All_Projects or else if All_Projects or else
Unit_Data.File_Names (Specification).Project = Project Unit_Data.File_Names (Spec).Project = Project
then then
Last_Switches.Increment_Last; Last_Switches.Increment_Last;
Last_Switches.Table (Last_Switches.Last) := Last_Switches.Table (Last_Switches.Last) :=
new String' new String'
(Get_Name_String (Get_Name_String
(Unit_Data.File_Names (Unit_Data.File_Names
(Specification).Display_Name)); (Spec).Display_File));
end if; end if;
end if; end if;
...@@ -486,21 +481,19 @@ procedure GNATCmd is ...@@ -486,21 +481,19 @@ procedure GNATCmd is
-- but not the subunits. -- but not the subunits.
elsif The_Command = Stack then elsif The_Command = Stack then
if Unit_Data.File_Names (Body_Part).Name /= No_File if Unit_Data.File_Names (Impl) /= null
and then and then Unit_Data.File_Names (Impl).Path.Name /= Slash
Unit_Data.File_Names (Body_Part).Path.Name /= Slash
then then
-- There is a body. Check if .ci files for this project -- There is a body. Check if .ci files for this project
-- must be added. -- must be added.
if Check_Project if Check_Project
(Unit_Data.File_Names (Body_Part).Project, Project) (Unit_Data.File_Names (Impl).Project, Project)
then then
Subunit := False; Subunit := False;
if Unit_Data.File_Names (Specification).Name = No_File if Unit_Data.File_Names (Spec) = null
or else Unit_Data.File_Names or else Unit_Data.File_Names (Spec).Path.Name = Slash
(Specification).Path.Name = Slash
then then
-- We have a body with no spec: we need to check -- We have a body with no spec: we need to check
-- if this is a subunit, because .ci files are not -- if this is a subunit, because .ci files are not
...@@ -511,7 +504,7 @@ procedure GNATCmd is ...@@ -511,7 +504,7 @@ procedure GNATCmd is
Sinput.P.Load_Project_File Sinput.P.Load_Project_File
(Get_Name_String (Get_Name_String
(Unit_Data.File_Names (Unit_Data.File_Names
(Body_Part).Path.Name)); (Impl).Path.Name));
begin begin
Subunit := Subunit :=
Sinput.P.Source_File_Is_Subunit (Src_Ind); Sinput.P.Source_File_Is_Subunit (Src_Ind);
...@@ -524,40 +517,37 @@ procedure GNATCmd is ...@@ -524,40 +517,37 @@ procedure GNATCmd is
new String' new String'
(Get_Name_String (Get_Name_String
(Unit_Data.File_Names (Unit_Data.File_Names
(Body_Part).Project. (Impl).Project.
Object_Directory.Name) & Object_Directory.Name) &
Directory_Separator & Directory_Separator &
MLib.Fil.Ext_To MLib.Fil.Ext_To
(Get_Name_String (Get_Name_String
(Unit_Data.File_Names (Unit_Data.File_Names
(Body_Part).Display_Name), (Impl).Display_File),
"ci")); "ci"));
end if; end if;
end if; end if;
elsif Unit_Data.File_Names (Specification).Name /= No_File elsif Unit_Data.File_Names (Spec) /= null
and then and then Unit_Data.File_Names (Spec).Path.Name /= Slash
Unit_Data.File_Names (Specification).Path.Name /= Slash
then then
-- We have a spec with no body. Check if it is for this -- We have a spec with no body. Check if it is for this
-- project. -- project.
if Check_Project if Check_Project
(Unit_Data.File_Names (Specification).Project, (Unit_Data.File_Names (Spec).Project, Project)
Project)
then then
Last_Switches.Increment_Last; Last_Switches.Increment_Last;
Last_Switches.Table (Last_Switches.Last) := Last_Switches.Table (Last_Switches.Last) :=
new String' new String'
(Get_Name_String (Get_Name_String
(Unit_Data.File_Names (Unit_Data.File_Names
(Specification).Project. (Spec).Project.
Object_Directory.Name) & Object_Directory.Name) &
Dir_Separator & Dir_Separator &
MLib.Fil.Ext_To MLib.Fil.Ext_To
(Get_Name_String (Get_Name_String
(Unit_Data.File_Names (Unit_Data.File_Names (Spec).File),
(Specification).Name),
"ci")); "ci"));
end if; end if;
end if; end if;
...@@ -568,14 +558,13 @@ procedure GNATCmd is ...@@ -568,14 +558,13 @@ procedure GNATCmd is
-- specified. -- specified.
for Kind in Spec_Or_Body loop for Kind in Spec_Or_Body loop
if Check_Project if Unit_Data.File_Names (Kind) /= null
(Unit_Data.File_Names (Kind).Project, Project) and then Check_Project
and then Unit_Data.File_Names (Kind).Name /= No_File (Unit_Data.File_Names (Kind).Project, Project)
and then Unit_Data.File_Names (Kind).Path.Name /= Slash and then Unit_Data.File_Names (Kind).Path.Name /= Slash
then then
Get_Name_String Get_Name_String
(Unit_Data.File_Names (Unit_Data.File_Names (Kind).Path.Display_Name);
(Kind).Path.Display_Name);
if FD /= Invalid_FD then if FD /= Invalid_FD then
Name_Len := Name_Len + 1; Name_Len := Name_Len + 1;
...@@ -833,20 +822,20 @@ procedure GNATCmd is ...@@ -833,20 +822,20 @@ procedure GNATCmd is
loop loop
Udata := Project_Tree.Units.Table (Unit); Udata := Project_Tree.Units.Table (Unit);
if Udata.File_Names (Specification).Name /= No_File if Udata.File_Names (Spec) /= null
and then and then
Get_Name_String (Udata.File_Names (Specification).Name) = Get_Name_String (Udata.File_Names (Spec).File) =
Line (1 .. Last) Line (1 .. Last)
then then
Path := Udata.File_Names (Specification).Path.Name; Path := Udata.File_Names (Spec).Path.Name;
exit; exit;
elsif Udata.File_Names (Body_Part).Name /= No_File elsif Udata.File_Names (Impl) /= null
and then and then
Get_Name_String (Udata.File_Names (Body_Part).Name) = Get_Name_String (Udata.File_Names (Impl).File) =
Line (1 .. Last) Line (1 .. Last)
then then
Path := Udata.File_Names (Body_Part).Path.Name; Path := Udata.File_Names (Impl).Path.Name;
exit; exit;
end if; end if;
end loop; end loop;
......
...@@ -948,21 +948,20 @@ package body MLib.Prj is ...@@ -948,21 +948,20 @@ package body MLib.Prj is
loop loop
Unit := In_Tree.Units.Table (Source); Unit := In_Tree.Units.Table (Source);
if Unit.File_Names (Body_Part).Name /= No_File if Unit.File_Names (Impl) /= null
and then Unit.File_Names (Body_Part).Path.Name /= Slash and then Unit.File_Names (Impl).Path.Name /= Slash
then then
if if
Check_Project (Unit.File_Names (Body_Part).Project) Check_Project (Unit.File_Names (Impl).Project)
then then
if Unit.File_Names (Specification).Name = No_File then if Unit.File_Names (Spec) = null then
declare declare
Src_Ind : Source_File_Index; Src_Ind : Source_File_Index;
begin begin
Src_Ind := Sinput.P.Load_Project_File Src_Ind := Sinput.P.Load_Project_File
(Get_Name_String (Get_Name_String
(Unit.File_Names (Unit.File_Names (Impl).Path.Name));
(Body_Part).Path.Name));
-- Add the ALI file only if it is not a subunit -- Add the ALI file only if it is not a subunit
...@@ -970,23 +969,23 @@ package body MLib.Prj is ...@@ -970,23 +969,23 @@ package body MLib.Prj is
Sinput.P.Source_File_Is_Subunit (Src_Ind) Sinput.P.Source_File_Is_Subunit (Src_Ind)
then then
Add_ALI_For Add_ALI_For
(Unit.File_Names (Body_Part).Name); (Unit.File_Names (Impl).File);
exit when not Bind; exit when not Bind;
end if; end if;
end; end;
else else
Add_ALI_For (Unit.File_Names (Body_Part).Name); Add_ALI_For (Unit.File_Names (Impl).File);
exit when not Bind; exit when not Bind;
end if; end if;
end if; end if;
elsif Unit.File_Names (Specification).Name /= No_File elsif Unit.File_Names (Spec) /= null
and then Unit.File_Names (Specification).Path.Name /= Slash and then Unit.File_Names (Spec).Path.Name /= Slash
and then Check_Project and then Check_Project
(Unit.File_Names (Specification).Project) (Unit.File_Names (Spec).Project)
then then
Add_ALI_For (Unit.File_Names (Specification).Name); Add_ALI_For (Unit.File_Names (Spec).File);
exit when not Bind; exit when not Bind;
end if; end if;
end loop; end loop;
...@@ -1424,30 +1423,29 @@ package body MLib.Prj is ...@@ -1424,30 +1423,29 @@ package body MLib.Prj is
loop loop
if In_Tree.Units.Table if In_Tree.Units.Table
(Index).File_Names (Index).File_Names
(Body_Part).Name /= No_File (Impl) /= null
then then
Proj := Proj :=
In_Tree.Units.Table (Index). In_Tree.Units.Table (Index).
File_Names File_Names
(Body_Part).Project; (Impl).Project;
Fname := Fname :=
In_Tree.Units.Table (Index). In_Tree.Units.Table (Index).
File_Names (Body_Part).Name; File_Names (Impl).File;
elsif elsif
In_Tree.Units.Table In_Tree.Units.Table
(Index).File_Names (Index).File_Names
(Specification).Name /= (Spec) /= null
No_File
then then
Proj := Proj :=
In_Tree.Units.Table In_Tree.Units.Table
(Index).File_Names (Index).File_Names
(Specification).Project; (Spec).Project;
Fname := Fname :=
In_Tree.Units.Table In_Tree.Units.Table
(Index).File_Names (Index).File_Names
(Specification).Name; (Spec).File;
else else
Proj := No_Project; Proj := No_Project;
...@@ -1842,15 +1840,16 @@ package body MLib.Prj is ...@@ -1842,15 +1840,16 @@ package body MLib.Prj is
loop loop
Unit := In_Tree.Units.Table (Index); Unit := In_Tree.Units.Table (Index);
if Unit.File_Names (Body_Part).Project /= if Unit.File_Names (Impl) /= null
and then Unit.File_Names (Impl).Project /=
No_Project No_Project
then then
if Ultimate_Extending_Project_Of if Ultimate_Extending_Project_Of
(Unit.File_Names (Body_Part).Project) = (Unit.File_Names (Impl).Project) =
For_Project For_Project
then then
Get_Name_String Get_Name_String
(Unit.File_Names (Body_Part).Name); (Unit.File_Names (Impl).File);
Name_Len := Name_Len - Name_Len := Name_Len -
File_Extension File_Extension
(Name (1 .. Name_Len))'Length; (Name (1 .. Name_Len))'Length;
...@@ -1862,12 +1861,13 @@ package body MLib.Prj is ...@@ -1862,12 +1861,13 @@ package body MLib.Prj is
end if; end if;
end if; end if;
elsif Ultimate_Extending_Project_Of elsif Unit.File_Names (Spec) /= null
(Unit.File_Names (Specification).Project) = and then Ultimate_Extending_Project_Of
For_Project (Unit.File_Names (Spec).Project) =
For_Project
then then
Get_Name_String Get_Name_String
(Unit.File_Names (Specification).Name); (Unit.File_Names (Spec).File);
Name_Len := Name_Len :=
Name_Len - Name_Len -
File_Extension File_Extension
...@@ -1983,23 +1983,25 @@ package body MLib.Prj is ...@@ -1983,23 +1983,25 @@ package body MLib.Prj is
for Index in 1 .. Unit_Table.Last (In_Tree.Units) loop for Index in 1 .. Unit_Table.Last (In_Tree.Units) loop
Unit := In_Tree.Units.Table (Index); Unit := In_Tree.Units.Table (Index);
if Ultimate_Extending_Project_Of if Unit.File_Names (Impl) /= null
(Unit.File_Names (Body_Part).Project) = For_Project and then Ultimate_Extending_Project_Of
(Unit.File_Names (Impl).Project) = For_Project
and then and then
Get_Name_String Get_Name_String
(Unit.File_Names (Body_Part).Name) = (Unit.File_Names (Impl).File) =
Name (1 .. Last) Name (1 .. Last)
then then
Delete := True; Delete := True;
exit; exit;
end if; end if;
if Ultimate_Extending_Project_Of if Unit.File_Names (Spec) /= null
(Unit.File_Names (Specification).Project) = and then Ultimate_Extending_Project_Of
(Unit.File_Names (Spec).Project) =
For_Project For_Project
and then and then
Get_Name_String Get_Name_String
(Unit.File_Names (Specification).Name) = (Unit.File_Names (Spec).File) =
Name (1 .. Last) Name (1 .. Last)
then then
Delete := True; Delete := True;
...@@ -2193,9 +2195,10 @@ package body MLib.Prj is ...@@ -2193,9 +2195,10 @@ package body MLib.Prj is
-- Find and copy the immediate or inherited source -- Find and copy the immediate or inherited source
for J in Data.File_Names'Range loop for J in Data.File_Names'Range loop
if Is_Same_Or_Extension if Data.File_Names (J) /= null
(For_Project, Data.File_Names (J).Project) and then Is_Same_Or_Extension
and then Data.File_Names (J).Name = File_Name (For_Project, Data.File_Names (J).Project)
and then Data.File_Names (J).File = File_Name
then then
Copy_File Copy_File
(Get_Name_String (Data.File_Names (J).Path.Name), (Get_Name_String (Data.File_Names (J).Path.Name),
......
...@@ -626,6 +626,7 @@ package Prj is ...@@ -626,6 +626,7 @@ package Prj is
Lang_Kind : Language_Kind := File_Based; Lang_Kind : Language_Kind := File_Based;
-- Kind of the language -- Kind of the language
-- ??? Should be in Language itself
Compiled : Boolean := True; Compiled : Boolean := True;
-- False when there is no compiler for the language -- False when there is no compiler for the language
...@@ -675,6 +676,8 @@ package Prj is ...@@ -675,6 +676,8 @@ package Prj is
Path : Path_Information := No_Path_Information; Path : Path_Information := No_Path_Information;
-- Path name of the source -- Path name of the source
-- Path.Name is set to Slash for an excluded file that does not belong
-- in the project in fact
Source_TS : Time_Stamp_Type := Empty_Time_Stamp; Source_TS : Time_Stamp_Type := Empty_Time_Stamp;
-- Time stamp of the source file -- Time stamp of the source file
...@@ -1342,20 +1345,8 @@ package Prj is ...@@ -1342,20 +1345,8 @@ package Prj is
Project_Error : exception; Project_Error : exception;
-- Raised by some subprograms in Prj.Attr -- Raised by some subprograms in Prj.Attr
type Spec_Or_Body is (Specification, Body_Part); subtype Spec_Or_Body is Source_Kind range Spec .. Impl;
type File_Names_Data is array (Spec_Or_Body) of Source_Id;
type File_Name_Data is record
Name : File_Name_Type := No_File;
Index : Int := 0;
Display_Name : File_Name_Type := No_File;
Path : Path_Information := No_Path_Information;
Project : Project_Id := No_Project;
Needs_Pragma : Boolean := False;
end record;
-- File and Path name of a spec or body
type File_Names_Data is array (Spec_Or_Body) of File_Name_Data;
type Unit_Index is new Nat; type Unit_Index is new Nat;
No_Unit_Index : constant Unit_Index := 0; No_Unit_Index : constant Unit_Index := 0;
type Unit_Data is record type Unit_Data is record
......
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