aboutsummaryrefslogtreecommitdiff
path: root/compiler.d
diff options
context:
space:
mode:
Diffstat (limited to 'compiler.d')
-rw-r--r--compiler.d4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler.d b/compiler.d
index 119414c..3b684d4 100644
--- a/compiler.d
+++ b/compiler.d
@@ -716,7 +716,9 @@ class Compiler {
Function finish() {
this.func.chunk.writeOp(OpCode.OP_RETURN, current.line);
- disassembleChunk(this.func.chunk, to!string(func));
+ if (DEBUG) {
+ disassembleChunk(this.func.chunk, to!string(func));
+ }
return this.func;
}