Commit Graph

4 Commits

Author SHA1 Message Date
Arnaud Charlet cb25faf861 [multiple changes]
2011-08-29  Robert Dewar  <dewar@adacore.com>

	* exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
	s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.

2011-08-29  Thomas Quinot  <quinot@adacore.com>

	* par-endh.adb (Check_End): For an END where it is mandatory to repeat
	the scope name, do not report a missing label as a style violation (it
	will be diagnosed as an illegality).
	* exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
	variant records: Get_Enum_Lit_From_Pos already returns a usage
	occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
	on Expr in Integer_Literal case so that it can be used by
	Build_To_Any_Call.

From-SVN: r178195
2011-08-29 12:36:46 +02:00
Arnaud Charlet 1d10f669bc [multiple changes]
2011-08-29  Tristan Gingold  <gingold@adacore.com>

	* exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
	Adjust comment.
	* exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
	(Build_Abort_Block_Handler): New function to build an Abort_Signal
	exception handler.
	* exp_ch9.adb (Expand_N_Asynchronous_Select): Call
	Build_Abort_Block_Handler to build the exception handler. Do not
	undefer aborts for the Abort_Signal exception handler if back-end
	exception mechanism.
	* exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
	back_end exceptions for all others and abort_signal.
	* s-except.ads (ZCX_By_Default): New constant.
	* a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
	(Raise_Exception_Always): Ditto.
	(Raise_From_Signal_Handler): Ditto.
	(Raise_With_Location_And_Msg): Ditto.
	(Raise_With_Msg): Ditto.
	(Reraise): Ditto.
	(Reraise_Occurence): Ditto.
	(Reraise_Occurrence_Always): Ditto.
	* s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
	* s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
	* s-interr-hwint.adb (Interrupt_Manager): Defer abort if ZCX.

2011-08-29  Thomas Quinot  <quinot@adacore.com>

	* sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.

