exp_ch3.ads
8.27 KB
-
exp_ch3.ads, [...] (Add_Final_Chain): New subprogram. · 04df6250
2007-08-14 Thomas Quinot <quinot@adacore.com> Ed Schonberg <schonberg@adacore.com> Javier Miranda <miranda@adacore.com> Robert Dewar <dewar@adacore.com> * exp_ch3.ads, exp_ch3.adb (Add_Final_Chain): New subprogram. (Freeze_Array_Type, Freeze_Record_Type): For the case of a component type that is an anonymous access to controlled object, establish an associated finalization chain to avoid corrupting the global finalization list when a dynamically allocated object designated by such a component is deallocated. (Make_Controlling_Function_Wrappers): Create wrappers for constructor functions that need it, even when not marked Requires_Overriding. (Initialize_Tag): Replace call to has_discriminants by call to Is_Variable_Size_Record in the circuitry that handles the initialization of secondary tags. (Is_Variable_Size_Record): New implementation. (Expand_N_Object_Declaration): Suppress call to init proc if there is a Suppress_Initialization pragma for a derived type. (Is_Variable_Size_Record): New subprogram. (Build_Offset_To_Top_Functions): New implementation that simplifies the initial version of this routine and also fixes problems causing incomplete initialization of the table of interfaces. (Build_Init_Procedure): Improve the generation of code to initialize the the tag components of secondary dispatch tables. (Init_Secondary_Tags): New implementation that simplifies the previous version of this routine. (Make_DT): Add parameter to indicate when type has been frozen by an object declaration, for diagnostic purposes. (Check_Premature_Freezing): New subsidiary procedure of Make_DT, to diagnose attemps to freeze a subprogram when some untagged type of its profile is a private type whose full view has not been analyzed yet. (Freeze_Array_Type): Generate init proc for packed array if either Initialize or Normalize_Scalars is set. (Make_Controlling_Function_Wrappers, Make_Null_Procedure_Specs): when constructing the new profile, copy the null_exclusion indicator for each parameter, to ensure full conformance of the new body with the spec. * sem_type.ads, sem_type.adb (Make_Controlling_Function_Wrappers): Create wrappers for constructor functions that need it, even when not marked Requires_Overriding. (Covers): Handle properly designated types of anonymous access types, whose non-limited views are themselves incomplete types. (Add_Entry): Use an entity to store the abstract operation which hides an interpretation. (Binary_Op_May_Be_Hidden): Rename to Binary_Op_Interp_Has_Abstract_Op. (Collect_Interps): Use Empty as an actual for Abstract_Op in the initialization aggregate. (Function_Interp_May_Be_Hidden): Rename to Function_Interp_Has_Abstract_Op. (Has_Compatible_Type): Remove machinery that skips interpretations if they are labeled as potentially hidden by an abstract operator. (Has_Hidden_Interp): Rename to Has_Abstract_Op. (Set_May_Be_Hidden): Rename to Set_Abstract_Op. (Write_Overloads): Output the abstract operator if present. (Add_Entry): Before inserting a new entry into the interpretation table for a node, determine whether the entry will be disabled by an abstract operator. (Binary_Op_Interp_May_Be_Hidden): New routine. (Collect_Interps): Add value for flag May_Be_Hidden in initialization aggregate. (Function_Interp_May_Be_Hidden): New routine. (Has_Compatible_Type): Do not consider interpretations hidden by abstract operators when trying to determine whether two types are compatible. (Has_Hidden_Interp): New routine. (Set_May_Be_Hidden_Interp): New routine. (Write_Overloads): Write the status of flag May_Be_Hidden. From-SVN: r127417
Thomas Quinot committed