[multiple changes]
2011-08-31 Matthew Heaney <heaney@adacore.com> * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock status. 2011-08-31 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb: Set kind of loop parameter properly, to preserve all errors in B tests. 2011-08-31 Jose Ruiz <ruiz@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and Interrupt_Priority aspects, force the analysis of the aspect expression (when building the equivalent pragma). Otherwise, its analysis is done too late, after the task or protected object has been created. * sem_ch9.adb (Analyze_Single_Protected_Declaration, Analyze_Single_Task_Declaration): Remove the code to move the aspects to the object declaration because they are needed in the type declaration. From-SVN: r178370
This commit is contained in:
parent
680fba0932
commit
b87897272f
@ -1,3 +1,24 @@
|
||||
2011-08-31 Matthew Heaney <heaney@adacore.com>
|
||||
|
||||
* a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
|
||||
status.
|
||||
|
||||
2011-08-31 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* sem_ch5.adb: Set kind of loop parameter properly, to preserve all
|
||||
errors in B tests.
|
||||
|
||||
2011-08-31 Jose Ruiz <ruiz@adacore.com>
|
||||
|
||||
* sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
|
||||
Interrupt_Priority aspects, force the analysis of the aspect expression
|
||||
(when building the equivalent pragma). Otherwise, its analysis is done
|
||||
too late, after the task or protected object has been created.
|
||||
* sem_ch9.adb (Analyze_Single_Protected_Declaration,
|
||||
Analyze_Single_Task_Declaration): Remove the code to move the aspects
|
||||
to the object declaration because they are needed in the type
|
||||
declaration.
|
||||
|
||||
2011-08-31 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
|
||||
|
@ -59,15 +59,16 @@ package body Ada.Containers.Red_Black_Trees.Generic_Bounded_Operations is
|
||||
"attempt to tamper with cursors (container is busy)";
|
||||
end if;
|
||||
|
||||
-- The lock status (which monitors "element tampering") always implies
|
||||
-- that the busy status (which monitors "cursor tampering") is set too;
|
||||
-- this is a representation invariant. Thus if the busy bit is not set,
|
||||
-- then the lock bit must not be set either.
|
||||
pragma Assert (Tree.Lock = 0);
|
||||
|
||||
Tree.First := 0;
|
||||
Tree.Last := 0;
|
||||
Tree.Root := 0;
|
||||
Tree.Length := 0;
|
||||
|
||||
-- Why are the following commented out with no explanation ???
|
||||
-- Tree.Busy
|
||||
-- Tree.Lock
|
||||
|
||||
Tree.Free := -1;
|
||||
end Clear_Tree;
|
||||
|
||||
|
@ -1164,7 +1164,9 @@ package body Sem_Ch13 is
|
||||
Pragma_Identifier =>
|
||||
Make_Identifier (Sloc (Id), Pname),
|
||||
Pragma_Argument_Associations =>
|
||||
New_List (Relocate_Node (Expr)));
|
||||
New_List
|
||||
(Make_Pragma_Argument_Association
|
||||
(Sloc (Id), Expression => Relocate_Node (Expr))));
|
||||
|
||||
Set_From_Aspect_Specification (Aitem, True);
|
||||
|
||||
@ -1526,6 +1528,12 @@ package body Sem_Ch13 is
|
||||
end if;
|
||||
|
||||
Prepend (Aitem, To => L);
|
||||
|
||||
-- Analyze rewritten pragma. Otherwise, its
|
||||
-- analysis is done too late, after the task or
|
||||
-- protected object has been created.
|
||||
|
||||
Analyze (Aitem);
|
||||
end;
|
||||
|
||||
-- For all other cases, insert in sequence
|
||||
|
@ -1965,7 +1965,6 @@ package body Sem_Ch5 is
|
||||
|
||||
begin
|
||||
Enter_Name (Id);
|
||||
Set_Ekind (Id, E_Constant);
|
||||
|
||||
-- We always consider the loop variable to be referenced, since
|
||||
-- the loop may be used just for counting purposes.
|
||||
@ -2058,6 +2057,11 @@ package body Sem_Ch5 is
|
||||
Analyze (DS);
|
||||
end if;
|
||||
|
||||
-- Set kind of loop parameter, which may be used in
|
||||
-- the subsequent analysis of of the condition in a
|
||||
-- quantified expression.
|
||||
|
||||
Set_Ekind (Id, E_Loop_Parameter);
|
||||
return;
|
||||
end;
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
-- --
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
with Aspects; use Aspects;
|
||||
with Atree; use Atree;
|
||||
with Checks; use Checks;
|
||||
with Einfo; use Einfo;
|
||||
@ -1726,7 +1725,6 @@ package body Sem_Ch9 is
|
||||
Defining_Identifier => O_Name,
|
||||
Object_Definition => Make_Identifier (Loc, Chars (T)));
|
||||
|
||||
Move_Aspects (N, O_Decl);
|
||||
Rewrite (N, T_Decl);
|
||||
Insert_After (N, O_Decl);
|
||||
Mark_Rewrite_Insertion (O_Decl);
|
||||
@ -1796,7 +1794,6 @@ package body Sem_Ch9 is
|
||||
Defining_Identifier => O_Name,
|
||||
Object_Definition => Make_Identifier (Loc, Chars (T)));
|
||||
|
||||
Move_Aspects (N, O_Decl);
|
||||
Rewrite (N, T_Decl);
|
||||
Insert_After (N, O_Decl);
|
||||
Mark_Rewrite_Insertion (O_Decl);
|
||||
|
Loading…
Reference in New Issue
Block a user