From e2c284b57641b5feec9a8d04313b0cd6d556e860 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Sun, 24 Oct 2021 18:26:42 +0200 Subject: Add lambda type and minor file cleanup --- src/bytecode/debug.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/bytecode/debug.h') diff --git a/src/bytecode/debug.h b/src/bytecode/debug.h index 6703e68..7673703 100755 --- a/src/bytecode/debug.h +++ b/src/bytecode/debug.h @@ -2,6 +2,7 @@ #define BDL_DEBUG_H #include "chunk.h" +#include "objects.h" void disassemble_chunk(Chunk *chunk, const char *name); size_t disassemble_instruction(Chunk *chunk, size_t offset); @@ -51,7 +52,7 @@ disassemble_chunk(Chunk *chunk, const char *name) { offset = 0; while (offset < array_size(chunk->constants)) { printf("\t%03ld -> ", offset); - display(chunk->constants[offset]); + object_display(chunk->constants[offset]); printf("\n"); offset++; } @@ -72,7 +73,7 @@ disassemble_instruction(Chunk *chunk, size_t offset) { case OP_CONSTANT: { u8 constant = chunk->code[offset + 1]; printf("%-16s %4d -> ", ops_str[instruction], constant); - display(chunk->constants[constant]); + object_display(chunk->constants[constant]); printf("\n"); return offset + 2; } break; -- cgit v1.2.1