diff options
| author | mryouse | 2023-05-25 01:59:59 +0000 |
|---|---|---|
| committer | mryouse | 2023-05-25 01:59:59 +0000 |
| commit | b2a3dc3b78dd6ce60b7c5e685fbbb40c84434691 (patch) | |
| tree | 5bd7d8f03f521f606ac9b490da74f14ccf7ae136 /vm.d | |
| parent | cb64344f44cdbcd31f4d775bd1865b1af142bba3 (diff) | |
add nil value
Diffstat (limited to 'vm.d')
| -rw-r--r-- | vm.d | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -223,7 +223,6 @@ class VM { InterpretResult run() { writeln("== VM running =="); - writefln("> > > framecount: %d", this.frameCount); while (true) { if (DEBUG) { writeln(" Stacks:"); @@ -264,6 +263,8 @@ class VM { } Value val = this.popA(); this.globals[asString(name)] = val; + Value nil = { ValueType.NIL }; + this.pushA(nil); break; case OpCode.OP_GET_GLOBAL: Value name = this.current.func.chunk.constants[this.readByte()]; |
