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] Restriction Static_Dispatch_Tables


This patch completes the work associated with this new GNAT restriction
by means of improving the code generated by the compiler to generate all
the runtime data structures associated with dispatch tables in read-only
memory when the dispatch tables are statically build.

Test available in previous patch.

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

2017-11-09  Javier Miranda  <miranda@adacore.com>

	* exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
	dispatch table is statically built.
	(Make_DT): Declare constant the Interface_Table object associated with
	an statically built dispatch table. For this purpose the Offset_To_Top
	value of each interface is computed using the dummy object.
	* exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
	the Offset_To_Top field of secondary dispatch tables when the dispatch
	table is statically built.
	(Initialize_Tag): Do not generate calls to Register_Interface_Offset
	when the dispatch table is statically built.
	* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
	Document the new GNAT restriction Static_Dispatch_Tables.
	* gnat_rm.texi: Regenerate.

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]