exp_dist.adb: Declare subprogram index in Build_RPC_Receiver_Body...

* exp_dist.adb:
	Declare subprogram index in Build_RPC_Receiver_Body, to reduce the
	amount of PCS-specific code in RACW stubs generation.
	(Copy_Specification): Set Etype on copied formal parameter entities, as
	this information is needed for PolyORB stubs generation.
	(PolyORB_Support.Build_Subprogram_Receiving_Stubs): Remove unused
	variable Dynamic_Async.
	(Build_Subprogram_Receiving_Stubs): Make PCS-specific
	(Build_RPC_Receiver_Specification): Make generic again, as recent
	changes have allowed RPC receivers to have the same profile for both
	variants of the PCS.
	Reorganise RPC receiver generation to reduce differences between the
	structure of GARLIC and PolyORB RPC receivers.
	(Add_Receiving_Stubs_To_Declarations): Make this subprogram
	PCS-specific.
	Simplify elaboration code for RCI packages.

	* s-parint.ads, s-parint.adb, rtsfind.ads: Reorganise RPC receiver
	generation to reduce differences between the structure of GARLIC and
	PolyORB RPC receivers.

	* s-stratt.adb: Fix typo in comment.

From-SVN: r92837
This commit is contained in:
Arnaud Charlet 2005-01-03 16:37:33 +01:00
parent a778d033f9
commit 16db96c5a2
5 changed files with 2238 additions and 1144 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1017,6 +1017,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_Access, -- System.Partition_Interface
RE_RCI_Locator, -- System.Partition_Interface
RE_RCI_Subp_Info, -- System.Partition_Interface
RE_RCI_Subp_Info_Array, -- System.Partition_Interface
@ -1056,7 +1057,6 @@ package Rtsfind is
RE_NVList_Ref, -- System.PolyORB_Interface
RE_NVList_Create, -- System.PolyORB_Interface
RE_NVList_Add_Item, -- System.PolyORB_Interface
RE_Request_Access, -- System.PolyORB_Interface
RE_Request_Create, -- System.PolyORB_Interface
RE_Request_Invoke, -- System.PolyORB_Interface
RE_Request_Arguments, -- System.PolyORB_Interface
@ -2098,6 +2098,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_Access => System_Partition_Interface,
RE_RCI_Locator => System_Partition_Interface,
RE_RCI_Subp_Info => System_Partition_Interface,
RE_RCI_Subp_Info_Array => System_Partition_Interface,
@ -2127,7 +2128,6 @@ package Rtsfind is
RE_NVList_Ref => System_PolyORB_Interface,
RE_NVList_Create => System_PolyORB_Interface,
RE_NVList_Add_Item => System_PolyORB_Interface,
RE_Request_Access => System_PolyORB_Interface,
RE_Request_Create => System_PolyORB_Interface,
RE_Request_Invoke => System_PolyORB_Interface,
RE_Request_Arguments => System_PolyORB_Interface,

View File

@ -275,7 +275,7 @@ package body System.Partition_Interface is
procedure Register_Receiving_Stub
(Name : Unit_Name;
Receiver : RPC.RPC_Receiver;
Receiver : RPC_Receiver;
Version : String := "";
Subp_Info : System.Address;
Subp_Info_Len : Integer)

View File

@ -35,6 +35,7 @@
-- an appropriate WITH, and the interface can be expected to remain stable.
with Ada.Exceptions;
with Ada.Streams;
with Interfaces;
with System.RPC;
@ -89,6 +90,20 @@ package System.Partition_Interface is
-- Do not change its definition or its layout without updating
-- Exp_Dist.Build_Remote_Supbrogram_Proxy_Type.
-- The Request_Access type is used for communication between the PCS
-- and the RPC receiver generated by the compiler: it contains all the
-- necessary information for the receiver to process an incoming call.
type RST_Access is access all Ada.Streams.Root_Stream_Type'Class;
type Request_Access is record
Params : RST_Access;
-- A stream describing the called subprogram and its parameters
Result : RST_Access;
-- A stream where the result, raised exception, or out values,
-- are marshalled.
end record;
procedure Check
(Name : Unit_Name;
Version : String;
@ -131,9 +146,10 @@ package System.Partition_Interface is
pragma No_Return (Raise_Program_Error_Unknown_Tag);
-- Raise Program_Error with the same message as E one
type RPC_Receiver is access procedure (R : Request_Access);
procedure Register_Receiving_Stub
(Name : Unit_Name;
Receiver : RPC.RPC_Receiver;
Receiver : RPC_Receiver;
Version : String := "";
Subp_Info : System.Address;
Subp_Info_Len : Integer);

View File

@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2003, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2004, 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- --
@ -39,7 +39,7 @@ package body System.Stream_Attributes is
Err : exception renames Ada.IO_Exceptions.End_Error;
-- Exception raised if insufficient data read (note that the RM implies
-- that Data_Error might be the appropriate choice, but AI195-00132
-- that Data_Error might be the appropriate choice, but AI95-00132
-- decides with a binding interpretation that End_Error is preferred).
SU : constant := System.Storage_Unit;