From-SVN: r178194
2011-08-29 12:34:32 +02:00
Robert Dewar b5c84c3ccf exp_atag.ads, [...]: Replace headers with GPL v3 headers.
2007-09-10  Robert Dewar  <dewar@adacore.com>

	* exp_atag.ads, exp_atag.adb, mlib-tgt-tru64.adb, mlib-tgt-aix.adb,
	mlib-tgt-irix.adb, mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
	mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
	mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, ali.adb, ali.ads,
	ali-util.adb, ali-util.ads, atree.h, back_end.adb, back_end.ads,
	bcheck.adb, bcheck.ads, binde.adb, binde.ads, binderr.adb, binderr.ads,
	bindgen.adb, bindgen.ads, bindusg.adb, bindusg.ads, butil.adb,
	butil.ads, checks.adb, checks.ads, clean.adb, clean.ads, comperr.adb,
	comperr.ads, cstand.adb, cstand.ads, debug_a.adb, debug_a.ads,
	elists.h, errout.adb, erroutc.ads, errutil.adb, errutil.ads,
	err_vars.ads, eval_fat.adb, eval_fat.ads, exp_sel.ads, exp_sel.adb,
	exp_aggr.adb, exp_aggr.ads, expander.adb, expander.ads, exp_attr.ads,
	exp_ch10.ads, exp_ch11.adb, exp_ch12.adb, exp_ch12.ads, exp_ch13.adb,
	exp_ch13.ads, exp_ch2.adb, exp_ch2.ads, exp_ch3.ads, exp_ch4.adb,
	exp_ch4.ads, exp_ch5.adb, exp_ch5.ads, exp_ch6.adb, exp_ch6.ads,
	exp_ch7.adb, exp_ch7.ads, exp_ch8.adb, exp_ch8.ads, exp_ch9.adb,
	exp_ch9.ads, exp_code.adb, exp_code.ads, exp_dbug.adb, exp_dbug.ads,
	exp_disp.ads, exp_dist.adb, exp_dist.ads, exp_fixd.adb, exp_fixd.ads,
	exp_imgv.adb, exp_imgv.ads, exp_intr.adb, exp_intr.ads, exp_pakd.adb,
	exp_pakd.ads, exp_prag.adb, exp_prag.ads, exp_smem.adb, exp_strm.adb,
	exp_strm.ads, exp_tss.adb, exp_tss.ads, exp_util.adb, exp_util.ads,
	exp_vfpt.adb, exp_vfpt.ads, fmap.adb, fmap.ads, fname-sf.adb,
	fname-sf.ads, fname-uf.adb, fname-uf.ads, frontend.adb, frontend.ads,
	get_targ.adb, get_targ.ads, gnat1drv.adb, gnat1drv.ads, gnatbind.adb,
	gnatbind.ads, gnatbl.c, gnatchop.adb, gnatclean.adb, gnatcmd.adb,
	gnatcmd.ads, gnatdll.adb, gnatfind.adb, gnatkr.adb, gnatkr.ads,
	gnatlbr.adb, gnatlink.adb, gnatlink.ads, gnatls.adb, gnatls.ads,
	gnatmake.adb, gnatmake.ads, gnatmem.adb, gnatname.adb, gnatname.ads,
	gnatprep.adb, gnatprep.ads, gnatsym.adb, gnatxref.adb,
	gprep.adb, gprep.ads, hlo.adb, hlo.ads, impunit.adb, impunit.ads,
	inline.adb, inline.ads, itypes.adb, itypes.ads, layout.adb, layout.ads,
	lib-load.adb, lib-load.ads, lib-util.adb, lib-util.ads, lib-writ.adb,
	lib-writ.ads, lib-xref.adb, lib-xref.ads, live.adb, live.ads,
	make.adb, make.ads, makeutl.ads, makeutl.adb, makeusg.adb, makeusg.ads,
	mdll.adb, mdll.ads, mdll-fil.adb, mdll-fil.ads, mdll-utl.adb,
	mdll-utl.ads, memroot.adb, memroot.ads, mlib.adb, mlib.ads,
	mlib-fil.adb, mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb,
	mlib-tgt.ads, mlib-utl.adb, mlib-utl.ads, namet.h, nmake.adt,
	osint.adb, osint.ads, osint-b.adb, osint-b.ads, osint-c.adb,
	osint-c.ads, osint-l.adb, osint-l.ads, osint-m.adb, osint-m.ads,
	par.adb, par.ads, par-ch10.adb, par-ch11.adb, par-ch12.adb,
	par-ch13.adb, par-ch2.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
	par-ch6.adb, par-ch7.adb, par-ch8.adb, par-ch9.adb, par-endh.adb,
	par-labl.adb, par-load.adb, par-prag.adb, par-sync.adb, par-tchk.adb,
	par-util.adb, prep.adb, prep.ads, prepcomp.adb, prepcomp.ads,
	prj.adb, prj.ads, prj-attr.adb, prj-attr.ads, prj-com.ads,
	prj-dect.adb, prj-dect.ads, prj-err.adb, prj-err.ads, prj-ext.adb,
	prj-ext.ads, prj-makr.adb, prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads,
	prj-pars.adb, prj-pars.ads, prj-part.adb, prj-part.ads,
	prj-pp.adb, prj-pp.ads, prj-proc.adb, prj-proc.ads,
	prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
	prj-util.adb, prj-util.ads, restrict.adb, restrict.ads,
	rtsfind.adb, rtsfind.ads, scn.adb, scn.ads,
	scng.adb, scng.ads, sdefault.ads, sem.ads, sem_aggr.ads, sem_attr.adb,
	sem_case.adb, sem_case.ads, sem_cat.adb, sem_cat.ads, sem_ch10.adb,
	sem_ch10.ads, sem_ch11.adb, sem_ch11.ads, sem_ch12.ads, sem_ch13.adb,
	sem_ch13.ads, sem_ch2.adb, sem_ch2.ads, sem_ch3.adb, sem_ch3.ads,
	sem_ch4.ads, sem_ch5.adb, sem_ch5.ads, sem_ch6.adb, sem_ch6.ads,
	sem_ch7.adb, sem_ch7.ads, sem_ch8.adb, sem_ch8.ads, sem_ch9.adb,
	sem_ch9.ads, sem_disp.adb, sem_disp.ads, sem_dist.adb, sem_dist.ads,
	sem_elab.adb, sem_elab.ads, sem_elim.adb, sem_elim.ads, sem_eval.adb,
	sem_eval.ads, sem_intr.adb, sem_intr.ads, sem_maps.adb, sem_maps.ads,
	sem_mech.adb, sem_mech.ads, sem_prag.adb, sem_prag.ads, sem_res.adb,
	sem_res.ads, sem_smem.adb, sem_smem.ads, sem_type.adb, sem_type.ads,
	sem_util.adb, sem_util.ads, sem_vfpt.adb, sem_vfpt.ads, sem_warn.adb,
	sem_warn.ads, sfn_scan.ads, sinfo-cn.adb, sinfo-cn.ads, sinput-c.adb,
	sinput-c.ads, sinput-d.adb, sinput-d.ads, sinput-l.adb, sinput-l.ads,
	sinput-p.adb, sinput-p.ads, snames.h, sprint.adb, sprint.ads,
	stringt.h, style.ads, styleg.adb, styleg.ads, styleg-c.adb,
	styleg-c.ads, stylesw.adb, stylesw.ads, switch.adb, switch.ads,
	switch-b.adb, switch-b.ads, switch-c.adb, switch-c.ads, switch-m.adb,
	switch-m.ads, symbols.adb, symbols.ads, targparm.adb, tbuild.adb,
	tbuild.ads, tempdir.adb, tempdir.ads, tree_gen.adb, tree_gen.ads,
	treepr.adb, treepr.ads, treeprs.adt, ttypef.ads, ttypes.ads,
	types.h, uintp.h, urealp.h, usage.adb, usage.ads,
	validsw.adb, validsw.ads, vxaddr2line.adb, xeinfo.adb, xnmake.adb,
	xref_lib.adb, xref_lib.ads, xr_tabls.adb, xr_tabls.ads, xsinfo.adb,
	xtreeprs.adb, xsnames.adb, vms_conv.ads, vms_conv.adb, xgnatugn.adb,
	gprmake.adb, makegpr.ads, makegpr.adb, prj-attr-pm.ads, prj-attr-pm.adb,
	mlib-tgt-lynxos.adb, mlib-tgt-darwin.adb, symbols-vms.adb,
	symbols-processing-vms-alpha.adb, symbols-processing-vms-ia64.adb,
	mlib-tgt-specific.adb, mlib-tgt-specific.ads, mlib-tgt-vms.adb,
	mlib-tgt-vms.ads: Replace headers with GPL v3 headers.

