1. 23 Jul, 2009 2 commits
    • [multiple changes] · 1c5c721a
      2009-07-23  Sergey Rybin  <rybin@adacore.com>
      
      	* gnat_ugn.texi: Update doc on Misnamed_Identifiers rule.
      
      2009-07-23  Javier Miranda  <miranda@adacore.com>
      
      	* sinfo.ads, sinfo.adb (SCIL_Entity/Set_SCIL_Entity): new subprograms
      	(Entity/Set_Entity): not available in N_Null_Statement nodes
      	(Is_Scil_Node): renamed as Is_SCIL_Node
      	(Scil_Nkind): renamed as SCIL_Nkind
      	(Scil_Related_Node): renamed as SCIL_Related_Node
      	(Scil_Target_Prim): renamed as SCIL_Target_Prim
      	(Set_Is_Scil_Node): Renamed as Set_Is_SCIL_Node
      	(Set_Scil_Related_Node): Renamed as Set_SCIL_Related_Node
      	(Set_Scil_Target_Prim): Renamed as Set_SCIL_Target_Prim
      	Update documentation
      	* exp_disp.ads (Scil_Node_Kind): Renamed as SCIL_Node_Kind
      	(Get_Scil_Node_Kind): Renamed as Get_SCIL_Node_Kind
      	(New_Scil_Node): Renamed as New_SCIL_Node
      	* exp_disp.adb Update all occurrences of New_Scil_Node to New_SCIL_Node.
      	(Get_Scil_Node_Kind): Renamed as Get_SCIL_Node_Kind
      	(New_Scil_Node): Renamed as New_SCIL_Node
      	* exp_ch3.adb Update occurrence of New_Scil_Node to New_SCIL_Node.
      
      2009-07-23  Robert Dewar  <dewar@adacore.com>
      
      	* sem_prag.adb: No_Return is an Ada 2005 pragma, not a GNAT pragma
      	* snames.ads-tmpl: No_Return is an Ada 2005 pragma, not a GNAT pragma
      	* einfo.adb: Minor reformatting
      
      From-SVN: r149984
      Arnaud Charlet committed
    • einfo.adb (Component_Type): Add missing assertion. · 7205254b
      2009-07-23  Javier Miranda  <miranda@adacore.com>
      
      	* einfo.adb (Component_Type): Add missing assertion.
      	* sem_res.adb (Resolve_Call): Ensure proper kind of entity before
      	reading attribute Component_Size.
      	* exp_ch4.adb (Is_Safe_In_Place_Array_Op): Ensure proper kind of entity
      	before reading attributes Component_Size and Component_Type.
      	* exp_ch3.adb (Build_Initialization_Call): Ensure proper kind of entity
      	before reading attribute Component_Type.
      
      From-SVN: r149981
      Javier Miranda committed
  2. 20 Jul, 2009 1 commit
    • [multiple changes] · 6fb4cdde
      2009-07-20  Robert Dewar  <dewar@adacore.com>
      
      	* vms_data.ads: Minor reformatting
      
      	* einfo.ads, einfo.adb (Parent_Subtype): Now allowed on record subtype,
      	applies to base type.
      	(Parent_Subtype): Now allowed on record subtype, applies to base type
      	* exp_ch5.adb (Expand_Assign_Record): Handle Componentwise_Assignment
      	for case of fully repped tagged type.
      	(Make_Tag_Ctrl_Assignment): Set Componentwise_Assignment and avoid
      	tag save/restore for fully repped tagged type case.
      	* exp_util.ads, exp_util.adb (Is_Fully_Repped_Tagged_Type): New function
      	* fe.h (Is_Fully_Repped_Tagged_Type): New function
      	* sem_ch13.adb (Analyze_Recorrd_Representation_Clause): Check for
      	overlap of tagged type components with parent type if parent type is
      	fully repped.
      	* sinfo.ads, sinfo.adb (Componentwise_Assignment): New flag
      
      	* sem_res.adb (Check_No_Direct_Boolean_Operators): Remove handling of
      	comparisons.
      	(Resolve_Comparison_Operators): Remove No_Direct_Boolean_Operators check
      	(Resolve_Equality_Op): Remove No_Direct_Boolean_Operators check
      
      	* gnat_rm.texi: Restriction No_Direct_Boolean_Operators includes only
      	logical operators (AND/OR/XOR), not comparison operators.
      
      	* sprint.ads: Minor reformatting
      
      2009-07-20  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_intr.adb (Check_Intrinsic_Call): For Import_Value and related
      	intrinsics, check that argument is a string literal, rather than
      	checking for staticness.
      
      From-SVN: r149811
      Arnaud Charlet committed
  3. 10 Jul, 2009 1 commit
    • [multiple changes] · 811c6a85
      2009-07-10  Thomas Quinot  <quinot@adacore.com>
      
      	* exp_ch7.adb: Update comments.
      
      2009-07-10  Arnaud Charlet  <charlet@adacore.com>
      
      	* exp_ch13.adb (Expand_N_Record_Representation_Clause): Ignore mod
      	clause if -gnatI is set instead of crashing.
      
      2009-07-10  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch11.adb (Same_Expression): Null is always equal to itself.
      	Additional work to remove redundant successive raise statements, in
      	this case access checks.
      
      2009-07-10  Vincent Celier  <celier@adacore.com>
      
      	* make.adb (Compile): Always create a deep copy of the mapping file
      	argument (-gnatem=...) as it may be deallocate/reallocate by
      	Normalize_Arguments.
      
      2009-07-10  Javier Miranda  <miranda@adacore.com>
      
      	* einfo.adb (Directly_Designated_Type): Add assertion.
      	
      	* sem_res.adb (Check_Fully_Declared_Prefix): Add missing check on
      	access types before using attribute Directly_Designated_Type.
      
      2009-07-10  Emmanuel Briot  <briot@adacore.com>
      
      	* prj.ads: Minor typo fix
      
      2009-07-10  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch6.adb (Add_Extra_Formal): Protected operations do no need
      	special treatment.
      
      	* exp_ch6.adb (Expand_Protected_Subprogram_Call): If rewritten
      	subprogram is a function call, resolve properly, to ensure that extra
      	actuals are added as needed.
      
      From-SVN: r149474
      Arnaud Charlet committed
  4. 09 Jul, 2009 1 commit
  5. 24 Apr, 2009 1 commit
    • einfo.adb (OK_To_Rename): New flag · d1f453b7
      2009-04-24  Robert Dewar  <dewar@adacore.com>
      
      	* einfo.adb (OK_To_Rename): New flag
      
      	* einfo.ads (OK_To_Rename): New flag
      
      	* exp_ch3.adb (Expand_N_Object_Declaration): Rewrite as renames if
      	OK_To_Rename set.
      
      	* exp_ch4.adb (Expand_Concatenate): Mark temp variable OK_To_Rename
      
      	* sem_ch7.adb (Uninstall_Declarations): Allow for renames from
      	OK_To_Rename.
      
      From-SVN: r146714
      Robert Dewar committed
  6. 20 Apr, 2009 1 commit
    • [multiple changes] · 9013065b
      2009-04-20  Javier Miranda  <miranda@adacore.com>
      
      	* einfo.ads, einfo.adb (Is_Underlying_Record_View): New subprogram
      	(Set_Is_Underlying_Record_View): New subprogram
      
      	* sem_aggr.adb (Discr_Present, Resolve_Record_Aggregate): In case of
      	private types with unknown discriminants use the underlying record view
      	if available.
      
      	* sem_ch3.adb (Build_Derived_Private_Type): Enable construction of the
      	underlying record view in the full view of private types whose parent
      	has unknown discriminants.
      	(Build_Derived_Record_Type): Avoid generating the class-wide entity
      	associated with an underlying record view.
      	(Derived_Type_Declaration): Avoid deriving parent primitives in
      	underlying record views.
      
      	* sem_ch6.adb (Check_Return_Subtype_Indication): Add support for
      	records with unknown discriminants.
      
      	* sem_type.adb (Covers): Handle underlying record views.
      	(Is_Ancestor): Add support for underlying record views.
      
      	* exp_attr.adb (Expand_Attribute): Expand attribute 'size into a
      	dispatching call if the type of the target object is tagged and has
      	unknown discriminants.
      
      	* exp_aggr.adb (Resolve_Record_Aggregate): Add support for records with
      	unknown discriminants.
      
      	* exp_disp.adb (Build_Dispatch_Tables): Avoid generating dispatch
      	tables for internally built underlying record views.
      
      	* sprint.adb (sprint_node_actual): Improve output of aggregates with an
      	empty list of component associations.
      
      2009-04-20  Thomas Quinot  <quinot@adacore.com>
      
      	* sem_ch10.adb: Minor reformatting
      
      	* socket.c, g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.ads,
      	g-socthi-mingw.ads, g-socthi.ads, g-socket.adb
      	(GNAT.Sockets.Inet_Addr): Do not use non-portable inet_aton, instead use
      	standard inet_pton API (and emulate it on platforms that do not
      	support it).
      	(GNAT.Sockets.Thin.Inet_Pton, VMS case): Implement in terms of
      	DECC$INET_ADDR, imported in Ada.
      	(GNAT.Sockets.Thin.Inet_Pton, VxWorks and Windows cases): Use C
      	implementation provided by GNAT runtime.
      	(__gnat_inet_pton): C implementation of inet_pton(3) for VxWorks and
      	Windows.
      
      From-SVN: r146391
      Arnaud Charlet committed
  7. 17 Apr, 2009 1 commit
    • einfo.ads, einfo.adb: New attribute Underlying_Record_View... · 39f346aa
      2009-04-17  Ed Schonberg  <schonberg@adacore.com>
      
      	* einfo.ads, einfo.adb: New attribute Underlying_Record_View, to handle
      	type extensions whose parent is a type with unknown discriminants.
      
      	* exp_aggr.adb (Expand_Record_Aggregate): If the type of an extension
      	aggregate has unknown discriminants, use the Underlying_Record_View to
      	obtain the discriminants of the ancestor part.
      
      	* exp_disp.adb (Build_Dispatch_Tables): Types that are
      	Underlying_Record_Views share the dispatching information of the
      	original record extension.
      
      	* exp_ch3.adb (Expand_Record_Extension): If the type inherits unknown
      	discriminants, propagate dispach table information to the
      	Underlying_Record_View.
      
      	* sem_ch3.adb (Build_Derived_Private_Type): If parent type has unknown
      	discriminants and declaration is not a completion, generate
      	Underlying_Record_View to provide proper discriminant information to
      	the front-end and to gigi.
      
      From-SVN: r146264
      Ed Schonberg committed
  8. 10 Apr, 2009 2 commits
    • [multiple changes] · fad0600d
      2009-04-10  Robert Dewar  <dewar@adacore.com>
      
      	* einfo.ads, einfo.adb (Low_Bound_Tested): New name for Low_Bound_Known
      
      	* sem_prag.adb (Analyze_Pragma, case Check): Remove check for lower
      	bound tested, since this is now done more generally in Sem_Res.
      
      	* sem_res.adb (Resolve_Comparison_Op): Add call to
      	Check_Lower_Bound_Tested.
      	(Resolve_Equality_Op): Add call to Check_Lower_Bound_Tested
      
      	* sem_warn.ads, sem_warn.adb (Check_Low_Bound_Tested): New procedure
      	(Low_Bound_Tested): New name for Low_Bound_Known flag
      
      	* exp_ch5.adb: Minor reformatting
      
      	* exp_ch4.adb:
      	Add comments on copying the Comes_From_Source flag for allocators
      
      	* sinfo.ads:
      	Add comments on copying the Comes_From_Source flag for allocators
      
      	* exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Copy
      	Comes_From_Source flag from old allocator to new one.
      
      2009-04-10  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch6.ads: Address missing documentation query
      
      2009-04-10  Vincent Celier  <celier@adacore.com>
      
      	* prj-attr.adb:
      	Add new Linker attributes Max_Command_Line_Length, Response_File_Format
      	and Response_File_Switches.
      
      	* prj-nmsc.adb (Process_Linker): Process new attributes
      	Max_Command_Line_Length, Response_File_Format and
      	Response_File_Switches.
      
      	* prj.ads (Response_File_Format): New enumeration type
      	(Project_Configuration): New componants Max_Command_Line_Length,
      	Resp_File_Format and Resp_File_Options.
      
      	* snames.ads-tmpl: Add new standard names for linking response files
      	for gprbuild: GNU, None, Object_List, Option_List,
      	Max_Command_Line_Length, Response_File_Format and
      	Response_File_Switches.
      
      2009-04-10  Geert Bosch  <bosch@adacore.com>
      
      	* system-aix.ads, system-darwin-ppc.ads, system-darwin-x86.ads,
      	system-freebsd-x86.ads, system-hpux.ads, system-hpux-ia64.ads,
      	system-irix-n32.ads, system-irix-o32.ads, system-linux-alpha.ads,
      	system-linux-hppa.ads, system-linux-ia64.ads, system-linux-ppc.ads,
      	system-linux-s390.ads, system-linux-s390x.ads, system-linux-sh4.ads,
      	system-linux-sparc.ads, system-linux-x86_64.ads, system-linux-x86.ads,
      	system-mingw.ads, system-solaris-sparc.ads, system-solaris-sparcv9.ads,
      	system-solaris-x86.ads, system-tru64.ads, system-vms_64.ads,
      	system-vms.ads, system-vms-ia64.ads, system-vms-zcx.ads,
      	system-vxworks-arm.ads, system-vxworks-m68k.ads,
      	system-vxworks-mips.ads, system-vxworks-ppc.ads,
      	system-vxworks-sparcv9.ads, system-vxworks-x86.ads
      	(Backend_Overflow_Checks): Set to True.
      
      From-SVN: r145924
      Arnaud Charlet committed
    • einfo.ads, einfo.adb (Postcondition_Proc): New attribute for procedures. · 7ca78bba
      2009-04-10  Robert Dewar  <dewar@adacore.com>
      
      	* einfo.ads, einfo.adb (Postcondition_Proc): New attribute for
      	procedures.
      
      	* sem_ch6.adb: Minor code clean up.
      
      From-SVN: r145903
      Robert Dewar committed
  9. 09 Apr, 2009 4 commits
    • [multiple changes] · c75c4293
      2009-04-09  Vincent Celier  <celier@adacore.com>
      
      	* errout.adb: Remove dependency on package Style
      
      	* style.ads, styleg.adb, styleg.ads (RM_Column_Check): Remove function,
      	moved to Stylesw.
      	
      	* stylesw.ads, stylesw.adb (RM_Column_Check): New function, moved from
      	Styleg.
      
      	* errutil.adb, par.adb: Import Stylesw
      
      2009-04-09  Arnaud Charlet  <charlet@adacore.com>
      
      	* opt.ads: Fix typos.
      
      2009-04-09  Robert Dewar  <dewar@adacore.com>
      
      	* einfo.adb: Minor reformatting
      
      From-SVN: r145832
      Arnaud Charlet committed
    • sem_aggr.adb, [...]: Reorganize einfo/sem_aux, moving routines from einfo to sem_aux · a4100e55
      2009-04-09  Robert Dewar  <dewar@adacore.com>
      
      	* sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, exp_atag.adb, layout.adb,
      	sem_dist.adb, exp_ch7.adb, sem_ch5.adb, sem_type.adb, exp_imgv.adb,
      	exp_util.adb, sem_aux.adb, sem_aux.ads, exp_attr.adb, exp_ch9.adb,
      	sem_ch7.adb, inline.adb, fe.h, sem_ch9.adb, exp_code.adb, einfo.adb,
      	einfo.ads, exp_pakd.adb, checks.adb, sem_ch12.adb, exp_smem.adb,
      	tbuild.adb, freeze.adb, sem_util.adb, sem_res.adb, sem_attr.adb,
      	exp_dbug.adb, sem_case.adb, exp_tss.adb, exp_ch4.adb, exp_ch6.adb,
      	sem_smem.adb, sem_ch4.adb, sem_mech.adb, sem_ch6.adb, exp_disp.adb,
      	sem_ch8.adb, exp_aggr.adb, sem_eval.adb, sem_cat.adb, exp_dist.adb,
      	sem_ch13.adb, exp_strm.adb, lib-xref.adb, sem_disp.adb, exp_ch3.adb:
      	Reorganize einfo/sem_aux, moving routines from einfo to sem_aux
      
      From-SVN: r145820
      Robert Dewar committed
    • exp_disp.adb (Export_DT): Addition of a new argument (Index)... · b16d9747
      2009-04-09  Javier Miranda  <miranda@adacore.com>
      
      	* exp_disp.adb (Export_DT): Addition of a new argument (Index); used to
      	retrieve from the Dispatch_Table_Wrappers list the external name.
      	Addition of documentation.
      	(Make_Secondary_DT): Addition of a new argument (Suffix_Index) that is
      	used to export secondary dispatch tables (in the previous version of
      	the frontend only primary dispatch tables were exported). Addition of
      	documentation.
      	(Import_DT): New subprogram (internal of Make_Tags). Used to import a
      	dispatch table of a given tagged type. 
      	(Make_Tags): Modified to import secondary dispatch tables.
      
      	* sem_ch3.adb (Analyze_Object_Declaration): Code cleanup.
      	(Constant_Redeclaration): Code cleanup.
      
      	* einfo.ads (Dispatch_Table_Wrapper): Renamed to
      	Dispatch_Table_Wrappers.  Update documentation.
      
      	* einfo.adb (Dispatch_Table_Wrapper, Set_Dispatch_Table_Wrapper):
      	Renamed to Dispatch_Table_Wrappers.
      
      	* sem_util.adb (Collect_Interface_Components): Improve handling of
      	private types.
      
      	* atree.ads (Elist26, Set_Elist26): New subprograms
      
      	* atree.adb (Elist26, Set_Elist26): New subprograms
      
      From-SVN: r145811
      Javier Miranda committed
  10. 08 Apr, 2009 1 commit
    • [multiple changes] · 4c8a5bb8
      2009-04-08  Thomas Quinot  <quinot@adacore.com>
      
      	* sem_ch8.adb: Minor reformatting.
      	Minor code reorganization.
      
      2009-04-08  Robert Dewar  <dewar@adacore.com>
      
      	* snames.h, einfo.adb, einfo.ads, sem_prag.adb, snames.adb,
      	snames.ads, freeze.adb, par-prag.adb: Add implementation of
      	pragma Thread_Local_Storage, setting new flag
      	Has_Pragma_Thread_Local_Storage in corresponding entities.
      
      From-SVN: r145725
      Arnaud Charlet committed
  11. 31 Jul, 2008 1 commit
  12. 30 Jul, 2008 1 commit
    • einfo.adb: Flag245 is now used. · d44202ba
      2008-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* einfo.adb: Flag245 is now used.
      	(Is_Primitive_Wrapper, Set_Is_Primitive_Wrapper): Relax the assertion
      	check to include functions.
      	(Is_Private_Primitive, Set_Is_Private_Primitive): New subprograms.
      	(Wrapped_Entity, Set_Wrapped_Entity): Relax the assertion check to
      	include functions.
      	(Write_Entity_Flags): Move flag Is_Primitive, add Is_Private_Primitive
      	to the list of displayed flags.
      
      	* einfo.ads: Update comment on the usage of Is_Primitive_Wrapper and
      	Wrapped_Entity. These two flags are now present in functions.
      	New flag Is_Private_Primitive.
      	(Is_Private_Primitive, Set_Is_Private_Primitive): New subprograms.
      
      	* exp_ch9.adb:
      	(Build_Wrapper_Bodies): New subprogram.
      	(Build_Wrapper_Body): The spec and body have been moved to in
      	Build_Wrapper_ Bodies. Code cleanup.
      	(Build_Wrapper_Spec): Moved to the spec of Exp_Ch9. Code cleanup.
      	Wrappers are now generated for primitives declared between the private
      	and full view of a concurrent type that implements an interface.
      	(Build_Wrapper_Specs): New subprogram.
      	(Expand_N_Protected_Body): Code reformatting. Replace the wrapper body
      	creation mechanism with a call to Build_Wrapper_Bodies.
      	(Expand_N_Protected_Type_Declaration): Code reformatting. Replace the
      	wrapper spec creation mechanism with a call to Build_Wrapper_Specs.
      	(Expand_N_Task_Body): Replace the wrapper body creation
      	mechanism with a call to Build_Wrapper_Bodies.
      	(Expand_N_Task_Type_Declaration): Replace the wrapper spec
      	creation mechanism with a call to Build_Wrapper_Specs.
      	(Is_Private_Primitive_Subprogram): New subprogram.
      	(Overriding_Possible): Code cleanup.
      	(Replicate_Entry_Formals): Renamed to Replicate_Formals, code cleanup.
      
      	* exp_ch9.ads (Build_Wrapper_Spec): Moved from the body of Exp_Ch9.
      
      	* sem_ch3.adb: Add with and use clause for Exp_Ch9.
      	(Process_Full_View): Build wrapper specs for all primitives
      	that belong to a private view completed by a concurrent type
      	implementing an interface.
      	
      	* sem_ch6.adb (Analyze_Subprogram_Body): When the current subprogram
      	is a primitive of a
      	concurrent type with a private view that implements an interface, try to
      	find the proper spec.
      	(Analyze_Subprogram_Declaration): Mark a subprogram as a private
      	primitive if the type of its first parameter is a non-generic tagged
      	private type.
      	(Analyze_Subprogram_Specification): Code reformatting.
      	(Disambiguate_Spec): New routine.
      	(Find_Corresponding_Spec): Add a flag to controll the output of errors.
      	(Is_Private_Concurrent_Primitive): New routine.
      
      	* sem_ch6.ads:
      	(Find_Corresponding_Spec): Add a formal to control the output of errors.
      
      From-SVN: r138324
      Hristian Kirtchev committed
  13. 04 Jun, 2008 1 commit
  14. 26 May, 2008 1 commit
    • einfo.ads (Abstract_Interface_Alias): Renamed as Interface_Alias. · ce2b6ba5
      2008-05-26  Javier Miranda  <miranda@adacore.com>
      
      	* einfo.ads (Abstract_Interface_Alias): Renamed as Interface_Alias.
      	(Set_Abstract_Interface_Alias): Renamed as Set_Interface_Alias.
      	(Is_Internal): Adding documentation on internal entities that have
       	attribute Interface_Alias (old attribute Abstract_Interface_Alias)
      
      	* einfo.adb (Abstract_Interface_Alias): Renamed as Interface_Alias.
      	(Set_Abstract_Interface_Alias): Renamed as Set_Interface_Alias.
       	Added assertion to force entities with this attribute to have
       	attribute Is_Internal set to True.
      	(Next_Tag_Component): Simplify assertion using attribute Is_Tag.
      
      	* sem_ch3.adb (Derive_Interface_Subprograms): This subprogram has been
       	renamed as Derive_Progenitor_Subprograms. In addition, its code is
       	a new implementation.
      	(Add_Interface_Tag_Components): Remove special management of
      	synchronized interfaces.
      	(Analyze_Interface_Declaration): Minor reformating
      	(Build_Derived_Record_Type): Minor reformating
      	(Check_Abstract_Overriding): Avoid reporting error in case of abstract
       	predefined primitive inherited from interface type because the body of
       	internally generated predefined primitives of tagged types are generated
       	later by Freeze_Type
      	(Derive_Subprogram): Avoid generating an internal name if the parent
       	subprogram overrides an interface primitive.
      	(Derive_Subprograms): New implementation that keeps separate the
       	management of tagged types not implementing interfaces, from tagged
       	types that implement interfaces.
      	(Is_Progenitor): New implementation.
      	(Process_Full_View): Add documentation
      	(Record_Type_Declaration): Replace call to Derive_Interface_Subprograms
       	by call to Derive_Progenitor_Subprograms.
      
      	* sem_ch6.ads (Is_Interface_Conformant): New subprogram.
      	(Check_Subtype_Conformant, Subtype_Conformant): Adding new argument
       	Skip_Controlling_Formals.
      
      	* sem_ch6.adb (Is_Interface_Conformant): New subprogram.
      	(Check_Conventions): New implementation. Remove local subprogram
       	Skip_Check. Remove formal Search_From of routine Check_Convention.
      	(Check_Subtype_Conformant, Subtype_Conformant): Adding new argument
       	Skip_Controlling_Formals.
      	(New_Overloaded_Entity): Enable addition of predefined dispatching
       	operations.
      
      	* sem_disp.ads
      	(Find_Primitive_Covering_Interface): New subprogram.
      
      	* sem_disp.adb (Check_Dispatching_Operation): Disable registering
       	the task body procedure as a primitive of the corresponding tagged
       	type.
      	(Check_Operation_From_Private_Type): Avoid adding twice an entity
       	to the list of primitives.
      	(Find_Primitive_Covering_Interface): New subprogram.
      	(Override_Dispatching_Operation): Add documentation.
      
      	* sem_type.adb (Covers): Minor reformatings
      
      	* sem_util.ads (Collect_Abstract_Interfaces): Renamed as
      	Collect_Interfaces.
       	Rename formal.
      	(Has_Abstract_Interfaces): Renamed as Has_Interfaces.
      	(Implements_Interface): New subprogram.
      	(Is_Parent): Removed.
      	(Primitive_Names_Match): New subprogram.
      	(Remove_Homonym): Moved here from Derive_Interface_Subprograms.
      	(Ultimate_Alias): New subprogram.
      
      	* sem_util.adb (Collect_Abstract_Interfaces): Renamed as
      	Collect_Interfaces.
       	Remove special management for synchronized types. Rename formal. Remove
       	internal subprograms Interface_Present_In_Parent and Add_Interface.
      	(Has_Abstract_Interfaces): Renamed as Has_Interfaces. Replace assertion
       	on non-record types by code to return false in such case.
      	(Implements_Interface): New subprogram.
      	(Is_Parent): Removed. No special management is now required for
       	synchronized types covering interfaces.
      	(Primitive_Names_Match): New subprogram.
      	(Remove_Homonym): Moved here from Derive_Interface_Subprograms.
      	(Ultimate_Alias): New subprogram.
      
      	* exp_ch3.adb (Add_Internal_Interface_Entities): New subprogram.
       	Add internal entities associated with secondary dispatch tables to
       	the list of tagged type primitives that are not interfaces.
      	(Freeze_Record_Type): Add new call to Add_Internal_Interface_Entities
      	(Make_Predefined_Primitive_Specs): Code reorganization to improve
       	the management of predefined equality operator. In addition, if
       	the type has an equality function corresponding with a primitive
       	defined in an interface type, the inherited equality is abstract
       	as well, and no body can be created for it.
      
      	* exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved from
       	exp_util to exp_disp.
      	(Is_Predefined_Interface_Primitive): New subprogram. Returns True if
       	an entity corresponds with one of the predefined primitives required
       	to implement interfaces.
      	Update copyright notice.
      
      	* exp_disp.adb (Set_All_DT_Position): Add assertion. Exclude from the
       	final check on abstract subprograms all the primitives associated with
       	interface primitives because they must be visible in the public and
       	private part.
      	(Write_DT): Use Find_Dispatching_Type to locate the name of the
      	interface type. This allows the use of this routine, for debugging
      	purposes, when the tagged type is not fully decorated.
      	(Is_Predefined_Dispatching_Operation): Moved from exp_util to exp_disp.
       	Factorize code calling new subprogram Is_Predefined_Interface_Primitive.
      	(Is_Predefined_Interface_Primitive): New subprogram. Returns True if an
       	entity corresponds with one of the predefined primitives required to
       	implement interfaces.
      
      	* exp_util.adb (Find_Interface_ADT): New implementation
      	(Find_Interface): Removed.
      
      	* sprint.adb (Sprint_Node_Actual): Generate missing output for the
       	list of interfaces associated with nodes
      	N_Formal_Derived_Type_Definition and N_Private_Extension_Declaration.
      
      From-SVN: r135923
      Javier Miranda committed
  15. 20 May, 2008 1 commit
    • re PR ada/30740 (Improper semantics in gnat's compilation of certain expressions… · 685094bf
      re PR ada/30740 (Improper semantics in gnat's compilation of certain expressions involving modular arithmetic)
      
      2008-05-20  Robert Dewar  <dewar@adacore.com>
      
      	PR ada/30740
      	* einfo.ads, einfo.adb (Non_Binary_Modulus): Applies to all types and
      	subtypes, always False for non-modular types.
      	Shared_Var_Assign_Proc (node22) and Shared_Var_Read_Proc (node 15)
      	entry nodes have been replaced by Shared_Var_Procs_Instance (node22)
      	for Shared_Storage package.
      	(Is_RACW_Stub_Type): New entity flag.
      
      	* exp_ch4.adb
      	(Expand_N_Op_Expon): Avoid incorrect optimization of a*(2**b) in the
      	case where we have a modular type with a non-binary modules.
      	Comments reformattings.
      
      	* sem_intr.adb: Simplify code not that Non_Binary_Modulus applies to
      	all types.
      
      From-SVN: r135619
      Robert Dewar committed
  16. 08 Apr, 2008 1 commit
    • alloc.ads: Add entries for Obsolescent_Warnings table · 21d27997
      2008-04-08  Robert Dewar  <dewar@adacore.com>
      	    Bob Duff  <duff@adacore.com>
      	    Gary Dismukes  <dismukes@adacore.com>
      	    Ed Schonberg  <schonberg@adacore.com>
      
      	* alloc.ads: Add entries for Obsolescent_Warnings table
      
      	* einfo.ads, einfo.adb: Minor reformatting.
      	(Is_Discriminal): New subprogram.
      	(Is_Prival): New subprogram.
      	(Is_Protected_Component): New subprogram.
      	(Is_Protected_Private): Removed.
      	(Object_Ref, Set_Object_Ref): Removed.
      	(Prival, Set_Prival): Change assertion.
      	(Privals_Chain, Set_Privals_Chain): Removed.
      	(Prival_Link, Set_Prival_Link): New subprogram.
      	(Protected_Operation, Set_Protected_Operation): Removed.
      	(Protection_Object, Set_Protection_Object): New subprogram.
      	(Write_Field17_Name): Remove case for Object_Ref.
      	(Write_Field20_Name): Add case for Prival_Link.
      	(Write_Field22_Name): Remove case for Protected_Operation,
      	Privals_Chain.
      	Add case for Protection_Object.
      	(Can_Use_Internal_Rep): Make this into a [base type only] attribute,
      	so clients
      	(Overlays_Constant): New flag
      	(Is_Constant_Object): New predicate
      	(Is_Standard_Character_Type): New predicate
      	(Optimize_Alignment_Space): New flag
      	(Optimize_Alignment_Time): New flag
      	(Has_Postconditions): New flag
      	(Obsolescent_Warrning): Field removed
      	(Spec_PPC_List): New field
      	(Relative_Deadline_Variable, Set_Relative_Deadline_Variable): Add
      	subprograms to get and set the relative deadline associated to a task.
      
      	* exp_attr.adb (May_Be_External_Call): Account for the case where the
      	Access attribute is part of a named parameter association.
      	(Expand_Access_To_Protected_Op): Test for the attribute occurring
      	within an init proc and use that directly as the scope rather than
      	traversing up to the protected operation's enclosing scope. Only apply
      	assertion on Is_Open_Scopes in the case the scope traversal is done.
      	For the init proc case use the address of the first formal (_init) as
      	the protected object reference.
      	Implement Invalid_Value attribute
      	(Expand_N_Attribute_Reference): Case Attribute_Unrestricted_Access.
      	contents of the dispatch table there is no need to duplicate the
      	itypes associated with record types (i.e. the implicit full view
      	of private types).
      	Implement Enum_Val attribute
      	(Expand_N_Attribute_Reference, case Old): Properly handle appearence
      	within _Postconditions procedure
      	(Expand_N_Attribute_Reference, case Result): Implement new attribute
      
      	* exp_ch5.adb (Expand_N_Simple_Return_Statement): Handle case in which
      	a return statement calls a function that is not available in
      	configurable runtime.
      	(Analyze_If_Statement): don't optimize simple True/False cases in -O0
      	(Expand_Non_Function_Return): Generate call to _Postconditions proc
      	(Expand_Simple_Function_Return): Ditto
      
      	* frontend.adb: Add call to Sem_Aux.Initialize
      
      	* sem_aux.ads, sem_aux.adb: New file.
      
      	* par-prag.adb: Add entries for pragmas Precondition/Postcondition
      	Add new Pragma_Relative_Deadline.
      	Add support for pragmas Check and Check_Policy
      
      	* sem_attr.ads, sem_attr.adb (Check_Not_CPP_Type): New subprogram.
      	(Check_Stream_Attribute): Add missing check (not allowed in CPP types)
      	(Analyze_Attribute): In case of attributes 'Alignment and 'size add
      	missing check because they are not allowed in CPP tagged types.
      	Add Sure parameter to Note_Possible_Modification calls
      	Add implementation of Invalid_Value attribute
      	Implement new attribute Has_Tagged_Values
      	Implement Enum_Val attribute
      	(Analyze_Attribute, case Range): Set Name_Req True for prefix of
      	generated attributes.
      	(Analyze_Attribute, case Result): If prefix of the attribute is
      	overloaded, it always resolves to the enclosing function.
      	(Analyze_Attribute, case Result): Properly deal with analysis when
      	Postconditions are not active.
      	(Resolve_Attribute, case Result): Properly deal with appearence during
      	preanalysis in spec.
      	Add processing for attribute Result
      
      	* sem_ch6.ads, sem_ch6.adb (Check_Overriding_Indicator): Code cleanup
      	for operators.
      	(Analyze_Subprogram_Body): Install private_with_clauses when the body
      	acts as a spec.
      	(Check_Inline_Pragma): recognize an inline pragma that appears within
      	the subprogram body to which it applies.
      	(Analyze_Function_Return): Check that type of the expression of a return
      	statement in a function with a class-wide result is not declared at a
      	deeper level than the function.
      	(Process_PPCs): Deal with enabling/disabling, using PPC_Enabled flag
      	(Verify_Overriding_Indicator): Handle properly subprogram bodies for
      	user- defined operators.
      	(Install_Formals): Moved to spec to allow use from Sem_Prag for
      	analysis of precondition/postcondition pragmas.
      	(Analyze_Subprogram_Body.Last_Real_Spec_Entity): New name for
      	Last_Formal, along with lots of comments on what this is about
      	(Analyze_Subprogram_Body): Fix case where we move entities from the
      	spec to the body when there are no body entities (now possible with
      	precondition and postcondition pragmas).
      	(Process_PPCs): New procedure
      	(Analyze_Subprogram_Body): Add call to Process_PPCs
      
      	* sem_ch8.adb (Use_One_Type): refine warning on a redundant use_type
      	clause.
      	(Pop_Scope): Restore Check_Policy_List on scope exit
      	(Push_Scope): Save Check_Policy_List on scope entry
      	Change name In_Default_Expression      => In_Spec_Expression
      	Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
      	Change name Pre_Analyze_And_Resolve    => Preanalyze_And_Resolve
      	(Analyze_Object_Renaming): Allow 'Reference as object
      	(Analyze_Pragma, case Restriction_Warnings): Call GNAT_Pragma
      	(Process_Restrictions_Or_Restriction_Warnings): Check for bad spelling
      	of restriction identifier.
      	Add Sure parameter to Note_Possible_Modication calls
      
      	* sem_prag.ads, sem_prag.adb (Analyze_Pragma, case Stream_Convert):
      	Don't check for primitive operations when calling Rep_Item_Too_Late.
      	(Process_Import_Or_Interface): Do not place flag on formal
      	subprograms.
      	(Analyze_Pragma, case Export): If the entity is a deferred constant,
      	propagate information to full view, which is the one elaborated by the
      	back-end.
      	(Make_Inline): the pragma is effective if it applies to an internally
      	generated subprogram declaration for a body that carries the pragma.
      	(Analyze_Pragma, case Optimize_Alignment): Set new flag
      	Optimize_Alignment_Local.
      	(Analyze_PPC_In_Decl_Part): New procedure
      	(Get_Pragma_Arg): Moved to outer level
      	(Check_Precondition_Postcondition): Change to allow new visibility
      	rules for package spec
      	(Analyze_Pragma, case Check_Policy): Change placement rules to be
      	same as pragma Suppress/Unsuppress.
      	Change name In_Default_Expression      => In_Spec_Expression
      	Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
      	Change name Pre_Analyze_And_Resolve    => Preanalyze_And_Resolve
      	(Check_Precondition_Postcondition): Do proper visibility preanalysis
      	for the case of these pragmas appearing in the spec.
      	(Check_Enabled): New function
      	(Initialize): New procedure
      	(Tree_Read): New procedure
      	(Tree_Write): New procedure
      	(Check_Precondition_Postcondition): New procedure
      	Implement pragmas Check and Check_Policy
      	Merge Assert processing with Check
      
      	* sem_warn.adb (Warn_On_Known_Condition): Handle pragma Check
      	New warning flag -gnatw.e
      
      	* sinfo.ads, sinfo.adb (Has_Relative_Deadline_Pragma): New function
      	returning whether a task (or main procedure) has a pragma
      	Relative_Deadline.
      	(Set_Has_Relative_Deadline_Pragma): Procedure to indicate that a task
      	(or main procedure) has a pragma Relative_Deadline.
      	Add Next_Pragma field to N_Pragma node
      	(PPC_Enabled): New flag
      	(Next_Pragma): Now used for Pre/Postcondition processing
      
      	* snames.h, snames.ads, snames.adb: New standard name
      	Inherit_Source_Path
      	Add entry for 'Invalid_Value attribute
      	Add entry for new attribute Has_Tagged_Values
      	Add entry for Enum_Val attribute
      	Add new standard names Aggregate, Configuration and Library.
      	Add _Postconditions
      	Add _Result
      	Add Pragma_Precondition
      	Add Pragma_Postcondition
      	Add Attribute_Result
      	New standard name Archive_Builder_Append_Option
      	(Preset_Names): Add _relative_deadline and relative_deadline definitions
      	There was also a missing non_preemptive_within_priorities.
      	(Get_Pragma_Id, Is_Pragma_Name): Add support for pragma
      	Relative_Deadline.
      	Add support for pragmas Check and Check_Policy
      
      	* tree_gen.adb: Call Sem_Aux.Tree_Write
      
      	* tree_in.adb: Call Sem_Aux.Tree_Read
      
      	* exp_ch11.adb (Expand_N_Raise_Statement): New Build_Location calling
      	sequence
      
      	* exp_intr.adb (Expand_Source_Info): New Build_Location calling
      	sequence
      
      	* exp_prag.adb (Expand_Pragma_Relative_Deadline): New procedure.
      	(Expand_N_Pragma): Call the appropriate procedure for expanding pragma
      	Relative_Deadline.
      	(Expand_Pragma_Check): New procedure
      
      	* sinput.ads, sinput.adb (Build_Location_String): Now appends to name
      	buffer.
      
      	* sinfo.adb (PPC_Enabled): New flag
      
      From-SVN: r134010
      Robert Dewar committed
  17. 26 Mar, 2008 1 commit
    • einfo.ads, einfo.adb (N_Pragma): Chars field removed, use Chars (Pragma_Identifier (.. · 0f282086
      2008-03-26  Robert Dewar  <dewar@adacore.com>
      
      	* einfo.ads, einfo.adb (N_Pragma): Chars field removed, use Chars
      	(Pragma_Identifier (.. instead.
      	(OK_To_Reorder_Components): New flag
      	(Has_Entries): Code cleanup.
      	(Warnings_Off_Used): New flag
      	(Warnings_Off_Used_Unmodified): New flag
      	(Warnings_Off_Used_Unreferenced): New flag
      	(Has_Warnings_Off): New function
      	(Has_Unmodified): New function
      	(Has_Unreferenced): New function
      	(Is_Trivial_Subprogram): New flag
      	(Is_Static_Dispatch_Table_Entity): New attribute.
      	Change name Access_Subprogram_Type_Kind to Access_Subprogram_Kind
      	(more consistent with other similar names)
      	(Access_Subprogram_Type): New classification function
      
      From-SVN: r133555
      Robert Dewar committed
  18. 19 Dec, 2007 1 commit
    • g-expect-vms.adb, [...]: Add pragma Warnings (Off) for unassigned IN OUT arguments · 9d77af56
      2007-12-19  Robert Dewar  <dewar@adacore.com>
      
      	* g-expect-vms.adb, g-expect.adb, s-poosiz.adb: 
      	Add pragma Warnings (Off) for unassigned IN OUT arguments
      
      	* sem_warn.adb (Output_Reference): Suppress messages for internal names
      	(Check_References): Extensive changes to tune up warnings
      	(Output_Non_Modifed_In_Out_Warnings): Changes to tune up warnings
      	(Has_Pragma_Unmodifed_Check_Spec): New function
      	(Check_References): Implement pragma Unmodified
      	(Warn_On_Unassigned_Out_Parameter): Implement pragma Unmodified
      
      	* par-prag.adb: Dummy entry for pragma Unmodified
      
      	* sem_prag.adb: Implement pragma Unmodified
      
      	* einfo.ads, einfo.adb: (Has_Pragma_Unmodified): New flag
      	(Proc_Next_Component_Or_Discriminant): Fix typo.
      	Update comments.
      
      	* sem_util.adb (Note_Possible_Modification): Add processinng for pragma
      	Unmodified.
      	(Reset_Analyzed_Flags): Use Traverse_Proc instead of Traverse_Func,
      	because the former already takes care of discarding the result.
      	(Mark_Coextensions): Remove ununused initial value from Is_Dynamic.
      	Add comment.
      
      	* snames.h, snames.ads, snames.adb: Add entry for pragma Unmodified
      
      From-SVN: r131068
      Robert Dewar committed
  19. 13 Dec, 2007 1 commit
    • einfo.ads, einfo.adb: Flag 232 is now Implemented_By_Entry. · ce0bead3
      2007-12-06  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* einfo.ads, einfo.adb: Flag 232 is now Implemented_By_Entry.
      	(Implemented_By_Entry, Set_Implemented_By_Entry): New routines.
      	(Write_Entry_Flags): Add an entry for Implemented_By_Entry.
      	(Renamed_In_Spec): New flag
      	(Has_Pragma_Inline_Always): New flag
      	Add missing doc for pragma Obsolescent_Warning
      	Add missing doc for 17 additional unused flags (230-247)
      	(Is_Derived_Type): Remove condition "not Is_Generic_Type".
      	Alphabetize with clauses.
      	Separate Is_Thunk and Has_Thunks flags
      	(Write_Entity_Flags): Add forgotten entry for Has_Thunks
      	(Related_Interface): Renamed to Related_Type.
      	(Has_Thunks/Set_Has_Thunks): Subprograms of new attribute.
      	(Set_Is_Flag): Restrict the assertion.
      
      From-SVN: r130825
      Hristian Kirtchev committed
  20. 15 Oct, 2007 1 commit
    • s-taprop-solaris.adb, [...]: Minor reformatting. · 67ce0d7e
      2007-10-15  Robert Dewar  <dewar@adacore.com>
      
      	* s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb, 
      	s-taprop-vxworks.adb, s-taprop-posix.adb, a-calend-vms.adb,
      	a-calend.adb, a-nuflra.adb, a-tigeau.adb, a-wtgeau.adb, 
      	checks.adb, bindgen.adb, eval_fat.adb, exp_fixd.adb, fmap.adb, 
      	freeze.adb, g-awk.adb, g-calend.adb, g-diopit.adb, g-expect.adb, 
      	gnatchop.adb, gnatlink.adb, g-spipat.adb, g-thread.adb, make.adb, 
      	mdll.adb, mlib.adb, mlib-prj.adb, osint.adb, par-ch3.adb, prj.adb, 
      	prj-makr.adb, sem_prag.adb, sem_type.adb, s-fatgen.adb, s-fileio.adb, 
      	sinfo.ads, sinput-d.adb, s-taasde.adb, s-tasdeb.ads, s-tasren.adb, 
      	s-tassta.adb, s-tpobop.adb, s-tposen.adb, stylesw.adb, types.ads,
      	uintp.adb, validsw.adb, makegpr.adb, a-rbtgso.adb, a-crbtgo.adb, 
      	a-coorse.adb, a-convec.adb, a-coinve.adb, a-cohama.adb, a-ciorse.adb, 
      	a-cihama.adb, a-cidlli.adb, a-chtgop.adb, a-cdlili.adb, a-cdlili.adb, 
      	a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cohase.adb, a-ciorma.adb, 
      	a-coorma.adb, a-ztgeau.adb, symbols-vms.adb, a-crdlli.adb, 
      	a-calari.adb, a-calfor.adb, s-os_lib.adb, s-regpat.adb, a-ngrear.adb:
      	Minor reformatting.
      	Add Unreferenced and Warnings (Off) pragmas for cases of
      	variables modified calls where they are IN OUT or OUT parameters and
      	the resulting values are not subsequently referenced. In a few cases,
      	we also remove redundant code found by the new warnings.
      
      	* ug_words, vms_data.ads, usage.adb, sem_util.adb, sem_util.ads, 
      	sem_warn.adb, sem_warn.ads, sem_res.adb, sem_ch7.adb, sem_ch8.adb,
      	sem_ch5.adb, opt.ads, lib-xref.adb, lib-xref.ads, exp_smem.adb,
      	sem_ch11.adb, exp_ch6.adb, einfo.ads, einfo.adb: implement a new
      	warning controlled by -gnatw.o that warns on cases of out parameter
      	values being ignored.
      
      From-SVN: r129318
      Robert Dewar committed
  21. 26 Sep, 2007 1 commit
    • einfo.adb (Is_Thunk): New attribute applicable to subprograms. · fdce4bb7
      2007-09-26  Javier Miranda  <miranda@adacore.com>
      	    Gary Dismukes  <dismukes@adacore.com>
      
      	* einfo.adb (Is_Thunk): New attribute applicable to subprograms. True
      	for thunks associated with interface types.
      
      	* einfo.ads: Improve documentatation of Is_Internal
      	(Is_Thunk): New attribute applicable to subprograms. True for thunks
      	associated with interface types.
      	Extensive comment fixes regarding flags that appear in all entities. The
      	documentation is now consistent for all such flags (there were a number
      	of errors in the documentation in this regard).
      
      	* exp_attr.adb (Expand_N_Attribute_Reference): Minor code cleanup.
      
      	* exp_ch6.adb (Make_Build_In_Place_Call_*): Return immediately if any
      	of these procedures are passed a function call that already has
      	build-in-place actuals (testing new flag
      	Is_Expanded_Build_In_Place_Call). Set the flag on the function call in
      	the case where processing continues.
      	(Expand_Call): If the call is generated from a thunk body then we
      	propagate the extra actuals associated with the accessibility
      	level of the access type actuals.
      
      	* sem_ch6.adb (Analyze_Subprogram_Body): Set the Protected_Formal field
      	of each extra formal of a protected operation to reference the
      	corresponding extra formal of the subprogram denoted by the
      	operation's Protected_Body_Subprogram.
      	
      	* sinfo.ads, sinfo.adb (Is_Expanded_Build_In_Place_Call): New flag on
      	N_Function_Call nodes.
      
      From-SVN: r128786
      Javier Miranda committed
  22. 11 Sep, 2007 3 commits
  23. 31 Aug, 2007 1 commit
    • einfo.ads, einfo.adb: New flag Is_Raised (Flag224). · d5e96bc6
      2007-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* einfo.ads, einfo.adb: New flag Is_Raised (Flag224). Update the
      	structure of E_Exception to reflect the new flag.
      	(Is_Raised, Set_Is_Raised): New inlined routines.
      	Update the usage of available flag to reflect the addition of Is_Raised.
      	(Is_Raised, Set_Is_Raised): Bodies of new routines.
      	(Write_Entity_Flags): Write the status of flag Is_Raised.
      	(Is_Descendent_Of_Address): New entity flag, to simplify handling of
      	spurious ambiguities when integer literals appear in the context of an
      	address type that is a visible integer type.
      
      	* sem_ch11.adb (Analyze_Exception_Handler): Add code to warn on local
      	exceptions never being raised.
      	(Analyze_Raise_Statement): When analyzing an exception, mark it as being
      	explicitly raised.
      
      From-SVN: r127970
      Hristian Kirtchev committed
  24. 16 Aug, 2007 1 commit
    • cstand.adb (Create_Standard): Create an entity for a zero-sized type associated with... · 4c8e94ab
      2007-08-16  Gary Dismukes  <dismukes@adacore.com>
      
      	* cstand.adb (Create_Standard): Create an entity for a zero-sized type
      	associated with Standard_Debug_Renaming_Type, to be used as the type of
      	the special variables whose names provide debugger encodings for
      	renaming declarations.
      
      	* einfo.ads, einfo.adb (Debug_Renaming_Link): Change to return Node25.
      	(Set_Debug_Renaming_Link): Change to set Node25.
      	(Write_Field13_Name): Remove case for E_Enumeration_Literal.
      	(Write_Field25_Name): Add case for E_Variable to output
      	"Debug_Renaming_Link".
      	(Write_Field23_Name): Correct the output string for "Limited_View".
      
      	* exp_dbug.adb: Add with and use of Tbuild.
      	(Debug_Renaming_Declaration): Replace creation of an enumeration type
      	and literal with creation of a variable of type
      	Standard_Debug_Renaming_Type whose name encodes both the renamed object
      	and the entity of the renaming declaration.
      	(Qualify_Entity_Name): Add the delayed qualification of the entity name
      	part of the name of a variable that has a Debug_Renaming_Link.
      
      	* stand.ads (Standard_Debug_Renaming_Type): New Entity_Id denoting a
      	special type to be associated with variables that provide debugger
      	encodings for renaming declarations.
      
      From-SVN: r127537
      Gary Dismukes committed
  25. 14 Aug, 2007 1 commit
    • einfo.ads, einfo.adb: Create a limited view of an incomplete type... · 5d37ba92
      2007-08-14  Ed Schonberg  <schonberg@adacore.com>
      	    Robert Dewar  <dewar@adacore.com>
      	    Javier Miranda  <miranda@adacore.com>
      	    Gary Dismukes  <dismukes@adacore.com>
      
      	* einfo.ads, einfo.adb: Create a limited view of an incomplete type,
      	to make treatment of limited views uniform for all visible declarations
      	in a limited_withed package.
      	Improve warnings for in out parameters
      	(Set_Related_Interaface/Related_Interface): Allow the use of this
      	attribute with constants.
      	(Write_Field26_Name): Handle attribute Related_Interface in constants.
      	Warn on duplicate pragma Preelaborable_Initialialization
      
      	* sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Body): Force the
      	generation of a freezing node to ensure proper management of null
      	excluding access types in the backend.
      	(Create_Extra_Formals): Test base type of the formal when checking for
      	the need to add an extra accessibility-level formal. Pass the entity E
      	on all calls to Add_Extra_Formal (rather than Scope (Formal) as was
      	originally being done in a couple of cases), to ensure that the
      	Extra_Formals list gets set on the entity E when the first entity is
      	added.
      	(Conforming_Types): Add missing calls to Base_Type to the code that
      	handles anonymous access types. This is required to handle the
      	general case because Process_Formals builds internal subtype entities
      	to handle null-excluding access types.
      	(Make_Controlling_Function_Wrappers): Create wrappers for constructor
      	functions that need it, even when not marked Requires_Overriding.
      	Improve warnings for in out parameters
      	(Analyze_Function_Return): Warn for disallowed null return
      	Warn on return from procedure with unset out parameter
      	Ensure consistent use of # in error messages
      	(Check_Overriding_Indicator): Add in parameter Is_Primitive.
      	(Analyze_Function_Return): Move call to Apply_Constraint_Check before
      	the implicit conversion of the expression done for anonymous access
      	types. This is required to generate the code of the null excluding
      	check (if required).
      
      	* sem_warn.ads, sem_warn.adb (Check_References.Publicly_Referenceable):
      	A formal parameter is never publicly referenceable outside of its body.
      	(Check_References): For an unreferenced formal parameter in an accept
      	statement, use the same warning circuitry as for subprogram formal
      	parameters.
      	(Warn_On_Unreferenced_Entity): New subprogram, taken from
      	Output_Unreferenced_Messages, containing the part of that routine that
      	is now reused for entry formals as described above.
      	(Goto_Spec_Entity): New function
      	(Check_References): Do not give IN OUT warning for dispatching operation
      	Improve warnings for in out parameters
      	(Test_Ref): Check that the entity is not undefinite before calling
      	Scope_Within, in order to avoid infinite loops.
      	Warn on return from procedure with unset out parameter
      	Improved warnings for unused variables
      
      From-SVN: r127415
      Ed Schonberg committed
  26. 06 Jun, 2007 1 commit
    • einfo.ads, einfo.adb (Available_View): New synthesized attribute applicable to… · 0a36105d
      einfo.ads, einfo.adb (Available_View): New synthesized attribute applicable to types that have the With_Type flag set.
      
      2007-04-20  Javier Miranda  <miranda@adacore.com>
      	    Ed Schonberg  <schonberg@adacore.com>
      	    Robert Dewar  <dewar@adacore.com>
      	    Eric Botcazou  <ebotcazou@adacore.com>
      	    Arnaud Charlet  <charlet@adacore.com>
      
      	* einfo.ads, einfo.adb (Available_View): New synthesized attribute
      	applicable to types that have the With_Type flag set. Returns the
      	non-limited view of the type, if available, otherwise the type itself.
      	For class-wide types, there is no direct link in the tree, so we have
      	to retrieve the class-wide type of the non-limited view of the Etype.
      	New attributes Static_Initialization and Static_Elaboration_Desired.
      	Remove the pragma Thread_Body, and the associated flag
      	Is_Thread_Body in entities, and all related code.
      	(Suppress_Value_Tracking_On_Call): New flag
      	E_Exception has Esize and Alignment fields
      	(Universal_Aliasing): New function.
      	(Set_Universal_Aliasing): New procedure.
      	(Write_Entity_Flags): Deal with Universal_Aliasing flag.
      	(Check_Nested_Access): New procedure.
      	(Has_Up_Level_Access, Set_Has_Up_Level_Access): New procedures.
      	(Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
      	(Related_Interface): New attribute. Present in dispatch table pointer
      	components of records. Set to point to the entity of the corresponding
      	interface type.
      	(Is_By_Reference_Type): Recurse on the full view of an incomplete type.
      	(Original_Access_Type): Remove, not needed.
      	(Root_Type): Handle properly subtypes of class-wide-types.
      	Update comments.
      
      	* sem_ch4.adb (Analyze_Explicit_Dereference): Add support for
      	class-wide types visible through limited-with clauses.
      	(Try_Primitive_Operation): When examining all primitive operations of a
      	tagged type, do not consider subprograms labeled as hidden unless they
      	belong to a private generic type with a tagged parent.
      	(Try_Object_Operation): Extensive rewriting, to handle properly various
      	overloading cases, when several ancestors may have class-wide operations
      	that are possible candidates, and when the overloaded functions return
      	array types and have defaulted parameters so that the call may be
      	interpreted as an indexing.
      	(Analyze_Allocator): Remove Mark_Allocator and its invocation.
      	(Process_Function_Call): use Next, rather than Next_Actual, to analyze
      	successive actuals before analyzing the call itself.
      	(Try_Primitive_Operation): A primitive operation is compatible with the
      	prefix if the prefix has a synchronized type and the type of the formal
      	is its corresponding record, as can be the case when the primitive
      	operation is declared outside of the body of the type.
      	(Traverse_Homonyms): New subprocedure of Try_Class_Wide_Operation, to
      	perform homonym traversal, looking for class-wide operation matches
      	(formerly done in statements of Try_Class_Wide_Operation). Matches on
      	access parameters are now restricted to anonymous access types.
      	(Mark_Allocator): An allocator with a discriminant association parent is
      	a coextension.
      	(Try_One_Prefix_Interpretation): If the type of the object is
      	incomplete, as can be happen when it is a limited view obtained through
      	a limited_with_clause, the selected component is not part of a prefixed
      	call.
      	(Complete_Object_Operation): Diagnose properly an object that is not
      	aliased when the corresponding controlling formal is an access
      	parameter.
      	(Try_Primitive_Operation, Try_Class_Wide_Operation): Diagnose properly
      	ambiguous calls in prefixed notation, where two primitives differ only
      	in that the controlling argument of one is an access parameter.
      
      	* sem_ch6.adb (Has_Single_Return): Add guard in code that determines
      	whether a function that returns an unconstrained type can be inlined.
      	(Process_Formals): Diagnose properly the illegal use of an incomplete
      	type in the profile of an access_to_subprogram declaration.
      	(Check_Synchronized_Overriding): Nothing check for concurrent types, the
      	operations are attached to the corresponding record.
      	(Analyze_Subprogram_Specification): Add variables Formal and Formal_Typ.
      	When processing a primitive of a concurrent type which implements an
      	interface change the type of all controlling formals to that of the
      	corresponding record type.
      	(Check_Synchronized_Overriding): Relax the conditional logic when trying
      	to determine the tagged type to which a primitive belongs.
      	(Check_Conventions): Capture condition to ignore a primitive operation
      	(which is shared between the loop in Check_Conventions and the one in
      	Check_Convention) in a new local function Skip_Check.
      	(Check_Convention): Rename Prim_Op to Second_Prim_Op to avoid possible
      	confusion with Check_Conventions' own Prim_Op local variable.
      	(Create_Extra_Formals): Test for a tagged result type rather than a
      	controlling result when determining whether to add a BIP_Alloc_Form
      	formal and a BIP_Final_List formal to the function.
      	(Check_Conformance); For parameters that are anonymous access types,
      	subtype conformance requires that the not null and the constant
      	indicators must match
      	(Check_Synchronized_Overriding): New parameter Formal_Typ. Add machinery
      	to retrieve the appropriate type when processing a concurrent type
      	declared within a generic. Minor comment reformatting. Change invocation
      	of Overrides_Synchronized_Primitive to Find_Overridden_Synchronized_Pri-
      	mitive.
      	(Analyze_Subprogram_Body): If the return type of a function is an
      	anonymous access to the limited view of a class-wide type, and the
      	non-limited view of the type is available, update the type of the
      	function so that code can be generated.
      	(Process_Formals): In case of access-subtype itype whose designated
      	type is also an itype (situation that happens now with access to
      	subprograms) we mark the access-type itype with the Has_Delayed_Freeze
      	attribute to avoid backend problems.
      	(Check_Return_Subtype_Indication): Replace R_Type with R_Stm_Type in
      	init of R_Stm_Type_Is_Anon_Access. Also check that base types of the
      	anonymous types' designated types are same before testing
      	Subtypes_Statically_Match.
      	(Create_Extra_Formals): Test for a named access parameter that is a
      	controlling formal as an additional condition for adding an
      	accessibility level formal. This can occur in the subp type created for
      	dispatching calls in Expand_Dispatching_Call, and allows calling
      	Create_Extra_Formals from that procedure rather than special-casing the
      	extra formals there.
      	(Create_Extra_Formals): Add BIP_Alloc_Form and BIP_Final_List formals
      	when the function has a controlling result.
      	(Check_Returns): Add much more knowledge of the optimization of local
      	raise statements to gotos, to retain proper warnings in this case.
      	(Check_Statement_Sequence): Ignore N_Push_xxx_Label and N_Pop_xxx_Label
      	nodes when looking for last statement.
      
      	* sem_type.ads, sem_type.adb (Specific_Type): Add support for
      	class-wide types visible through limited with clauses.
      	(Add_One_Interp): If the operands are anonymous access types, the
      	predefined operator on universal_access is immediately visibles
      	(Find_Unique_Type): Handle anonymous access to subprogram types just as
      	other anonymous access types.
      	(Disambiguate): Take into account CIL convention.
      	(Interface_Present_In_Ancestor): Add support for class-wide interfaces.
      
      From-SVN: r125390
      Javier Miranda committed
  27. 06 Apr, 2007 1 commit
    • einfo.ads, einfo.adb: (First_Component_Or_Discriminant): New function · f937473f
      2007-04-06  Robert Dewar  <dewar@adacore.com>
      	    Thomas Quinot  <quinot@adacore.com>
      	    Ed Schonberg  <schonberg@adacore.com>
      	    Bob Duff  <duff@adacore.com>
      
      	* einfo.ads, einfo.adb: (First_Component_Or_Discriminant): New function
      	(Next_Component_Or_Discriminant): New function and procedure
      	(First_Index, First_Literal, Master_Id,
      	Set_First_Index, Set_First_Literal, Set_Master_Id):
      	Add missing Ekind assertions.
      	(Is_Access_Protected_Subprogram_Type): New predicate.
      	(Has_RACW): New entity flag, set on package entities to indicate that
      	the package contains the declaration of a remote accecss-to-classwide
      	type.
      	(E_Return_Statement): This node type has the Finalization_Chain_Entity
      	attribute, in case the result type has controlled parts.
      	(Requires_Overriding): Add this new flag, because "requires
      	overriding" is subtly different from "is abstract" (see AI-228).
      	(Is_Abstract): Split Is_Abstract flag into Is_Abstract_Subprogram and
      	Is_Abstract_Type. Make sure these are called only when appropriate.
      	(Has_Pragma_Unreferenced_Objects): New flag
      
      	* exp_ch5.adb (Expand_N_Assignment_Statement): If the left-hand side is
      	class-wide, the tag of the right-hand side must be an exact match, not
      	an ancestor of that of the object on left-hand side.
      	(Move_Activation_Chain): New procedure to create the call to
      	System.Tasking.Stages.Move_Activation_Chain.
      	(Expand_N_Extended_Return_Statement): Generate code to call
      	System.Finalization_Implementation.Move_Final_List at the end of a
      	return statement if the function's result type has controlled parts.
      	Move asserts to Build_In_Place_Formal.
      	(Move_Final_List): New function to create the call statement.
      	(Expand_N_Assignment_Statement): In case of assignment to a class-wide
      	tagged type, replace generation of call to the run-time subprogram
      	CW_Membership by call to Build_CW_Membership.
      	(Expand_N_Return_Statement): Replace generation of call to the run-time
      	subprogram Get_Access_Level by call to Build_Get_Access_Level.
      	(Expand_N_Simple_Function_Return): Replace generation of call to the
      	run-time subprogram Get_Access_Level by call to Build_Get_Access_Level.
      
      	* exp_ch6.ads, exp_ch6.adb (Expand_Call): Use new predicate
      	Is_Access_Protected_Subprogram_Type, to handle both named and anonymous
      	access to protected operations.
      	(Add_Task_Actuals_To_Build_In_Place_Call): New procedure to add the
      	master and chain actual parameters to a build-in-place function call
      	involving tasks.
      	(BIP_Formal_Suffix): Add new enumeration literals to complete the case
      	statement.
      	(Make_Build_In_Place_Call_In_Allocator,
      	Make_Build_In_Place_Call_In_Anonymous_Context,
      	Make_Build_In_Place_Call_In_Assignment,
      	Make_Build_In_Place_Call_In_Object_Declaration): Call
      	Add_Task_Actuals_To_Build_In_Place_Call with the appropriate master.
      	(Expand_Inlined_Call): If the subprogram is a null procedure, or a
      	stubbed procedure with a null body, replace the call with a null
      	statement without using the full inlining machinery, for efficiency
      	and to avoid invalid values in source file table entries.
      
      	* exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Add support for
      	renamings of calls to build-in-place functions.
      
      	* rtsfind.adb (RTE_Record_Component_Available): New subprogram that
      	provides the functionality of RTE_Available to record components.
      	(RTU_Entity): The function Entity has been renamed to RTU_Entity
      	to avoid undesired overloading.
      	(Entity): New subprogram that returns the entity for the referened
      	unit. If this unit has not been loaded, it returns Empty.
      	(RE_Activation_Chain_Access, RE_Move_Activation_Chain): New entities.
      	Remove no longer used entities.
      	(RE_Finalizable_Ptr_Ptr, RE_Move_Final_List): New entities.
      	(RE_Type_Specific_Data): New entity.
      	(RE_Move_Any_Value): New entity.
      	(RE_TA_A, RE_Get_Any_Type): New entities.
      	(RE_Access_Level, RE_Dispatch_Table, E_Default_Prim_Op_Count,
      	 RE_Prims_Ptr, RE_RC_Offset, RE_Remotely_Callable,
      	 RE_DT_Typeinfo_Ptr_Size, RE_Cstring_Ptr, RE_DT_Expanded_Name): Added.
      	(Entity): New subprogram that returns the entity for the referened
      	unit. If this unit has not been loaded, it returns Empty.
      	(RTE): Addition of a new formal that extends the search to the scopes
      	of the record types found in the chain of the package.
      
      	* sem_ch6.ads, sem_ch6.adb (Check_Overriding_Indicator): Print
      	"abstract subprograms must be visible" message, whether or not the type
      	is an interface; that is, remove the special case for interface types.
      	(Analyze_Function_Return): Remove error message "return of task objects
      	is not yet implemented" because this is now implemented.
      	(Create_Extra_Formals): Add the extra master and activation chain
      	formals in case the result type has tasks.
      	Remove error message "return of limited controlled objects is not yet
      	implemented".
      	(Create_Extra_Formals): Add the extra caller's finalization list formal
      	in case the result type has controlled parts.
      	(Process_Formals): In case of access formal types there is no need
      	to continue with the analysis of the formals if we already notified
      	errors.
      	(Check_Overriding_Indicator): Add code to check overriding of predefined
      	operators.
      	(Create_Extra_Formals): Prevent creation of useless Extra_Constrained
      	flags for formals that do not require them,.
      	(Enter_Overloaded_Entity): Do not give -gnatwh warning message unless
      	hidden entity is use visible or directly visible.
      	(Analyze_Abstract_Subprogram_Declaration,Analyze_Subprogram_Body,
      	Analyze_Subprogram_Declaration,Analyze_Subprogram_Specification,
      	Check_Conventions,Check_Delayed_Subprogram,Make_Inequality_Operator,
      	New_Overloaded_Entity): Split Is_Abstract flag into
      	Is_Abstract_Subprogram and Is_Abstract_Type.
      
      	* s-finimp.ads, s-finimp.adb (Move_Final_List): New procedure to move
      	a return statement's finalization list to the caller's list, used for
      	build-in-place functions with result type with controlled parts.
      	Remove no longer used entities.
      
      	* s-taskin.ads (Activation_Chain): Remove pragma Volatile. It is no
      	longer needed, because the full type is now limited, and therefore a
      	pass-by-reference type.
      	(Foreign_Task_Level): New constant.
      
      	* s-tassta.ads, s-tassta.adb (Move_Activation_Chain): New procedure to
      	move tasks from the activation chain belonging to a return statement to
      	the one passed in by the caller, and update the master to the one
      	passed in by the caller.
      	(Vulnerable_Complete_Master, Check_Unactivated_Tasks): Check the master
      	of unactivated tasks, so we don't kill the ones that are being returned
      	by a build-in-place function.
      	(Create_Task): Ignore AI-280 for foreign threads.
      
      From-SVN: r123558
      Robert Dewar committed
  28. 31 Oct, 2006 1 commit
    • einfo.ads, einfo.adb (Obsolescent_Warning): Now defined on all entities. · 6e443c90
      2006-10-31  Robert Dewar  <dewar@adacore.com>
      	    Ed Schonberg  <schonberg@adacore.com>
      	    Bob Duff  <duff@adacore.com>
      
      	* einfo.ads, einfo.adb (Obsolescent_Warning): Now defined on all
      	entities. Move other fields around to make this possible
      	(Is_Derived_Type): Add missing call to Is_Type.
      	(Extra_Formals): New function for subprograms, entries, subprogram
      	types.
      	(Set_Extra_Formals): New procedure for subprograms, entries, subp types.
      	(First_Formal_With_Extras): New function for subprogs, entries, subp
      	types.
      	(Write_Field28_Name): New procedure for node display of "Extra_Formals".
      	Add node information for E_Return_Statement.
      	(Elaborate_Body_Desirable): New flag
      	(Is_Return_By_Reference_Type): Rename Is_Return_By_Reference_Type
      	to be Is_Inherently_Limited_Type, because return-by-reference has
      	no meaning in Ada 2005.
      	(E_Return_Statement): New entity kind.
      	(Return_Applies_To): Field of E_Return_Statement.
      	(Is_Return_Object): New flag in object entities.
      	(Is_Dynamic_Scope): Make it True for E_Return_Statement.
      	(Must_Have_Preelab_Init): New flag
      	(Known_To_Have_Preelab_Init): New flag
      	(Is_Formal_Object): Move from Sem_Ch8 body to Einfo
      	(Is_Visible_Formal): New flag on entities in formal packages.
      	(Low_Bound_Known): New flag
      	(Non_Limited_View, Set_Non_Limited_View): Add membership test agains
      	Incomplete_Kind.
      	(Write_Field17_Name): Correct spelling of Non_Limited_View. Add name
      	output when Id is an incomplete subtype.
      
      From-SVN: r118250
      Robert Dewar committed
  29. 15 Feb, 2006 1 commit
    • einfo.ads, einfo.adb (First_Tag_Component): Protect the frontend against errors… · ba673907
      einfo.ads, einfo.adb (First_Tag_Component): Protect the frontend against errors in the source program...
      
      2006-02-13  Javier Miranda  <miranda@adacore.com>
      	    Robert Dewar  <dewar@adacore.com>
      	    Ed Schonberg  <schonberg@adacore.com>
      
      	* einfo.ads, einfo.adb (First_Tag_Component): Protect the frontend
      	against errors in the source program: a private types for which the
      	corresponding full type declaration is missing and pragma CPP_Virtual
      	is used.
      	(Is_Unchecked_Union): Check flag on Implementation_Base_Type.
      	(Is_Known_Null): New flag
      	(Has_Pragma_Pure): New flag
      	(No_Return): Present in all entities, set only for procedures
      	(Is_Limited_Type): A type whose ancestor is an interface is limited if
      	explicitly declared limited.
      	(DT_Offset_To_Top_Func): New attribute that is present in E_Component
      	entities. Only used for component marked Is_Tag. If present it stores
      	the Offset_To_Top function used to provide this value in tagged types
      	whose ancestor has discriminants.
      
      	* exp_ch2.adb: Update status of new Is_Known_Null flag
      
      	* sem_ch7.adb: Maintain status of new Is_Known_Null flag
      
      	* sem_cat.adb (Get_Categorization): Don't treat function as Pure in
      	the categorization sense if Is_Pure was set by pragma Pure_Function.
      
      From-SVN: r111055
      Javier Miranda committed
  30. 09 Dec, 2005 1 commit
    • einfo.adb (Itype_Printed): New flag · 653da906
      2005-12-05  Robert Dewar  <dewar@adacore.com>
      	    Ed Schonberg  <schonberg@adacore.com>
      	    Gary Dismukes  <dismukes@adacore.com>
      	    Javier Miranda  <miranda@adacore.com>
      	    Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* einfo.adb (Itype_Printed): New flag
      	(Is_Limited_Type): Derived types do not inherit limitedness from
      	interface progenitors.
      	(Is_Return_By_Reference_Type): Predicate does not apply to limited
      	interfaces.
      
      	* einfo.ads (Itype_Printed): New flag
      	Move Is_Wrapper_Package to proper section
      	Add missing Inline for Is_Volatile
      
      	* output.ads, output.adb (Write_Erase_Char): New procedure
      	(Save/Restore_Output_Buffer): New procedures
      	(Save/Restore_Output_Buffer): New procedures
      
      	* sprint.ads, sprint.adb (Write_Itype): Handle case of record itypes
      	Add missing support for anonymous access type
      	(Write_Id): Insert calls to Write_Itype
      	(Write_Itype): New procedure to output itypes
      
      	* par-ch12.adb (P_Formal_Derived_Type_Definition): In Ada 2005, handle
      	use of "limited" in declaration.
      
      	* sinfo.ads, sinfo.adb: 
      	Formal derived types can carry an explicit "limited" indication.
      
      	* sem_ch3.adb: Add with and use of Targparm.
      	(Create_Component): If Frontend_Layout_On_Target is True and the
      	copied component does not have a known static Esize, then reset
      	the size and positional fields of the new component.
      	(Analyze_Component_Declaration): A limited component is
      	legal within a protected type that implements an interface.
      	(Collect_Interfaces): Do not add to the list the interfaces that
      	are implemented by the ancestors.
      	(Derived_Type_Declaration): If the parent of the full-view is an
      	interface perform a transformation of the tree to ensure that it has
      	the same parent than the partial-view. This simplifies the job of the
      	expander in order to generate the correct object layout, and it is
      	needed because the list of interfaces of the full-view can be given in
      	any order.
      	(Process_Full_View): The parent of the full-view does not need to be
      	a descendant of the parent of the partial view if both parents are
      	interfaces.
      	(Analyze_Private_Extension_Declaration): If declaration has an explicit
      	"limited" the parent must be a limited type.
      	(Build_Derived_Record_Type): A derived type that is explicitly limited
      	must have limited ancestor and progenitors.
      	(Build_Derived_Type): Ditto.
      	(Process_Full_View): Verify that explicit uses of "limited" in partial
      	and full declarations are consistent.
      	(Find_Ancestor_Interface): Remove function.
      	(Collect_Implemented_Interfaces): New procedure used to gather all
      	implemented interfaces by a type.
      	(Contain_Interface): New function used to check whether an interface is
      	present in a list.
      	(Find_Hidden_Interface): New function used to determine whether two
      	lists of interfaces constitute a set equality. If not, the first
      	differing interface is returned.
      	(Process_Full_View): Improve the check for the "no hidden interface"
      	rule as defined by AI-396.
      
      From-SVN: r108295
      Robert Dewar committed
  31. 15 Nov, 2005 1 commit
    • rtsfind.ads, [...]: Complete support for Ada 2005 interfaces. · f4d379b8
      2005-11-14  Hristian Kirtchev  <kirtchev@adacore.com>
      	    Javier Miranda  <miranda@adacore.com>
      
      	* rtsfind.ads, exp_util.adb, exp_util.ads, exp_disp.adb, exp_disp.ads,
      	exp_ch7.adb, sem_ch9.adb, snames.adb, snames.ads,
      	exp_ch9.adb, exp_ch9.ads, exp_ch6.adb, exp_ch3.adb, exp_ch3.ads,
      	einfo.ads, einfo.adb: Complete support for Ada 2005 interfaces.
      
      	* a-tags.ads, a-tags.adb: Major rewrite and additions to implement
      	properly new Ada 2005 interfaces (AI-345) and add run-time checks (via
      	assertions).
      
      	* exp_dbug.ads, exp_dbug.adb (Get_Secondary_DT_External_Name): New
      	subprogram that generates the external name associated with a
      	secondary dispatch table.
      	(Get_Secondary_DT_External_Name): New subprogram that generates the
      	external name associated with a secondary dispatch table.
      
      From-SVN: r106965
      Hristian Kirtchev committed
  32. 05 Sep, 2005 1 commit
    • a-tags.adb (IW_Membership): Give support to "Iface_CW_Typ in T'Class". · 10b93b2e
      2005-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
      	    Javier Miranda  <miranda@adacore.com>
      	    Gary Dismukes  <dismukes@adacore.com>
      	    Ed Schonberg  <schonberg@adacore.com>
      
      	* a-tags.adb (IW_Membership): Give support to
      	"Iface_CW_Typ in T'Class". For this purpose the functionality of this
      	subprogram has been extended to look for the tag in the ancestors tag
      	table.
      	Update the structure of the GNAT Dispatch Table to reflect the
      	additional two tables used in dispatching selects.
      	Introduce appropriate array types and record components in
      	Type_Specific_Data to reflect the two tables.
      	(Get_Entry_Index, Set_Entry_Index): Retrieve and set the entry index in
      	the TSD of a tag, indexed by position.
      	(Get_Prim_Op_Kind, Set_Prim_Op_Kind): Retrieve and set the primitive
      	operation kind in the TSD of a tag, indexed by position.
      
      	* a-tags.ads: Introduce an enumeration type to capture different
      	primitive operation kinds. Define a constant reflecting the number of
      	predefined primitive operations.
      	(Get_Entry_Index, Set_Entry_Index): Set and retrieve the entry index
      	of an entry wrapper.
      	(Get_Prim_Op_Kind, Set_Prim_Op_Kind): Set and retrieve the kind of
      	callable entity of a primitive operation.
      
      	* exp_ch3.adb (Freeze_Record_Type): Generate the declarations of the
      	primitive operations used in dispatching selects for limited
      	interfaces, limited tagged, task and protected types what implement a
      	limited interface.
      	(Freeze_Type): Generate the bodies of the primitive operations used in
      	dispatching selects for limited tagged, task and protected types that
      	implement a limited interface. Generate statements to populate the two
      	auxiliary tables used for dispatching in select statements.
      	(Freeze_Record_Type): Add call to initialize the dispatch table entries
      	associated with predefined interface primitive operations.
      	(Build_Dcheck_Function): Change Set_Subtype_Mark to
      	Set_Result_Definition.
      	(Build_Variant_Record_Equality): Change Subtype_Mark to
      	Result_Definition.
      	(Freeze_Enumeration_Type): Change Subtype_Mark to Result_Definition.
      	(Predef_Spec_Or_Body): Change Subtype_Mark to Result_Definition.
      	(Build_Assignment): Simplify the code that adds the run-time-check.
      	(Expand_N_Object_Declaration): Code cleanup.
      
      	* exp_ch7.adb (Make_Clean): Select the appropriate type for locking
      	entries when there is a protected type that implements a limited
      	interface.
      
      	* exp_ch9.adb: Add package Select_Expansion_Utilities that contains
      	common routines used in expansion of dispatching selects.
      	(Add_Private_Declarations): Select the appropriate protection type when
      	there is a protected type that implements a limited interface.
      	(Build_Parameter_Block): Generate a wrapped parameter block.
      	(Build_Protected_Subprogram_Body): Select the appropriate type for
      	locking entries when there is a protected type that implements a
      	limited interface.
      	(Build_Wrapper_Spec): Set the flag and wrapped entity for procedures
      	classified as entry wrappers.
      	(Expand_N_Asynchronous_Select): Add support for expansion of dispatching
      	asynchronous selects.
      	(Expand_N_Conditional_Entry_Call): Add support for expansion of
      	dispatching conditional selects.
      	(Expand_N_Protected_Type_Declaration): Select the appropriate type for
      	protection when there is a protected type that implements limited
      	interfaces.
      	(Expand_N_Timed_Entry_Call): Add support for expansion of dispatching
      	timed selects.
      	(Extract_Dispatching_Call): Extract the entity of the name of a
      	dispatching call, the object parameter, actual parameters and
      	corresponding formals.
      	(Make_Initialize_Protection): Correct logic of protection initialization
      	when there is a protected type that implements a limited interface.
      	(Parameter_Block_Pack): Populate a wrapped parameter block with the
      	values of actual parameters.
      	(Parameter_Block_Unpack): Retrieve the values from a wrapped parameter
      	block and assign them to the original actual parameters.
      
      	* exp_ch9.ads (Subprogram_Protection_Mode): New type.
      	(Build_Protected_Sub_Specification): Change the type and name of the
      	last formal to account for the increased variety of protection modes.
      
      	* einfo.ads, einfo.adb (Was_Hidden): New attribute. Present in all
      	entities. Used to save the value of the Is_Hidden attribute when the
      	limited-view is installed.
      	(Is_Primitive_Wrapper, Set_Is_Primitive_Wrapper): Retrieve and change
      	the attribute of procedures classified as entry wrappers.
      	(Wrapped_Entity, Set_Wrapped_Entity): Retrieve and change the wrapped
      	entity of a primitive wrapper.
      	(Write_Entity_Flags): Output the name and value of the
      	Is_Primitive_Wrapper attribute.
      	(Write_Field27_Name): Output the name and entity of the field Wrapped_
      	Entity.
      	(Underlying_Type): If we have an incomplete entity that comes from
      	the limited view then we return the Underlying_Type of its non-limited
      	view if it is already available.
      	(Abstract_Interface_Alias): Flag applies to all subrogram kinds,
      	including operators.
      	(Write_Field26_Name): Add entry for Overridden_Operation
      	(Overridden_Operation): New attribute of functions and procedures.
      
      	* exp_disp.ads, exp_disp.adb (Default_Prim_Op_Position): Return a
      	predefined position in the dispatch table for the primitive operations
      	used in dispatching selects.
      	(Init_Predefined_Interface_Primitives): Remove the hardcoded number of
      	predefined primitive operations and replace it with
      	Default_Prim_Op_Count.
      	(Make_Disp_Asynchronous_Select_Spec, Make_Disp_Conditional_Select_Spec,
      	Make_Disp_Get_Prim_Op_Kind_Spec, Make_Disp_Timed_Select_Spec): Update
      	the names of the generated primitive operations used in dispatching
      	selects.
      	(Init_Predefined_Interface_Primitives): No need to inherit primitives in
      	case of abstract interface types. They will be inherit by the objects
      	implementing the interface.
      	(Make_DT): There is no need to inherit the dispatch table of the
      	ancestor interface for the elaboration of abstract interface types.
      	The dispatch table will be inherited by the object implementing the
      	interface.
      	(Copy_Secondary_DTs): Add documentation.
      	(Validate_Position): Improve this static check in case of
      	aliased subprograms because aliased subprograms must have
      	the same position.
      	(Init_Predefined_Interface_Primitives): New subprogram that initializes
      	the entries associated with predefined primitives of all the secondary
      	dispatch tables.
      	(Build_Anonymous_Access_Type): Removed.
      	(Expand_Interface_Actuals): With the previous cleanup there is no need
      	to build an anonymous access type. This allows further cleanup in the
      	code generated by the expander.
      	(Expand_Interface_Conversion): If the actual is an access type then
      	build an internal function to handle the displacement. If the actual
      	is null this function returns null because no displacement is
      	required; otherwise performs a type conversion that will be
      	expanded in the code that returns the value of the displaced actual.
      	(Expand_Interface_Actuals): Avoid the generation of unnecessary type
      	conversions that have no effect in the generated code because no
      	displacement is required. Code cleanup; use local variables to
      	avoid repeated calls to the subprogram directly_designated_type().
      
      	* exp_util.ads, exp_util.adb (Is_Predefined_Dispatching_Operation):
      	Classify the primitive operations used in dispatching selects as
      	predefined.
      	(Implements_Limited_Interface): Determine whether some type either
      	directly implements a limited interface or extends a type that
      	implements a limited interface.
      	(Build_Task_Image_Function): Change Subtype_Mark to Result_Definition.
      	(Expand_Subtype_From_Expr): Do not build actual subtype if the
      	expression is limited.
      	(Find_Interface_Tag): Add code to handle class-wide types and
      	entities from the limited-view.
      
      	* rtsfind.ads: Add entries in RE_Id and RE_Unit_Table for
      	Get_Entry_Index, Get_Prim_Op_Kind, POK_Function, POK_Procedure,
      	POK_Protected_Entry, POK_Protected_Function, POK_Protected_Procedure,
      	POK_Task_Entry, POK_Task_Procedure, Prim_Op_Kind, Set_Entry_Index,
      	Set_Prim_Op_Kind.
      
      	* sem_ch9.adb (Analyze_Triggering_Alternative): Check for legal type
      	of procedure name or prefix that appears as a trigger in a triggering
      	alternative.
      
      	* uintp.ads: Introduce constants Uint_11 and Uint_13.
      
      From-SVN: r103850
      Hristian Kirtchev committed
  33. 01 Jul, 2005 1 commit