Thicket thicket
ocaml
REPOS 1

OxCaml covers the compiler extensions and their supporting tools and packages.

W48.2025 · 24–30 Novoxcaml/oxcaml

Features

OxCaml x86 peephole pass: A new post-emission peephole optimization pass for the x86 backend is now in place, with merged rules for MOV-chain elimination, dead-register move deletion, MOV+ADD→LEA rewriting, MOV-sequence→XCHG, and redundant CMP removal. The umbrella PR #5063 collecting further rules remains open.

OxCaml register allocation affinity: PR #5059 (open) adds a simple affinity mechanism to all three register allocators, guided by CFG move-frequency counts. Enabled via -regalloc-param AFFINITY:on; benchmarks show up to −12% move instructions with the greedy allocator.

OxCaml third-party signal handlers: PR #5044 (open) extends Sys.signal_behavior with a Signal_external constructor so that handlers installed by foreign runtimes (e.g. Python in PyOCaml) are preserved and re-installable. Also fixes a space leak in the handler table and a race between install and dispatch.

OxCaml GADT with-bounds: PR #5046 (open) re-enables with-bounds normalization for GADTs, previously disabled in #4242. Correctness is targeted; performance work in #5047 (merged) reduces repeated fuel exhaustion on large jkinds.

OxCaml separability as scannable axis: PR #5031 (open) promotes separability from a non-modal to a scannable axis and renames the base sort Value to Scannable internally. This unifies layout annotations and improves error messages for layout mismatches.

Fixes

OxCaml loose staticity checking: PR #5054 (merged) forces common expressions (if, try/with, pattern-match branches) to dynamic in the mode system, preventing miscompilation when slambda v1 encounters unsupported static forms.

OxCaml env fold laziness: PR #5066 (merged) changes Env.fold_modules and Env.fold_modtypes to pass a Subst.Lazy instead of forcing substitutions, reducing unnecessary work for Merlin.

Compatibility and Releases

OxCaml manifest files: PR #4986 (merged) adds -I-manifest and -H-manifest flags, letting the compiler resolve source files from a build-system manifest rather than directory search paths. Paths are relative to $DUNE_MANIFEST_LOAD_PATH_ROOT.