Repository activity
40458 results across all weeks
ppxlib: Longident.parse takes UTF-8 identifiers as identifiers
Since ocaml-ppx/ppxlib#111 (0.32), [Longident.parse] takes a string which doesn't start with an ASCII letter or [_] as an operator, with no module path, so "É.x" was [Lident "É.x"]. It now also asks the compiler ([Misc.Utf8_lexeme.starts_like_a_valid_identifier]), for which [Ocaml_common] gets [Misc]: "É.x" is [Ldot (Lident "É", "x")] again.
Robin Ricard (@rricard)ppxlib: add Options.continue_after_exception
Since ocaml-ppx/ppxlib#453 (0.32), a driver which is embedding errors carries on when a deriver or an extension raises, so that one failure doesn't cancel the rest of the context-free pass and several errors are reported at once; #447 did the same for whole passes, and #472 puts the error where the generated code would have gone.
Robin Ricard (@rricard)ppxlib: add the -reset-inline-gensym driver flag
Generated names ([gen_symbol]) are numbered across the whole file, so adding or changing one inline expectation renumbers the names in every later one. With [-reset-inline-gensym], the driver restarts the numbering before each [@@deriving_inline], [@@@deriving.inline] or attribute-group inline expectation. It is off by default: names generated before and aft…
Robin Ricard (@rricard)ppxlib: allowlist the [@rec] attribute
The compiler interprets [@rec] on type parameters, so the driver's unused attribute check must not reject it.
Robin Ricard (@rricard)ppxlib: make map_top_down's structure_item and signature_item work again
Since ocaml-ppx/ppxlib#574 (0.37), [map_node] also applies the attribute-replacement rules, and asserts when given a structure or signature item, on the grounds that [#structure] and [#signature] handle those. [#structure_item] and [#signature_item] call it all the same, so calling either directly raised.
Robin Ricard (@rricard)ppxlib: repository health nits
Various nits we need to apply on this copy of ppxlib to maintain it healthily in this repository.
Robin Ricard (@rricard)reaper: fix bugs related to unboxed blocks
Unboxed block which are called have caused a lot of bugs in the past, so preventing to unbox them seems the safest route, even it loses a tiny bit of unboxing, mostly in GADT code. This adds two rules in unboxing_analysis.ml prevent the unboxing of such blocks.
Nathanaëlle Courant (@Ekdohibs)reaper: lose aliases between deleted fields when rewriting types
If there was a value with type Block ((=x), (=x)) whose fields were poisoned, the type after rewriting would still say those fields were aliases of each other, which might not necessarily be true.
Nathanaëlle Courant (@Ekdohibs)reaper: make [Analysis.Solution.t] exportable
In preparation for LTO.
Nathanaëlle Courant (@Ekdohibs)reaper: prevent a bug in types_rewriting when recovering sources
In the reaper, the semantics of the metadata for types rewriting was subtly different in the join and when trying to recover sources from usages, which caused a possible miscompilation.
Nathanaëlle Courant (@Ekdohibs)reaper: prevent miscompilation with local fields
This prevents a rare miscompilation at the interaction between local fields and Only_generative_effects primitives not tracked by the reaper, so mostly immutable arrays.
Nathanaëlle Courant (@Ekdohibs)reaper: rebuild several units per -reaper-rebuild invocation
This PR adds support for rebuilding in batches to the -reaper-rebuild command.
Simon Spies (@spiessimon)reaper: remove -reaper-preserve-direct-calls
The "auto" mode works well, is the only mode used, and the non-auto mode had a (difficult to reach) bug.
Nathanaëlle Courant (@Ekdohibs)refactor(typing): split `before_generalize`
before_generalize now runs stuff before generalization. Revolutionary, I know :o
Alistair (@johnyob)refactor(typing/utils): move stamping / snapshotting to `With_backtracking`
Adds stamps to With_backtracking
Alistair (@johnyob)refactor: rename `Ivar` -> `Typing_ivar`, `Scheduler` -> `Typing_scheduler`
When building against jane, there are (sadly) cases where we open Ocamlfrontend and Async. This causes a namespace clash against Async's Ivar and Scheduler and the typechecker's Ivar and Scheduler. Simplest fix is to rename the typechecker's modules by slapping on a Typing_* prefix[^1].
Alistair (@johnyob)testsuite: check arm64 non-value 64-bit stores emit no barrier
Add an asmcomp codegen test for the Sixtyfour store change (#6538/#7790): Bytes.set_int64 compiles to a plain str with no dmb ishld, while a value store keeps stlr. The .run script greps the -S output.
Sebastian Pop (@sebpop)x *. -1. on a NaN gives a sign bit that differs from bytecode
Simplify rewrites x *. 1. and x /. 1. to x, and x *. -1. and x /. -1. to a negation. For a NaN the result differs from what the machine computes: Float.sign_bit (nan *. -1.) is true in native code and false in bytecode and at -Oclassic; the same for float32, and a signalling NaN times 1. stays signalling.
Mark Shinwell (@mshinwell)Community digest
Dune 3.25.0 is out, and it changes how build actions see the filesystem and how generated files are handled. The OCaml compiler also no longer crashes when it encounters certain redundant match patterns.
core digest
A compiler crash on certain pattern matches is fixed, and a proposal would turn partial-match warnings into hard errors. Several library bugs are also patched, including string functions that returned wrong results with extreme inputs.