CVS difference for ais/ai-00416.txt

Differences between 1.7 and version 1.8
Log of other versions for file ais/ai-00416.txt

--- ais/ai-00416.txt	2005/05/07 02:15:03	1.7
+++ ais/ai-00416.txt	2005/05/10 04:15:17	1.8
@@ -1,4 +1,4 @@
-!standard 3.2.3(01)                                     05-04-17  AI95-00416/06
+!standard 3.2.3(01)                                     05-05-05  AI95-00416/07
 !standard 3.3(10)
 !standard 3.7(27)
 !standard 3.9.2(02)
@@ -27,10 +27,11 @@
 !standard 9.2(04)
 !standard 13.11(25)
 !standard 13.11.2(9)
+!standard 13.11.2(10)
 !standard 13.11.2(17)
 !class amendment 05-02-07
 !status Amendment 200Y 05-03-16
-!comment This AI is in the Amendment, but is not yet approved.
+!status ARG Approved 8-0-1  05-04-18
 !status work item 05-02-07
 !status received 05-02-07
 !priority High
@@ -383,7 +384,7 @@
     then either the return_subtype_indication (if any) is constrained,
     or there must be a return expression.
 
-Modify 6.5(5.5/2) as follows:
+Add the paragraph inserted before 6.5(6) by AI95-00318:
 
 	For the execution of an extended_return_statement, the
 	subtype_indication or access_definition is elaborated. This creates
@@ -478,12 +479,14 @@
 
 Change 9.2(2):
 
-     A task object (which represents one task) can be {a part of a
-     stand-alone object, of an object created by an allocator, or of an
-     anonymous object of a limited type} [created either as part of the
+     A task object (which represents one task) can be {a part
+     of a stand-alone object, of an object created by an allocator, or of an
+     anonymous object of a limited type, or a coextension of one of these}
+     [created either as part of the
      elaboration of an object_declaration occurring immediately within
      some declarative region, or as part of the evaluation of an
-     allocator]. All tasks {that are part of any of the stand-alone objects}
+     allocator]. All tasks {that are part or coextensions of any of the
+     stand-alone objects}
      created by the elaboration of object_declarations {(or
      generic_associations of formal objects of mode IN)} of a single
      declarative region [(including subcomponents of the declared
@@ -491,8 +494,8 @@
      the evaluation of a single allocator are activated together. The
      activation of a task is associated with the innermost allocator or
      object_declaration that is responsible for its creation.] {All
-     tasks that are part of a single object that is not a stand-alone
-     object are activated together.}
+     tasks that are part or coextensions of a single object that is not a
+     stand-alone object are activated together.}
 
 Change 9.2(3):
      For {the} tasks [created by the elaboration of object_declarations] of a
@@ -501,27 +504,31 @@
 
 Change 9.2(4):
 
-     {For tasks that are part of a single object that is not a stand-alone
-     object, activations are initiated after completing any
+     {For tasks that are part or coextensions of a single object that is
+     not a stand-alone object, activations are initiated after completing any
      initialization of the outermost object enclosing these tasks, prior
      to performing any other operation on the outermost object. In
-     particular, for} [For] tasks {that are part of the object} created
+     particular, for} [For] tasks {that are part or coextensions of the
+     object} created
      by the evaluation of an allocator, the activations are initiated as
      the last step of evaluating the allocator, [after completing any
      initialization for the object created by the allocator, and] prior
