Thicket thicket
ocaml
REPOS 1

Tools covers builds, package management, editors, documentation and JavaScript compilation.

W40.2026 · 28 Sep – 4 Octocsigen/js_of_ocaml

Features

  • Recursive-descent JavaScript parser (open, by hhugo): Replaces the Menhir-based parser with a hand-written one over the same Flow lexer. Parsing concatenated runtime files drops from 0.313 s to 0.258 s and promoted memory from 92 MB to 59 MB; the compiler library no longer links menhirLib. Syntax errors now name the unexpected token and expected rule. #2467

Compatibility and Releases

  • OCaml 5.6 support (merged, by vouillon): Updates the compiler for the OCaml 5.6 toolchain. #2469

Fixes

  • JS syntax-error reporting (merged, by vouillon): Columns are now 1-based as editors expect; lines split at \r\n, \n, \r, U+2028, U+2029; long lines show a 100-code-point window. Fixes a crash on OCaml 4.13 where In_channel.input_line is absent. #2471

  • Parse_info.Debug / Parse_info.Diagnostic printers (open, by hhugo): Splits the single to_string into a debug variant (0-based, for IR and --debug-info) and a diagnostic variant (1-based, for all user-facing errors). Lexer errors gain the source excerpt and print location first. #2491

  • Reference unboxing codegen (merged, by vouillon): The dominator tree was built from Structure.build_graph extra edges, so a reference allocated in a loop and read after leaving it had its allocation removed but not its reads, producing an unbound variable. The pass now uses the actual CFG dominator tree. #2489

  • Wasm land normalization (merged, by vouillon): x land y was typed as 31-bit-normalized whenever one operand was normalized, even if that operand was negative (e.g. -1), leaving high bits set. Normalization now requires a non-negative constant or both operands normalized. #2490

  • CPS-based effects (merged, by vouillon): Corrects code generation for effects compiled in CPS form. #2484

  • Recursive inlining (merged, by vouillon): Fixes a bug in the inliner's handling of recursive call sites. #2482