From af07e3fba55ef98aabd54057c6e3433734b81111 Mon Sep 17 00:00:00 2001 From: mryouse Date: Thu, 1 Jun 2023 20:17:37 -0400 Subject: split concat/append into 2 ops --- compiler.d | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler.d') diff --git a/compiler.d b/compiler.d index 28785a6..8a00547 100644 --- a/compiler.d +++ b/compiler.d @@ -566,7 +566,6 @@ class Compiler { if (args.length == 0) { this.func.chunk.writeOp(OpCode.OP_LIST, -1); this.func.chunk.writeOp(to!ubyte(0), -1); - //this.advance(); return; } int length = to!int(args.length); @@ -601,7 +600,7 @@ class Compiler { // TODO if this is used for both string/list, should be able to typecheck second arg here ValueType vt2 = this.resolve(args[1], ValueType.ANY); - this.func.chunk.writeOp(OpCode.OP_CONCAT, args[0].line); + this.func.chunk.writeOp(OpCode.OP_APPEND, args[0].line); } void compileIn(Form[] args) { -- cgit v1.2.3