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 3): native ctl — one-shot continuations by stack switching

- tilrt/handlers.rs:
  - tl_handle_ctl runs a handler's body on its own fiber, and the
    calling stack drives it (return clause, final ctl catch);
  - tl_perform_ctl suspends to the handler named by its marker, forwarded
    through the handlers in between;
  - resume is a runtime closure valid once per suspension;
  - a body never resumed is cancelled (TL_YIELD_CANCEL) and unwound, so
    its references are dropped;
  - preemption inside a fiber is forwarded up to the actor.
- Codegen emits tl_handle_ctl and tl_perform_ctl. Every non-actor
  tests/run program now runs natively, including effects and
  resume_twice.
- New run test (generators.til): 20000 yields with preemption inside the
  fiber, cancellation of a body holding a list, forwarding through an
  inner ctl handler, and final ctl leaving a fiber.

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

olivier · il y a 1 mois · 2819763bfb3b9e1a2deaa756d9e226d3f58916b9

Parents d15b7d0

15 fichiers modifiés, 657 ajouts, 50 suppressions