summaryrefslogtreecommitdiffstats
path: root/gcc/ada/exp_ch3.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-08 06:47:55 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-08 06:47:55 +0000
commitcc60bd167ed27492916b1cc0a316ea41a89a60d1 (patch)
tree1de7681091aaa76f00129510f3d08256cfb44e88 /gcc/ada/exp_ch3.ads
parentf970b6bf3b38e38b8b3218ad6a22879e12e46b42 (diff)
downloadppe42-gcc-cc60bd167ed27492916b1cc0a316ea41a89a60d1.tar.gz
ppe42-gcc-cc60bd167ed27492916b1cc0a316ea41a89a60d1.zip
2008-04-08 Javier Miranda <miranda@adacore.com>
Robert Dewar <dewar@adacore.com> Ed Schonberg <schonberg@adacore.com> * a-tags.adb (Register_Interface_Offset): New subprogram. (Set_Dynamic_Offset_To_Top): New subprogram (see previous comment). (To_Predef_Prims_Table_Ptr): Removed. (Acc_Size): Removed. (To_Acc_Size): Removed. (Parent_Size): Modified to the call the subprogram returning the size of the parent by means of the new TSD component Size_Func. * a-tags.ads (Offset_To_Top_Ptr): New access type declaration. (DT_Offset_To_Top_Offset): New constant value that is used to generate code referencing the Offset_To_Top component of the dispatch table's prologue. (Prim_Ptr): New declaration of access to procedure. Used to avoid the use of 'address to initialize dispatch table slots. (Size_Func): New component of the TSD. Used by the run-time to call the size primitive of the tagged type. * checks.adb (Apply_Access_Check): Avoid check when accessing the Offset_To_Top component of a dispatch table. (Null_Exclusion_Static_Checks): If the non-null access type appears in a deferred constant declaration. do not add a null expression, to prevent spurious errors when full declaration is analyzed. (Apply_Discriminant_Check): If both discriminant constraints share a node which is not static but has no side effects, do not generate a check for that discriminant. (Generate_Index_Checks): Set Name_Req to true in call to duplicate subexpr, since the prefix of an attribute is a name. * checks.ads: Fix nit in comment. * exp_ch3.ads, exp_ch3.adb (Freeze_Record_Type): Do not add the spec and body of predefined primitives in case of CPP tagged type derivations. (Freeze_Type): Deal properly with no storage pool case (Make_Predefined_Primitive_Specs): Generate specification of abstract primitive Deep_Adjust if a nonlimited interface is derived from a limited interface. (Build_Dcheck_Functions): Create discriminant-checking functions only for variants that have some component(s). (Build_Slice_Assignment): In expanded code for slice assignment, handle properly the case where the slice bounds extend to the last value of the underlying representation. (Get_Simple_Init_Val): New calling sequence, accomodate Invalid_Value (Is_Variable_Size_Record): An array component has a static size if index bounds are enumeration literals. * exp_disp.adb (Make_DT): Use the first subtype to determine whether an external tag has been specified for the type. (Building_Static_DT): Add missing support for private types. (Make_DT): Add declaration of Parent_Typ to ensure consistent access to the entity associated with the parent of Typ. This is done to avoid wrong access when the parent is a private type. (Expand_Interface_Conversion): Improve error message when the configurable runtime has no support for dynamic interface conversion. (Expand_Interface_Thunk): Add missing support to interface types in configurable runtime. (Expand_Dispatching_Call): remove obsolete code. (Make_DT): Replace occurrences of RE_Address by RE_Prim_Ptr, and ensure that all subtypes and aggregates associated with dispatch tables have the attribute Is_Dispatch_Table_Entity set to true. (Register_Primitive): Rename one variable to improve code reading. Replace occurrences of RE_Addres by RE_Prim_Ptr. Register copy o of the pointer to the 'size primitive in the TSD. * rtsfind.ads (RE_DT_Offset_To_Top_Offset): New entity. (RE_Offset_To_Top_Ptr): New entity. (RE_Register_Interface_Offset): New entity. (RE_Set_Dynamic_Offset_To_Top): New entity. (RE_Set_Offset_To_Top): Removed entity. (RE_Prim_Ptr): New entity (RE_Size_Func): New entity (RE_Size_Ptr): New entity (RTU_Id): Add Ada_Dispatching and Ada_Dispatching_EDF. (Ada_Dispatching_Child): Define this new subrange. (RE_Id): Add new required run-time calls (RE_Set_Deadline, RE_Clock, RE_Time_Span, and RE_Time_Span_Zero). (RE_Unit_Table): Add new required run-time calls * rtsfind.adb (Get_Unit_Name): Add processing for Ada.Dispatching children. * exp_atag.ads, exp_atag.adb (Build_Offset_To_Top): New subprogram. (Build_Set_Static_Offset_To_Top): New subprogram. Generates code that initializes the Offset_To_Top component of a dispatch table. (Build_Predef_Prims): Removed. (Build_Get_Predefined_Prim_Op_Address): Replace call to Predef_Prims by its actual code. (Build_Set_Size_Function): New subprogram. * exp_ch13.adb: Do not generate storage variable for storage_size zero (Expand): Handle setting/restoring flag Inside_Freezing_Actions git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134020 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch3.ads')
-rw-r--r--gcc/ada/exp_ch3.ads22
1 files changed, 12 insertions, 10 deletions
diff --git a/gcc/ada/exp_ch3.ads b/gcc/ada/exp_ch3.ads
index 04669679893..d51724af3cd 100644
--- a/gcc/ada/exp_ch3.ads
+++ b/gcc/ada/exp_ch3.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, 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- --
@@ -133,16 +133,18 @@ package Exp_Ch3 is
function Get_Simple_Init_Val
(T : Entity_Id;
- Loc : Source_Ptr;
+ N : Node_Id;
Size : Uint := No_Uint) return Node_Id;
-- For a type which Needs_Simple_Initialization (see above), prepares the
- -- tree for an expression representing the required initial value. Loc is
- -- the source location used in constructing this tree which is returned as
- -- the result of the call. The Size parameter indicates the target size of
- -- the object if it is known (indicated by a value that is not No_Uint and
- -- is greater than zero). If Size is not given (Size set to No_Uint, or
- -- non-positive), then the Esize of T is used as an estimate of the Size.
- -- The object size is needed to prepare a known invalid value for use by
- -- Normalize_Scalars.
+ -- tree for an expression representing the required initial value. N is a
+ -- node whose source location used in constructing this tree which is
+ -- returned as the result of the call. The Size parameter indicates the
+ -- target size of the object if it is known (indicated by a value that is
+ -- not No_Uint and is greater than zero). If Size is not given (Size set to
+ -- No_Uint, or non-positive), then the Esize of T is used as an estimate of
+ -- the Size. The object size is needed to prepare a known invalid value for
+ -- use by Normalize_Scalars. A call to this routine where T is a scalar
+ -- type is only valid if we are in Normalize_Scalars or Initialize_Scalars
+ -- mode, or if N is the node for a 'Invalid_Value attribute node.
end Exp_Ch3;
OpenPOWER on IntegriCloud