-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
Summary
Add VM call-frame support and compiler lowering for user function declarations/calls, including proper return semantics.
Scope (MVP)
- VM call model:
- call frames stack
- per-frame instruction pointer and base slot
- argument passing and return value handling
- Bytecode/compiler support for:
- function declaration objects
- call instruction with arity checks
- return instruction semantics
- Integrate builtin call path with VM call convention
Out of Scope
- Closures/upvalues
- Methods/receiver injection for struct methods
- Tail-call optimization
- try/catch propagation through frames (follow-up issue)
Acceptance Criteria
- User-defined functions compile and execute through VM call frames
- Nested calls return correct values and preserve caller locals
- Arity mismatch and invalid-call runtime errors are reported clearly
- Tests cover declaration, call, nested call, and return behavior
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels