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