+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)
(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 --
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),
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');
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));
-- 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
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,
-- 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;
-- --
-- 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- --
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
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
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
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,
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,
-- 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