Skip to content

Runtime 5 changes that are specific to flambda‐backend

Stephen Dolan edited this page Aug 13, 2024 · 3 revisions

GC

(See below for Flambda 2-specific GC changes.)

Support for new language features

  • Locals (stack allocation)

  • Mixed blocks (including new size macros)

  • Unboxed values in closures

Other features

  • Long frames

  • Put frametables in .text with relative offsets for return addresses (PR1227)

  • Allocate pools for the shared heap in batches rather than one at a time (PR2248)

  • Mark delay (K=1) (PR2348)

Misc small features

  • Add some checks that the minor GC does not recurse (PR1743, PR2075 and PR2098)

  • Silence the debug runtime by default (runtime5 only) (PR2195)

Configuration changes

  • space_overhead=160 by default

  • Increased minor heap size by default

GC bugfixes

  • Ensure the minor heap is actually empty before reallocating it (PR2208)

  • Reorder call to caml_domain_external_interrupt_hook (PR2204) (think this is probably fixed upstream)

  • Fix caml_alloc_shr_check_gc for tags >= No_scan_tag (PR2203)

  • Fix assertion in caml_ephe_clean (PR2192) (submitted upstream)

  • Reinitialize IO mutexes in systhreads5 (PR2160) (think this is fixed upstream)

  • Fix segfault when signal handlers invoked in non-OCaml threads on runtime5 (PR2154) (fixed upstream)

  • Fix caml_gc_compaction in the 5 runtime to run finalizers (PR2135) (should now be fixed upstream)

Flambda 2

  • Support for registering closures in caml_globals

  • Asynchronous exception handling via Sys.with_async_exns

  • Flambda 2 invalid trap

Effects

  • No-stack-checks

  • Integration of effects and locals (not yet merged)

Multi-domain

  • New safepoints strategy (not yet merged)

Dynlink

  • Check to prevent duplicate root registration

  • Fix for naked pointer problem in unsafe_get_global_value (PR2317)

Systhreads

  • Ability to swap out the runtime lock

  • Implementation of the master lock without using pthread condvars

Numbers, arrays, etc

  • float32 runtime support

  • SIMD runtime support e.g. for array operations

  • Various other array / boxed number primitives

Misc features

  • Improved implementation of reachable words algorithm (c.f. Obj.reachable_words) for retainer profiling

  • Atomic printing of GC logs (PR2874)

  • Timestamp printing in GC logs (PR2216)

  • Add caml_hot__code{begin,end} symbols in runtime5 (#2133)

  • Compression in Marshal is not supported (to avoid a zlib dependency)

Small bug fixes/improvements

  • Hoist Wosize_val from end conditions of loops (PR2301)

  • Cause a C warning when CAMLreturn is missing in C stubs (PR2102)

  • Compile with -mbranches-within-32B

  • Dune build fixes