Repository activity
40458 results across all weeks
randoml.0.1.5 needs OCaml < 5
cargo:warning=vendor/boxroot/boxroot.c:23:10: fatal error: caml/compact.h: No such file or directory
Dmitrii Kosarev (@Kakadu)rocq 9.3.0 and rocq-stdlib 9.2.0
CC @silene @SkySkimmer
Enrico Tassi (@gares)synopsis.1.1 needs ocaml < 5.4
Error from https://check.ci.ocaml.org is:
Dmitrii Kosarev (@Kakadu)yices2: fix for new GCC
@Kakadu: OK, ready for review.
Dmitrii Kosarev (@Kakadu)Compiler/Wasm: intern string constants
This reduces bundle size by reusing strings already used in other parts of the program.
Jérôme Vouillon (@vouillon)Compiler: Js_traverse.free is an iterator
Js_traverse.free computes the variables defined and used in each scope. It was also removing the name of the function expressions that do not refer to themselves (an optimization dating back to 2013), which is why it had to be a mapper, and why Js_assign.program was using the program it returned: a full copy of the AST for an analysis.
hhugoCompiler: define constant_of_const only where it is used
Ocaml_compiler.constant_of_const converts a Lambda.structured_constant, whose shape moves with every compiler-libs release; keeping it building across OCaml versions and OxCaml flavours has been a recurring cost.
Jérôme Vouillon (@vouillon)Compiler: do not collect while reading the debug events
The debug events of a large program are hundreds of megabytes (about 450 MB for the toplevel example), unmarshalled directly into the major heap by input_value, and dropped as soon as the bytecode has been parsed.
hhugoCompiler: fix over-applications with --effects=double-translation
Jérôme Vouillon (@vouillon)Compiler: force a major GC after parsing when debug info was loaded
The DBUG section is deserialised, projected into the IR, and then discarded. Reclaiming it before the optimisation phases lowers peak memory by ~20% on debug-enabled builds (--source-map/--debug-info/ --pretty/--toplevel), with no effect on builds that don't read it (gated on dbg_section_needed).
Jérôme Vouillon (@vouillon)Compiler: keep the parentheses around an optional chain
Parentheses delimit an optional chain: when a is null, (a?.b).c raises an exception, whereas a?.b.c is undefined. The parser dropped the parentheses, so the first was printed as the second, which changes what the program does. Likewise, (a?.b)t and new (a?.b)() were printed without their parentheses, which is a syntax error. This affects runtime files and j…
hhugoCompiler: preserve sharing in Eval and Specialize_js
Stacked on #2445 (the trie): the first two commits are that PR.
hhugoCompiler: preserve sharing when mapping over the JavaScript AST
The methods of Js_traverse.map used to rebuild every node of the JavaScript AST, down to identifiers and locations. About seven passes inheriting from this class traverse the whole generated program (constant sharing, variable declaration compaction, constant sinking, variable coalescing, simplification, cleaning, variable naming), and each of them only modi…
hhugoCompiler: preserve sharing when substituting variables
Subst.Excluding_Binders used to rebuild every block, instruction and expression of the program, even though a substitution usually only affects a small part of it. It is applied to the whole program by several passes (flow analysis, phi simplification, reference unboxing, block merging), about nine times with the default profile, and each time a complete cop…
hhugoCompiler: recursive-descent JavaScript parser
Replace the Menhir-based JavaScript parser (Parse_js) with a hand-written recursive-descent parser over the same Flow lexer.
hhugoCompiler: report JS syntax errors as file:line:col
Three small changes to JavaScript parsing, independent of the parser implementation:
hhugoCompiler: represent sets of addresses and variables as Patricia trees
Stacked on #2445 (the trie): the first two commits are that PR.
hhugoCompiler: represent the map of blocks as a trie
Addr.Map.find is the single most expensive function when compiling large programs: the blocks of a program are looked up all the time, and Map.Make (Int) is an AVL tree about 17 levels deep for a program with 150 000 blocks.
hhugoCompiler: speed up the JavaScript printer
Two commits speeding up the JavaScript printer:
hhugoCompiler: 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