Commit d80ee77c by Arnaud Charlet

[multiple changes]

2010-10-12  Thomas Quinot  <quinot@adacore.com>

	* rtsfind.ads, exp_dist.adb, exp_dist.ads (Build_General_Calling_Stubs,
	PolyORB case): Request is now a controlled type: we can declare the
	request on the stack, and we do not need explicit cleanup actions
	anymore.

2010-10-12  Bob Duff  <duff@adacore.com>

	* s-rident.ads (Profile_Info): This variable is now constant.

From-SVN: r165376
parent 81eb625c
2010-10-12 Thomas Quinot <quinot@adacore.com>
* rtsfind.ads, exp_dist.adb, exp_dist.ads (Build_General_Calling_Stubs,
PolyORB case): Request is now a controlled type: we can declare the
request on the stack, and we do not need explicit cleanup actions
anymore.
2010-10-12 Bob Duff <duff@adacore.com>
* s-rident.ads (Profile_Info): This variable is now constant.
2010-10-12 Emmanuel Briot <briot@adacore.com>
* g-comlin.adb, g-comlin.ads (Define_Switch): Put back (unused)
......
......@@ -7103,7 +7103,7 @@ package body Exp_Dist is
(RE : RE_Id;
Actuals : List_Id := New_List) return Node_Id;
-- Generate a procedure call statement calling RE with the given
-- actuals. Request is appended to the list.
-- actuals. Request'Access is appended to the list.
---------------------------
-- Make_Request_RTE_Call --
......@@ -7114,7 +7114,10 @@ package body Exp_Dist is
Actuals : List_Id := New_List) return Node_Id
is
begin
Append_To (Actuals, New_Occurrence_Of (Request, Loc));
Append_To (Actuals,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Request, Loc),
Attribute_Name => Name_Access));
return Make_Procedure_Call_Statement (Loc,
Name =>
New_Occurrence_Of (RTE (RE), Loc),
......@@ -7174,9 +7177,9 @@ package body Exp_Dist is
Append_To (Decls,
Make_Object_Declaration (Loc,
Defining_Identifier => Request,
Aliased_Present => False,
Aliased_Present => True,
Object_Definition =>
New_Occurrence_Of (RTE (RE_Request_Access), Loc)));
New_Occurrence_Of (RTE (RE_Request), Loc)));
Result := Make_Temporary (Loc, 'R');
......@@ -7410,13 +7413,16 @@ package body Exp_Dist is
Append_List_To (Statements, Extra_Formal_Statements);
Append_To (Statements,
Make_Request_RTE_Call (RE_Request_Create, New_List (
Target_Object,
Subprogram_Id,
New_Occurrence_Of (Arguments, Loc),
New_Occurrence_Of (Result, Loc),
New_Occurrence_Of
(RTE (RE_Nil_Exc_List), Loc))));
Make_Procedure_Call_Statement (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Request_Setup), Loc),
Parameter_Associations => New_List (
New_Occurrence_Of (Request, Loc),
Target_Object,
Subprogram_Id,
New_Occurrence_Of (Arguments, Loc),
New_Occurrence_Of (Result, Loc),
New_Occurrence_Of (RTE (RE_Nil_Exc_List), Loc))));
pragma Assert
(not (Is_Known_Non_Asynchronous and Is_Known_Asynchronous));
......@@ -7447,8 +7453,7 @@ package body Exp_Dist is
-- Asynchronous case
if not Is_Known_Non_Asynchronous then
Asynchronous_Statements :=
New_List (Make_Request_RTE_Call (RE_Request_Destroy));
Asynchronous_Statements := New_List (Make_Null_Statement (Loc));
end if;
-- Non-asynchronous case
......@@ -7465,10 +7470,6 @@ package body Exp_Dist is
New_Occurrence_Of (Request, Loc))));
if Is_Function then
Append_To (Non_Asynchronous_Statements,
Make_Request_RTE_Call (RE_Request_Destroy));
-- If this is a function call, read the value and return it
Append_To (Non_Asynchronous_Statements,
......@@ -7486,9 +7487,6 @@ package body Exp_Dist is
-- Case of a procedure: deal with IN OUT and OUT formals
Append_List_To (Non_Asynchronous_Statements, After_Statements);
Append_To (Non_Asynchronous_Statements,
Make_Request_RTE_Call (RE_Request_Destroy));
end if;
end if;
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -35,7 +35,7 @@ package Exp_Dist is
PCS_Version_Number : constant array (PCS_Names) of Int :=
(Name_No_DSA => 1,
Name_GARLIC_DSA => 1,
Name_PolyORB_DSA => 3);
Name_PolyORB_DSA => 4);
-- PCS interface version. This is used to check for consistency between the
-- compiler used to generate distribution stubs and the PCS implementation.
-- It must be incremented whenever a change is made to the generated code
......
......@@ -1135,6 +1135,7 @@ package Rtsfind is
RE_Raise_Program_Error_Unknown_Tag, -- System.Partition_Interface
RE_Register_Passive_Package, -- System.Partition_Interface
RE_Register_Receiving_Stub, -- System.Partition_Interface
RE_Request, -- System.Partition_Interface
RE_Request_Access, -- System.Partition_Interface
RE_RCI_Locator, -- System.Partition_Interface
RE_RCI_Subp_Info, -- System.Partition_Interface
......@@ -1174,12 +1175,11 @@ package Rtsfind is
RE_NVList_Ref, -- System.Partition_Interface
RE_NVList_Create, -- System.Partition_Interface
RE_NVList_Add_Item, -- System.Partition_Interface
RE_Request_Create, -- System.Partition_Interface
RE_Request_Invoke, -- System.Partition_Interface
RE_Request_Arguments, -- System.Partition_Interface
RE_Request_Set_Out, -- System.Partition_Interface
RE_Request_Invoke, -- System.Partition_Interface
RE_Request_Raise_Occurrence, -- System.Partition_Interface
RE_Request_Destroy, -- System.Partition_Interface
RE_Request_Set_Out, -- System.Partition_Interface
RE_Request_Setup, -- System.Partition_Interface
RE_Nil_Exc_List, -- System.Partition_Interface
RE_Servant, -- System.Partition_Interface
RE_Move_Any_Value, -- System.Partition_Interface
......@@ -2308,6 +2308,7 @@ package Rtsfind is
RE_Raise_Program_Error_Unknown_Tag => System_Partition_Interface,
RE_Register_Passive_Package => System_Partition_Interface,
RE_Register_Receiving_Stub => System_Partition_Interface,
RE_Request => System_Partition_Interface,
RE_Request_Access => System_Partition_Interface,
RE_RCI_Locator => System_Partition_Interface,
RE_RCI_Subp_Info => System_Partition_Interface,
......@@ -2338,12 +2339,11 @@ package Rtsfind is
RE_NVList_Ref => System_Partition_Interface,
RE_NVList_Create => System_Partition_Interface,
RE_NVList_Add_Item => System_Partition_Interface,
RE_Request_Create => System_Partition_Interface,
RE_Request_Invoke => System_Partition_Interface,
RE_Request_Arguments => System_Partition_Interface,
RE_Request_Set_Out => System_Partition_Interface,
RE_Request_Invoke => System_Partition_Interface,
RE_Request_Raise_Occurrence => System_Partition_Interface,
RE_Request_Destroy => System_Partition_Interface,
RE_Request_Set_Out => System_Partition_Interface,
RE_Request_Setup => System_Partition_Interface,
RE_Nil_Exc_List => System_Partition_Interface,
RE_Servant => System_Partition_Interface,
RE_Move_Any_Value => System_Partition_Interface,
......
......@@ -329,7 +329,7 @@ package System.Rident is
-- value of the parameter permitted by the profile.
end record;
Profile_Info : array (Profile_Name_Actual) of Profile_Data :=
Profile_Info : constant array (Profile_Name_Actual) of Profile_Data :=
-- Restricted Profile
......
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