Earlier documentation comments suggested that major GC hooks can do things with the GC-managed heap. This is problematic and not used in practice.
This commit changes the documentation comments to make it clear that major GC hools are not allowed to interact with the GC-managed heap.
Use unsigned comparisons (jb/ja) in amd64 and i386 emitters of Lcondbranch3,
instead of the previous mixture of unsigned and signed comparisons (jb/jg).
--with-pic should be adding -fPIC (or equivalent) to $internal_cflags,
not $common_cflags. Additionally, unused variable aspp was being
updated, instead of ASPP.
Allocations ignored by this version
- Marshalling
- In the minor heap by natively-compiled OCaml code
Allocations potentially sampled
- In the major heap
- In the minor heap by C code and OCaml code in bytecode mode
Just for this one, I gave up on the idea of sorting the items by issue
number, and I tried to put first the items that will be of interest to
the widest number of users. (Within each section, and then sections
ordered following roughly the same principle.) Very subjective and
objectionable, but there you go.
This commit replaces a few configure command-line options by configuration
variables:
- "--with-dllibs" is replaced by DLLIBS
- "--with-reserved-header-bits" is replaced by RESERVED_HEADER_BITS
- "--with-default-string" is replaced by DEFAULT_STRING
When the old value was static (i.e., boxed, but outside of the major
and the minor heaps) but the new value pointed to one of the two
heaps, then the root was not re-inserted in the lists.
Dually, when the new value is static but the old only points to one of
the two heaps, then the root has to be removed, otherwise it will stay
in the lists, and be scanned by the GC even after being unregistered.
If an allocation fails, the decrement of young_ptr should be undone
before the GC is entered. This happened correctly on bytecode but not
on native code.
This commit (squash of pull request #8619) fixes it for all the
platforms supported by ocamlopt.
amd64: add alternate entry points caml_call_gc{1,2,3} for code size
optimisation.
powerpc: introduce one GC call point per allocation size per function.
Each call point corrects the allocation pointer r31 before calling
caml_call_gc.
i386, arm, arm64, s390x: update the allocation pointer after the
conditional branch to the GC, not before.
arm64: simplify the code generator: Ialloc can assume that less than
0x1_0000 bytes are allocated, since the max allocation size for the
minor heap is less than that.
This is a partial cherry-pick of commit 8ceec on multicore.
A #! line should not exceed 128 characters (including the \0
terminator). This adds a test - both to the generation of the camlheader
files and also to the -use-runtime flag which falls back to #!/bin/sh
and uses exec to invoke the the interpreter.
* Fix `Printtyp.print_items` final state
* make `Printtyp.tree_of_type_declaration` more cautious when hiding the declared type within the body of the declaration.
* test
fixes#7156
Two new functions exposed:
```ocaml
val to_string_default: exn -> string
(** [Printexc.to_string_default e] returns a string representation of the
exception [e], ignoring all registered exception printers.
@since 4.09
*)
val use_printers: exn -> string option
(** [Printexc.use_printers e] returns [None] if there are no registered
printers and [Some s] with else as the resulting string otherwise.
@since 4.09
*)
```