tobogganSe connecter

louise

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

M5 (part 1): native backend — Perceus, C codegen, tilc build

- tilc_perceus:
  - dup/drop insertion on Core;
  - an independent checker that every path balances its references.
- tilc_codegen_c:
  - Core to C for the functions reachable from main;
  - one uniform C signature (ABI Revision 1), so every tail call is
    musttail and a self tail call is a jump;
  - closures through entry functions, and immortal static literals;
  - `fn` operations as direct calls through the handler capability;
  - regions through the runtime.
  ctl, final ctl and actors are rejected with a clear message for now.
- tilrt (ABI version 1):
  - ctx->xargs and immortal blocks;
  - the std externs (which borrow their arguments) and region references;
  - fatal panics for compiled programs until unwinding lands.
- CLI: `tilc build` and `tilc run --native`.
- Differential test: every supported tests/run program prints the
  interpreter's output natively with 0 live blocks, also under ASan and
  UBSan in CI.

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

olivier · il y a 1 mois · 26860ce3dbc3dad03e7cb4c41192b2c535848939

Parents cc5df23

27 fichiers modifiés, 2355 ajouts, 26 suppressions

Acrates/tilc_codegen_c/Cargo.toml+17−0
Acrates/tilc_codegen_c/src/driver.rs+138−0
Acrates/tilc_codegen_c/src/emit.rs+641−0
Acrates/tilc_codegen_c/src/lib.rs+157−0
Acrates/tilc_codegen_c/tests/native.rs+134−0
Acrates/tilc_perceus/tests/programs.rs+89−0
Acrates/tilc_perceus/tests/snapshots/programs__rc_of_a_small_program.snap+62−0