Repository activity
40458 results across all weeks
Benchmarks: add query-json, herd and Alt-Ergo
Adds three real-world programs to the benchmarks run by current-bench, chosen after a survey of the opam reverse dependencies of js_of_ocaml and of GitHub projects with js_of_ocaml/wasm_of_ocaml builds (notes in benchmarks/CANDIDATES.md). Each has a JavaScript or Web build upstream and covers something the current benchmarks do not:
hhugoBenchmarks: run with OCaml 5.5
Moves the benchmark image to OCaml 5.5 (ocaml/opam:debian-ocaml-5.5, currently 5.5.1).
hhugoCHANGES: #2529, #2541
Add the missing changelog entries for #2529 and #2541:
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: carry block descriptors in the IR
Introcaml tags every allocated block with the index of its descriptor, stored in the reserved bits of the block header. This records it in the IR: a descriptor of the abstract type Code.Block_desc.t (with Block_desc.none for blocks without one) is added to Block allocations and to Tuple and Float_array constants.
hhugoCompiler: contification of local functions
Turn a local function into blocks of its enclosing function when it is only used as the callee of full applications, all located in the function defining it, and all with the same continuation (all tail calls, or all jumping to the same block with the same arguments, leaving the same exception handler if any; a function applied once always qualifies). Calls …
Jérôme Vouillon (@vouillon)Compiler: 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: 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: preserve sharing in Eval and Specialize_js
Stacked on #2445 (the trie): the first two commits are that PR.
hhugoCompiler: 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…
hhugoCompiler: test integers against 0 by truthiness
Two small code generation improvements.
hhugoConversion 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)Convert Int_trie slots with Obj.magic, not %identity
Int_trie stores both values and child nodes (arrays) in slots typed private int list, converting with %identity. OxCaml's flambda2 trusts the shape of a value converted with %identity (for int list, an immediate or a block of size 2): with join points (-O2, -O3), the store of a node into a slot in remove_node is dropped as unreachable, so removing a key from…
Jérôme Vouillon (@vouillon)Differing behavior in printf float rounding
It appears that printf float rounding behavior is different between the regular runtime and the jsoo runtime:
bcc32Experiment: benchmark with wasm-opt disabled
@hhugo: @vouillon,how much more work before we can merge this ? Wondering if I should wait for it for the next release ..
Jérôme Vouillon (@vouillon)Introcaml support in Wasm
Jérôme Vouillon (@vouillon)Introcaml: runtime introspection in JavaScript
Runtime introspection for OCaml values in JavaScript when js_of_ocaml is built with Introcaml: Introspect.Print and friends work under node and in the browser, and Chrome DevTools can display OCaml values in OCaml syntax.
hhugoIntrocaml: support runtime introspection in JavaScript
Prototype of the design sketched by @let-def in #2409 (comment). Built on top of #2409: only the last commit is new, the others are that PR (rebased on master).
hhugoLib: deprecated messageEvent aliases are class types
Fixes a regression of 6.5.0~beta1 found by the opam CI (ocaml/opam-repository#30965): jsoo_broadcastchannel.2.0.0 fails with
hhugoPrepare next release
clean up changelog
hhugo