Repository activity
40458 results across all weeks
Represent `Void` uniformly in Lambda
Today, void layouts are translated into Lambda as nullary products. Some consumers of such nullary Lambda products (like copy_mixed_block_element) did not special-case them when they should have. As a result, the representation of voids was inconsistent on bytecode—they were usually represented as immediates, but sometimes as empty blocks.
Zack Eisbach (@zackbach)Restore TLS get/set
Restores the TLS.{get,set} functions.
Max Slater (@TheNumbat)Restore js_of_ocaml-compiler.runtime
Fortunately it's also a problem with a really easy solution!
David Allsopp (@dra27-js)Restrict and freshen closure environments in slambda
A closure now saves only its free variables and free sort variables, rather than the whole environment in scope, which was all written to the cmx. This means we keep less data alive longer than it needs to be and serialize much less in the cmx. This adds Lambda.free_sort_vars.
Jack Rickard (@Skepfyr)Result types for functions returning closures, and two fixes
Posted for initial feedback; we may split it into several PRs (the two fixes at the base of the branch can go on their own).
Mark Shinwell (@mshinwell)Review: mode polymorphism printing
This PR adds review comments (in the form of in-file CR comments) for #5483, which was reviewed for only non-printing functionality. The review comments are mostly documentation-related nits and stylistic suggestions. Some bugs were found, but are better addressed in #7098 (to be reviewed shortly).
Zack Eisbach (@zackbach)Run the compiler testsuite in nix's check phase too
Enables make ci in the nix oxcaml package's check phase: make ci was in the checkPhase but had never actually run under nix (doCheck defaulted to false), and the testsuite was not sandbox-clean.
Jacob Van Buren (@jvanburen)Run the js_of_ocaml tests on the compiler build, in nix's check phase
Stacked on #7542. Makes js_of_ocaml a fully tested part of the compiler build: make jsoo-test runs the js_of_ocaml test suite on the js_of_ocaml the compiler ships, and the nix oxcaml package runs it in its check phase, so a js_of_ocaml failure fails the compiler package (only the jsoo tests: make ci never actually ran under nix — doCheck defaulted to fals…
Jacob Van Buren (@jvanburen)Selection: do not defer allocating external calls declared effect-free
An external declared [@@no_effects] [@@no_coeffects] but not [@@noalloc] becomes a Cextcall with alloc = true: it goes through caml_c_call and may trigger a GC. is_simple_expr in Cfg_selectgen accepted such a call as "simple" whatever its alloc flag, and effects_of rates it as pure, so emit_parts could defer it. For a Calloc, the deferred arguments are evalu…
Mark Shinwell (@mshinwell)Shape.Uid distinguishes interface and implementation units
Stacked on #7506. #7028 is based on this PR.
Zesen Qian (@riaqn)Small int machtype
Add small ints to Cmm.machtype. Specifically, in Cmm.machtype_component, the constructor Int is removed and constructors Tagged_int and Naked_int of int_width are added, where type int_width = Int64 | Int32 | Int16 | Int8. The Naked_ints don't have a subtyping relation (not even with each other), but we still have Tagged_int < Val < Addr.
James Rayman (@jra4)Stabilize vec512
Promotes the vec512 layout and types to stable and enables the AVX512 backend flags by default (if support was detected in configure).
Max Slater (@TheNumbat)Staticity of applications of `include functor` and generative functors
Generative functor applications must always be Dynamic.
Jakub Bachurski (@jbachurski)Stop `let mutable` from letting stack values escape a try-region
Assigning a stack-allocated value to a mutable variable from inside a try body, or the scrutinee of a match with exception cases, let the exception handler free the value while it was still reachable:
Zesen Qian (@riaqn)Stop deriving global names by stripping pack prefixes
Stacked on #7616. Groundwork for #7506: remove Compilation_unit.to_global_name_without_prefix, which manufactured a global name by stripping the pack prefix off an implementation.
Zesen Qian (@riaqn)Stop generating redundant Craise for division by zero
Fixes #7668.
Vincent Laviron (@lthls)Structured mangling: C implementation of demangling
C implementation of symbol demangling
Kevin Svetlitski (@Svetlitski)Structured mangling: fix names of compiler-generated closures
Profiling a large internal executable built with -name-mangling-scheme structured showed that about nine thousand function symbols still demangled to a bare fn, and that every functor body demangled with the functor's name doubled (Make_set.Make_set). None of these closures are anonymous in the source: they are the functions the compiler synthesizes from a d…
Kevin Svetlitski (@Svetlitski)Structured mangling: make the stamps in mangled names separable
Under -name-mangling-scheme structured, every function symbol carries two compiler-generated stamps: the function-slot stamp, fused into the function's identifier (F13double_even_0), and the code-ID stamp as a suffix (_3_code). Both change whenever unrelated code in the file changes, and the first one cannot be told apart from a source identifier ending in d…
Kevin Svetlitski (@Svetlitski)Structured mangling: mark partial applications with the callee's path
Accidental partial application is a real performance hazard, yet the closures the compiler creates for it were either invisible or opaque in symbol names.
Kevin Svetlitski (@Svetlitski)