aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch7.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 17:08:04 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 17:08:04 +0200
commitf9ad6b6231baeb79e967d1e7f1d1d9a7953453b7 (patch)
tree87091994956cdeda34009c2edcbcb3ab478bbce3 /gcc/ada/exp_ch7.ads
parent1cdfa9be54975f0566d6f261a706dcb8d767601d (diff)
downloadgcc-f9ad6b6231baeb79e967d1e7f1d1d9a7953453b7.zip
gcc-f9ad6b6231baeb79e967d1e7f1d1d9a7953453b7.tar.gz
gcc-f9ad6b6231baeb79e967d1e7f1d1d9a7953453b7.tar.bz2
[multiple changes]
2011-08-03 Javier Miranda <miranda@adacore.com> * sem_prag.adb (Process_Interface_Name): Allow duplicated export names in Java since they are always enclosed in a namespace that differentiates them, and overloaded entities are supported by the VM. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * checks.adb (Determine_Range): If a computed bound of an operation is outside the range of the base type of the expression, and overflow checks are enabled, the result is unknown and cannot be used for any subsequent constant folding. * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are unknown, so is the result of the comparison. 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com> * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal From_Abort. When finalization was triggered by an abort, propagate Standard'Abort_Signal rather than Program_Error. * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal From_Abort. * a-except.adb (Raise_From_Controlled_Operation): Add new formal From_Abort. When finalization was triggered by an abort, propagate Standard'Abort_Signal rather than Program_Error. * a-except.ads:(Raise_From_Controlled_Operation): Add new formal From_Abort. * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable Abort_Id. Update the calls to Build_Object_Declarations and Build_Raise_Statement to include Abort_Id. (Build_Adjust_Statements): New local variable Abort_Id. Update the calls to Build_Object_Declarations and Build_Raise_Statement to include Abort_Id. (Build_Finalize_Statements): New local variable Abort_Id. Update the calls to Build_Object_Declarations and Build_Raise_Statement to include Abort_Id. (Build_Components): Create an entity for Abort_Id when exceptions are allowed on the target. (Build_Finalizer): New local variable Abort_Id. (Build_Initialize_Statements): New local variable Abort_Id. Update the calls to Build_Object_Declarations and Build_Raise_Statement to include Abort_Id. (Build_Object_Declarations): Add new formal Abort_Id. Create the declaration of flag Abort_Id to preserve the original abort status before finalization code is executed. (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to runtime routine Raise_From_Controlled_Operation. (Create_Finalizer): Update the call to Build_Raise_Statement to include Abort_Id. Update the call to Build_Object_Declarations to include Abort_Id. Update the layout of the finalizer body. (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort. (Process_Transient_Objects): New local variable Abort_Id. Remove the clunky code to create all flags and objects related to exception propagation and replace it with a call to Build_Object_Declarations. Update the call to Build_Raise_Statement to include Abort_Id. * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec. Add new formal Abort_Id and associated comment on its use. (Build_Raise_Statement): Add new formal Abort_Id and associated comment on its use. * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id. Remove the clunky code to create all flags and objects related to exception propagation and replace it with a call to Build_Object_Declarations. Update the call to Build_Raise_Statement. 2011-08-03 Eric Botcazou <ebotcazou@adacore.com> * s-tassta.adb: Fix minor typos. 2011-08-03 Robert Dewar <dewar@adacore.com> * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb, lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting. From-SVN: r177283
Diffstat (limited to 'gcc/ada/exp_ch7.ads')
-rw-r--r--gcc/ada/exp_ch7.ads34
1 files changed, 27 insertions, 7 deletions
diff --git a/gcc/ada/exp_ch7.ads b/gcc/ada/exp_ch7.ads
index 5ed2a73..dd1b8f8 100644
--- a/gcc/ada/exp_ch7.ads
+++ b/gcc/ada/exp_ch7.ads
@@ -57,19 +57,39 @@ package Exp_Ch7 is
-- Build one controlling procedure when a late body overrides one of
-- the controlling operations.
+ function Build_Object_Declarations
+ (Loc : Source_Ptr;
+ Abort_Id : Entity_Id;
+ E_Id : Entity_Id;
+ Raised_Id : Entity_Id) return List_Id;
+ -- Subsidiary to Make_Deep_Array_Body and Make_Deep_Record_Body. Return a
+ -- list containing the object declarations of boolean flag Abort_Id, the
+ -- exception occurrence E_Id and boolean flag Raised_Id.
+ --
+ -- Abort_Id : constant Boolean :=
+ -- Exception_Identity (Get_Current_Excep.all) =
+ -- Standard'Abort_Signal'Identity;
+ -- <or>
+ -- Abort_Id : constant Boolean := False; -- no abort
+ --
+ -- E_Id : Exception_Occurrence;
+ -- Raised_Id : Boolean := False;
+
function Build_Raise_Statement
- (Loc : Source_Ptr;
- E_Id : Entity_Id;
- R_Id : Entity_Id) return Node_Id;
+ (Loc : Source_Ptr;
+ Abort_Id : Entity_Id;
+ E_Id : Entity_Id;
+ Raised_Id : Entity_Id) return Node_Id;
-- Subsidiary to routines Build_Finalizer, Make_Deep_Array_Body and Make_
-- Deep_Record_Body. Generate the following conditional raise statement:
--
- -- if R_Id then
- -- Raise_From_Controlled_Operation (E_Id);
+ -- if Raised_Id then
+ -- Raise_From_Controlled_Operation (E_Id, Abort_Id);
-- end if;
--
- -- E_Id denotes the defining identifier of a local exception occurrence,
- -- R_Id is the entity of a local boolean flag.
+ -- Abort_Id is a local boolean flag which is set when the finalization was
+ -- triggered by an abort, E_Id denotes the defining identifier of a local
+ -- exception occurrence, Raised_Id is the entity of a local boolean flag.
function CW_Or_Has_Controlled_Part (T : Entity_Id) return Boolean;
-- True if T is a class-wide type, or if it has controlled parts ("part"