summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch3.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 13:54:36 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 13:54:36 +0000
commit76a1c25b5ba521501bd8e2ce30573c34cc0da1fb (patch)
tree873996443f0c7e7119eead6a25a380b1d3b5441a /gcc/ada/exp_ch3.ads
parent986fb7dd6375783b9f492a215dd9d767575cdb7c (diff)
downloadgcc-76a1c25b5ba521501bd8e2ce30573c34cc0da1fb.tar.gz
2005-11-14 Hristian Kirtchev <kirtchev@adacore.com>
Javier Miranda <miranda@adacore.com> * rtsfind.ads, exp_util.adb, exp_util.ads, exp_disp.adb, exp_disp.ads, exp_ch7.adb, sem_ch9.adb, snames.adb, snames.ads, exp_ch9.adb, exp_ch9.ads, exp_ch6.adb, exp_ch3.adb, exp_ch3.ads, einfo.ads, einfo.adb: Complete support for Ada 2005 interfaces. * a-tags.ads, a-tags.adb: Major rewrite and additions to implement properly new Ada 2005 interfaces (AI-345) and add run-time checks (via assertions). * exp_dbug.ads, exp_dbug.adb (Get_Secondary_DT_External_Name): New subprogram that generates the external name associated with a secondary dispatch table. (Get_Secondary_DT_External_Name): New subprogram that generates the external name associated with a secondary dispatch table. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106965 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch3.ads')
-rw-r--r--gcc/ada/exp_ch3.ads66
1 files changed, 37 insertions, 29 deletions
diff --git a/gcc/ada/exp_ch3.ads b/gcc/ada/exp_ch3.ads
index f4d6097dce0..ce2b7990a11 100644
--- a/gcc/ada/exp_ch3.ads
+++ b/gcc/ada/exp_ch3.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005 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- --
@@ -40,12 +40,21 @@ package Exp_Ch3 is
procedure Expand_Previous_Access_Type (Def_Id : Entity_Id);
-- For a full type declaration that contains tasks, or that is a task,
-- check whether there exists an access type whose designated type is an
- -- incomplete declarations for the current composite type. If so, build
- -- the master for that access type, now that it is known to denote an
- -- object with tasks.
+ -- incomplete declarations for the current composite type. If so, build the
+ -- master for that access type, now that it is known to denote an object
+ -- with tasks.
procedure Expand_Record_Extension (T : Entity_Id; Def : Node_Id);
- -- Add a field _parent in the extension part of the record.
+ -- Add a field _parent in the extension part of the record
+
+ procedure Build_Class_Wide_Master (T : Entity_Id);
+ -- For access to class-wide limited types we must build a task master
+ -- because some subsequent extension may add a task component. To avoid
+ -- bringing in the tasking run-time whenever an access-to-class-wide
+ -- limited type is used, we use the soft-link mechanism and add a level of
+ -- indirection to calls to routines that manipulate Master_Ids. This must
+ -- also be used for anonymous access types whose designated type is a task
+ -- or synchronized interface.
procedure Build_Discr_Checking_Funcs (N : Node_Id);
-- Builds function which checks whether the component name is consistent
@@ -66,10 +75,10 @@ package Exp_Ch3 is
-- constructed tree, and Typ is the type of the entity (the initialization
-- procedure of the base type is the procedure that actually gets called).
-- In_Init_Proc has to be set to True when the call is itself in an init
- -- proc in order to enable the use of discriminals. Enclos_type is the
- -- type of the init proc and it is used for various expansion cases
- -- including the case where Typ is a task type which is a array component,
- -- the indices of the enclosing type are used to build the string that
+ -- proc in order to enable the use of discriminals. Enclos_type is the type
+ -- of the init proc and it is used for various expansion cases including
+ -- the case where Typ is a task type which is a array component, the
+ -- indices of the enclosing type are used to build the string that
-- identifies each task at runtime.
--
-- Discr_Map is used to replace discriminants by their discriminals in
@@ -84,33 +93,32 @@ package Exp_Ch3 is
function Freeze_Type (N : Node_Id) return Boolean;
-- This function executes the freezing actions associated with the given
- -- freeze type node N and returns True if the node is to be deleted.
- -- We delete the node if it is present just for front end purpose and
- -- we don't want Gigi to see the node. This function can't delete the
- -- node itself since it would confuse any remaining processing of the
- -- freeze node.
+ -- freeze type node N and returns True if the node is to be deleted. We
+ -- delete the node if it is present just for front end purpose and we don't
+ -- want Gigi to see the node. This function can't delete the node itself
+ -- since it would confuse any remaining processing of the freeze node.
function Needs_Simple_Initialization (T : Entity_Id) return Boolean;
-- Certain types need initialization even though there is no specific
- -- initialization routine. In this category are access types (which
- -- need initializing to null), packed array types whose implementation
- -- is a modular type, and all scalar types if Normalize_Scalars is set,
- -- as well as private types whose underlying type is present and meets
- -- any of these criteria. Finally, descendants of String and Wide_String
- -- also need initialization in Initialize/Normalize_Scalars mode.
+ -- initialization routine. In this category are access types (which need
+ -- initializing to null), packed array types whose implementation is a
+ -- modular type, and all scalar types if Normalize_Scalars is set, as well
+ -- as private types whose underlying type is present and meets any of these
+ -- criteria. Finally, descendants of String and Wide_String also need
+ -- initialization in Initialize/Normalize_Scalars mode.
function Get_Simple_Init_Val
(T : Entity_Id;
Loc : Source_Ptr;
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.
+ -- 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.
end Exp_Ch3;