Skip to content

Commit 038fd65

Browse files
committed
Address last round of comments
1 parent 5f00bd1 commit 038fd65

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

considered/rfc-generalized-finalization.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ existing code in many different ways. One such example is illustrated below:
3737

3838
```ada
3939
type T is tagged null record;
40-
type U is record;
40+
type U is null record;
4141
4242
function F (X : T) return U;
4343
```
@@ -115,10 +115,10 @@ The `Relaxed_Finalization` configuration value is `True` by default, which
115115
implies that:
116116

117117
* The compiler has permission to perform no automatic finalization of heap
118-
allocated objects: `Finalize` is only called when an object is implicitly
119-
deallocated. As a consequence, no-runtime support is needed for the implicit
120-
case, and no header will be maintained for this in heap-allocated controlled
121-
objects.
118+
allocated objects: `Finalize` is only called when an object is explicitly
119+
deallocated, or when the pointed object is assigned a new value. As a
120+
consequence, no-runtime support is needed for the implicit case, and no
121+
header will be maintained for this in heap-allocated controlled objects.
122122

123123
Heap-allocated objects allocated through a nested access type definition will
124124
hence **not** be deallocated either. The result is simply that memory will be
@@ -147,9 +147,14 @@ This aspect shall be explicitly defined only on:
147147
* Record types, tagged or not
148148
* Private types for which the full-view is a record type
149149

150+
<<<<<<< Updated upstream
150151
Note in particular that it cannot be defined on a derived type.
151152

152153
Any type that has a `Finalizable` aspect is a by-reference type.
154+
=======
155+
Any type that has a `Finalizable` aspect will automatically become a
156+
by-reference type.
157+
>>>>>>> Stashed changes
153158
154159
The aspect is inherited by derived types. The compiler-generated calls to the
155160
user-defined operations should then be dispatching whenever it makes sense,
@@ -267,8 +272,9 @@ TBD.
267272
Rationale and alternatives
268273
==========================
269274

270-
The rationale for defining the `No_Raise` aspect in such a way will be put here
271-
because it's essentially linked to its use in Finalization. We think it's fundamental that:
275+
The rationale for defining the relaxation of errors in `Relaxed_Finalization`
276+
mode, and the `No_Raise` aspect in such a way will be put here. We think it's
277+
fundamental that:
272278

273279
1. In development/testing setups, a finalizer raising an exception is as noisy
274280
as possible and crashes the application early

0 commit comments

Comments
 (0)