Repository activity
40458 results across all weeks
JSIR: switch to JSOO whole-program mode when using the JSIR linker
Previously, when using the JSIR whole-program linker, we still built the runtime and invoked the JSOO linker separately. This meant that the entire runtime was included, instead of just the ones that are needed by this program. This PR makes ocamlopt run JSOO in whole-program mode to fix this.
Leo Lee (@smjleo)JSIR: warn and generate stubs for missing primitives in whole-program mode
This prevents missing runtimes from turning up as JavaScript errors during runtime.
Leo Lee (@smjleo)JSIR: write shape information for separate compilation
JSOO uses these to determine the arities of calls, so that it can emit direct calls where possible instead of a caml_apply. The JSIR pipeline mostly doesn't need this because Flambda does this already with .cmx files, but when using -opaque (e.g. for dev builds) this reduces the JS stack required for deep recursion.
Leo Lee (@smjleo)Lambda: Lcode and an allocating Ptemplate_env
Slambda evaluation now produces dedicated constructs for templates:
Jack Rickard (@Skepfyr)Leave the imports of recorded interfaces to be checked at link time
Draft. Stacked on #7031 (attach-cmi-path), through the simplify-intf-imports branch, which simplifies interface imports to a name and an optional CRC and will be its own PR. This PR is not part of the #7031 → #7797 stack.
Zesen Qian (@riaqn)List comprehension to max_int loops forever
A list comprehension whose last element is max_int does not terminate, and after the wrap it keeps yielding values from the bottom of the range:
KC Sivaramakrishnan (@kayceesrk)Loop-invariant loads are not hoisted out of loops
Loads whose value cannot change inside a loop are executed on every
Thomas Gazagnaire (@samoht)Loops analysis for SSA
As per title; it implements the same algorithm
Xavier Clerc (@xclerc)Machtype checking
Adds another pass during cmm_invariants that traverses Cmm expressions and makes sure the machtypes of inputs and outputs of each operation are consistent with eachother. For now, this machtype-checking pass is toggled with a separate flag (-dcmm-(no-)check-machtypes, default enabled), but it can be folded into -dcmm-invariants when we consider the machtype …
James Rayman (@jra4)Make `backtrace_active` a global variable
Make backtrace_active a global variable
Vesa Karvonen (@polytypic)Make dead trap handler elimination unconditional
As per title: over time elimination has
Xavier Clerc (@xclerc)Make generated code independent of debugging information in three places
Three places where the amount of debugging information being produced could change the generated code. Each is a separate commit.
Mark Shinwell (@mshinwell)Match over an unboxed record takes the wrong case
A match whose or-pattern is made of unboxed record patterns takes a case without testing another component of the scrutinee, with no warning. With a variant in place of the boolean the code reads the argument of a constant constructor (segmentation fault); #() and #true | #false patterns do the same.
Mark Shinwell (@mshinwell)Match with branch relaxation takes the wrong case
Ethan Chou (@echoumcp1)Measure GC performance from runtime events
This reworks the "gcrate" test/tool so that it works purely on the runtime events stream, so it can be applied to any OCaml process and report the speed of promotion, marking, and sweeping in that process (rather than solely in its own synthetic benchmark). Prompted by @gasche's comments on ocaml/ocaml#15280, and building on #7981 and #7982.
Nick Barnes (@NickBarnes)Mode polymorphic primitives
This PR adds support for mode polymorphic primitives, such as:
ainageorgesMode polymorphism printing: aliases
This PR implements printing of mode aliases in a mode polymorphic signature.
ainageorgesMutable record field update in "when" guard causes segfault
The following program causes a segfault (and causes no warnings other than 70, missing .mli):
Mark Shinwell (@mshinwell)Native link with a library compiled again after its client: uncaught Consistbl.Inconsistency
When a library is compiled again after a client was compiled against it, ocamlopt refuses the link, as it must, but with an uncaught exception, Consistbl.Make(...).Inconsistency, in place of the "make inconsistent assumptions over implementation" error.
Mark Shinwell (@mshinwell)No `%caml_bytes_get8u_indexed_by_int64#` primitive
There are %caml_bytes_get16u_indexed_by_int64#, get32u and get64u primitives, but no 8-bit one:
Thomas Gazagnaire (@samoht)