Commit e7834f95 by Robert Dewar Committed by Arnaud Charlet

exp_ch9.adb, [...]: Minor reformatting.

2012-05-15  Robert Dewar  <dewar@adacore.com>

	* exp_ch9.adb, sem_ch9.adb, sem_ch13.adb: Minor reformatting.

From-SVN: r187506
parent 88e7531b
2012-05-15 Robert Dewar <dewar@adacore.com> 2012-05-15 Robert Dewar <dewar@adacore.com>
* exp_ch9.adb, sem_ch9.adb, sem_ch13.adb: Minor reformatting.
2012-05-15 Robert Dewar <dewar@adacore.com>
* g-comlin.adb, g-comlin.ads: Minor reformatting. * g-comlin.adb, g-comlin.ads: Minor reformatting.
2012-05-15 Vincent Pucci <pucci@adacore.com> 2012-05-15 Vincent Pucci <pucci@adacore.com>
......
...@@ -944,16 +944,14 @@ package body Sem_Ch13 is ...@@ -944,16 +944,14 @@ package body Sem_Ch13 is
-- Set the Uses_Lock_Free flag to True if there is no -- Set the Uses_Lock_Free flag to True if there is no
-- expression or if the expression is True. -- expression or if the expression is True.
if No (Expr) if No (Expr) or else Is_True (Static_Boolean (Expr)) then
or else Is_True (Static_Boolean (Expr))
then
Set_Uses_Lock_Free (E); Set_Uses_Lock_Free (E);
end if; end if;
goto Continue; goto Continue;
end if; end if;
-- For all of these aspects we just create a matching pragma -- For all other aspects we just create a matching pragma
-- and insert it, if the expression is missing or set to -- and insert it, if the expression is missing or set to
-- True. If the expression is False, we can ignore the -- True. If the expression is False, we can ignore the
-- aspect with the exception that in the case of a derived -- aspect with the exception that in the case of a derived
......
...@@ -70,9 +70,8 @@ package body Sem_Ch9 is ...@@ -70,9 +70,8 @@ package body Sem_Ch9 is
function Allows_Lock_Free_Implementation function Allows_Lock_Free_Implementation
(N : Node_Id; (N : Node_Id;
Complain : Boolean := False) return Boolean; Complain : Boolean := False) return Boolean;
-- This dispatch routine return True if N satisfies the following list of -- This routine returns True iff N satisfies the following list of lock-
-- lock-free restrictions for protected type declaration and protected -- free restrictions for protected type declaration and protected body:
-- body:
-- --
-- 1) Protected type declaration -- 1) Protected type declaration
-- May not contain entries -- May not contain entries
...@@ -87,8 +86,7 @@ package body Sem_Ch9 is ...@@ -87,8 +86,7 @@ package body Sem_Ch9 is
-- May not contain loop statements or procedure calls -- May not contain loop statements or procedure calls
-- Function calls and attribute references must be static -- Function calls and attribute references must be static
-- --
-- If Complain is set to True, an error message is issued when return -- If Complain is True, an error message is issued when False is returned
-- False.
procedure Check_Max_Entries (D : Node_Id; R : All_Parameter_Restrictions); procedure Check_Max_Entries (D : Node_Id; R : All_Parameter_Restrictions);
-- Given either a protected definition or a task definition in D, check -- Given either a protected definition or a task definition in D, check
...@@ -134,9 +132,7 @@ package body Sem_Ch9 is ...@@ -134,9 +132,7 @@ package body Sem_Ch9 is
-- flag. When Complain is True, an aspect Lock_Free forces the lock-free -- flag. When Complain is True, an aspect Lock_Free forces the lock-free
-- implementation. In that case, the debug flag is not needed. -- implementation. In that case, the debug flag is not needed.
if not Complain if not Complain and then not Debug_Flag_9 then
and then not Debug_Flag_9
then
return False; return False;
end if; end if;
...@@ -235,7 +231,7 @@ package body Sem_Ch9 is ...@@ -235,7 +231,7 @@ package body Sem_Ch9 is
-- Protected body case -- Protected body case
else else
declare Protected_Body_Case : declare
Decls : constant List_Id := Declarations (N); Decls : constant List_Id := Declarations (N);
Pid : constant Entity_Id := Corresponding_Spec (N); Pid : constant Entity_Id := Corresponding_Spec (N);
Prot_Typ_Decl : constant Node_Id := Parent (Pid); Prot_Typ_Decl : constant Node_Id := Parent (Pid);
...@@ -392,6 +388,8 @@ package body Sem_Ch9 is ...@@ -392,6 +388,8 @@ package body Sem_Ch9 is
end if; end if;
end Satisfies_Lock_Free_Requirements; end Satisfies_Lock_Free_Requirements;
-- Start of processing for Protected_Body_Case
begin begin
Decl := First (Decls); Decl := First (Decls);
...@@ -409,7 +407,7 @@ package body Sem_Ch9 is ...@@ -409,7 +407,7 @@ package body Sem_Ch9 is
Next (Decl); Next (Decl);
end loop; end loop;
end; end Protected_Body_Case;
end if; end if;
return True; return True;
...@@ -1709,8 +1707,8 @@ package body Sem_Ch9 is ...@@ -1709,8 +1707,8 @@ package body Sem_Ch9 is
End_Scope; End_Scope;
-- When a Lock_Free aspect forces the lock-free implementation, check N -- When a Lock_Free aspect forces the lock-free implementation, check N
-- meets all the lock-free restrictions. Otherwise, -- meets all the lock-free restrictions. Otherwise, an error message is
-- Allows_Lock_Free_Implementation issue an error message. -- issued by Allows_Lock_Free_Implementation.
if Uses_Lock_Free (Defining_Identifier (N)) then if Uses_Lock_Free (Defining_Identifier (N)) then
if not Allows_Lock_Free_Implementation (N, Complain => True) then if not Allows_Lock_Free_Implementation (N, Complain => True) then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment