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>
* 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.
2012-05-15 Vincent Pucci <pucci@adacore.com>
......
......@@ -944,16 +944,14 @@ package body Sem_Ch13 is
-- Set the Uses_Lock_Free flag to True if there is no
-- expression or if the expression is True.
if No (Expr)
or else Is_True (Static_Boolean (Expr))
then
if No (Expr) or else Is_True (Static_Boolean (Expr)) then
Set_Uses_Lock_Free (E);
end if;
goto Continue;
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
-- True. If the expression is False, we can ignore the
-- aspect with the exception that in the case of a derived
......
......@@ -70,9 +70,8 @@ package body Sem_Ch9 is
function Allows_Lock_Free_Implementation
(N : Node_Id;
Complain : Boolean := False) return Boolean;
-- This dispatch routine return True if N satisfies the following list of
-- lock-free restrictions for protected type declaration and protected
-- body:
-- This routine returns True iff N satisfies the following list of lock-
-- free restrictions for protected type declaration and protected body:
--
-- 1) Protected type declaration
-- May not contain entries
......@@ -87,8 +86,7 @@ package body Sem_Ch9 is
-- May not contain loop statements or procedure calls
-- Function calls and attribute references must be static
--
-- If Complain is set to True, an error message is issued when return
-- False.
-- If Complain is True, an error message is issued when False is returned
procedure Check_Max_Entries (D : Node_Id; R : All_Parameter_Restrictions);
-- Given either a protected definition or a task definition in D, check
......@@ -134,9 +132,7 @@ package body Sem_Ch9 is
-- flag. When Complain is True, an aspect Lock_Free forces the lock-free
-- implementation. In that case, the debug flag is not needed.
if not Complain
and then not Debug_Flag_9
then
if not Complain and then not Debug_Flag_9 then
return False;
end if;
......@@ -235,7 +231,7 @@ package body Sem_Ch9 is
-- Protected body case
else
declare
Protected_Body_Case : declare
Decls : constant List_Id := Declarations (N);
Pid : constant Entity_Id := Corresponding_Spec (N);
Prot_Typ_Decl : constant Node_Id := Parent (Pid);
......@@ -392,6 +388,8 @@ package body Sem_Ch9 is
end if;
end Satisfies_Lock_Free_Requirements;
-- Start of processing for Protected_Body_Case
begin
Decl := First (Decls);
......@@ -409,7 +407,7 @@ package body Sem_Ch9 is
Next (Decl);
end loop;
end;
end Protected_Body_Case;
end if;
return True;
......@@ -1709,8 +1707,8 @@ package body Sem_Ch9 is
End_Scope;
-- When a Lock_Free aspect forces the lock-free implementation, check N
-- meets all the lock-free restrictions. Otherwise,
-- Allows_Lock_Free_Implementation issue an error message.
-- meets all the lock-free restrictions. Otherwise, an error message is
-- issued by Allows_Lock_Free_Implementation.
if Uses_Lock_Free (Defining_Identifier (N)) 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