Commit 3040dbd4 by Robert Dewar Committed by Arnaud Charlet

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

2011-09-01  Robert Dewar  <dewar@adacore.com>

	* exp_ch4.adb, a-exexda.adb: Minor reformatting.

From-SVN: r178402
parent fecbd779
2011-09-01 Robert Dewar <dewar@adacore.com> 2011-09-01 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb, a-exexda.adb: Minor reformatting.
2011-09-01 Robert Dewar <dewar@adacore.com>
* s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting. * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
2011-09-01 Thomas Quinot <quinot@adacore.com> 2011-09-01 Thomas Quinot <quinot@adacore.com>
......
...@@ -433,7 +433,8 @@ package body Exception_Data is ...@@ -433,7 +433,8 @@ package body Exception_Data is
------------------------------ ------------------------------
function Exception_Info_Maxlength function Exception_Info_Maxlength
(X : Exception_Occurrence) return Natural is (X : Exception_Occurrence) return Natural
is
begin begin
return return
Basic_Exception_Info_Maxlength (X) Basic_Exception_Info_Maxlength (X)
...@@ -447,14 +448,15 @@ package body Exception_Data is ...@@ -447,14 +448,15 @@ package body Exception_Data is
procedure Append_Info_Exception_Message procedure Append_Info_Exception_Message
(X : Exception_Occurrence; (X : Exception_Occurrence;
Info : in out String; Info : in out String;
Ptr : in out Natural) is Ptr : in out Natural)
is
begin begin
if X.Id = Null_Id then if X.Id = Null_Id then
raise Constraint_Error; raise Constraint_Error;
end if; end if;
declare declare
Len : constant Natural := Exception_Message_Length (X); Len : constant Natural := Exception_Message_Length (X);
Msg : constant String (1 .. Len) := X.Msg (1 .. Len); Msg : constant String (1 .. Len) := X.Msg (1 .. Len);
begin begin
Append_Info_String (Msg, Info, Ptr); Append_Info_String (Msg, Info, Ptr);
...@@ -476,7 +478,7 @@ package body Exception_Data is ...@@ -476,7 +478,7 @@ package body Exception_Data is
end if; end if;
declare declare
Len : constant Natural := Exception_Name_Length (Id); Len : constant Natural := Exception_Name_Length (Id);
Name : constant String (1 .. Len) := To_Ptr (Id.Full_Name) (1 .. Len); Name : constant String (1 .. Len) := To_Ptr (Id.Full_Name) (1 .. Len);
begin begin
Append_Info_String (Name, Info, Ptr); Append_Info_String (Name, Info, Ptr);
...@@ -497,7 +499,8 @@ package body Exception_Data is ...@@ -497,7 +499,8 @@ package body Exception_Data is
--------------------------- ---------------------------
function Exception_Name_Length function Exception_Name_Length
(Id : Exception_Id) return Natural is (Id : Exception_Id) return Natural
is
begin begin
-- What is stored in the internal Name buffer includes a terminating -- What is stored in the internal Name buffer includes a terminating
-- null character that we never care about. -- null character that we never care about.
...@@ -516,7 +519,8 @@ package body Exception_Data is ...@@ -516,7 +519,8 @@ package body Exception_Data is
------------------------------ ------------------------------
function Exception_Message_Length function Exception_Message_Length
(X : Exception_Occurrence) return Natural is (X : Exception_Occurrence) return Natural
is
begin begin
return X.Msg_Length; return X.Msg_Length;
end Exception_Message_Length; end Exception_Message_Length;
...@@ -530,7 +534,6 @@ package body Exception_Data is ...@@ -530,7 +534,6 @@ package body Exception_Data is
is is
Info : aliased String (1 .. Basic_Exception_Tback_Maxlength (X)); Info : aliased String (1 .. Basic_Exception_Tback_Maxlength (X));
Ptr : Natural := Info'First - 1; Ptr : Natural := Info'First - 1;
begin begin
Append_Info_Basic_Exception_Traceback (X, Info, Ptr); Append_Info_Basic_Exception_Traceback (X, Info, Ptr);
return Info (Info'First .. Ptr); return Info (Info'First .. Ptr);
...@@ -545,7 +548,6 @@ package body Exception_Data is ...@@ -545,7 +548,6 @@ package body Exception_Data is
is is
Info : String (1 .. Exception_Info_Maxlength (X)); Info : String (1 .. Exception_Info_Maxlength (X));
Ptr : Natural := Info'First - 1; Ptr : Natural := Info'First - 1;
begin begin
Append_Info_Exception_Information (X, Info, Ptr); Append_Info_Exception_Information (X, Info, Ptr);
return Info (Info'First .. Ptr); return Info (Info'First .. Ptr);
...@@ -596,9 +598,9 @@ package body Exception_Data is ...@@ -596,9 +598,9 @@ package body Exception_Data is
if Excep.Msg_Length <= Exception_Msg_Max_Length - Size then if Excep.Msg_Length <= Exception_Msg_Max_Length - Size then
Excep.Msg (Excep.Msg_Length + 1) := ':'; Excep.Msg (Excep.Msg_Length + 1) := ':';
Excep.Msg_Length := Excep.Msg_Length + Size; Excep.Msg_Length := Excep.Msg_Length + Size;
Val := Number; Val := Number;
Size := 0; Size := 0;
while Val > 0 loop while Val > 0 loop
Remind := Val rem 10; Remind := Val rem 10;
Val := Val / 10; Val := Val / 10;
...@@ -658,8 +660,7 @@ package body Exception_Data is ...@@ -658,8 +660,7 @@ package body Exception_Data is
Len : constant Natural := Len : constant Natural :=
Natural'Min (Message'Length, Exception_Msg_Max_Length); Natural'Min (Message'Length, Exception_Msg_Max_Length);
First : constant Integer := Message'First; First : constant Integer := Message'First;
Excep : constant EOA := Get_Current_Excep.all; Excep : constant EOA := Get_Current_Excep.all;
begin begin
Excep.Exception_Raised := False; Excep.Exception_Raised := False;
Excep.Msg_Length := Len; Excep.Msg_Length := Len;
...@@ -667,7 +668,6 @@ package body Exception_Data is ...@@ -667,7 +668,6 @@ package body Exception_Data is
Excep.Id := Id; Excep.Id := Id;
Excep.Num_Tracebacks := 0; Excep.Num_Tracebacks := 0;
Excep.Pid := Local_Partition_ID; Excep.Pid := Local_Partition_ID;
end Set_Exception_Msg; end Set_Exception_Msg;
---------------------------------- ----------------------------------
......
...@@ -4428,11 +4428,12 @@ package body Exp_Ch4 is ...@@ -4428,11 +4428,12 @@ package body Exp_Ch4 is
------------------------- -------------------------
function Find_Insertion_Node return Node_Id is function Find_Insertion_Node return Node_Id is
Par : Node_Id := N; Par : Node_Id;
begin begin
-- Climb up the branches of a complex if statement -- Climb up the branches of a complex if statement
Par := N;
while Nkind_In (Parent (Par), N_And_Then, N_Op_Not, N_Or_Else) loop while Nkind_In (Parent (Par), N_And_Then, N_Op_Not, N_Or_Else) loop
Par := Parent (Par); Par := Parent (Par);
end loop; end loop;
...@@ -4440,6 +4441,8 @@ package body Exp_Ch4 is ...@@ -4440,6 +4441,8 @@ package body Exp_Ch4 is
return Par; return Par;
end Find_Insertion_Node; end Find_Insertion_Node;
-- Local variables
Ins_Nod : constant Node_Id := Find_Insertion_Node; Ins_Nod : constant Node_Id := Find_Insertion_Node;
Loc : constant Source_Ptr := Sloc (Decl); Loc : constant Source_Ptr := Sloc (Decl);
Obj_Id : constant Entity_Id := Defining_Identifier (Decl); Obj_Id : constant Entity_Id := Defining_Identifier (Decl);
...@@ -4452,8 +4455,8 @@ package body Exp_Ch4 is ...@@ -4452,8 +4455,8 @@ package body Exp_Ch4 is
Temp_Id : Node_Id; Temp_Id : Node_Id;
begin begin
-- Step 1: Create the access type which provides a reference to -- Step 1: Create the access type which provides a reference to the
-- the transient object. -- transient object.
if Is_Access_Type (Obj_Typ) then if Is_Access_Type (Obj_Typ) then
Desig_Typ := Directly_Designated_Type (Obj_Typ); Desig_Typ := Directly_Designated_Type (Obj_Typ);
...@@ -4469,11 +4472,11 @@ package body Exp_Ch4 is ...@@ -4469,11 +4472,11 @@ package body Exp_Ch4 is
Ptr_Decl := Ptr_Decl :=
Make_Full_Type_Declaration (Loc, Make_Full_Type_Declaration (Loc,
Defining_Identifier => Ptr_Id, Defining_Identifier => Ptr_Id,
Type_Definition => Type_Definition =>
Make_Access_To_Object_Definition (Loc, Make_Access_To_Object_Definition (Loc,
All_Present => All_Present =>
Ekind (Obj_Typ) = E_General_Access_Type, Ekind (Obj_Typ) = E_General_Access_Type,
Subtype_Indication => New_Reference_To (Desig_Typ, Loc))); Subtype_Indication => New_Reference_To (Desig_Typ, Loc)));
Insert_Action (Ins_Nod, Ptr_Decl); Insert_Action (Ins_Nod, Ptr_Decl);
Analyze (Ptr_Decl); Analyze (Ptr_Decl);
......
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