diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-29 11:09:46 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-29 11:09:46 +0000 |
commit | 12e90c4403a80eb330785a31627c0aaf52141b0b (patch) | |
tree | c6f72c04618eb46b19778035ec894212166d8ea2 /gcc/ada/exp_ch3.adb | |
parent | 289e4204a7085dddb979dd2f27b34e463b29df13 (diff) | |
download | gcc-12e90c4403a80eb330785a31627c0aaf52141b0b.tar.gz |
2012-10-29 Tristan Gingold <gingold@adacore.com>
* gnat_rm.texi: Document implementation advice for Pragma
Partition_Elaboration_Policy.
2012-10-29 Yannick Moy <moy@adacore.com>
* s-bignum.adb (Div_Rem): Reference that Algorithm_D is from
the second edition of TAOCP from Knuth, since the algo changed
in the third edition. Also correct the definition of 'd' which
could overflow.
2012-10-29 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Build_Initialization_Call): Create static strings
which denote entry [family] names and associate them with the
object's Protection_Entries or ATCB.
(Build_Init_Statements):
Remove local variable Names. Do not generate the entry [family]
names inside the init proc because they are now static.
* exp_ch9.adb (Build_Entry_Names): Reimplemented. The strings
which denote entry [family] names are now generated statically
and associated with the concurrent object's Protection_Entries
or ATCB during initialization.
* exp_ch9.ads (Build_Entry_Names): Change subprogram profile
and associated comment on usage.
* rtsfind.ads: Add the following entries to tables RE_Id and
RE_Unit_Table:
RE_Protected_Entry_Names_Array RE_Task_Entry_Names_Array
RO_PE_Number_Of_Entries RO_PE_Set_Entry_Names
RO_ST_Number_Of_Entries RO_ST_Set_Entry_Names
Remove the following entries from tables RE_Id and RE_Unit_Table:
RO_PE_Set_Entry_Name RO_TS_Set_Entry_Name
* s-taskin.adb: Remove with clause for Ada.Unchecked_Deallocation.
(Free_Entry_Names_Array): Removed.
(Number_Of_Entries): New routine.
(Set_Entry_Names): New routine.
* s-taskin.ads: Rename type Entry_Names_Array to
Task_Entry_Names_Array. Rename type Entry_Names_Array_Access
to Task_Entry_Names_Access. Update the type of ACTB field
Entry_Names and add a comment on its protection status.
(Free_Entry_Names_Array): Removed.
(Number_Of_Entries): New routine.
(Set_Entry_Names): New routine.
* s-tassta.adb (Create_Task): Remove formal parameter
Build_Entry_Names. Do not allocate an array to hold the
string names of entries and families.
(Free_Entry_Names): Removed.
(Free_Task): Remove the call to Free_Entry_Names.
(Set_Entry_Name): Removed.
(Vulnerable_Free_Task): Remove the call to Free_Entry_Names.
* s-tassta.ads (Create_Task): Remove formal parameter
Build_Entry_Names along with associated comment.
(Set_Entry_Name): Removed.
* s-tpoben.adb: Remove with clause for Ada.Unchecked_Deallocation.
(Finalize): Remove the call to Free_Entry_Names.
(Free_Entry_Names): Removed.
(Initialize_Protection_Entries):
Remove formal parameter Build_Entry_Names. Do not allocate
an array to hold the string names of entries and families.
(Number_Of_Entries): New routine.
(Set_Entry_Name): Removed.
(Set_Entry_Names): New routine.
* s-tpoben.ads: Add types Protected_Entry_Names_Array and
Protected_Entry_Names_Access. Update the type of Protection_Enties
field Entry_Names.
(Initialize_Protection_Entries): Remove
formal parameter Build_Entry_Names along with associated comment.
(Number_Of_Entries): New routine.
(Set_Entry_Name): Removed.
(Set_Entry_Names): New routine.
2012-10-29 Arnaud Charlet <charlet@adacore.com>
* gnat_ugn.texi: Minor typo fix.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192933 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch3.adb')
-rw-r--r-- | gcc/ada/exp_ch3.adb | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 0e703da2237..fdf3185cede 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -1704,6 +1704,18 @@ package body Exp_Ch3 is end if; end if; + -- When the object is either protected or a task, create static strings + -- which denote the names of entries and families. Associate the strings + -- with the concurrent object's Protection_Entries or ATCB. This is a + -- VMS Debug feature. + + if OpenVMS_On_Target + and then Is_Concurrent_Type (Typ) + and then Entry_Names_OK + then + Build_Entry_Names (Id_Ref, Typ, Res); + end if; + return Res; exception @@ -2665,7 +2677,6 @@ package body Exp_Ch3 is Decl : Node_Id; Has_POC : Boolean; Id : Entity_Id; - Names : Node_Id; Stmts : List_Id; Typ : Entity_Id; @@ -3009,17 +3020,6 @@ package body Exp_Ch3 is Append_To (Stmts, Make_Task_Create_Call (Rec_Type)); - -- Generate the statements which map a string entry name to a - -- task entry index. Note that the task may not have entries. - - if Entry_Names_OK then - Names := Build_Entry_Names (Rec_Type); - - if Present (Names) then - Append_To (Stmts, Names); - end if; - end if; - declare Task_Type : constant Entity_Id := Corresponding_Concurrent_Type (Rec_Type); @@ -3073,18 +3073,6 @@ package body Exp_Ch3 is if Is_Protected_Record_Type (Rec_Type) then Append_List_To (Stmts, Make_Initialize_Protection (Rec_Type)); - - -- Generate the statements which map a string entry name to a - -- protected entry index. Note that the protected type may not - -- have entries. - - if Entry_Names_OK then - Names := Build_Entry_Names (Rec_Type); - - if Present (Names) then - Append_To (Stmts, Names); - end if; - end if; end if; -- Second pass: components with per-object constraints |