Repository activity
40458 results across all weeks
No longer call wasm-opt with --opt 1
We skip calling wasm-opt with --opt 1. Expected benefits:
Jérôme Vouillon (@vouillon)Optimize exceptions
Throwing a Wasm exception is expensive. This PR makes exceptions cheaper:
Jérôme Vouillon (@vouillon)Optimize the placement of conversions: (un)boxing, (un)tagging, normalization
Jérôme Vouillon (@vouillon)Prepare for Oxcaml 5.4
Jérôme Vouillon (@vouillon)RFC: move ppx_optcomp_light and ppx_expect_light to their own repo (ocsigen/ocsippx)
js_of_ocaml contains two small ppxes that I think would be useful outside of this repo. I would like to move them to their own repository under the ocsigen organisation. This issue describes the plan so we can gather feedback before doing it.
hhugoRange analysis
Jérôme Vouillon (@vouillon)Refined typing
Jérôme Vouillon (@vouillon)Runtime: fast path for immediates in polymorphic comparisons
caml_equal, caml_notequal, caml_lessthan, caml_lessequal, caml_greaterthan and caml_greaterequal now compare two immediates directly instead of going through caml_compare_val. In JavaScript, the test is on numbers, which also covers floats: JavaScript comparisons agree with OCaml's on NaN. caml_compare is unchanged.
Jérôme Vouillon (@vouillon)Static evalution
On PRT:
Jérôme Vouillon (@vouillon)Switch to dune 3.23
It uses js_of_ocaml --build-config to manage config details.
Jérôme Vouillon (@vouillon)Tests: update the OCaml 5.6 stdlib expected output
OCaml trunk changed Seq.ints_in_range to avoid an overflow at max_int (ocaml/ocaml#15173).
Jérôme Vouillon (@vouillon)Use Wax for runtime files
Wax 0.2.0 is on opam. I think it is mature enough to be used by Js_of_ocaml.
Jérôme Vouillon (@vouillon)Use ppx_devtools from its own repository (#2551, phase 3)
Phase 3 of #2551: use ppx_devtools from its own repository, https://github.com/ocsigen/ppx_devtools, extracted with its history after #2564.
hhugoWasm-JS boundary optimizations
Faster calls between Wasm and JavaScript.
Jérôme Vouillon (@vouillon)Wasm: inline globals used once in another global initializer
Each variable bound to a constant at toplevel becomes a global, so a nested constant block is built from several globals, most of them used only once, by the initializer of the enclosing block. The initializer of an immutable, non-exported global used only once, in the initializer of another global, is now inlined there, and the global removed. A global used…
Jérôme Vouillon (@vouillon)Wasm: make Binaryen optional
Binaryen's wasm-opt is now the only Binaryen tool wasm_of_ocaml uses (linking and dead code elimination moved to our linker in #2506, and Wax assembles the runtime since #2373). This makes it optional.
hhugoWasm: outline toplevel code calling functions which signal exceptions by returning null
Since raising functions which can be called through closures are wrapped, the toplevel function calls many of them directly, each call being followed by a br_on_null to the exception handler wrapping the whole toplevel function. Split_toplevel did not support such an escaping branch, so the toplevel function was no longer split: on the Bonsai partial_render_…
Jérôme Vouillon (@vouillon)Wasm: require Binaryen 120
Binaryen 119 wrongly refines the type of exported mutable globals. The runtime exports the global caml_exception, used by functions which signal exceptions by returning null (#2098), as (mut (ref eq)); since the runtime only stores immediates in it, wasm-opt 119 turns it into (mut (ref i31)). Any program with such a function then fails to link:
Jérôme Vouillon (@vouillon)Wasm: split the toplevel function into smaller functions
The toplevel function of a large program can be huge, which makes optimizing compilers (Binaryen, TurboFan, ...) very slow, or even makes them fail.
Jérôme Vouillon (@vouillon)[wasm] Option to implement OCaml strings with JavaScript strings
Conditional compilation of Wasm runtime
Jérôme Vouillon (@vouillon)