Commit 8fb3f5df by Arnaud Charlet

[multiple changes]

2011-08-04  Emmanuel Briot  <briot@adacore.com>

	* make.adb: Remove debug trace.

2011-08-04  Vincent Celier  <celier@adacore.com>

	* makeutl.adb (Do_Complete): Get the absolute path name of a relative
	path in canonical form, to be able to compare path names on platforms
	such as Windows or Darwin.

2011-08-04  Thomas Quinot  <quinot@adacore.com>

	* par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
	For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
	* scos.ads: Update documentation accordingly.
	* put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
	pragmas.

From-SVN: r177369
parent 428f80e6
2011-08-04 Emmanuel Briot <briot@adacore.com>
* make.adb: Remove debug trace.
2011-08-04 Vincent Celier <celier@adacore.com>
* makeutl.adb (Do_Complete): Get the absolute path name of a relative
path in canonical form, to be able to compare path names on platforms
such as Windows or Darwin.
2011-08-04 Thomas Quinot <quinot@adacore.com>
* par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
* scos.ads: Update documentation accordingly.
* put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
pragmas.
2011-08-04 Ed Schonberg <schonberg@adacore.com> 2011-08-04 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
......
...@@ -5695,9 +5695,6 @@ package body Make is ...@@ -5695,9 +5695,6 @@ package body Make is
Info := Mains.Next_Main; Info := Mains.Next_Main;
exit when Info = No_Main_Info; exit when Info = No_Main_Info;
Debug_Output ("MANU Got main: ", Name_Id (Info.File));
Debug_Output ("MANU in project: ", Info.Project.Name);
Proj := Ultimate_Extending_Project_Of (Info.Project); Proj := Ultimate_Extending_Project_Of (Info.Project);
if Real_Main_Project = No_Project then if Real_Main_Project = No_Project then
......
...@@ -1452,7 +1452,8 @@ package body Makeutl is ...@@ -1452,7 +1452,8 @@ package body Makeutl is
Normalize_Pathname Normalize_Pathname
(Name => Main, (Name => Main,
Directory => "", Directory => "",
Resolve_Links => False); Resolve_Links => False,
Case_Sensitive => False);
begin begin
File.File := Create_Name (Absolute); File.File := Create_Name (Absolute);
Main_Id := Create_Name (Base); Main_Id := Create_Name (Base);
......
...@@ -765,7 +765,10 @@ package body Par_SCO is ...@@ -765,7 +765,10 @@ package body Par_SCO is
Index := Condition_Pragma_Hash_Table.Get (Loc); Index := Condition_Pragma_Hash_Table.Get (Loc);
-- The test here for zero is to deal with possible previous errors -- The test here for zero is to deal with possible previous errors, and
-- for the case of pragma statement SCOs, for which we always set the
-- Pragma_Sloc even if the particular pragma cannot be specifically
-- disabled.
if Index /= 0 then if Index /= 0 then
pragma Assert (SCO_Table.Table (Index).C1 = 'P'); pragma Assert (SCO_Table.Table (Index).C1 = 'P');
...@@ -1071,14 +1074,23 @@ package body Par_SCO is ...@@ -1071,14 +1074,23 @@ package body Par_SCO is
end if; end if;
declare declare
SCE : SC_Entry renames SC.Table (J); SCE : SC_Entry renames SC.Table (J);
Pragma_Sloc : Source_Ptr := No_Location;
begin begin
-- For the statement SCO for a pragma, set Pragma_Sloc so that
-- the SCO can be omitted if the pragma is disabled.
if SCE.Typ = 'P' then
Pragma_Sloc := SCE.From;
end if;
Set_Table_Entry Set_Table_Entry
(C1 => C1, (C1 => C1,
C2 => SCE.Typ, C2 => SCE.Typ,
From => SCE.From, From => SCE.From,
To => SCE.To, To => SCE.To,
Last => (J = SC_Last)); Last => (J = SC_Last),
Pragma_Sloc => Pragma_Sloc);
end; end;
end loop; end loop;
......
...@@ -95,7 +95,8 @@ begin ...@@ -95,7 +95,8 @@ begin
pragma Assert (Start <= Stop); pragma Assert (Start <= Stop);
Output_SCO_Line : declare Output_SCO_Line : declare
T : SCO_Table_Entry renames SCO_Table.Table (Start); T : SCO_Table_Entry renames SCO_Table.Table (Start);
Continuation : Boolean;
begin begin
case T.C1 is case T.C1 is
...@@ -103,11 +104,26 @@ begin ...@@ -103,11 +104,26 @@ begin
-- Statements -- Statements
when 'S' => when 'S' =>
Write_Info_Initiate ('C');
Write_Info_Char ('S');
Ctr := 0; Ctr := 0;
Continuation := False;
loop loop
if SCO_Table.Table (Start).C2 = 'P'
and then SCO_Pragma_Disabled
(SCO_Table.Table (Start).Pragma_Sloc)
then
goto Next_Statement;
end if;
if Ctr = 0 then
Write_Info_Initiate ('C');
if not Continuation then
Write_Info_Char ('S');
Continuation := True;
else
Write_Info_Char ('s');
end if;
end if;
Write_Info_Char (' '); Write_Info_Char (' ');
if SCO_Table.Table (Start).C2 /= ' ' then if SCO_Table.Table (Start).C2 /= ' ' then
...@@ -115,22 +131,20 @@ begin ...@@ -115,22 +131,20 @@ begin
end if; end if;
Output_Range (SCO_Table.Table (Start)); Output_Range (SCO_Table.Table (Start));
exit when SCO_Table.Table (Start).Last;
Start := Start + 1; -- Increment entry counter (up to 6 entries per line,
pragma Assert (SCO_Table.Table (Start).C1 = 's'); -- continuation lines are marked Cs).
Ctr := Ctr + 1; Ctr := Ctr + 1;
-- Up to 6 items on a line, if more than 6 items,
-- continuation lines are marked Cs.
if Ctr = 6 then if Ctr = 6 then
Write_Info_Terminate; Write_Info_Terminate;
Write_Info_Initiate ('C');
Write_Info_Char ('s');
Ctr := 0; Ctr := 0;
end if; end if;
<<Next_Statement>>
exit when SCO_Table.Table (Start).Last;
Start := Start + 1;
pragma Assert (SCO_Table.Table (Start).C1 = 's');
end loop; end loop;
Write_Info_Terminate; Write_Info_Terminate;
......
...@@ -355,8 +355,9 @@ package SCOs is ...@@ -355,8 +355,9 @@ package SCOs is
Last : Boolean; Last : Boolean;
Pragma_Sloc : Source_Ptr := No_Location; Pragma_Sloc : Source_Ptr := No_Location;
-- For a SCO nested with a pragma Debug/Assert/PPC, location of pragma -- For the statement SCO for a pragma, or for any expression SCO nested
-- (used for control of SCO output, value not recorded in ALI file). -- in a pragma Debug/Assert/PPC, location of PRAGMA token (used for
-- control of SCO output, value not recorded in ALI file).
end record; end record;
package SCO_Table is new GNAT.Table ( package SCO_Table is new GNAT.Table (
......
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