diff options
| author | Mel <einebeere@gmail.com> | 2022-05-18 02:19:35 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2022-05-18 02:19:35 +0200 |
| commit | 0a7927ed8257857c8d114387f12844312f6da51c (patch) | |
| tree | 5fa9829606be6dc1c0f0d4b092a4bc29a96e24a0 /pkg/lang/vm/vm.go | |
| parent | 3abe18ffca484efc3553aa4ec9cb677eb19cdaf4 (diff) | |
| download | jinx-0a7927ed8257857c8d114387f12844312f6da51c.tar.zst jinx-0a7927ed8257857c8d114387f12844312f6da51c.zip | |
Start call stack with at least one frame
Diffstat (limited to 'pkg/lang/vm/vm.go')
| -rw-r--r-- | pkg/lang/vm/vm.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/lang/vm/vm.go b/pkg/lang/vm/vm.go index 434eae3..a6e1fb8 100644 --- a/pkg/lang/vm/vm.go +++ b/pkg/lang/vm/vm.go @@ -13,8 +13,9 @@ type VM struct { func New(code *code.Code) *VM { return &VM{ - code: code, - pc: 0, + code: code, + pc: 0, + stack: NewCallStack(), } } |
