Skip to content

effects: rt_* only in Srs.* handlers; tests use requests (E2b + E3 part 2) - #38

Merged
vic merged 2 commits into
mainfrom
e2b-rt-outside-srs
Nov 9, 2026
Merged

vic merged 2 commits into
mainfrom
e2b-rt-outside-srs

Conversation

@vic

@vic vic commented Nov 9, 2026

Copy link
Copy Markdown
Owner

E2b + E3 part 2 of the effects epic. rt_* is now legal only in the body of a Srs.* handler; the tests and libs use effect requests.

  • error[rt-outside-srs]: Ty.Mode is now Run(by: User | Srs) or Comptime. A handler named Srs.* runs as Srs. A call of an rt_* extern anywhere else, spec bodies included, is the error.
  • Arena and Heap are renamed Srs.Arena and Srs.Heap. Emit keys its inline bump allocator on Srs.Arena (vt_Srs__Arena).
  • Tests and libs: rt_print* and rt_str_* calls become Console.* and Str.*. Each main that prints opens handle io = Srs.Console(). The test handlers use the stateless shape. The test-only externs rt_same and rt_handle are renamed ext_same and ext_handle. parse.out is updated: it prints the migrated contracts.srs.
  • The innermost capability is found among the locals still in reach by name. A capability whose name an inner val shadows is skipped. Before, the C referred to the val. Bead vic-mgd4 tracks the same question in Flow.

Tests:

  • New: neg/eff_rt and prog/eff_shadow.
  • neg/spec_extern keeps rt_print. It now reports both impure-call and rt-outside-srs.

Bootstrap: two rounds to the fixpoint (n2 == n3). The seed is the new compiler's own C.

Local gate: 199 ok and 2 FAIL, both load timeouts on a busy host. s2c_parse passes when rerun alone. s2c_types compiles in 3.4 s under load 8 (limit 5 s) and its output matches.

Mutants: 3 of 3 killed.

  • Shadow skip removed: prog/eff_shadow gets no-op add.
  • User-mode rt check removed: neg/eff_rt fails.
  • Prefix test changed: neg/eff_rt fails.

vic added 2 commits November 9, 2026 06:54
…]); tests and libs use effect requests (E3 part 2): Console.*, Str.*, Srs.Arena/Srs.Heap, stateless test handlers, test externs ext_same/ext_handle; a capability whose name an inner local shadows is not the innermost
@vic
vic merged commit 8e870c5 into main Nov 9, 2026
3 checks passed
@vic
vic deleted the e2b-rt-outside-srs branch November 17, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant