Skip to content
Success

Changes

Summary

  1. configure: add a NAKED_POINTERS parameter to Makefile.config (commit: 41227a1) (details)
  2. ocamltest: add the "naked_pointers" action (commit: 133102c) (details)
  3. Revise testing of Obj.reachable_words (commit: ccb7829) (details)
  4. Reimplement Obj.reachable_word using a hash table to detect sharing (commit: e52bf32) (details)
  5. Changes entry for #9678 (commit: 7e4ef62) (details)
Commit 41227a1ebaf9bc519d112682f1e1ae3bfb3960a8 by xavier.leroy
configure: add a NAKED_POINTERS parameter to Makefile.config

We have NAKED_POINTERS=false if configured with --disable-naked-pointers,
NAKED_POINTERS=true otherwise.
(commit: 41227a1)
The file was modifiedMakefile.config.in (diff)
The file was modifiedconfigure (diff)
The file was modifiedconfigure.ac (diff)
Commit 133102cfc7d261d381ac93df016e43b98ab0d712 by xavier.leroy
ocamltest: add the "naked_pointers" action

It succeeds if the runtime system supports naked pointers,
and fails otherwise (e.g. if configured with --disable-naked-pointers).
(commit: 133102c)
The file was modifiedocamltest/Makefile (diff)
The file was modifiedocamltest/ocamltest_config.ml.in (diff)
The file was modifiedocamltest/ocamltest_config.mli (diff)
The file was modifiedocamltest/builtin_actions.ml (diff)
Commit ccb7829ddcc4a07ab2f241d8735511f2b212b9f5 by xavier.leroy
Revise testing of Obj.reachable_words

Part of the test makes sense only if the runtime system supports
naked pointers and has a page table to distinguish major heap pointers
from out-of-heap pointers.

This part is split off in a new test, lib-obj/reachable_words_np.ml,
conditionalized on "naked_pointers".
(commit: ccb7829)
The file was addedtestsuite/tests/lib-obj/reachable_words_np.ml
The file was modifiedtestsuite/tests/lib-obj/reachable_words.ml (diff)
Commit e52bf321fd2323787fa443a0999a9fd5bb6b2ecb by xavier.leroy
Reimplement Obj.reachable_word using a hash table to detect sharing

The previous implementation (caml_obj_reachable_words in runtime/obj.c)
was using the mark bits of block headers to detect sharing.

This is not compatible with Multicore OCaml.

This commit reimplements caml_obj_reachable_words to detect sharing
with a hash table of addresses already seen.

The implementation reuses the hash table used to detect sharing
during marshaling (commit 67ada54ce), and other bits of the marshaler,
hence the function caml_obj_reachable_words was moved to runtime/extern.c.

In no-naked-pointers mode, to anticipate the disappearance of the page
table, statically-allocated blocks cannot be treated specially and will
be counted towards the size.  This change of semantics is mentioned
in the documentation for Obj.reachable_words.
(commit: e52bf32)
The file was modifiedruntime/extern.c (diff)
The file was modifiedstdlib/obj.mli (diff)
The file was modifiedruntime/obj.c (diff)
The file was modifiedChanges (diff)