diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-10-13 13:00:13 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-10-13 13:00:13 +0200 |
commit | 1a36a0cd695e3254367fc01d371ae23f3d3f50fa (patch) | |
tree | aa31cbc8e6e668e5151abda35b023b5a3b2ef393 /gcc/ada/exp_ch9.ads | |
parent | a5917ffb2cd7097f9b8b754c2745c23d860cb31a (diff) | |
download | gcc-1a36a0cd695e3254367fc01d371ae23f3d3f50fa.zip gcc-1a36a0cd695e3254367fc01d371ae23f3d3f50fa.tar.gz gcc-1a36a0cd695e3254367fc01d371ae23f3d3f50fa.tar.bz2 |
[multiple changes]
2011-10-13 Cyrille Comar <comar@adacore.com>
* gnat_ugn.texi: Minor editing.
2011-10-13 Vincent Celier <celier@adacore.com>
* projects.texi: Add documentation on packages and attributes
that are inherited from a project being extended into the
extended project.
2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Build_Master): Rewritten.
(Expand_N_Full_Type_Declaration): Reformat the declarative
region. Update the call to Build_Master_Renaming.
(Expand_Previous_Access_Type): Rewritten.
* exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
Add local constant Result_Subt and update related usage.
(Expand_N_Extended_Return_Statement): Add local constant
Result_Subt and update related usage.
* exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
new context detection mechanism.
(Build_Class_Wide_Master):
Use Insert_Action to add the renaming into the tree.
(Build_Master_Entity): Rewritten to use the new context detection
mechanism.
(Build_Master_Renaming): Add formal parameter Ins_Nod
and related usage. Use Insert_Action to add the renaming into the
tree.
(Find_Enclosing_Context): New subsidiary routine. Rather
than relying on enclosing scopes, this routine looks at the
tree structure to figure out the proper context for a _master
or a _chain. This approach eliminates the issues with transient
scopes which have not been converted into blocks.
* exp_ch9.ads (Build_Master_Entity): Change parameter profile
to better reflect the new usage. Update the related comment.
(Build_Master_Renaming): Add formal parameter Ins_Nod. Update
the comment on usage.
* sem_ch3.adb (Access_Definition): Update the calls to
Build_Master_Entity and Build_Master_Renaming.
* sem_ch6.adb (Create_Extra_Formals): Add local variable
Full_Subt. Code reformatting.
* sem_util.adb (Is_Iterator): Alphabetized.
(Is_LHS): Alphabetized.
(Is_Limited_Class_Wide_Type): New routine.
* sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
From-SVN: r179913
Diffstat (limited to 'gcc/ada/exp_ch9.ads')
-rw-r--r-- | gcc/ada/exp_ch9.ads | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/gcc/ada/exp_ch9.ads b/gcc/ada/exp_ch9.ads index 3f20c1c..3bbbf0d 100644 --- a/gcc/ada/exp_ch9.ads +++ b/gcc/ada/exp_ch9.ads @@ -60,24 +60,22 @@ package Exp_Ch9 is -- protected type. The statements are wrapped inside a block due to a local -- declaration. - procedure Build_Master_Entity - (Id : Entity_Id; - Use_Current : Boolean := False); + procedure Build_Master_Entity (Obj_Or_Typ : Entity_Id); -- Given the name of an object or a type which is either a task, contains -- tasks or designates tasks, create a _master in the appropriate scope - -- which captures the value of Current_Master. Mark the enclosing body as - -- being a task master. A _master is built to avoid multiple expensive - -- calls to Current_Master and to facilitate object initialization. Flag - -- Use_Current ensures that the master scope is the current scope. - - procedure Build_Master_Renaming (N : Node_Id; Typ : Entity_Id); - -- Given an access type Typ and a declaration N of a designated type that - -- is either a task or contains tasks, create a renaming of the form: + -- which captures the value of Current_Master. Mark the nearest enclosing + -- body or block as being a task master. + + procedure Build_Master_Renaming + (Ptr_Typ : Entity_Id; + Ins_Nod : Node_Id := Empty); + -- Given an access type Ptr_Typ whose designated type is either a task or + -- contains tasks, create a renaming of the form: -- - -- TypM : Master_Id renames _Master; + -- <Ptr_Typ>M : Master_Id renames _Master; -- - -- where _master denotes the task master of the enclosing context. The - -- renaming declaration is inserted before N. + -- where _master denotes the task master of the enclosing context. Ins_Nod + -- is used to provide a specific insertion node for the renaming. function Build_Private_Protected_Declaration (N : Node_Id) return Entity_Id; -- A subprogram body without a previous spec that appears in a protected |