Summary
vera/wasm.py is currently 2,317 lines — already past the complexity threshold. The WasmContext class carries a lot of state across operators, primitives, arithmetic, memory, and string handling.
Suggested decomposition
Split into a vera/wasm/ package:
context.py — WasmContext class, core state management
slots.py — WasmSlotEnv, De Bruijn slot resolution
strings.py — StringPool, string encoding/decoding
operators.py — arithmetic, comparison, boolean operators
memory.py — linear memory, array access, ADT layout
__init__.py — re-export public API
When
After C7 series completes. C7e (multi-module codegen) will touch wasm.py significantly, so decomposing before that work is done would be premature.
Summary
vera/wasm.pyis currently 2,317 lines — already past the complexity threshold. TheWasmContextclass carries a lot of state across operators, primitives, arithmetic, memory, and string handling.Suggested decomposition
Split into a
vera/wasm/package:context.py— WasmContext class, core state managementslots.py— WasmSlotEnv, De Bruijn slot resolutionstrings.py— StringPool, string encoding/decodingoperators.py— arithmetic, comparison, boolean operatorsmemory.py— linear memory, array access, ADT layout__init__.py— re-export public APIWhen
After C7 series completes. C7e (multi-module codegen) will touch wasm.py significantly, so decomposing before that work is done would be premature.