summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_util.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-08 06:50:51 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-08 06:50:51 +0000
commit57993a5368c6b04d4b89553618030a8c6dd222b5 (patch)
tree9188d82c46a135582ea73731887923f5d1dd3edb /gcc/ada/exp_util.ads
parent192ababb2e2bb688d93bb0854e3728a55afeed79 (diff)
downloadgcc-57993a5368c6b04d4b89553618030a8c6dd222b5.tar.gz
2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
Ed Schonberg <schonberg@adacore.com> Robert Dewar <dewar@adacore.com> Gary Dismukes <dismukes@adacore.com> * exp_ch9.ads, exp_ch9.adb (Build_Protected_Entry, Build_Unprotected_Subprogram_Body): Generate debug info for declarations related to the handling of private data in task and protected types. (Debug_Private_Data_Declarations): New subprogram. (Install_Private_Data_Declarations): Remove all debug info flagging. This is now done by Debug_Private_Data_Declarations at the correct stage of expansion. (Build_Simple_Entry_Call): If the task name is a function call, expand the prefix into an object declaration, and make the surrounding block a task master. (Build_Master_Entity): An internal block is a master if it wraps a call. Code reformatting, update comments. Code clean up. (Make_Task_Create_Call): Use 'Unrestricted_Access instead of 'Address. (Replicate_Entry_Formals): If the formal is an access parameter or anonymous access to subprogram, copy the original tree to create new entities for the formals of the subprogram. (Expand_N_Task_Type_Declaration): Create a Relative_Deadline variable for tasks to store the value passed using pragma Relative_Deadline. (Make_Task_Create_Call): Add the Relative_Deadline argument to the run-time call to create a task. (Build_Wrapper_Spec): If the controlling argument of the interface operation is an access parameter with a non-null indicator, use the non-null indicator on the wrapper. * sem_ch9.adb (Analyze_Protected_Type): Only retrieve the full view when present, which it may not be in the case where the type entity is an incomplete view brought in by a limited with. (Analyze_Task_Type): Only retrieve the full view when present, which it may not be in the case where the type entity is an incomplete view brought in by a limited with. (Analyze_Protected_Definition): Set Is_Frozen on all itypes generated for private components of a protected type, to prevent the generation of freeze nodes for which there is no proper scope of elaboration. * exp_util.ads, exp_util.adb (Remove_Side_Effects): If the expression is a function call that returns a task, expand into a declaration to invoke the build_in_place machinery. (Find_Protection_Object): New routine. (Remove_Side_Effects): Also make a copy of the value for attributes whose result is of an elementary type. (Silly_Boolean_Array_Not_Test): New procedure (Silly_Boolean_Array_Xor_Test): New procedure (Is_Volatile_Reference): New function (Remove_Side_Effects): Use Is_Volatile_Reference (Possible_Bit_Aligned_Component): Handle slice case properly * exp_pakd.adb (Expand_Packed_Not): Move silly true/true or false/false case test to Exp_Util (Expand_Packed_Xor): Move silly true/true case test to Exp_Util git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134030 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_util.ads')
-rw-r--r--gcc/ada/exp_util.ads26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads
index 9c99323e8e4..73277afe16b 100644
--- a/gcc/ada/exp_util.ads
+++ b/gcc/ada/exp_util.ads
@@ -372,6 +372,13 @@ package Exp_Util is
-- operation which is not directly visible. If T is a class wide type,
-- then the reference is to an operation of the corresponding root type.
+ function Find_Protection_Object (Scop : Entity_Id) return Entity_Id;
+ -- Traverse the scope stack starting from Scop and look for an entry,
+ -- entry family, or a subprogram that has a Protection_Object and return
+ -- it. Raises Program_Error if no such entity is found since the context
+ -- in which this routine is invoked should always have a protection
+ -- object.
+
procedure Force_Evaluation
(Exp : Node_Id;
Name_Req : Boolean := False);
@@ -491,6 +498,13 @@ package Exp_Util is
-- Returns true if type T is not tagged and is a derived type,
-- or is a private type whose completion is such a type.
+ function Is_Volatile_Reference (N : Node_Id) return Boolean;
+ -- Checks if the node N represents a volatile reference, which can be
+ -- either a direct reference to a variable treated as volatile, or an
+ -- indexed/selected component where the prefix is treated as volatile,
+ -- or has Volatile_Components set. A slice of a volatile variable is
+ -- also volatile.
+
procedure Kill_Dead_Code (N : Node_Id; Warn : Boolean := False);
-- N represents a node for a section of code that is known to be dead. Any
-- exception handler references and warning messages relating to this code
@@ -613,6 +627,18 @@ package Exp_Util is
-- renamed subprogram. The node is rewritten to be an identifier that
-- refers directly to the renamed subprogram, given by entity E.
+ procedure Silly_Boolean_Array_Not_Test (N : Node_Id; T : Entity_Id);
+ -- N is the node for a boolean array NOT operation, and T is the type of
+ -- the array. This routine deals with the silly case where the subtype of
+ -- the boolean array is False..False or True..True, where it is required
+ -- that a Constraint_Error exception be raised (RM 4.5.6(6)).
+
+ procedure Silly_Boolean_Array_Xor_Test (N : Node_Id; T : Entity_Id);
+ -- N is the node for a boolean array XOR operation, and T is the type of
+ -- the array. This routine deals with the silly case where the subtype of
+ -- the boolean array is True..True, where a raise of a Constraint_Error
+ -- exception is required (RM 4.5.6(6)).
+
function Target_Has_Fixed_Ops
(Left_Typ : Entity_Id;
Right_Typ : Entity_Id;