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] Adjust slots assignment of tagged type primitives


This patch changes the assignment of dispatch table slots to tagged
types that implement interfaces. Done to follow the C++ ABI and thus
facilitate interfacing C++ classes and Ada tagged types.

Tested on x86_64-pc-linux-gnu, committed on trunk

2010-06-23  Javier Miranda  <miranda@adacore.com>

	* sem_ch3.adb (Add_Internal_Interface_Entities): Ensure that the
	internal entities are added to the scope of the tagged type.
	(Derive_Subprograms): Do not stop derivation when we find the first
	internal entity that has attribute Interface_Alias. After the change
	done to Override_Dispatching_Operations it is no longer true that
	these primirives are always located at the end of the list of
	primitives.
	* einfo.ads (Primitive_Operations): Add documentation.
	* exp_disp.adb (Write_DT): Improve output adding to the name of the
	primitive a prefix indicating its corresponding tagged type.
	* sem_disp.adb (Override_Dispatching_Operations): If the overridden
	entity covers the primitive of an interface that is not an ancestor of
	this tagged type then the new primitive is added at the end of the list
	of primitives.  Required to fulfill the C++ ABI.

Attachment: difs
Description: Text document


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