Skip to content

Commit 919ec34

Browse files
hyperpolymathclaude
andcommitted
chore(state): close BUG-005, update effects to interpreter-complete
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b58178a commit 919ec34

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

.machine_readable/6a2/STATE.a2ml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ project = "affinescript"
66
version = "0.1.0"
77
last-updated = "2026-04-11"
88
status = "active"
9+
session-note-2026-04-11-b = "BUG-005 CLOSED: WasmGC silent drop+null fallbacks replaced with explicit CodegenError (UnboundFunction for missing func_indices entries, UnsupportedFeature for indirect/higher-order calls). Effects runtime SHIPPED: TopEffect now registers each op as a PerformEffect-raising VBuiltin in interp.ml (was no-op). Multi-arg handler arg_vals bug fixed. ExprResume wired to __resume__ continuation in handler env. WasmGC path: TopEffect ops registered as unreachable stubs with correct func_indices offsets; ExprHandle and ExprResume reject with UnsupportedFeature (EH proposal or CPS transform required for full dispatch)."
910

1011
[project-context]
1112
name = "affinescript"
@@ -44,7 +45,7 @@ affine-types = "wired-and-reachable (Track A Manhattan plan complete 2026-04-10.
4445
linear-arrows = "parse-only (-[q]-> syntax accepted by parser; quantity annotation not propagated into enforcement)"
4546
borrow-checker = "phase-3-in-progress (see lib/borrow.ml [IMPL-DEP: Phase 3])"
4647
row-polymorphism = "60% (records + effects rows implemented in typecheck/unify; not fully exercised end-to-end)"
47-
effects = "declarations-only (effect types parsed and tracked; handler semantics not yet in interpreter or backends)"
48+
effects = "interpreter-complete (handler dispatch, PerformEffect propagation, ExprResume, multi-arg ops all wired in interp.ml 2026-04-11). WasmGC: ops registered as unreachable stubs; ExprHandle/ExprResume reject with UnsupportedFeature — full WASM dispatch needs EH proposal or CPS transform."
4849
dependent-types = "parse-only (TRefined AST node exists and refinement predicates parse, but predicates do not reduce; no SMT/decision procedure wired in)"
4950
traits = "70% (registry and lookup work; generic trait resolution needs unification integration)"
5051

@@ -152,22 +153,21 @@ evidence = "lib/quantity.ml:245-249 (comment admits the gap)"
152153
fix-plan = "Track D (borrow checker Phase 3) — lambda capture analysis is part of the borrow/ownership story. Not A3 scope."
153154
regression-test = "Track D fixture — deferred until borrow checker lands."
154155

155-
[[open-bug]]
156+
[[closed-bug]]
156157
id = "BUG-005"
157158
severity = "medium"
158159
category = "codegen"
159160
title = "WasmGC backend silently drops unknown function calls"
160161
discovered = "2026-04-10"
162+
fixed = "2026-04-11"
161163
description = """
162-
lib/codegen_gc.ml ExprApp handling silently emits 'drop all args + push null'
163-
when the callee is not in the func_indices table, and does the same for
164-
indirect calls. This is placeholder behaviour that produces wrong code rather
165-
than failing loudly. Any program that reaches codegen with an unresolved
166-
function call will compile to nonsense at runtime.
164+
lib/codegen_gc.ml ExprApp handling silently emitted 'drop all args + push null'
165+
when the callee was not in the func_indices table, and did the same for
166+
indirect calls. This was placeholder behaviour that produced wrong code rather
167+
than failing loudly.
167168
"""
168-
evidence = "lib/codegen_gc.ml gen_gc_expr ExprApp case (the 38-line block added as part of the in-progress WasmGC work)"
169-
fix-plan = "Replace silent drops with explicit CodegenError. Direct-call path (via func_indices) and int/float builtin coercions stay — they're correct. Only the fallback arms need to fail loudly."
170-
regression-test = "Add a fixture that intentionally references an unknown function name and expects a loud compile error."
169+
fix = "Both fallback arms replaced with explicit CodegenError. Direct-call miss → Error (UnboundFunction id.name). Indirect/higher-order callee → Error (UnsupportedFeature \"indirect / higher-order call in WasmGC backend (call_ref not yet implemented)\"). New UnboundFunction variant added to codegen_error and format_codegen_error. commit b58178a."
170+
regression-test-status = "deferred — fixture needs a known-unknown function name in a WasmGC compile path"
171171

172172
# ─── Deferred upgrade: bring .machine_readable/ to current standards ──────────
173173
# AffineScript predates most of the current hyperpolymath .machine_readable/

0 commit comments

Comments
 (0)