diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-15 15:54:14 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-15 15:54:14 +0000 |
commit | 4660e715aa628a0071e76853fda39cf8057c2c4e (patch) | |
tree | 826fcec0a5407caae82fabd04cb7e41ec79589fa /gcc/ada/tbuild.adb | |
parent | 90fd25c58b1661a5ad762daba6800b86eb95485e (diff) | |
download | gcc-4660e715aa628a0071e76853fda39cf8057c2c4e.tar.gz |
2005-03-08 Javier Miranda <miranda@adacore.com>
Robert Dewar <dewar@adacore.com>
Thomas Quinot <quinot@adacore.com>
Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* atree.ads, atree.adb: Add support for Elist24 field
* atree.h: Fix wrong definition of Field27
Add support for Elist16 field
Add support for Elist24 field
* einfo.ads, einfo.adb (Abstract_Interfaces,
Set_Abstract_Interfaces): New subprograms.
(Abstract_Interface_Alias, Set_Abstract_Interface_Alias): New
subprograms.
(Access_Disp_Table, Set_Access_Disp_Table): Modified to handle a list of
entities rather than a single node.
(Is_Interface, Set_Is_Interface): New subprogram
(First_Tag_Component): New syntesized attribute
(Next_Tag_Component): New synthesized attribute
(Write_Entity_Flags): Upgraded to write Is_Interface
(Write_Field24_Name): Upgraded to write Abstract_Interfaces
(Write_Field25_Name): Upgraded to write Abstract_Interface_Alias
(Task_Body_Procedure): New subprogram to read this attribute.
(Set_Task_Body_Procedure): New subprogram to set this attribute.
(Has_Controlled_Component): Now applies to all entities.
This is only a documentation change, since it always worked to apply
this to other than composite types (yielding false), but now this is
official.
Update documentation on Must_Be_Byte_Aligned for new spec
* tbuild.adb, exp_dist.adb, exp_disp.adb, exp_ch3.ads, exp_ch3.adb,
exp_attr.adb, exp_aggr.adb, exp_ch4.adb, exp_ch5.adb: Upgrade all the
uses of the Access_Disp_Table attribute to reference the first dispatch
table associated with a tagged type. As
part of the implementation of abstract interface types,
Access_Disp_Table has been redefined to contain a list of dispatch
tables (rather than a single dispatch table).
Similarly, upgrade all the references to Tag_Component by the
new attribute First_Tag_Component.
(Find_Inherited_TSS): Moved to exp_tss.
Clean up test in Expand_N_Object_Declaration for cases
where we need to do a separate assignment of the initial value.
(Expand_N_Object_Declaration): If the expression in the
declaration of a tagged type is an aggregate, no need to generate an
additional tag assignment.
(Freeze_Type): Now a function that returns True if the N_Freeze_Entity
is to be deleted.
Bit packed array ops are only called if operands are known to be
aligned.
(Component_Equality): When returning an N_Raise_Program_Error statement,
ensure that its Etype is set to Empty to avoid confusing GIGI (which
expects that only expressions have a bona fide type).
(Make_Tag_Ctrl_Assignment): Use Build_Actual_Subtype to correctly
determine the amount of data to be copied.
* par.adb (P_Interface_Type_Definition): New subprogram that parses the
new syntax rule of Ada 2005 interfaces (for AI-251 and AI-345):
INTERFACE_TYPE_DEFINITION ::=
[limited | task | protected | synchronized] interface
[AND interface_list]
* par-ch3.adb (P_Type_Declaration): Modified to give support to
interfaces.
(P_Derived_Type_Def_Or_Private_Ext_Decl): Modified to give support to
interfaces.
(P_Interface_Type_Definition): New subprogram that parses the new
syntax rule of Ada 2005 interfaces
(P_Identifier_Declarations): fix two occurrences of 'RENAMES' in error
messages by the correct RENAMES (quotes removed).
* sem_prag.adb: Upgrade all the references to Tag_Component by the new
attribute First_Tag_Component.
* sinfo.ads, sinfo.adb: Remove OK_For_Stream flag, not used, not needed
(Interface_List, Set_Interface_List): New subprograms.
(Interface_Present, Set_Interface_Present): New subprograms.
(Limited_Present, Set_Limited_Present): Available also in derived
type definition nodes.
(Protected_Present, Set_Protected_Present): Available also in
record type definition and
derived type definition nodes.
(Synchronized_Present, Set_Synchronized_Present): New subprograms.
(Task_Present, Set_Task_Present): New subprogram.
(Task_Body_Procedure): Removed.
(Set_Task_Body_Procedure): Removed.
These subprogram have been removed because the attribute
Task_Body_Procedure has been moved to the corresponding task type
or task subtype entity to leave a field free to store the list
of interfaces implemented by a task (for AI-345)
Add Expression field to N_Raise_Statement node for Ada 2005 AI-361
(Null_Exclusion_Present): Change to Flag11, to avoid conflict with
expression flag Do_Range_Check
(Exception_Junk): Change to Flag7 to accomodate above change
(Box_Present, Default_Name, Specification, Set_Box_Present,
Set_Default_Name, Set_Specification): Expand the expression
"X in N_Formal_Subprogram_Declaration" into the corresponding
two comparisons. Required to use the csinfo tool.
* exp_ch11.adb (Expand_N_Raise_Statement): Deal with case where
"with string" given.
* sem_ch11.adb (Analyze_Raise_Statement): Handle case where string
expression given.
* par-ch11.adb (P_Raise_Statement): Recognize with string expression
in 2005 mode
* exp_ch9.adb (Build_Task_Proc_Specification): Modified to use entity
attribute Task_Body_Procedure rather than the old semantic field that
was available in the task_type_declaration node.
* par-ch12.adb (P_Formal_Type_Definition): Modified to handle formal
interface type definitions.
(P_Formal_Derived_Type_Definition): Modified to handle the list of
interfaces.
* par-ch9.adb (P_Task): Modified to handle the list of interfaces in a
task type declaration.
(P_Protected): Modified to handle the list of interfaces in a
protected type declaration.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96489 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/tbuild.adb')
-rw-r--r-- | gcc/ada/tbuild.adb | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/gcc/ada/tbuild.adb b/gcc/ada/tbuild.adb index 046826f617a..6dedcabeca4 100644 --- a/gcc/ada/tbuild.adb +++ b/gcc/ada/tbuild.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2004, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- -- -- -- 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- -- @@ -26,6 +26,7 @@ with Atree; use Atree; with Einfo; use Einfo; +with Elists; use Elists; with Lib; use Lib; with Namet; use Namet; with Nlists; use Nlists; @@ -169,11 +170,12 @@ package body Tbuild is return Unchecked_Convert_To ( - New_Occurrence_Of (Etype (Access_Disp_Table (Full_Type)), Loc), + New_Occurrence_Of + (Etype (Node (First_Elmt (Access_Disp_Table (Full_Type)))), Loc), Make_Selected_Component (Loc, Prefix => New_Copy (Rec), Selector_Name => - New_Reference_To (Tag_Component (Full_Type), Loc))); + New_Reference_To (First_Tag_Component (Full_Type), Loc))); end Make_DT_Access; ----------------------- @@ -183,9 +185,9 @@ package body Tbuild is function Make_DT_Component (Loc : Source_Ptr; Typ : Entity_Id; - I : Positive) return Node_Id + N : Positive) return Node_Id is - X : Node_Id; + X : Node_Id; Full_Type : Entity_Id := Typ; begin @@ -193,10 +195,12 @@ package body Tbuild is Full_Type := Underlying_Type (Typ); end if; - X := First_Component ( - Designated_Type (Etype (Access_Disp_Table (Full_Type)))); + X := + First_Component + (Designated_Type + (Etype (Node (First_Elmt (Access_Disp_Table (Full_Type)))))); - for J in 2 .. I loop + for J in 2 .. N loop X := Next_Component (X); end loop; @@ -216,6 +220,7 @@ package body Tbuild is is begin Check_Restriction (No_Implicit_Conditionals, Node); + return Make_If_Statement (Sloc (Node), Condition, Then_Statements, @@ -234,7 +239,6 @@ package body Tbuild is is N : constant Node_Id := Make_Implicit_Label_Declaration (Loc, Defining_Identifier); - begin Set_Label_Construct (N, Label_Construct); return N; |