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.
Dernier runRéussi#121 · main · 16 min 23 s
0Étoiles
0Forks
40Issues
Runtime ABI 3: ctx->xargs points at the running thread's slots (issue #137)
The 26 slots for call arguments after the sixth were part of every actor's context: 208 of the 336 bytes of an Actor, though they only hold values between a caller's stores and the callee's copy. ctx->xargs is now a pointer, which run_slice sets to the resuming scheduler thread's slots (sched::XARGS). Generated C is unchanged (ctx->xargs[i] reads the same), the context shrinks to 48 bytes, and TL_ABI_VERSION goes to 3. Why it is safe: nothing suspends between the stores and the copy. Generated functions copy their arguments before their preemption check; closure entries copy, drop the closure and store again before their tail call; the runtime's callers (prims::call_closure, effect clauses, callbacks) call straight into generated code. Callbacks run only on their extern call's thread, and the blocking pool never runs Louise code (ADR 0015). tests/run/many_arguments.lse: 32 actors calling a 9-parameter recursive function, a closure with captures and 7 arguments, and a 7-argument ctl operation, preempted and moved between threads. With the pointer set only on an actor's first slice (a stale thread's slots), it gave wrong results or crashed in 10 runs of 10 on 4 and 8 threads; it passes in 10 of 10 otherwise, on 1 to 22 threads, with and without immediate hibernation, with the leak oracle at 0. No test program had more than six parameters before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parents 8f14728
7 fichiers modifiés, 105 ajouts, 13 suppressions
docs/runtime-abi.md+5−2runtime/louise_rt/include/louise_rt.h+4−3runtime/louise_rt/src/abi.rs+10−4runtime/louise_rt/src/handlers.rs+1−1runtime/louise_rt/src/prims.rs+1−1runtime/louise_rt/src/sched.rs+15−2tests/run/many_arguments.lse+69−0