seam refusal + control tests: a runtime binding can short-circuit

Prediction 3 was FALSE. I expected refusal to be impossible through the seam
because the entry indirection discarded its return. One line:

    { el_val_t __s = el_seam_run(EL_STR(f), 0, 0); if (__s) return __s; }

work() returns 7; bound to a refusing construct AFTER the build it returns 42.
So three of the five compile-time kinds are runtime-bindable: entry injection,
exit injection, and refusal. wraps_body needs invocation control and
prohibits_outside is compile-time by nature.

104/104 native compiler tests pass.
This commit is contained in:
bigmerge
2026-08-17 08:40:10 -05:00
parent 35b07bade2
commit 886626a64e
2 changed files with 22 additions and 1 deletions
+1 -1
View File
@@ -3208,7 +3208,7 @@ fn cg_entry_seam(stmt: Map<String, Any>, fn_name: String) -> Void {
// RUNTIME SEAM: codegen cannot know which constructs will be bound to this
// fn after the binary exists, so the indirection is unconditional. What
// applies is resolved at execution against a table written later.
emit_line(" el_seam_run(EL_STR(" + c_str_lit(fn_name) + "), 0, 0);")
emit_line(" { el_val_t __s = el_seam_run(EL_STR(" + c_str_lit(fn_name) + "), 0, 0); if (__s) return __s; }")
let gdl = stmt["decorators"]
let n_gdl: Int = native_list_len(gdl)
let gi = 0