[Changes] the C-layout of weak arrays changed

master
François Bobot 2016-03-17 11:27:03 +01:00 committed by Damien Doligez
parent 17b64ac2b2
commit 83ff5cb963
2 changed files with 7 additions and 2 deletions

View File

@ -3443,6 +3443,9 @@ OCaml 4.03.0 (25 Apr 2016):
now support marshaled data bigger than 4 Gb.
(Xavier Leroy)
* GPR#22: The undocumented layout of weak arrays has been changed. Finalisation
functions are now run before the erasure of the corresponding values.
* GPR#226: select higher levels of optimization for GCC >= 3.4 and Clang
when compiling the run-time system and C stub code.
"-std=gnu99 -O2 -fno-strict-aliasing -fwrapv" is used by default.

View File

@ -22,8 +22,10 @@ type 'a t
(** The type of arrays of weak pointers (weak arrays). A weak
pointer is a value that the garbage collector may erase whenever
the value is not used any more (through normal pointers) by the
program. Note that finalisation functions are run after the
weak pointers are erased.
program. Note that finalisation functions are run before the
weak pointers are erased, because the finalisation functions
can make values alive again (before 4.03 the finalisation
functions were run before).
A weak pointer is said to be full if it points to a value,
empty if the value was erased by the GC.