Commit Graph

11 Commits (f6279a64b5f8812fed05e8bfeaa9bffcf7b6933f)

Author SHA1 Message Date
Xavier Leroy ccb7829ddc 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".
2020-06-22 19:37:22 +02:00
KC Sivaramakrishnan 9355b4e8f5
Initialise in caml_obj_block / Obj.new_block only when necessary (#9513)
caml_alloc returns initialised blocks for tag < No_scan_tag. Otherwise,
initialise the blocks as necessary.

For Abtract_tag, Double_tag and Double_array_tag, the initial contents
are irrelevant.

Uninitialised Custom_tag objects are difficult to use correctly. Hence,
reject custom block allocations through Obj.new_block.

For String_tag, the last byte encodes the string length. Hence, reject
zero-length string objects. Initialise the last byte which encodes the
length to ensure non-negative lengths for uninitialised strings.
2020-05-02 18:47:16 +02:00
Nicolás Ojeda Bär 3d7fc7530a Remove ocamltests files 2019-09-28 18:03:59 +02:00
David Allsopp 1626a018d8 Remove unnecessary executable bit from sources (#2270)
Various files which seem to have acquired Git executable bits.
File contents are unchanged; only permissions are changed.
2019-02-28 16:29:26 +01:00
Stephen Dolan a17b37c7ac Changes entry and review fixes 2019-02-12 15:22:37 +00:00
Stephen Dolan 51025d1729 Add optimisations in simplif.ml for Obj.with_tag. 2019-02-12 11:13:55 +00:00
Stephen Dolan c39f771a33 Deprecate Obj.set_tag.
- Adds Obj.with_tag as a partial replacement.
  - Adds caml_obj_make_forward for use of Camlinternal{Lazy,Mod}
2019-02-12 11:13:48 +00:00
Nicolas Ojeda Bar bd490da145 Migrate lib-obj test to ocamltest 2017-12-05 17:18:35 +01:00
Sébastien Hinderer 905658ee62 Remove copyright notices in test files.
It is preferred that no copyright notice appears in these files.

The list of files to modify has been obtained with the following command:

    ocaml/testsuite/tests$ find . -name '*.ml*' \
    | xargs grep -l -i copyright \
    > test-files-with-copyright-header
2016-05-03 07:37:48 -04:00
alainfrisch 5329570097 GPR#560: fix test (avoid letting flambda statically allocate dynamic values). 2016-05-03 09:32:28 +02:00
alainfrisch 4cfc7db63e GPR#560: add test. 2016-05-02 18:14:34 +02:00