From-SVN: r128332
2007-09-10 14:47:10 +02:00
Javier Miranda 4d744221db a-tags.ads, a-tags.adb (Offset_To_Top): Moved from the package body to the specification because the frontend generates...
2005-12-05  Javier Miranda  <miranda@adacore.com>
	    Hristian Kirtchev  <kirtchev@adacore.com>

	* a-tags.ads, a-tags.adb (Offset_To_Top): Moved from the package body
	to the specification because the frontend generates code that uses this
	subprogram.
	(Set_Interface_Table): Add missing assertion.
	Update documentation describing the run-time structure.
	(Displace): New subprogram that displaces the pointer to the object
	to reference one of its secondary dispatch tables.
	(IW_Membership): Modified to use the new table of interfaces.
	(Inherit_TSD): Modified to use the new table of interfaces.
	(Register_Interface_Tag): Use the additional formal to fill the
	contents of the new table of interfaces.
	(Set_Interface_Table): New subprogram that stores in the TSD the
	pointer to the table of interfaces.
	(Set_Offset_To_Top): Use the additional formal to save copy of
	the offset value in the table of interfaces.
	Update structure of GNAT Primary and Secondary dispatch table diagram.
	Add comment section on GNAT dispatch table prologue.
	(Offset_To_Signature): Update the constant value of the Signature field.
	(Dispatch_Table): Update comment on hidden fields in the prologue.
	(Get_Entry_Index, Get_Prim_Op_Kind, Get_Offset_Index, OSD,
	Set_Entry_Index, Set_Offset_Index, Set_Prim_Op_Kind, SSD, TSD): Change
	the type of formal parameter T to Tag, introduce additional assertions.
	(Get_Num_Prim_Ops, Set_Num_Prim_Ops): Remove an unnecessary type
	conversion.
	(Get_Tagged_Kind, Set_Tagged_Kind): New bodies.

	* exp_ch6.adb (Register_Interface_DT_Entry): Remove the Thunk_Id actual
	in all the calls to Expand_Interface_Thunk. Instead of referencing the
	record component containing the tag of the secondary dispatch table we
	have to use the Offset_To_Top run-time function to get this information;
	otherwise if the pointer to the base of the object has been displace
	we get a wrong value if we use the 'position attribute.

	* exp_disp.adb (Expand_Interface_Thunk): Remove the Thunk_Id actual in
	all the calls to Expand_Interface_Thunk.
	(Make_Secondary_DT): Secondary dispatch tables do not have a table of
	interfaces; hence the call to Set_Interface_Table was clearly wrong.
	(Collect_All_Interfaces): Modify the internal subprogram Collect to
	ensure that the interfaces implemented by the ancestors are placed
	at the header of the generated list.
	(Expand_Interface_Conversion): Handle the case in which the displacement
	associated with the interface conversion is not statically known. In
	this case we generate a call to the new run-time subprogram Displace.
	(Make_DT): Generate and fill the new table of interfaces.
	(Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Add entries for
	Get_Tagged_Kind and Set_Tagged_Kind.
	(Tagged_Kind): New function that determines the tagged kind of a type
	with respect to limitedness and concurrency and returns a reference to
	RE_Tagged_Kind.
	(Make_Disp_Asynchronous_Select_Body, Make_Disp_Conditional_Select_Body,
	Make_Disp_Timed_Select_Body): Correctly retrieve the pointer to the
	primary dispatch table for a type.
	(Make_DT, Make_Secondary_DT): Set the tagged kind in the primary and
	secondary dispatch table respectively of a tagged type.

	* exp_disp.ads (Expand_Interface_Thunk): Remove Thunk_Id formal.
	(Expand_Interface_Conversion): New subprogram to indicate if the
	displacement of the type conversion is statically known.
	(DT_Access_Action): Add values Get_Tagged_Kind and Set_Tagged_Kind.

	* rtsfind.ads (RE_Offset_To_Top): New entity
	(RTU_Id): Add Ada_Task_Termination to the list so that it is made
	accessible to users.
	(Re_Displace): New entity
	(RE_Interface_Data): New entity
	(RE_Set_Interface_Data): New_Entity
	(RE_Id, RE_Unit_Table): Add entry for RE_Get_Tagged_Kind,
	Set_Tagged_Kind, RE_Tagged_Kind, RE_TK_Abstract_Limited_Tagged,
	RE_TK_Abstract_Tagged, RE_TK_Limited_Tagged, RE_TK_Protected,
	RE_TK_Tagged, RE_TK_Task.

	* exp_ch3.adb (Init_Secondary_Tags): Modify the subprogram
	Init_Secondary_Tags_Internal to allow its use with interface types and
	also to generate the code for the new additional actual required
	by Set_Offset_To_Top.
	(Build_Init_Statements): In case of components associated with abstract
	interface types there is no need to generate a call to its IP.
	(Freeze_Record_Type): Generate Select Specific Data tables only for
	concurrent types.
	(Make_Predefined_Primitive_Specs, Predefined_Primitive_Bodies): Generate
	the bodies and specifications of the predefined primitive operations
	dealing with dispatching selects and abort, 'Callable, 'Terminated only
	for concurrent types.

        * exp_sel.ads, exp_sel.adb: New files.

	* exp_ch9.adb (Build_Protected_Entry, Expand_N_Protected_Body,
	Expand_N_Protected_Type_Declaration, Make_Initialize_Protection): Handle
	properly protected objects and attach handler in the case of the
	restricted profile.
	Move embeded package Select_Expansion_Utilities into a separate external
	package.
	(Expand_N_Asynchronous_Select, Expand_N_Conditional_Select,
	Expand_N_Timed_Entry_Call): Correct calls external package Exp_Sel.
	(Build_K, Build_S_Assignment): New subprograms, part of the select
	expansion utilities.
	(Expand_N_Asynchronous_Select, Expand_N_Conditional_Entry_Call,
	Expand_N_Timed_Entry_Call): Optimize expansion of select statements
	where the trigger is a dispatching procedure of a limited tagged type.

From-SVN: r108284
2005-12-09 18:13:28 +01:00