This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] code reorg to support polyorb


This change introduces a reorganization of code generation to support
multiple implementations of the PCS (specifically, the GARLIC library
currently used in GLADE, and the PolyORB schizophrenic middleware).

The RPC receiver is not generated for a RACW that implements a RAS (in
that case, calls are dispatched by the RPC receiver of the RCI package
containing the designated subprogram).
For a RACW generated to support a RAS, it is not necessary to generate
an RPC receiver (calls are processed by the RPC receivers of the
RCI packages containing the designated subprograms).
Disable the generation of the RPC receiver in that case.

For implementation of the distributed systems annex, subprograms that
can be called remotely (through static remote subprogram calls, through
dereferences of remote access-to-subprogram types, or through dispatching
calls on remote access-to-classwide types) must be assigned identifiers
to be used by the partition communication subsystem. In the existing
implementation of the DSA, based on the GARLIC library, these identifiers
are numeric, but in the PolyORB-based implementation, they are strings
derived from the name of the subprogram. This change adds the necessary
support routines to assign both kinds of identifiers to each subprogram.

This Type support Subprogram is defined for remote access-to-subprogram
types, and constructs the internal representation for a value of such
type (which is used to designate subprograms possibly located on different
partitions, and perform dynamically bound remote subprogram calls).
The Etype for a function must be set to the entity for its return type,
not an occurrence thereof. This change makes the implementation compliant
with this requirement.

2004-11-18  Thomas Quinot  <quinot@adacore.com>

	* exp_dist.adb (Build_RPC_Receiver_Body): New subprogram. This
	procedures factors the common processing for building an RPC receiver
	for an RCI package or an RACW type.
	Stylistic cleanup: change '/= Empty' to 'Present ()'; move body of
	Build_Remote_Subprogram_Proxy_Type into proper alphabetical order.
	(Get_PCS_Name): New subprogram. Returns the name of the PCS currently
	in use.
	(Specific_Add_RACW_Features): New subprogram. PCS-specific part of
	Add_RACW_Features.
	(Specific_Add_RAST_Features): New subprogram. PCS-specific part of
	Add_RAST_Features.
	(Assign_Subprogram_Identifier): New subprogram. Provision for assigning
	distribution subprogram identifiers that are either subprogram numbers
	or strings.
	(Get_Subprogram_Ids): New subprogram. Retrieve both the numeric and
	string distribution identifiers assigned to a given subprogram.
	(Get_Subprogram_Id): Reimplement in terms of Get_Subprogram_Ids.
	(Add_RAS_Dereference_TSS): Add comments.
	(Build_General_Calling_Stubs): Note that the RACW_Type formal parameter
	is not referenced yet because it will be used by the PolyORB DSA
	implementation.
	(Insert_Partition_Check): Remove fossile code.
	(First_RCI_Subprogram_Id): Document this constant.
	(Add_RAS_Access_TSS): Correct the setting of the Etype of the
	RAS_Access TSS.
	(Get_Pkg_Name_String): Remove subprogram. Usage occurrences are
	replaced with calls to Get_Library_Unit_Name_String. Previously there
	were several instances of the same code in different locations in the
	compiler; this checkin completes the replacement of all of these
	instances with calls to a common subprogram.
	Minor reformatting.

	* sem_dist.adb: Remove comment noting that RPC receiver generation
	should be disabled for RACWs that implement RASs.
	(Process_Partition_Id): Use new subprogram Get_Library_Unit_Name_String.

	* sem_util.ads, sem_util.adb (Has_Stream): New function
	(Get_Library_Unit_Name_String): New subprogram to retrieve the fully
	qualified name of a library unit into the name buffer.
	(Note_Possible_Modification): Generate a reference only
	if the context comes from source.

	* snames.ads (PCS_Names): New subtype corresponding to names of
	supported implementations of the Partition Communication Subsystem
	(PCS) (i.e. the runtime library support modules for the distributed
	systems annex).

Attachment: difs.5
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]