Repository activity
40458 results across all weeks
Functorize: require every global the bundle body references
A functorized bundle's required_globals only listed the units it instantiates locally. Complete instances and plain units that the body passes to them as runtime arguments are referenced with Pgetglobal but were not required, so when they are linked from an archive nothing selects them as units: the system linker still pulls their object code in to resolve t…
Zesen Qian (@riaqn)Guard pages on ARM64
Adding guard pages (and therefore --disable-stack-checks) to ARM64.
Nick Barnes (@NickBarnes)Improve json api
This PR makes the existing Misc.Json module a little more general and friendly to use. A follow up PR will use the Compact printing mode introduced in this PR.
Liam Stevenson (@liam923)JSIR: bring back JSOO changes
This PR brings back changes that were made to external/js_of_ocaml to support ingesting JSIR, which were erased in #7071 . The ocamlj pipeline is not yet expected to work with this version of JSOO, as the Flambda and JSOO implementations have drifted since these original changes. This will be addressed in subsequent PRs.
Leo Lee (@smjleo)JSIR: build stdlib
Build the stdlib with JSIR (i.e. ocamlopt -target js_of_ocaml) when running make jsoo-build.
Leo Lee (@smjleo)JSIR: catch up with Flambda changes and automate JSOO import
This PR makes changes required to get the JSIR -> js_of_ocaml into a basic state, catching up with changes in Flambda and JSOO. Notably:
Leo Lee (@smjleo)JSIR: clean up old JSOO patches
This PR addresses some issues with the old JSOO changes for JSIR (#7463), namely:
Leo Lee (@smjleo)JSIR: move `ocamlj` to `ocamlopt -target js_of_ocaml` and invoke JSOO directly
Delete ocamlj, and instead have ocamlopt -target js_of_ocaml emit javascript. The compiler now finds the JSOO executable from Config.bindir / OXCAML_JS_OF_OCAML env var, and calls it directly rather than emitting .cmj artifacts as before. It is a partial resurrection/rewrite of #4753. For more detailed file format descriptions, see the README.
Leo Lee (@smjleo)JSIR: ocamltest integration
Makes ocamltest support JSIR so that we can have JSIR tests in the build system.
Leo Lee (@smjleo)JSIR: support Smallints
Add support for Smallints for JSIR translation. We use the same representation as in bytecode and native code, where they are stored sign-extended.
Leo Lee (@smjleo)JSIR: support block indices
JSIR blocks have the same flattened and reordered layout as native blocks. However, these blocks are represented as JavaScript arrays, and thus each (unarised) element always occupies one slot. In particular, arrays are never packed, and so always occupy the same number of slots as its length.
Leo Lee (@smjleo)JSOO: sign-extend 8-bit reads through string-like block indices
On JSOO/WASM, 8-bit unboxed values like char# and int8# are sign-extended. However, reads through string, bytes and bigstring block indices used unsigned byte reads, which return a zero-extended char. Reading a byte 0xff therefore produced 255 instead of -1, so the result did not compare equal to other 8-bit values with the same bits, and reinterpreting it a…
ericlovesmath (@ericlovesmath)Make `jane-street-merlin-setup.sh` give Merlin and the LSP the opam `dune`
Merlin and ocamllsp both get their configuration by running dune ocaml-merlin, looking dune up on PATH. Jane Street editor setups add .local-merlin-bin to that PATH, but jane-street-merlin-setup.sh never linked dune there, so nothing made sure that anyone found a compatible dune.
Luke Maurer (@lukemaurer)Make a flambda_arity container
There are a few new things that wants to match arguments to parameters (specialisation and param usefulness).
Pierre Chambart (@chambart)Make externality a "secret" mode axis
Instead of hardcoding externality as a special-cased non-modal axis, make it a regular modal axis. Hide it and prevent users from writing annotations for externality modes and modalities, allowing them in mode-crossing only.
dkalinichenko-jsMake ocaml-index deterministic
At the moment, ocaml-index write a random id into an index file. This is so that other index files that point at it can store the expected id, and thus determine if the pointed-at index file has changed since the current index file has been written. While this is useful knowledge, it causes builds to not be deterministic. This PR replaces the random id with …
Liam Stevenson (@liam923)Make return arities [`Complex] throughout Flambda 2
Changes the return arities on Apply_expr — and correspondingly Code_metadata.result_arity, Function_decl.return and IR.apply.return_arity — from [Unarized] to [Complex] Flambda_arity.t, so that the structure of unboxed products in return types is preserved end to end instead of being flattened at construction time. (Argument arities were already [`Comple…
Mark Shinwell (@mshinwell)Misbehaviour with -opaque / warning 58
Warning 58 ("no-cmx-file") is incorrectly triggered by Flambda2 in some cases where -opaque is in use. Here's a minimal example:
Stephen Dolan (@stedolan)Mode crossing for addresses
Adds the following modal kinds for addr and addr_imm:
Benjamin Peters (@bn-peters)Only use guard pages for currently-active stacks
Enable millions of fibers without stack checks.
Nick Barnes (@NickBarnes)