Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework stack-frame handling in the VM
Instead of having the stack frames as `ref` objects that are chained together via their `next` field, store them in a `seq` in `TCtx`. This makes it easier to reason about them, and also connects the frames to their owning context. While the frame list should ideally be first-in last-out (stack), this isn't currently possible due to how exception handling is implemented. In addition, the stack trace now always includes the entry function and also the number of skipped frames. A nil access error when no entry function exists (happens when a statement is evaluated) is also fixed.
- Loading branch information