v3 Capstone
Full pipeline
- lex -> parse -> analyze -> compile -> encode -> decode -> run
- VM runs decoded artifact only
Boundary contracts
- parser/analyzer output must match compiler input contract
- compiler output must be serializable and decodable
- decode errors stop execution
- no stage reads internal data from neighbors
Closures and collections
- nested function capture remains valid across compile boundary
- arrays/maps pass as heap-backed runtime objects
- closure call expects callable runtime value
Determinism
- same source should yield stable artifact shape
- same source should produce stable run result
- each
CompileAndRungets fresh VM state
Error ordering
- parse/lex first
- first analyzer diagnostic
- compile/encode then decode
- runtime only for fully validated artifacts
Practical checks
- capture visibility and return values
- map/array construction + index write/read
- decode failure blocks runtime
- call to non-callable value errors at runtime
1 / 1