CVS difference for ais/ai-00280.txt
--- ais/ai-00280.txt 2002/04/26 20:15:17 1.3
+++ ais/ai-00280.txt 2003/03/04 04:56:22 1.4
@@ -1,4 +1,4 @@
-!standard 9.04 (20) 02-04-19 AI95-00280/02
+!standard 9.04 (20) 03-02-19 AI95-00280/03
!standard 4.08 (11)
!class binding interpretation 01-12-21
!status work item 01-12-21
@@ -20,8 +20,8 @@
access type has begun:
If the designated type has a controlled or protected part, Program_Error
is raised.
- Otherwise, a bound error occurs, either raising Program_Error
- or working normally (possibly without finalization of the object).
+ Otherwise, a bounded error occurs, either raising Program_Error
+ or working normally.
!question
@@ -116,7 +116,7 @@
procedure Free is new Ada.Unchecked_Deallocation (T2, T2_Ref);
end P;
-Assuming that Ref's finalization is non-null (i.e. that the set of allocated
+Assuming that T2_Ref's finalization is non-null (i.e. that the set of allocated
objects to be iterated over is non-empty), P.T2's Finalize procedure will be
invoked during P.T2_Ref's collection finalization.
@@ -157,13 +157,18 @@
an allocation occurs after collection finalization has started. However, this
check is a distributed overhead on allocations, and provides no benefit for
types with a trivial finalization. Thus, we require this check only for access
-types that could a non-trivial finalization. For other types, this case is
+objects that have a non-trivial finalization. For other objects, this case is
declared to be a bounded error, allowing implementation to make the check if
-they wish, or ignore the problem (as there is no ill effect).
+they wish, or ignore the problem (as there is no ill effect). This minimizes
+the overhead.
-This rule is complicated slightly, as class-wide types could have an extension
-which later adds a controlled or protected part. Thus we have to include all
-class-wide types in the required check category.
+Since we only require the check when the object has non-trivial finalization,
+it is possible for objects (with trivial finalization) to be allocated for a
+collection which has other objects with non-trivial finalization. This can
+happen for an access to a class-wide type, where some extensions have
+non-trivial finalization. If allowing the allocation of such objects is a
+problem for an implementation, the implementation can always detect the
+bounded error (that is, make the check) for all allocators for that collection.
Similarly, an allocation of a task for a master which has completed waiting
@@ -172,21 +177,26 @@
!corrigendum 04.08(11)
-@drepl
+@dinsb
If the created object contains any tasks, they are activated (see 9.2).
Finally, an access value that designates the created object is returned.
-@dby
+@dinss
+If the created object contains any tasks, they are activated (see 9.2).
+Finally, an access value that designates the created object is returned.
If the created object contains any tasks, and the master of the type
of the @fa<allocator> has finished waiting for dependent tasks (see 9.3),
Program_Error is raised.
-If the designated type of the type of the @fa<allocator> is class-wide or
-has a controlled or protected part, and the finalization of the collection
-of the type of the allocator (see 7.6.1) has started, Program_Error is raised.
+If the object created by the @fa<allocator> has a controlled or protected part,
+and the finalization of the collection of the type of the allocator (see 7.6.1)
+has started, Program_Error is raised.
+!corrigendum 04.08(11)
+
+@dinsa
If the created object contains any tasks, they are activated (see 9.2).
Finally, an access value that designates the created object is returned.
-
+@dinst
@s8<@i<Bounded (Run-Time) Errors>>@hr
It is a bounded error if the finalization of the collection of the type
Questions? Ask the ACAA Technical Agent