Commit feecad68 by Arnaud Charlet

[multiple changes]

2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>

	* inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
	entity node for the unit containing the parameter.
	(Add_Inlined_Body): Use it to find the unit containing the subprogram.
	(Add_Inlined_Subprogram): Likewise.
	* gcc-interface/Make-lang.in: Update dependencies.

2011-08-02  Thomas Quinot  <quinot@adacore.com>

	* s-stusta.adb (Print): Make sure Pos is always initialized to a
	suitable value.

2011-08-02  Ed Falis  <falis@adacore.com>

	* init.c: Fix conditional compilation so that the fp initialization is
	peformed for the MILS VxWorks Guest OS.

From-SVN: r177136
parent 12f0c50c
2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
* inline.adb (Get_Code_Unit_Entity): New local function. Returns the
entity node for the unit containing the parameter.
(Add_Inlined_Body): Use it to find the unit containing the subprogram.
(Add_Inlined_Subprogram): Likewise.
* gcc-interface/Make-lang.in: Update dependencies.
2011-08-02 Thomas Quinot <quinot@adacore.com>
* s-stusta.adb (Print): Make sure Pos is always initialized to a
suitable value.
2011-08-02 Ed Falis <falis@adacore.com>
* init.c: Fix conditional compilation so that the fp initialization is
peformed for the MILS VxWorks Guest OS.
2011-08-02 Geert Bosch <bosch@adacore.com> 2011-08-02 Geert Bosch <bosch@adacore.com>
* a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image. * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2026,7 +2026,7 @@ __gnat_init_float (void) ...@@ -2026,7 +2026,7 @@ __gnat_init_float (void)
to get correct Ada semantics. Note that for AE653 vThreads, the HW to get correct Ada semantics. Note that for AE653 vThreads, the HW
overflow settings are an OS configuration issue. The instructions overflow settings are an OS configuration issue. The instructions
below have no effect. */ below have no effect. */
#if defined (_ARCH_PPC) && !defined (_SOFT_FLOAT) && !defined (VTHREADS) #if defined (_ARCH_PPC) && !defined (_SOFT_FLOAT) && (!defined (VTHREADS) || defined (__VXWORKSMILS__))
#if defined (__SPE__) #if defined (__SPE__)
{ {
const unsigned long spefscr_mask = 0xfffffff3; const unsigned long spefscr_mask = 0xfffffff3;
......
...@@ -137,6 +137,10 @@ package body Inline is ...@@ -137,6 +137,10 @@ package body Inline is
-- Local Subprograms -- -- Local Subprograms --
----------------------- -----------------------
function Get_Code_Unit_Entity (E : Entity_Id) return Entity_Id;
pragma Inline (Get_Code_Unit_Entity);
-- Return the entity node for the unit containing E
function Scope_In_Main_Unit (Scop : Entity_Id) return Boolean; function Scope_In_Main_Unit (Scop : Entity_Id) return Boolean;
-- Return True if Scop is in the main unit or its spec -- Return True if Scop is in the main unit or its spec
...@@ -317,7 +321,7 @@ package body Inline is ...@@ -317,7 +321,7 @@ package body Inline is
if not Is_Abstract_Subprogram (E) and then not Is_Nested (E) if not Is_Abstract_Subprogram (E) and then not Is_Nested (E)
and then Convention (E) /= Convention_Protected and then Convention (E) /= Convention_Protected
then then
Pack := Scope (E); Pack := Get_Code_Unit_Entity (E);
if Must_Inline if Must_Inline
and then Ekind (Pack) = E_Package and then Ekind (Pack) = E_Package
...@@ -352,7 +356,7 @@ package body Inline is ...@@ -352,7 +356,7 @@ package body Inline is
procedure Add_Inlined_Subprogram (Index : Subp_Index) is procedure Add_Inlined_Subprogram (Index : Subp_Index) is
E : constant Entity_Id := Inlined.Table (Index).Name; E : constant Entity_Id := Inlined.Table (Index).Name;
Pack : constant Entity_Id := Cunit_Entity (Get_Code_Unit (E)); Pack : constant Entity_Id := Get_Code_Unit_Entity (E);
Succ : Succ_Index; Succ : Succ_Index;
Subp : Subp_Index; Subp : Subp_Index;
...@@ -1158,6 +1162,15 @@ package body Inline is ...@@ -1158,6 +1162,15 @@ package body Inline is
end loop; end loop;
end Remove_Dead_Instance; end Remove_Dead_Instance;
--------------------------
-- Get_Code_Unit_Entity --
--------------------------
function Get_Code_Unit_Entity (E : Entity_Id) return Entity_Id is
begin
return Cunit_Entity (Get_Code_Unit (E));
end Get_Code_Unit_Entity;
------------------------ ------------------------
-- Scope_In_Main_Unit -- -- Scope_In_Main_Unit --
------------------------ ------------------------
......
...@@ -62,9 +62,9 @@ package body System.Stack_Usage.Tasking is ...@@ -62,9 +62,9 @@ package body System.Stack_Usage.Tasking is
Res : out Stack_Usage_Result); Res : out Stack_Usage_Result);
-- Convert an object of type System.Stack_Usage in a Stack_Usage_Result -- Convert an object of type System.Stack_Usage in a Stack_Usage_Result
-------------- -------------
-- Convert -- -- Convert --
-------------- -------------
procedure Convert procedure Convert
(TS : System.Stack_Usage.Task_Result; (TS : System.Stack_Usage.Task_Result;
...@@ -73,9 +73,9 @@ package body System.Stack_Usage.Tasking is ...@@ -73,9 +73,9 @@ package body System.Stack_Usage.Tasking is
Res := TS; Res := TS;
end Convert; end Convert;
---------------------- ---------------------
-- Report_For_Task -- -- Report_For_Task --
---------------------- ---------------------
procedure Report_For_Task (Id : System.Tasking.Task_Id) is procedure Report_For_Task (Id : System.Tasking.Task_Id) is
begin begin
...@@ -83,9 +83,9 @@ package body System.Stack_Usage.Tasking is ...@@ -83,9 +83,9 @@ package body System.Stack_Usage.Tasking is
System.Stack_Usage.Report_Result (Id.Common.Analyzer); System.Stack_Usage.Report_Result (Id.Common.Analyzer);
end Report_For_Task; end Report_For_Task;
------------------------ -----------------------
-- Compute_All_Tasks -- -- Compute_All_Tasks --
------------------------ -----------------------
procedure Compute_All_Tasks is procedure Compute_All_Tasks is
Id : System.Tasking.Task_Id; Id : System.Tasking.Task_Id;
...@@ -111,9 +111,9 @@ package body System.Stack_Usage.Tasking is ...@@ -111,9 +111,9 @@ package body System.Stack_Usage.Tasking is
end if; end if;
end Compute_All_Tasks; end Compute_All_Tasks;
--------------------------- --------------------------
-- Compute_Current_Task -- -- Compute_Current_Task --
--------------------------- --------------------------
procedure Compute_Current_Task is procedure Compute_Current_Task is
begin begin
...@@ -128,9 +128,9 @@ package body System.Stack_Usage.Tasking is ...@@ -128,9 +128,9 @@ package body System.Stack_Usage.Tasking is
end if; end if;
end Compute_Current_Task; end Compute_Current_Task;
------------------ -----------------
-- Report_Impl -- -- Report_Impl --
------------------ -----------------
procedure Report_Impl (All_Tasks : Boolean; Do_Print : Boolean) is procedure Report_Impl (All_Tasks : Boolean; Do_Print : Boolean) is
begin begin
...@@ -158,18 +158,18 @@ package body System.Stack_Usage.Tasking is ...@@ -158,18 +158,18 @@ package body System.Stack_Usage.Tasking is
end Report_Impl; end Report_Impl;
---------------------- ---------------------
-- Report_All_Task -- -- Report_All_Task --
---------------------- ---------------------
procedure Report_All_Tasks is procedure Report_All_Tasks is
begin begin
Report_Impl (True, True); Report_Impl (True, True);
end Report_All_Tasks; end Report_All_Tasks;
-------------------------- -------------------------
-- Report_Current_Task -- -- Report_Current_Task --
-------------------------- -------------------------
procedure Report_Current_Task is procedure Report_Current_Task is
Res : Stack_Usage_Result; Res : Stack_Usage_Result;
...@@ -178,9 +178,9 @@ package body System.Stack_Usage.Tasking is ...@@ -178,9 +178,9 @@ package body System.Stack_Usage.Tasking is
Print (Res); Print (Res);
end Report_Current_Task; end Report_Current_Task;
-------------------------- -------------------------
-- Get_All_Tasks_Usage -- -- Get_All_Tasks_Usage --
-------------------------- -------------------------
function Get_All_Tasks_Usage return Stack_Usage_Result_Array is function Get_All_Tasks_Usage return Stack_Usage_Result_Array is
Res : Stack_Usage_Result_Array Res : Stack_Usage_Result_Array
...@@ -195,9 +195,9 @@ package body System.Stack_Usage.Tasking is ...@@ -195,9 +195,9 @@ package body System.Stack_Usage.Tasking is
return Res; return Res;
end Get_All_Tasks_Usage; end Get_All_Tasks_Usage;
----------------------------- ----------------------------
-- Get_Current_Task_Usage -- -- Get_Current_Task_Usage --
----------------------------- ----------------------------
function Get_Current_Task_Usage return Stack_Usage_Result is function Get_Current_Task_Usage return Stack_Usage_Result is
Res : Stack_Usage_Result; Res : Stack_Usage_Result;
...@@ -228,12 +228,12 @@ package body System.Stack_Usage.Tasking is ...@@ -228,12 +228,12 @@ package body System.Stack_Usage.Tasking is
return Res; return Res;
end Get_Current_Task_Usage; end Get_Current_Task_Usage;
------------ -----------
-- Print -- -- Print --
------------ -----------
procedure Print (Obj : Stack_Usage_Result) is procedure Print (Obj : Stack_Usage_Result) is
Pos : Positive; Pos : Positive := Obj.Task_Name'Last;
begin begin
-- Simply trim the string containing the task name -- Simply trim the string containing the task name
...@@ -247,7 +247,7 @@ package body System.Stack_Usage.Tasking is ...@@ -247,7 +247,7 @@ package body System.Stack_Usage.Tasking is
declare declare
T_Name : constant String := Obj.Task_Name T_Name : constant String := Obj.Task_Name
(Obj.Task_Name'First .. Pos); (Obj.Task_Name'First .. Pos);
begin begin
Put_Line Put_Line
("| " & T_Name & " | " & Natural'Image (Obj.Max_Size) & ("| " & T_Name & " | " & Natural'Image (Obj.Max_Size) &
......
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