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: arities in Core, sized reuse, tokens across calls, @fip (issue #157)

Lowering records the constructor arities of matched, destructured and
updated values (FnDecl::shapes). With them, a reuse of a cell of known
size skips the run-time size check; tuples, single-constructor values and
record updates give their cells; and a path with no fitting construction
hands its token to a callee that builds a cell of that size, through a
copy `g$reuse{n}`. An in-place reuse writes the header in one store.

`@fip` functions are checked after Perceus to allocate nothing (E0901),
by `louise check`, `run`, `build` and `test`.

Reuse specialisation (kept fields with a token flag) was measured and
left out: html was 6-7% slower. ADR 0040 (Proposed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

olivier · il y a 1 mois · 8d6cde298a1c28829fb99654fe3e3e3905f3d47f

Parents cd65d12

32 fichiers modifiés, 1407 ajouts, 224 suppressions

Acrates/louise/tests/fixtures/errors/fip.lse+29−0
Mcrates/louise_codegen_c/src/emit/mod.rs+14−3
Mcrates/louise_codegen_c/src/emit/prelude.h+11−0
Mcrates/louise_codegen_c/src/lib.rs+3−2
Mcrates/louise_codegen_c/tests/lines.rs+4−2
Mcrates/louise_core/src/evidence.rs+3−1
Mcrates/louise_core/src/lower/derive.rs+2−0
Mcrates/louise_core/src/lower/mod.rs+28−1
Mcrates/louise_core/src/lower/pattern.rs+44−1
Mcrates/louise_perceus/src/borrow.rs+44−5
Acrates/louise_perceus/src/fip.rs+197−0
Mcrates/louise_perceus/src/lib.rs+147−19
Mcrates/louise_perceus/src/specialise.rs+420−170
Mcrates/louise_perceus/tests/programs.rs+59−0
Mcrates/louise_perceus/tests/snapshots/programs__borrowing_and_reuse_of_a_small_program.snap+1−1
Mcrates/louise_perceus/tests/snapshots/programs__rc_of_early_returns.snap+1−1
Acrates/louise_perceus/tests/snapshots/programs__sized_reuse_tuples_and_calls.snap+69−0