[multiple changes]
2012-10-02 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_N_Case_Expression): Do not introduce indirections when the type of the alternatives is an access type: more efficient, and removes anomalies when an alternative is statically null. 2012-10-02 Robert Dewar <dewar@adacore.com> * aspects.ads: Minor comment addition (Invariant is a GNAT aspect). From-SVN: r191963
This commit is contained in:
parent
9a6dc47083
commit
2492305bcc
|
@ -1,3 +1,14 @@
|
||||||
|
2012-10-02 Ed Schonberg <schonberg@adacore.com>
|
||||||
|
|
||||||
|
* exp_ch4.adb (Expand_N_Case_Expression): Do not introduce
|
||||||
|
indirections when the type of the alternatives is an access type:
|
||||||
|
more efficient, and removes anomalies when an alternative is
|
||||||
|
statically null.
|
||||||
|
|
||||||
|
2012-10-02 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
|
* aspects.ads: Minor comment addition (Invariant is a GNAT aspect).
|
||||||
|
|
||||||
2012-10-02 Robert Dewar <dewar@adacore.com>
|
2012-10-02 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
* exp_ch7.adb, sem_dim.adb, sem_dim.ads, prj-part.adb, checks.adb,
|
* exp_ch7.adb, sem_dim.adb, sem_dim.ads, prj-part.adb, checks.adb,
|
||||||
|
|
|
@ -95,7 +95,7 @@ package Aspects is
|
||||||
Aspect_Implicit_Dereference,
|
Aspect_Implicit_Dereference,
|
||||||
Aspect_Input,
|
Aspect_Input,
|
||||||
Aspect_Interrupt_Priority,
|
Aspect_Interrupt_Priority,
|
||||||
Aspect_Invariant,
|
Aspect_Invariant, -- GNAT
|
||||||
Aspect_Iterator_Element,
|
Aspect_Iterator_Element,
|
||||||
Aspect_Link_Name,
|
Aspect_Link_Name,
|
||||||
Aspect_Machine_Radix,
|
Aspect_Machine_Radix,
|
||||||
|
|
|
@ -4797,7 +4797,7 @@ package body Exp_Ch4 is
|
||||||
-- wrong for unconstrained types (since the bounds may not be the
|
-- wrong for unconstrained types (since the bounds may not be the
|
||||||
-- same in all branches). Furthermore it involves an extra copy
|
-- same in all branches). Furthermore it involves an extra copy
|
||||||
-- for large objects. So we take care of this by using the following
|
-- for large objects. So we take care of this by using the following
|
||||||
-- modified expansion for non-scalar types:
|
-- modified expansion for non-elementary types:
|
||||||
|
|
||||||
-- do
|
-- do
|
||||||
-- type Pnn is access all typ;
|
-- type Pnn is access all typ;
|
||||||
|
@ -4820,7 +4820,7 @@ package body Exp_Ch4 is
|
||||||
|
|
||||||
-- Scalar case
|
-- Scalar case
|
||||||
|
|
||||||
if Is_Scalar_Type (Typ) then
|
if Is_Elementary_Type (Typ) then
|
||||||
Ttyp := Typ;
|
Ttyp := Typ;
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -4855,7 +4855,7 @@ package body Exp_Ch4 is
|
||||||
-- As described above, take Unrestricted_Access for case of non-
|
-- As described above, take Unrestricted_Access for case of non-
|
||||||
-- scalar types, to avoid big copies, and special cases.
|
-- scalar types, to avoid big copies, and special cases.
|
||||||
|
|
||||||
if not Is_Scalar_Type (Typ) then
|
if not Is_Elementary_Type (Typ) then
|
||||||
Aexp :=
|
Aexp :=
|
||||||
Make_Attribute_Reference (Aloc,
|
Make_Attribute_Reference (Aloc,
|
||||||
Prefix => Relocate_Node (Aexp),
|
Prefix => Relocate_Node (Aexp),
|
||||||
|
@ -4890,7 +4890,7 @@ package body Exp_Ch4 is
|
||||||
|
|
||||||
-- Construct and return final expression with actions
|
-- Construct and return final expression with actions
|
||||||
|
|
||||||
if Is_Scalar_Type (Typ) then
|
if Is_Elementary_Type (Typ) then
|
||||||
Fexp := New_Occurrence_Of (Tnn, Loc);
|
Fexp := New_Occurrence_Of (Tnn, Loc);
|
||||||
else
|
else
|
||||||
Fexp :=
|
Fexp :=
|
||||||
|
|
Loading…
Reference in New Issue