Thicket thicket
ocaml
REPOS 1

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

W35.2025 · 25–31 Augoxcaml/oxcaml

Features

  • OxCaml shrink-wrapping (prologue duplication): new experimental pass that duplicates function prologues across CFG branches to free hot paths from prologue/epilogue overhead. PR #4579 opened 2025-08-26; companion PR #4616 (stop shrink-wrapping when all paths need a prologue) opened 2025-08-29. Validator tests merged in #4585.

  • OxCaml [@regalloc] attribute: per-function register allocator selection (ls, irc, gi, cfg, default) as an alternative to the global -regalloc flag. PR #4583 opened 2025-08-26; a follow-up refactoring PR #4633 was opened after the interval.

  • OxCaml #syntax metaprogramming directive: new #syntax metaprogramming on|off directive and -metaprogramming / -no-metaprogramming flags to toggle lexer tokens ($, <[, ]>) for runtime metaprogramming, disabled by default. PR #4608 opened 2025-08-28.

  • OxCaml phantom variable DWARF: propagates optimized-away (phantom) variables from Cmm through CFG and Linear to DWARF emission, enabling debuggers to display reconstructed values. PR #4595 opened 2025-08-27; depends on Flambda2 phantom-binding support in #3937.

  • OxCaml cfg_tool.exe: new auxiliary tool for inspecting .cmir-cfg-regalloc artifacts; supports list and extract commands with dominator and loop display. PR #4596 opened 2025-08-27.

Fixes

  • OxCaml flambda2 affine switches: recognises affine switch patterns (e.g. A→0, B→2, C→4, D→6) so the middle end no longer forces a table lookup and blocks the later affine optimisation. Merged 2025-08-26 in PR #4571; closes issue #4474.

  • OxCaml mode error hints: introduces a structured hint system for the mode (layout) type-checker, replacing ad-hoc error strings with tracked, printable explanations. Merged 2025-08-30 in PR #4471.

Compatibility and Releases

  • OxCaml implicit kinds (ongoing): [@@@implicit_kind: ('var : jkind)] syntax declares default jkinds for type variables in signatures, controlled by -extension implicit-types. PR #4285 remains open with active review; a related [@rec] contractive-parameter proposal (#4400) is also under discussion.