-     to returning the new access value. {For tasks that are part of an
+     to returning the new access value. {For tasks that are part or
+     coextensions of an
      object that is the result of a function call, the activations are
      not initiated until after the function returns.}
 
    AARM NOTE:
-     The intent is that "temporary" objects with task parts are treated
-     similarly to an object created by an allocator. The "whole" object
-     is initialized, and then all of the task parts are activated together.
+     The intent is that "temporary" objects with task parts (or coextensions)
+     are treated similarly to an object created by an allocator. The "whole"
+     object is initialized, and then all of the task parts (including the
+     coextensions) are activated together.
      Each such "whole" object has its own task activation sequence, involving
      the activating task being suspended until all the new tasks complete
      their activation.
 
-Change 13.11(25.1/2) as follows:
+Change the first bullet added by the replacement of 13.11(25) in AI-230
+as follows:
 
     * If the allocator is [initializing an access discriminant of an object
       of a limited type, and the discriminant is itself a subcomponent]
@@ -546,11 +553,13 @@
       object being freed contains tasks, the object might not be
       deallocated.
 
+Change 13.11.2(10) as follows:
+
    After Free(X), the object designated by X, and any subcomponents {(and
    coextensions)} thereof, no longer exist; their storage can be reused
    for other purposes.
 
-Delete 13.11.2(17.1/2).
+Delete the paragraph added after 13.11.2(17) by AI-162.
 
 !discussion
 
@@ -656,6 +665,16 @@
 operations of the type, plus any user-defined primitive subprograms.
 
 
+!corrigendum 3.3(10)
+
+@drepl
+@xbullet<the result of evaluating
+a function_call (or the equivalent operator invocation - see 6.6);>
+@dby
+@xbullet<the return object created as the result of evaluating
+a function_call (or the equivalent operator invocation - see 6.6);>
+
+
 !corrigendum 3.7(27)
 
 @drepl
@@ -778,6 +797,21 @@
 its controlling tag value is determined by the target;>
 
 
+!corrigendum 3.10.2(07)
+
+@drepl
+@xbullet<An entity or view created by a declaration has the same accessibility
+level as the innermost enclosing master, except in the cases of renaming and
+derived access types described below. A parameter of a master has the same
+accessibility level as the master.>
+@dby
+@xbullet<An entity or view defined by a declaration and created as part of
+its elaboration has the same accessibility
+level as the innermost master (other than the declaration itself),
+except in the cases of renaming and derived access types described below. A
+parameter of a master has the same accessibility level as the master.>
+
+
 !corrigendum 3.10.2(09)
 
 @drepl
@@ -853,11 +887,12 @@
 the same as that of the access type.>
 @dby
 @xbullet<The accessibility level of an object created by an @fa<allocator> is
-the same as that of the access type, except for an @fa<allocator> that
-defines the value of an access parameter or an access discriminant.
-For an access parameter, the accessibility level is that of the
-master immediately enclosing the call. For an access discriminant,
-the accessibility level is determined as follows:>
+the same as that of the access type, except for an @fa<allocator> of an
+anonymous access type that defines the value of an access parameter or
+an access discriminant. For an @fa<allocator> defining the value of
+an access parameter, the accessibility level is that of the
+master immediately enclosing the call. For one defining an access
+discriminant, the accessibility level is determined as follows:>
 
 @xinbull<for an @fa<allocator> used to define the constraint in a
 @fa<subtype_declaration>, the level of the @fa<subtype_declaration>;>
@@ -868,6 +903,13 @@
 @xinbull<for an @fa<allocator> used to define the discriminant of an object,
 the level of the object.>
 
+@xindent<In this last case, the allocated object is said to be a
+@i<coextension> of the object whose discriminant designates it, as well as of
+any object of which the discriminated object is itself a coextension or
+subcomponent. All coextensions of an object are finalized when the object is
+finalized (see 7.6.1).>
+
+
 !corrigendum 04.08(05)
 
 @dinsa
@@ -970,8 +1012,10 @@
 @fa<subtype_indication> or @fa<access_definition> is elaborated. This creates
 the nominal subtype of the return object. If there is a return expression,
 it is evaluated and converted
-to the nominal subtype (which might raise Constraint_Error -- see 4.6) and
+to the nominal subtype (which might raise Constraint_Error -- see 4.6); the
+return object is created and the converted value
 becomes the initial value of the return object; otherwise, the return object is
+created and
 initialized by default as for a stand-alone object of its nominal subtype
 (see 3.3.1). If the nominal subtype is indefinite, the return object is
 constrained by its initial value. The @fa<handled_sequence_of_statements>, if
@@ -1041,6 +1085,28 @@
 finalized after it is complete, and before it is left.
 
 
+!corrigendum 7.6.1(09)
+
+@drepl
+@xbullet<If the object is of a composite type, then after performing the above
+actions, if any, every component of the object is finalized in an arbitrary
+order, except as follows: if the object has a component with an access
+discriminant constrained by a per-object expression, this component is
+finalized before any components that do not have such discriminants; for an
+object with several components with such a discriminant, they are finalized in
+the reverse of the order of their @fa<component_declaration>s.>
+@dby
+@xbullet<If the object is of a composite type, then after performing the above
+actions, if any, every component of the object is finalized in an arbitrary
+order, except as follows: if the object has a component with an access
+discriminant constrained by a per-object expression, this component is
+finalized before any components that do not have such discriminants; for an
+object with several components with such a discriminant, they are finalized in
+the reverse of the order of their @fa<component_declaration>s;>
+
+@xbullet<If the object has coextensions (see 3.10.2), each coextension is
+finalized after the object whose access discriminant designates it.>
+
 !corrigendum 9.2(02)
 
 @drepl
@@ -1056,12 +1122,13 @@
 @dby
 A task object (which represents one task) can be a part of a
 stand-alone object, of an object created by an @fa<allocator>, or of an
-anonymous object of a limited type. All tasks that are part of any
+anonymous object of a limited type, or a coextension of one of these.
+All tasks that are part or coextensions of any
 of the stand-alone objects created by the elaboration of
 @fa<object_declaration>s (or @fa<generic_association>s of formal objects of
 mode @b<in>) of a single declarative region are activated together. All tasks
-that are part of a single object that is not a stand-alone object are activated
-together.
+that are part or coextensions of a single object that is not a stand-alone
+object are activated together.
 
 
 !corrigendum 9.2(03)
@@ -1091,16 +1158,79 @@
 any initialization for the object created by the @fa<allocator>, and prior to
 returning the new access value.
 @dby
-For tasks that are part of a single object that is not a stand-alone
-object, activations are initiated after completing any
+For tasks that are part or coextensions of a single object that is not a
+stand-alone object, activations are initiated after completing any
 initialization of the outermost object enclosing these tasks, prior
 to performing any other operation on the outermost object. In
-particular, for tasks that are part of the object created
+particular, for tasks that are part or coextensions of the object created
 by the evaluation of an @fa<allocator>, the activations are initiated as
 the last step of evaluating the @fa<allocator>, prior
-to returning the new access value. For tasks that are part of an
-object that is the result of a function call, the activations are
+to returning the new access value. For tasks that are part or coextensions
+of an object that is the result of a function call, the activations are
 not initiated until after the function returns.
+
+
+!corrigendum 13.11(25)
+
+@drepl
+A storage pool for an anonymous access type should be created at the point of
+an allocator for the type, and be reclaimed when the designated object becomes
+inaccessible.
+@dby
+The storage pool used for an @fa<allocator> of an anonymous access type should
+be determined as follows:
+@xbullet<If the @fa<allocator> is defining a coextension (see 3.10.2) of an
+object being created by an outer @fa<allocator>, then the storage pool used
+for the outer @fa<allocator> should also be used for the coextension;>
+@xbullet<Otherwise, the storage pool should be created at the point of the
+@fa<allocator>, and be reclaimed when the allocated object becomes
+inaccessible.>
+
+!corrigendum 13.11.2(9)
+
+@drepl
+@xhang<@xterm<3.>Free(X), when X is not equal to null first performs
+finalization, as described in 7.6. It then deallocates the storage
+occupied by the object designated by X. If
+the storage pool is a user-defined object, then the storage is
+deallocated by calling Deallocate, passing
+access_to_variable_subtype_name'Storage_Pool as the Pool
+parameter. Storage_Address is the value returned in the
+Storage_Address parameter of the corresponding Allocate call.
+Size_In_Storage_Elements and Alignment are the same values passed
+to the corresponding Allocate call. There is one exception: if the
+object being freed contains tasks, the object might not be
+deallocated.
+@dby
+@xhang<@xterm<3.>Free(X), when X is not equal to null first performs
+finalization of the object designated by X (and any coextensions of the
+object @emdash see 3.10.2), as described in 7.6.1. It then deallocates the
+storage occupied by the object designated by X (and any coextensions). If
+the storage pool is a user-defined object, then the storage is
+deallocated by calling Deallocate, passing
+access_to_variable_subtype_name'Storage_Pool as the Pool
+parameter. Storage_Address is the value returned in the
+Storage_Address parameter of the corresponding Allocate call.
+Size_In_Storage_Elements and Alignment are the same values passed
+to the corresponding Allocate call. There is one exception: if the
+object being freed contains tasks, the object might not be
+deallocated.
+
+!corrigendum 13.11.2(10)
+
+@drepl
+After Free(X), the object designated by X, and any subcomponents
+thereof, no longer exist; their storage can be reused
+for other purposes.
+@dby
+After Free(X), the object designated by X, and any subcomponents (and
+coextensions) thereof, no longer exist; their storage can be reused
+for other purposes.
+
+
+!comment !corrigendum 13.11.2(17)
+!comment This just removes the change made by AI-00416. It is removed
+!comment there, and nothing need be done here.
 
 
 !ACATS test

Questions? Ask the ACAA Technical Agent