Commit 9cd33a66 by Arnaud Charlet

[multiple changes]

2009-07-15  Robert Dewar  <dewar@adacore.com>

	* par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
	N_Label. Remove SCO table entry for entry point (not used).

	* par_sco.ads: Remove SCO entry point type (not used)

	* switch.adb: Minor code clean up.

2009-07-15  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_dbug.ads (Base Record Types): Document enhanced encoding.

2009-07-15  Thomas Quinot  <quinot@adacore.com>

	* gnatls.adb: Minor reformatting

	* gnatcmd.adb: Minor code reorganization

2009-07-15  Ed Schonberg  <schonberg@adacore.com>

	* exp_util.adb (Component_May_Be_Bit_Aligned): Use underlying type to
	determine whether a component of a private type has a composite type.

From-SVN: r149688
parent 6eab5a95
2009-07-15 Robert Dewar <dewar@adacore.com> 2009-07-15 Robert Dewar <dewar@adacore.com>
* par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
N_Label. Remove SCO table entry for entry point (not used).
* par_sco.ads: Remove SCO entry point type (not used)
* switch.adb: Minor code clean up.
2009-07-15 Eric Botcazou <ebotcazou@adacore.com>
* exp_dbug.ads (Base Record Types): Document enhanced encoding.
2009-07-15 Thomas Quinot <quinot@adacore.com>
* gnatls.adb: Minor reformatting
* gnatcmd.adb: Minor code reorganization
2009-07-15 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Component_May_Be_Bit_Aligned): Use underlying type to
determine whether a component of a private type has a composite type.
2009-07-15 Robert Dewar <dewar@adacore.com>
* sem_ch10.adb: Minor reformatting throughout * sem_ch10.adb: Minor reformatting throughout
Minor code reorganization (put nested subprograms in alpha order) Minor code reorganization (put nested subprograms in alpha order)
......
...@@ -844,9 +844,11 @@ package Exp_Dbug is ...@@ -844,9 +844,11 @@ package Exp_Dbug is
-- Specifically, if this name is x, then we produce a record type named -- Specifically, if this name is x, then we produce a record type named
-- x___XVS consisting of one field. The name of this field is that of -- x___XVS consisting of one field. The name of this field is that of
-- the actual type being encoded, which we'll call y (the type of this -- the actual type being encoded, which we'll call y. The type of this
-- single field is arbitrary). Both x and y may have corresponding -- single field can be either an arbitrary non-reference type, e.g. an
-- ___XVE types. -- integer type, or a reference type; in the latter case, the referenced
-- type is also the actual type being encoded y. Both x and y may have
-- corresponding ___XVE types.
-- The size of the objects typed as x should be obtained from the -- The size of the objects typed as x should be obtained from the
-- structure of x (and x___XVE, if applicable) as for ordinary types -- structure of x (and x___XVE, if applicable) as for ordinary types
......
...@@ -913,6 +913,7 @@ package body Exp_Util is ...@@ -913,6 +913,7 @@ package body Exp_Util is
---------------------------------- ----------------------------------
function Component_May_Be_Bit_Aligned (Comp : Entity_Id) return Boolean is function Component_May_Be_Bit_Aligned (Comp : Entity_Id) return Boolean is
UT : constant Entity_Id := Underlying_Type (Etype (Comp));
begin begin
-- If no component clause, then everything is fine, since the back end -- If no component clause, then everything is fine, since the back end
-- never bit-misaligns by default, even if there is a pragma Packed for -- never bit-misaligns by default, even if there is a pragma Packed for
...@@ -924,8 +925,8 @@ package body Exp_Util is ...@@ -924,8 +925,8 @@ package body Exp_Util is
-- It is only array and record types that cause trouble -- It is only array and record types that cause trouble
if not Is_Record_Type (Etype (Comp)) if not Is_Record_Type (UT)
and then not Is_Array_Type (Etype (Comp)) and then not Is_Array_Type (UT)
then then
return False; return False;
...@@ -934,8 +935,8 @@ package body Exp_Util is ...@@ -934,8 +935,8 @@ package body Exp_Util is
-- back end can handle these cases correctly. -- back end can handle these cases correctly.
elsif Esize (Comp) <= 64 elsif Esize (Comp) <= 64
and then (Is_Record_Type (Etype (Comp)) and then (Is_Record_Type (UT)
or else Is_Bit_Packed_Array (Etype (Comp))) or else Is_Bit_Packed_Array (UT))
then then
return False; return False;
......
...@@ -603,7 +603,7 @@ procedure GNATCmd is ...@@ -603,7 +603,7 @@ procedure GNATCmd is
if Project = No_Project then if Project = No_Project then
return False; return False;
elsif All_Projects or Project = Root_Project then elsif All_Projects or else Project = Root_Project then
return True; return True;
elsif The_Command = Metric then elsif The_Command = Metric then
...@@ -2074,7 +2074,7 @@ begin ...@@ -2074,7 +2074,7 @@ begin
Process_Link; Process_Link;
end if; end if;
if The_Command = Link or The_Command = Bind then if The_Command = Link or else The_Command = Bind then
-- For files that are specified as relative paths with directory -- For files that are specified as relative paths with directory
-- information, we convert them to absolute paths, with parent -- information, we convert them to absolute paths, with parent
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -185,19 +185,19 @@ procedure Gnatls is ...@@ -185,19 +185,19 @@ procedure Gnatls is
function Image (Restriction : Restriction_Id) return String; function Image (Restriction : Restriction_Id) return String;
-- Returns the capitalized image of Restriction -- Returns the capitalized image of Restriction
--------------------------------------- ------------------------------------------
-- GLADE specific output subprograms -- -- GNATDIST specific output subprograms --
--------------------------------------- ------------------------------------------
package GLADE is package GNATDIST is
-- Any modification to this subunit requires a synchronization -- Any modification to this subunit requires a synchronization with
-- with the GLADE implementation. -- GNATDIST sources.
procedure Output_ALI (A : ALI_Id); procedure Output_ALI (A : ALI_Id);
procedure Output_No_ALI (Afile : File_Name_Type); procedure Output_No_ALI (Afile : File_Name_Type);
end GLADE; end GNATDIST;
----------------- -----------------
-- Add_Lib_Dir -- -- Add_Lib_Dir --
...@@ -392,11 +392,11 @@ procedure Gnatls is ...@@ -392,11 +392,11 @@ procedure Gnatls is
end if; end if;
end Find_Status; end Find_Status;
----------- --------------
-- GLADE -- -- GNATDIST --
----------- --------------
package body GLADE is package body GNATDIST is
N_Flags : Natural; N_Flags : Natural;
N_Indents : Natural := 0; N_Indents : Natural := 0;
...@@ -610,7 +610,7 @@ procedure Gnatls is ...@@ -610,7 +610,7 @@ procedure Gnatls is
-- There is no full source name. This occurs for instance when a -- There is no full source name. This occurs for instance when a
-- withed unit has a spec file but no body file. This situation -- withed unit has a spec file but no body file. This situation
-- is not a problem for GLADE since the unit may be located on -- is not a problem for GNATDIST since the unit may be located on
-- a partition we do not want to build. However, we need to -- a partition we do not want to build. However, we need to
-- locate the spec file and to find its full source name. -- locate the spec file and to find its full source name.
-- Replace the body file name with the spec file name used to -- Replace the body file name with the spec file name used to
...@@ -794,7 +794,7 @@ procedure Gnatls is ...@@ -794,7 +794,7 @@ procedure Gnatls is
N_Indents := N_Indents - 1; N_Indents := N_Indents - 1;
end Output_With; end Output_With;
end GLADE; end GNATDIST;
----------- -----------
-- Image -- -- Image --
...@@ -1754,7 +1754,7 @@ begin ...@@ -1754,7 +1754,7 @@ begin
if Ali_File = No_File then if Ali_File = No_File then
if Very_Verbose_Mode then if Very_Verbose_Mode then
GLADE.Output_No_ALI (Lib_File_Name (Main_File)); GNATDIST.Output_No_ALI (Lib_File_Name (Main_File));
else else
Write_Str ("Can't find library info for "); Write_Str ("Can't find library info for ");
...@@ -1791,7 +1791,7 @@ begin ...@@ -1791,7 +1791,7 @@ begin
if Very_Verbose_Mode then if Very_Verbose_Mode then
for A in ALIs.First .. ALIs.Last loop for A in ALIs.First .. ALIs.Last loop
GLADE.Output_ALI (A); GNATDIST.Output_ALI (A);
end loop; end loop;
return; return;
......
...@@ -71,13 +71,6 @@ package body Par_SCO is ...@@ -71,13 +71,6 @@ package body Par_SCO is
-- To = ending sloc -- To = ending sloc
-- Last = unused -- Last = unused
-- Entry
-- C1 = 'Y'
-- C2 = ' '
-- From = starting sloc
-- To = ending sloc
-- Last = unused
-- Exit -- Exit
-- C1 = 'T' -- C1 = 'T'
-- C2 = ' ' -- C2 = ' '
...@@ -659,9 +652,9 @@ package body Par_SCO is ...@@ -659,9 +652,9 @@ package body Par_SCO is
case T.C1 is case T.C1 is
-- Statements, entry, exit -- Statements, exit
when 'S' | 'Y' | 'T' => when 'S' | 'T' =>
Write_Info_Char (' '); Write_Info_Char (' ');
Output_Range (T.From, T.To); Output_Range (T.From, T.To);
...@@ -907,6 +900,11 @@ package body Par_SCO is ...@@ -907,6 +900,11 @@ package body Par_SCO is
Sloc_Range (N, From, To); Sloc_Range (N, From, To);
Set_Table_Entry ('T', ' ', From, To, False); Set_Table_Entry ('T', ' ', From, To, False);
-- Label (breaks statement sequence)
when N_Label =>
Set_Statement_Entry;
-- Block statement -- Block statement
when N_Block_Statement => when N_Block_Statement =>
......
...@@ -98,15 +98,6 @@ package Par_SCO is ...@@ -98,15 +98,6 @@ package Par_SCO is
-- CS sloc-range -- CS sloc-range
-- Entry points
-- An entry point is a statement to which control may be passed other
-- than by falling into the statement for above. Examples are the first
-- statement of the body of a loop, and the statement following a label.
-- The form of an entry point in the ALI file is:
-- CY sloc-range
-- Exit points -- Exit points
-- An exit point is a statement that causes transfer of control. Examples -- An exit point is a statement that causes transfer of control. Examples
......
...@@ -148,10 +148,10 @@ package body Switch is ...@@ -148,10 +148,10 @@ package body Switch is
begin begin
return Is_Switch (Switch_Chars) return Is_Switch (Switch_Chars)
and then and then
(Switch_Chars (First .. Last) = "-param" or else (Switch_Chars (First .. Last) = "-param"
Switch_Chars (First .. Last) = "dumpbase" or else or else Switch_Chars (First .. Last) = "dumpbase"
Switch_Chars (First .. Last) = "auxbase-strip" or else or else Switch_Chars (First .. Last) = "auxbase-strip"
Switch_Chars (First .. Last) = "auxbase"); or else Switch_Chars (First .. Last) = "auxbase");
end Is_Internal_GCC_Switch; end Is_Internal_GCC_Switch;
--------------- ---------------
...@@ -169,15 +169,15 @@ package body Switch is ...@@ -169,15 +169,15 @@ package body Switch is
----------------- -----------------
function Switch_Last (Switch_Chars : String) return Natural is function Switch_Last (Switch_Chars : String) return Natural is
Last : constant Natural := Switch_Chars'Last; Last : Natural := Switch_Chars'Last;
begin begin
if Last >= Switch_Chars'First if Last >= Switch_Chars'First
and then Switch_Chars (Last) = ASCII.NUL and then Switch_Chars (Last) = ASCII.NUL
then then
return Last - 1; Last := Last - 1;
else
return Last;
end if; end if;
return Last;
end Switch_Last; end Switch_Last;
----------------- -----------------
......
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