Thicket thicket
ocaml
REPOS 27
SEARCH THE ARCHIVE

Repository activity

40458 results across all weeks

  1. Pull requestW45.2026 · 2–8 Novocaml/opam-repository

    release utcp 0.0.10 (2026-11-05)

    Relicense to AGPL, add AI.md (@hannes https://git.robur.coop/robur/utcp/pulls/21)

    Hannes Mehnert (@hannesm)
  2. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Allow parameter and returned value unboxing of escaping functions

    Jérôme Vouillon (@vouillon)
  3. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    CI: run the bun job on an arm64 runner

    This exercises JavaScriptCore's ARM64 backend, which Safari also uses.

    Jérôme Vouillon (@vouillon)
  4. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler/JS: signal exceptions by returning a sentinel under a handler

    Throwing a JavaScript exception is expensive on V8: most of the cost is Isolate::ComputeLocation, which computes the location of the throw for the message object. On the ocamlc benchmark (--opt 2), the throw path takes about 41% of the run time.

    Jérôme Vouillon (@vouillon)
  5. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler/Runtime: avoid holey arrays with V8

    V8 tracks the elements kind of arrays, and holey arrays reaching the same store sites as packed ones make these sites convert packed arrays to holey ones. This is recorded in the allocation site of the converted arrays, so block literals end up being created holey as well. This causes polymorphism and repeated "wrong map" deoptimizations.

    Jérôme Vouillon (@vouillon)
  6. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler/Wasm: fix the typing of array accesses to constant blocks

    The type of the elements read from an array was computed from the blocks the global flow analysis knows the array can be. But this analysis does not track constants (their approximation is empty), and a constant block can be read as an array: the compiler passes the method names of a class to CamlinternalOO as constant blocks. The method names were thus type…

    Jérôme Vouillon (@vouillon)
  7. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler/Wasm: keep function locations for the conversion-site counters

    Since 95e273f, the location events are left out when only the variable names are read (--pretty without debug information), and so were the locations of closures, which come from these events. The counters of --debug count-conversion-sites then lost the location of their function.

    Jérôme Vouillon (@vouillon)
  8. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler/Wasm: tag the integer return values of raising functions

    Raising functions return null to signal an exception, so their return value must be a reference. Functions returning untagged integers were thus excluded and threw exceptions. Tagging an integer is much cheaper than throwing an exception, so they are now included: when some raising functions return untagged integers, the type equations of the calls to raisin…

    Jérôme Vouillon (@vouillon)
  9. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler/Wasm: wrap raising functions with double translation

    With --effects=double-translation, raising functions called through closures are wrapped as well: the wrapper is the direct-style code of the closure, which keeps its CPS version.

    Jérôme Vouillon (@vouillon)
  10. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler/wasm: per-function budget for cloning higher-order functions

    Replace the two limits of the cloning pass (functions of at most 300 instructions, at most 4 copies each) with a single budget: a function of size n is cloned at most budget / n times. Small functions such as List.iter can then be cloned for more of the closures they are passed. The budget defaults to 300 instructions, so no clone is larger than before, and …

    Jérôme Vouillon (@vouillon)
  11. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler: avoid a stack overflow when ordering the solver worklist

    The worklist of the imperative dataflow solvers is filled in reverse postorder by a recursive depth-first traversal. The graphs can be very deep: when compiling js_of_ocaml.bc, the traversal goes 4,403 nodes deep for the global dead code elimination (515,632 nodes) and 7,346 nodes deep for the liveness analysis of Js_variable_coalescing (a 7,539-node chain).…

    Jérôme Vouillon (@vouillon)
  12. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler: count the arguments of the initial continuation of closures as uses

    Deadcode recorded the block arguments of branches as definitions of the block parameters, so that an argument is marked used when the parameter is, but not the arguments of the initial continuation of a closure. A variable only passed there, such as a parameter of a function whose body is a loop, had a use count of zero.

    Jérôme Vouillon (@vouillon)
  13. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler: evaluate the function and arguments of a call once with callgen

    When the arity check of a call is inlined (--enable callgen, and for trampolined calls or calls in CPS with double translation), the function expression appears in the arity check and in both branches, and the arguments in both branches. These expressions can be inlined function calls or closures, so:

    Jérôme Vouillon (@vouillon)
  14. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler: export the aliases of user primitives with separate compilation

    With separate compilation, units are compiled without the runtime files given to build-runtime (dune passes them only to build-runtime). A unit thus refers to a primitive defined in such a file by the name used in the OCaml code, which can be an //Alias, and looks it up in the runtime object. But the runtime only exported the canonical names, so calling such…

    Jérôme Vouillon (@vouillon)
  15. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler: fix mutually recursive tail calls with --set tc_depth=0

    With tc_depth=0, the functions of a mutually recursive group take no counter parameter, and every tail call to another function of the group bounces through the trampoline. But the bounce always passed a counter value 0 as an extra first argument, which the callee then took as its real first argument: [even 10] returned false.

    Jérôme Vouillon (@vouillon)
  16. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler: fix the compact printing of number literals with a trailing dot

    In compact mode, nothing separates a number literal from a following keyword unless both characters can be part of an identifier. A literal with a trailing dot was thus followed directly by the keyword: 5. in o was printed as 5.in o and 1. instanceof C as 1.instanceof C, which are syntax errors (an identifier cannot start right after a numeric literal). Such…

    Jérôme Vouillon (@vouillon)
  17. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler: fix the formatting of the missing-primitive (Wasm) and missing-cmi warnings

    Print one item per line, indented, and end the message with a newline. Format.pp_print_list used its default pp_print_cut separator, which only breaks lines when the margin is exceeded, and the literal \n in the format string were not taken into account by Format when computing the current column.

    Jérôme Vouillon (@vouillon)
  18. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler: no functor-like inlining of open recursion through records

    A function such as the default methods of Ast_mapper and Tast_mapper, let expr sub x = ... sub.expr sub e ..., recurses through a record of closures. The inliner's dependency graph only has syntactic edges, so it does not see this recursion. Until now, the record fields became unknown once the mapper record escaped, but with OCaml 5.6 the immutable-block hin…

    Jérôme Vouillon (@vouillon)
  19. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler: trampoline mutually recursive direct-style functions with double translation

    With --effects=double-translation, Generate_closure only trampolined the tail calls of mutually recursive functions with a CPS version, leaving the other recursive groups unchanged. But functions which do not need CPS also have no CPS version: this is common in whole-program compilation, where all calls are known (with separate compilation, exported function…

    Jérôme Vouillon (@vouillon)
  20. Pull requestW45.2026 · 2–8 Novocsigen/js_of_ocaml

    Compiler: trampoline mutually recursive tail calls with --disable optcall

    Generate_closure only considered the tail calls marked as exact, and calls are marked as exact by the optcall specialization. With --disable optcall, tail calls between mutually recursive functions were thus not trampolined, and deep mutual recursion overflowed the stack.

    Jérôme Vouillon (@vouillon)