exp_strm.adb
55.3 KB
-
sem_ch3.ads, [...] (Analyze_Object_Declaration): Go to the underlying type to… · 9dfd2ff8
sem_ch3.ads, [...] (Analyze_Object_Declaration): Go to the underlying type to check if a type is Constrained in cases related to... 2005-09-01 Cyrille Comar <comar@adacore.com> Gary Dismukes <dismukes@adacore.com> Ed Schonberg <schonberg@adacore.com> Javier Miranda <miranda@adacore.com> * sem_ch3.ads, sem_ch3.adb (Analyze_Object_Declaration): Go to the underlying type to check if a type is Constrained in cases related to code generation (rather than semantic checking) since otherwise we do not generate similar code for mutable private types depending if their discriminants are visible or not. (Check_Abstract_Overriding): Do not complain about failure to override the primitive operations used in dispatching selects since they will always be overriden at the freeze point of the type. (Access_Definition): Separate out handling for resetting the scope of an anonymous access function result type. Retrieve the scope of the associated function rather than using Current_Scope, which does not have a consistent value (depends on whether we're in the middle of analyzing formal parameters). Add ??? comment about finding a cleaner way to handle the special cases of scope setting. (Process_Incomplete_Dependents): A protected operation is never a dispatching operation (only its wrapper may be). (Build_Derived_Record_Type): In case of tagged private types that implement interfaces add derivation of predefined primitive operations. (Derive_Subprograms): Replace the Is_Interface_Derivation parameter by two parameters that are used in case of derivation from abstract interface types: No_Predefined_Prims is used to avoid the derivation of predefined primitives from the interface, and Predefined Prims_Only is used to complete the derivation predefined primitives in case of private tagged types implementing interfaces. Fix typo in comments (Find_Interface_In_Descendant): Protect the frontend against wrong code with large circularity chains. (Is_Private_Overriding): Add support for entities overriding interface subprograms. The test failed because Entities associated with overriden interface subprograms are always marked as hidden (and used to build the secondary dispatch table); in this case the overriden entity is available through the field abstract_interface_alias (cf. override_ dispatching_operation) (Access_Definition): Set the scope of the type to Current_Scope for the case of a function with an anonymous access result type. (Access_Subprogram_Declaration): Handle creation of the type entity for an access-to-function type with an anonymous access result. (Check_Anonymous_Access_Types): Change Subtype_Mark to Result_Definition in handling for N_Access_Function_Definition. (Analyze_Subtype_Declaration): Modify the text of error message. (Derived_Type_Declaration): Modify the text of error message. (Process_Subtype): Modify the text of error message plus cleanup of one redundant error message. (Analyze_Component_Declaration): Code cleanup. (Analyze_Object_Declaration): Code cleanup. (Analyze_Subtype_Declaration): Propagate the null-exclusion attribute in case of access types. Code cleanup. (Array_Type_Declaration): Code cleanup. (Process_Discriminants): Create the new null-excluding itype if required. Code cleanup. (Process_Subtype): Create the new null-excluding itype if required. Code cleanup. (Build_Derived_Record_Type): Code cleanup to avoid calling twice the subprogram derive_subprograms in case of private types that implement interfaces. In this particular case the subprogram Complete_Subprograms_Derivation already does the job associated with the second call. * exp_strm.adb (Build_Elementary_Input_Call): Add an explicit conversion to the full view when generating an operation for a discriminant whose type may currently be private. From-SVN: r103881
Cyrille Comar committed