Repository activity
40458 results across all weeks
Count voluntary context switches to avoid busy-waiting epoll_waits
This is a rethink of #6007: we look at the count of voluntary context switches in the current thread (which is the tick thread). With a normal epoll_wait implementation, we will take at least one VCS per tick. With a busy-waiting implementation, we won't be taking very many at all.
Nick Barnes (@NickBarnes)DRAFT: introduce Compilation_unit_intf to identify interfaces
A reduced version of #6785. Refactors cross-file references so that interfaces and implementations have distinct identities:
Zesen Qian (@riaqn)Datalog-based validator for cfg_simplify
I introduce a simple Z3 Datalog-based validator for the Eliminate_dead_code pass from cfg_simplify. It was tested not to have false negatives by running the compiler with the validator on the compiler itself. When unreachable nodes existed (checked by passing -no-cfg-eliminate-dead-trap-handlers) the validator noticed this as expected.
hwasilewskijsDeduplicate contents of continuation handlers
Note: This is a quick proof of concept for #6751; it is experimental (notably we likely want a better hash function on primitives) and not intended to be merged as is.
Basile Clément (@bclement-ocp)Do not understate free names of generated code
Two fixes of the same kind. The partial-application stub built by Simplify recorded its free names via without_names_or_continuations, which also strips symbols; the symbol callee and symbol-valued applied arguments are baked into the stub's body, so they are now re-added. To_cmm can itself lift a set of closures to static allocation while translating a func…
Mark Shinwell (@mshinwell)Document the C ABI for unboxed types, and `[@unpacked]`
Add jane/doc/extensions/_03-unboxed-types/04-c-abi.md.
Ryan Tjoa (@rtjoa)Don't enroll a new domain into major GC until it's ready
In the existing code, domain creation can fail after its major GC state has been initialized, which includes "enrolling" it in the global major GC state (e.g. by incrementing num_domains_to_mark). This is then not torn down correctly in the failure path. Fixed by splitting caml_init_major_gc into caml_alloc_major_gc (which can fail, and now has the same fail…
Nick Barnes (@NickBarnes)Drop redundant sign extensions of values flowing into narrow stores
Narrow stores (8/16/32-bit chunks) only write the low bits, so sign
ttebbi-janestreetDynamic lexical parents
Reimplements the same semantics as #6710/#6711, but much simpler, since the binding state is the current node.
Max Slater (@TheNumbat)Dynamic scope extrusion check
This was supposed to be in here for a while.
Jakub Bachurski (@jbachurski)Dynamics as immutable lists
This deletes the hashtable-of-stacks dynamic storage, replacing it with an immutable list of single binding nodes.
Max Slater (@TheNumbat)Emit DWARF call site information
This PR is part of the dwarf202607 series (24 PRs) adding end-to-end DWARF debugging improvements for code compiled with Flambda 2: phantom lets so the debugger can print optimised-out variables, correct attribution of parameters and variables to inlined frames, and DWARF call site information.
Mark Shinwell (@mshinwell)Enable phantom lets by default
This PR is part of the dwarf202607 series (24 PRs) adding end-to-end DWARF debugging improvements for code compiled with Flambda 2: phantom lets so the debugger can print optimised-out variables, correct attribution of parameters and variables to inlined frames, and DWARF call site information.
Mark Shinwell (@mshinwell)Evaluate Delta_uleb128 constants generally in the x86 binary emitter
Replaces the exact expression-shape matching for Delta_uleb128 in the x86 binary emitter with a recursive evaluator over the constant language. The sections of operands are tracked, so any assembly-time-constant combination of labels, symbols and integers is accepted, and only differences within a single section (which are link-time invariant) can produce a …
Mark Shinwell (@mshinwell)Faster identifier export during LTO solve
Based on #6895.
Mark Shinwell (@mshinwell)Fix Pprintast for attrs on constrained params
Pprintast was failing to print attributes for code like let f ((x : int) [@test.attr1]) = ..., this fixes that.
Jack Rickard (@Skepfyr)Fix a jump to uninitialized data in the debugger
This fixes a crash in the debugger where it would sometimes attempt to jump to an uninitialized value. Firstly by fixing the thing that caused it to read uninitialized data, but also making it always check whether skiplist find actually succeded (previously it only checked in the debug runtime).
Jack Rickard (@Skepfyr)Fix a missing parens bug when `pprintast`ing labeled tuples
Use simple_pattern instead of pattern1 when printing labeled tuple components. simple_pattern prints more parentheses. Its sister function simple_pattern1 is used in label_exp to print labeled function arguments. We use simple_pattern instead of simple_pattern1 because tuple components can't contain mode annotations.
James Rayman (@jra4)Fix allocation pointer bug on stack overflow
When we use guard pages to raise Stack_overflow we go from OCaml code, via a SEGV handler and a little asm stub, to caml_raise_stack_overflow. Somewhere on that path we need to save the allocation point register %r15, otherwise recently-allocated values will be allocated over, leading to memory corruption.
Nick Barnes (@NickBarnes)Fix dwarf shapes for unboxed versions of types and `unit#`
We fix two issues:
Ryan Tjoa (@rtjoa)