tobogganSe connecter

louise

The Louise language: compiler, runtime, std, tooling

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

Perceus: kept fields for sized reuses (ADR 0040 Revision 2, issue #193); runtime ABI 8

A sized reuse no longer rewrites a field that receives the value the
release moved out of the same slot: the release leaves it in place (the
binding owns the value) and flags the cell TL_FLAG_TOKEN, and the reuse
skips the store. A record update writes one field, not all of them.
TL_FLAG_TOKEN tells tl_drop_slow/free_block to free a token dropped
unused without touching the dead fields; tl_reuse_header's whole-header
store clears the flag, so a reused cell is ordinary. The token helper is
a generated-prelude inline (tl_reuse_token_kept, the set as two mask
words — never past field 127). LOUISE_NO_KEPT_REUSE turns it off.

Re-landed on the stabilised measurement of ADR 0040 Revision 1 (fixed
alignment, pinned cores, deterministic instruction counts): lists
-10.2% and html -2.8% in instructions, dict +2.7% instructions with the
wall clock unchanged, everything else within +-0.3%; wall clock on the
movers within +-2%, under the 5% bar. The 2026-10-13 html regression
does not reproduce on the stable layout: it was the ThinLTO placement
variance, as suspected. The interpreter and Perceus's verify are
unchanged (the ownership model is the same); the differential tests and
the ASan spike pass with the leak oracle at 0.

Snapshots reviewed: sized_reuse_tuples_and_calls,
borrowing_and_reuse_of_a_small_program, rc_of_early_returns gain the
keep annotation, firing as intended.

olivier · il y a 1 mois · 6f2b8ca32d4e1cb7f3d32ff9dabf783d502075a8

Parents c14d7f3

17 fichiers modifiés, 310 ajouts, 52 suppressions

Mcrates/louise_codegen_c/src/emit/mod.rs+51−10
Mcrates/louise_codegen_c/src/emit/prelude.h+16−2
Acrates/louise_codegen_c/tests/kept_reuse.rs+86−0
Mcrates/louise_perceus/src/specialise.rs+88−27
Mcrates/louise_perceus/src/verify.rs+1−0
Mcrates/louise_perceus/tests/programs.rs+1−0
Mcrates/louise_perceus/tests/snapshots/programs__borrowing_and_reuse_of_a_small_program.snap+2−2
Mcrates/louise_perceus/tests/snapshots/programs__rc_of_early_returns.snap+2−2
Mcrates/louise_perceus/tests/snapshots/programs__sized_reuse_tuples_and_calls.snap+2−2
Mruntime/louise_rt/include/louise_rt.h+5−1