Thicket thicket
ocaml
REPOS 27
SEARCH THE ARCHIVE

Repository activity

40458 results across all weeks

  1. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Compiler: make the JS lexer state mutable

    Based on #2503; the diff is the single commit on top of it.

    hhugo
  2. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Compiler: no location events when only reading the variable names

    With --pretty, the debug information is read for the variable names, which also brought in the location events, even when neither a source map nor debug information is produced. The locations are then useless.

    Jérôme Vouillon (@vouillon)
  3. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Compiler: omit [| 0] after [>>>] by a constant in [1, 31]

    x >>> k with a constant k in [1, 31] is in [0, 2^31), so it does not need to be coerced to a 32-bit integer:

    hhugo
  4. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Compiler: propagate the value of the variable tested by a conditional

    Along the second edge of Cond (x, _, _), x is zero; along the

    Jérôme Vouillon (@vouillon)
  5. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Compiler: raise exceptions with an argument through a runtime function

    raise (E arg) was compiled to

    hhugo
  6. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Compiler: recursive-descent JavaScript parser

    Replace the Menhir-based JavaScript parser (Parse_js) with a hand-written recursive-descent parser over the same Flow lexer.

    hhugo
  7. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Compiler: relax the invariant of assigned variables

    A parameter x of a try block assigned in its body can now also be read in the arguments of the handler continuation of this block. These arguments are evaluated in the handler, in both backends, so this read does see the last value assigned to x.

    Jérôme Vouillon (@vouillon)
  8. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Compiler: share identical literals when parsing bytecode

    The OCaml compiler allocates a global slot for each occurrence of a literal, and each slot became its own variable bound to its own copy of the constant. Literals are immutable, so slots holding identical literals now share a single variable (share_literal in parse_bytecode.ml). Since this happens at parse time, both the JavaScript and the Wasm backends bene…

    hhugo
  9. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Compiler: share identical structured constants

    Structured constants (lists, tuples, variants, and in particular the ASTs of format strings) are immutable, but the code generator emitted a fresh array literal for each occurrence. For instance, every Format string containing @ carried its own copy of Break ("@ ", 1, 0): [0, "@ ", 1, 0] appeared 1445 times in ocamlc.byte compiled to JavaScript.

    hhugo
  10. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Compiler: sink pure instructions into the branch that uses them

    New IR pass (Branch_sinking), run just before JavaScript code generation.

    hhugo
  11. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Compiler: test integers against 0 by truthiness

    Two small code generation improvements.

    hhugo
  12. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Compiler: tune the GC space overhead

    The compiler allocates a lot, and keeps a large live heap when compiling a large program. With the default space_overhead (120), the major GC accounts for about a quarter of the compilation time.

    hhugo
  13. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Compiler: use the bytecode hint on integer equality tests

    With OCaml 5.6, EQ and NEQ instructions implementing an integer equality test (rather than a physical comparison) carry the hint Hint_int_equality_test (ocaml/ocaml#15135). Record it in the IR as Eq { int_only } / Neq { int_only }.

    Jérôme Vouillon (@vouillon)
  14. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Compiler: use the value of a tested variable in its branches

    New IR pass (Cond_refine), run just before the last dead code elimination, JavaScript target only:

    hhugo
  15. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Conversion counters

    This adds two debug flags that count, at run time, the representation conversions executed by code compiled with wasm_of_ocaml. The counts are exact and deterministic, unlike timings. That makes them useful for judging changes to how numbers are represented: unboxing, int typing, or where conversions are placed.

    Jérôme Vouillon (@vouillon)
  16. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Experiment with some static evalution

    Jérôme Vouillon (@vouillon)
  17. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Experiment: benchmark with wasm-opt disabled

    @hhugo: Benchmark summary for this experiment. This branch is #2238 (fast-o1) plus one commit that drops wasm-opt at every --opt level, so the meaningful comparison is against #2238's own run (f7d80dc26, run 5 minutes after this one), not against master: the bench UI's master comparison blends in the #2238 and #2506 changes.

    Jérôme Vouillon (@vouillon)
  18. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Fix float formatting to match native

    Jérôme Vouillon (@vouillon)
  19. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Globalize improvements

    Jérôme Vouillon (@vouillon)
  20. Pull requestW42.2026 · 12–18 Octocsigen/js_of_ocaml

    Inlining improvements

    Jérôme Vouillon (@vouillon)