[multiple changes]
2009-04-15 Robert Dewar <dewar@adacore.com> * sem_eval.adb (Get_Static_Length): Go to origin node for array bounds in case they were rewritten by expander (Force_Evaluation). * targparm.adb (Get_Target_Parameters): Correct check for Suppress_Exception_Locations. 2009-04-15 Ed Schonberg <schonberg@adacore.com> * exp_ch6.adb (Expand_Inlined_Call): If an in-parameter in a call to be inlined is of an array type that is not bit-packed, use a renaming declaration to capture its value, rather than a constant declaration. From-SVN: r146104
This commit is contained in:
parent
443614e35f
commit
bafc9e1d98
@ -1,3 +1,17 @@
|
||||
2009-04-15 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* sem_eval.adb (Get_Static_Length): Go to origin node for array bounds
|
||||
in case they were rewritten by expander (Force_Evaluation).
|
||||
|
||||
* targparm.adb (Get_Target_Parameters): Correct check for
|
||||
Suppress_Exception_Locations.
|
||||
|
||||
2009-04-15 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* exp_ch6.adb (Expand_Inlined_Call): If an in-parameter in a call to be
|
||||
inlined is of an array type that is not bit-packed, use a renaming
|
||||
declaration to capture its value, rather than a constant declaration.
|
||||
|
||||
2009-04-15 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* rtsfind.adb: Minor reformatting.
|
||||
|
@ -3795,9 +3795,18 @@ package body Exp_Ch6 is
|
||||
-- its value is captured in a renaming declaration. Otherwise
|
||||
-- declare a local constant initialized with the actual.
|
||||
|
||||
-- We also use a renaming declaration for expressions of an
|
||||
-- array type that is not bit-packed, both for efficiency reasons
|
||||
-- and to respect the semantics of the call: in most cases the
|
||||
-- original call will pass the parameter by reference, and thus
|
||||
-- the inlined code will have the same semantics.
|
||||
|
||||
if Ekind (F) = E_In_Parameter
|
||||
and then not Is_Limited_Type (Etype (A))
|
||||
and then not Is_Tagged_Type (Etype (A))
|
||||
and then
|
||||
(not Is_Array_Type (Etype (A))
|
||||
or else Is_Bit_Packed_Array (Etype (A)))
|
||||
then
|
||||
Decl :=
|
||||
Make_Object_Declaration (Loc,
|
||||
|
@ -2504,8 +2504,10 @@ package body Sem_Eval is
|
||||
-- Start of processing for Extract_Length
|
||||
|
||||
begin
|
||||
Decompose_Expr (Type_Low_Bound (T), Ent1, Kind1, Cons1);
|
||||
Decompose_Expr (Type_High_Bound (T), Ent2, Kind2, Cons2);
|
||||
Decompose_Expr
|
||||
(Original_Node (Type_Low_Bound (T)), Ent1, Kind1, Cons1);
|
||||
Decompose_Expr
|
||||
(Original_Node (Type_High_Bound (T)), Ent2, Kind2, Cons2);
|
||||
|
||||
if Present (Ent1)
|
||||
and then Kind1 = Kind2
|
||||
|
@ -408,10 +408,10 @@ package body Targparm is
|
||||
|
||||
-- Suppress_Exception_Locations
|
||||
|
||||
elsif System_Text (P .. P + 34) =
|
||||
"pragma Suppress_Exception_Locations;"
|
||||
elsif System_Text (P .. P + 35) =
|
||||
"pragma Suppress_Exception_Locations;"
|
||||
then
|
||||
P := P + 35;
|
||||
P := P + 36;
|
||||
Opt.Exception_Locations_Suppressed := True;
|
||||
goto Line_Loop_Continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user