diff options
| author | Ben Winston | 2023-05-20 18:58:51 -0400 |
|---|---|---|
| committer | Ben Winston | 2023-05-20 18:58:51 -0400 |
| commit | 38dc63a67879a42f208b5642a8590e1192e8e2e5 (patch) | |
| tree | e36a71c752d8d0c89e343ef02e295115d3e19ce7 /dbg.d | |
| parent | 0c70372774297272dd14133d48e40e9a3624420a (diff) | |
global variables
Diffstat (limited to 'dbg.d')
| -rw-r--r-- | dbg.d | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -47,6 +47,10 @@ void printForm(Form f, string prefix = "") { writefln("%s with %d body lines", prefix, func.funcBody.length); writefln("%s <end fn %s>", prefix, func.name.name); break; + case FormType.DEF: + Def def = cast(Def)f; + writefln("%s var: %s", prefix, def.name.name); + break; default: writeln("printFormDefault"); break; @@ -101,6 +105,8 @@ int disassemble(Chunk chunk, int offset) { return simpleInstruction("OP_SUBTRACT", offset); case OpCode.OP_CONSTANT: return constantInstruction("OP_CONSTANT", chunk, offset); + case OpCode.OP_DEFINE_GLOBAL: + return constantInstruction("OP_DEFINE_GLOBAL", chunk, offset); case OpCode.OP_NEGATE: return simpleInstruction("OP_NEGATE", offset); case OpCode.OP_POP: |
