[multiple changes]
2017-01-13 Yannick Moy <moy@adacore.com> * inline.adb: Code cleanup. * sem_util.adb (Is_OK_Volatile_Context): Add expression in delay statement as OK for volatile context. 2017-01-13 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation mode a choice that is a subtype with a static predicate is replaced by the values it covers. This transformation must not be performed in ASIS mode, to preserve the source for analysis. 2017-01-13 Justin Squirek <squirek@adacore.com> * nlists.ads: Correct minor typo. From-SVN: r244411
This commit is contained in:
parent
ef74daead6
commit
3abbc5c240
@ -1,3 +1,20 @@
|
||||
2017-01-13 Yannick Moy <moy@adacore.com>
|
||||
|
||||
* inline.adb: Code cleanup.
|
||||
* sem_util.adb (Is_OK_Volatile_Context): Add
|
||||
expression in delay statement as OK for volatile context.
|
||||
|
||||
2017-01-13 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
|
||||
mode a choice that is a subtype with a static predicate is
|
||||
replaced by the values it covers. This transformation must not
|
||||
be performed in ASIS mode, to preserve the source for analysis.
|
||||
|
||||
2017-01-13 Justin Squirek <squirek@adacore.com>
|
||||
|
||||
* nlists.ads: Correct minor typo.
|
||||
|
||||
2017-01-13 Gary Dismukes <dismukes@adacore.com>
|
||||
|
||||
* sem_ch13.adb: Minor reformatting and typo fix.
|
||||
|
@ -3200,17 +3200,12 @@ package body Inline is
|
||||
then
|
||||
pragma Assert (not (Is_By_Reference_Type (Etype (A))));
|
||||
pragma Assert (not (Is_Limited_Type (Etype (A))));
|
||||
Decl :=
|
||||
Append_To (Decls,
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Temp,
|
||||
Defining_Identifier => Make_Temporary (Loc, 'C'),
|
||||
Constant_Present => True,
|
||||
Object_Definition => New_Occurrence_Of (Temp_Typ, Loc),
|
||||
Expression => New_Copy_Tree (New_A));
|
||||
Append (Decl, Decls);
|
||||
|
||||
-- Create another name for the renaming
|
||||
|
||||
Temp := Make_Temporary (Loc, 'C');
|
||||
Expression => New_Copy_Tree (New_A)));
|
||||
end if;
|
||||
|
||||
Decl :=
|
||||
|
@ -302,13 +302,13 @@ package Nlists is
|
||||
-- Like Prepend_List, but arguments are the other way round
|
||||
|
||||
procedure Prepend_New (Node : Node_Or_Entity_Id; To : in out List_Id);
|
||||
pragma Inline (Append_New);
|
||||
pragma Inline (Prepend_New);
|
||||
-- Prepends Node at the end of node list To. If To is non-existent list, a
|
||||
-- list is created. Node must be a non-empty node that is not already a
|
||||
-- member of a node list, and To must be a node list.
|
||||
|
||||
procedure Prepend_New_To (To : in out List_Id; Node : Node_Or_Entity_Id);
|
||||
pragma Inline (Append_New_To);
|
||||
pragma Inline (Prepend_New_To);
|
||||
-- Like Prepend_New, but the arguments are in reverse order
|
||||
|
||||
procedure Prepend_To
|
||||
|
@ -1809,8 +1809,13 @@ package body Sem_Aggr is
|
||||
-- If the subtype has a static predicate, replace the
|
||||
-- original choice with the list of individual values
|
||||
-- covered by the predicate.
|
||||
-- Do not perform this transformation if we need to
|
||||
-- preserve the source for ASIS use.
|
||||
-- This should be deferred to expansion time ???
|
||||
|
||||
if Present (Static_Discrete_Predicate (E)) then
|
||||
if Present (Static_Discrete_Predicate (E))
|
||||
and then not ASIS_Mode
|
||||
then
|
||||
Delete_Choice := True;
|
||||
|
||||
New_Cs := New_List;
|
||||
|
@ -13726,6 +13726,11 @@ package body Sem_Util is
|
||||
then
|
||||
return True;
|
||||
|
||||
-- The volatile object appears as the expression in a delay statement
|
||||
|
||||
elsif Nkind (Context) in N_Delay_Statement then
|
||||
return True;
|
||||
|
||||
-- Allow references to volatile objects in various checks. This is not a
|
||||
-- direct SPARK 2014 requirement.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user