Repository activity
40458 results across all weeks
CI: enable the inline tests of the Jane Street packages explicitly
With --profile release, recent versions of dune (3.24 at least) pass inline_tests="disabled" to the ppx, which then removes the test bodies: the test runners would contain no test.
Jérôme Vouillon (@vouillon)CI: refresh the apt index before installing the doc dependencies
The Documentation workflow has failed on every master push since 2026-10-08 (last green run: 2026-10-07). The "Install dependencies" step dies in opam's depext handling for graphics (libx11-dev libxft-dev):
hhugoCI: run the test suites under bun
Bun is based in JavaScriptCore, which is also used by Safari. This gives us some confidence that the generated code is working in Safari.
Jérôme Vouillon (@vouillon)Compiler/Wasm: link with our own linker instead of wasm-merge and wasm-metadce
The output is essentially unchanged. Compilation is faster, since wasm-merge and wasm-metadce no longer run: -10% (--opt 1) and -5% (--opt 2) on js_of_ocaml.bc, -35% to -50% on small programs.
Jérôme Vouillon (@vouillon)Compiler: CPS: blocks ending with Pushtrap keep their parameters
The parameters of a block ending with Pushtrap can be assigned in the body of the try. When the CPS transformation turned such a block into the body of a closure, its parameters became the parameters of the closure, which breaks the invariant checked by Code.invariant (an assigned variable is a parameter of a block ending with Pushtrap). With Wasm, the globa…
Jérôme Vouillon (@vouillon)Compiler: Flow knows the value of a tested variable along some edges
Flow (JavaScript target only) now uses the value of a tested variable along the edges of the test:
hhugoCompiler: JS lexer, numeric separators and HTML close comments
Two lexer fixes found while checking the JavaScript parser against the test suites of other parsers, both confirmed by V8:
hhugoCompiler: JS lexer, sedlex 3.8 captures and line terminator fixes
Requires sedlex 3.8.1 and cleans up the JavaScript lexer on top of it.
hhugoCompiler: JS parser, reject more invalid programs
Follow-up to #2467, on top of its branch: strict mode tracking, and the rejection of invalid programs that the Menhir parser accepted. Each commit comes with its expect-test changes.
hhugoCompiler: JS parser, source phase imports
Adds support for source phase imports (stage 3): import source x from "m" is parsed as a new import kind, Source, printed and traversed like a default import.
hhugoCompiler: add Constant.equal
Adds Code.Constant.equal, an exact structural equality on constants (floats and Int64 compared bitwise, block tags and kinds included).
hhugoCompiler: check the invariant of assigned variables
A variable x assigned by Assign (x, y) is a parameter of a block ending with Pushtrap. It is only read in the blocks reachable from the exception handler without going through this block again, including the closures they define, but not from the body of the try, and it is not assigned there. Assign (x, y) can then be seen as passing y as an argument to the …
Jérôme Vouillon (@vouillon)Compiler: do not collect while reading the debug events
The debug events of a large program are hundreds of megabytes (about 450 MB for the toplevel example), unmarshalled directly into the major heap by input_value, and dropped as soon as the bytecode has been parsed.
hhugoCompiler: drop redundant breaks out of labelled blocks
Generalization of the first commit of #2500 (54b16c6). That commit is cherry-picked as the first commit of this PR, so the second commit shows exactly the additional impact on the tests.
hhugoCompiler: faster reading of debug events
Parsing is the largest phase when compiling the Partial Render Table benchmark (6.9 s out of 25.4 s for JS on master). With --pretty (or --debug-info), most of it is spent on debug events. Three independent fixes, one per commit:
hhugoCompiler: fix ASI over-insertion after `async`/`using` identifiers
async and using were handled like return/throw in the restricted-production ASI rule: any line break after them inserted a semicolon whenever one was acceptable. Only a few continuations are actually restricted by [no LineTerminator here]:
hhugoCompiler: fold [if (c) return a; return b] into [return c ? a : b]
Js_traverse.simpl already turned if (c) return a; else return b into return c ? a : b, but the else is often absent: the second return is just the code that follows the conditional. This adds that case, and folds chains of if (c) return a; as well:
hhugoCompiler: force a major GC after parsing when debug info was loaded
The DBUG section is deserialised, projected into the IR, and then discarded. Reclaiming it before the optimisation phases lowers peak memory by ~20% on debug-enabled builds (--source-map/--debug-info/ --pretty/--toplevel), with no effect on builds that don't read it (gated on dbg_section_needed).
Jérôme Vouillon (@vouillon)Compiler: inline pending expressions across [Poptrap]
When compiling a Poptrap, the generator passed an empty expression queue to the continuation, forcing values computed in the try body into a temporary.
hhugoCompiler: jump threading
A block that only tests one of its parameters (possibly after computing the tested value with IsInt, Not, an integer comparison or %direct_obj_tag) is often reached through edges on which the tested value is known: a constant, a block, the condition the predecessor has just tested ([a && b] without -g), or the value a Switch dispatched on. Such an edge is re…
Jérôme Vouillon (@vouillon)