From c4497933e7ff21ca42c3751c614811d340759571 Mon Sep 17 00:00:00 2001 From: underscorediscovery Date: Tue, 1 Oct 2019 23:28:01 -0700 Subject: [PATCH] minor fixes --- src/vm/wren_compiler.c | 2 +- src/vm/wren_debug.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vm/wren_compiler.c b/src/vm/wren_compiler.c index 08b2cfc2..ec05b45c 100644 --- a/src/vm/wren_compiler.c +++ b/src/vm/wren_compiler.c @@ -2197,7 +2197,7 @@ static void field(Compiler* compiler, bool canAssign) // Compiles a read or assignment to [variable]. static void bareName(Compiler* compiler, bool canAssign, Variable variable) { - // If there's an "=" after a bare name, it's a variable assignment. + // If there's an assignment after a bare name, it's a variable assignment. if (canAssign && isAssignment(compiler)) { // Compile the assignment and right-hand side. diff --git a/src/vm/wren_debug.c b/src/vm/wren_debug.c index d0b8b743..28152b21 100644 --- a/src/vm/wren_debug.c +++ b/src/vm/wren_debug.c @@ -177,6 +177,11 @@ static int dumpInstruction(WrenVM* vm, ObjFn* fn, int i, int* lastLine) case CODE_STORE_FIELD: BYTE_INSTRUCTION("STORE_FIELD"); case CODE_POP: printf("POP\n"); break; + case CODE_PUSH: { + int count = READ_BYTE(); + printf("PUSH %d\n", count); + break; + } case CODE_CALL_0: case CODE_CALL_1: