Commit 9dbf1c3e by Robert Dewar Committed by Arnaud Charlet

par_sco.adb (Traverse_Declarations_Or_Statments): Implement new format of…

par_sco.adb (Traverse_Declarations_Or_Statments): Implement new format of statement sequence SCO entries (one location/statement).

2010-01-26  Robert Dewar  <dewar@adacore.com>

	* par_sco.adb (Traverse_Declarations_Or_Statments): Implement new
	format of statement sequence SCO entries (one location/statement).
	* put_scos.adb (Put_SCOs): Implement new format of CS lines
	* scos.ads: Update comments.
	* sem_eval.adb: Minor reformatting.

From-SVN: r156242
parent 7ef50d41
2010-01-26 Robert Dewar <dewar@adacore.com>
* par_sco.adb (Traverse_Declarations_Or_Statments): Implement new
format of statement sequence SCO entries (one location/statement).
* put_scos.adb (Put_SCOs): Implement new format of CS lines
* scos.ads: Update comments.
* sem_eval.adb: Minor reformatting.
2010-01-26 Robert Dewar <dewar@adacore.com>
* par_sco.ads, par_sco.adb (Set_Statement_Entry): New handling of exits
(Extend_Statement_Sequence): New procedures
(Traverse_Declarations_Or_Statements): New handling for exits.
......
......@@ -90,13 +90,30 @@ begin
case T.C1 is
-- Statements, exit
-- Statements
when 'S' | 'T' =>
Write_Info_Char (' ');
Output_Range (T);
when 'S' =>
loop
Write_Info_Char (' ');
if SCO_Table.Table (Start).C2 /= ' ' then
Write_Info_Char (SCO_Table.Table (Start).C2);
end if;
Output_Range (SCO_Table.Table (Start));
exit when SCO_Table.Table (Start).Last;
Start := Start + 1;
pragma Assert (SCO_Table.Table (Start).C1 = 's');
end loop;
-- Statement continuations should not occur since they
-- are supposed to have been handled in the loop above.
when 's' =>
raise Program_Error;
-- Decision
-- Decision
when 'I' | 'E' | 'W' | 'X' =>
if T.C2 = ' ' then
......
......@@ -48,10 +48,6 @@ package SCOs is
-- Put_SCO reads the internal tables and generates text lines in the ALI
-- format.
-- ??? The specification below for the SCO ALI format and the internal
-- data structures have been modified, but the implementation has not been
-- updated yet to reflect these specification changes.
--------------------
-- SCO ALI Format --
--------------------
......@@ -150,8 +146,10 @@ package SCOs is
-- o object declaration
-- r renaming declaration
-- i generic instantiation
-- C CASE statement
-- F FOR loop statement
-- C CASE statement (includes only the expression)
-- F FOR/WHILE loop statement (includes only the iteration scheme)
-- I IF statement (includes only the condition [in the RM sense, which
-- is a decision in the SCO sense])
-- P PRAGMA
-- R extended RETURN statement
......@@ -279,9 +277,9 @@ package SCOs is
-- Statements
-- C1 = 'S' for entry point, 's' otherwise
-- C2 = 't', 's', 'o', 'r', 'i', 'C', 'F', 'P', 'R', ' '
-- C2 = 't', 's', 'o', 'r', 'i', 'C', 'F', 'I', 'P', 'R', ' '
-- (type/subtype/object/renaming/instantiation/
-- CASE/FOR/PRAGMA/RETURN/other)
-- CASE/FOR or WHILE/IF/PRAGMA/RETURN/other)
-- From = starting source location
-- To = ending source location
-- Last = False for all but the last entry, True for last entry
......@@ -316,7 +314,7 @@ package SCOs is
-- Note: the sequence starting with a decision, and continuing with
-- operators and elements up to and including the first one labeled with
-- Last=True, indicate the sequence to be output for a complex decision
-- Last = True, indicate the sequence to be output for a complex decision
-- on a single CD decision line.
----------------
......
......@@ -1911,9 +1911,9 @@ package body Sem_Eval is
Atyp := Designated_Type (Atyp);
end if;
-- If we have an array type (we should have but perhaps there
-- are error cases where this is not the case), then see if we
-- can do a constant evaluation of the array reference.
-- If we have an array type (we should have but perhaps there are
-- error cases where this is not the case), then see if we can do
-- a constant evaluation of the array reference.
if Is_Array_Type (Atyp) and then Atyp /= Any_Composite then
if Ekind (Atyp) = E_String_Literal_Subtype then
......@@ -1983,8 +1983,8 @@ package body Sem_Eval is
-- Numeric literals are static (RM 4.9(1)), and have already been marked
-- as static by the analyzer. The reason we did it that early is to allow
-- the possibility of turning off the Is_Static_Expression flag after
-- analysis, but before resolution, when integer literals are generated
-- in the expander that do not correspond to static expressions.
-- analysis, but before resolution, when integer literals are generated in
-- the expander that do not correspond to static expressions.
procedure Eval_Integer_Literal (N : Node_Id) is
T : constant Entity_Id := Etype (N);
......
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