aboutsummaryrefslogtreecommitdiff
path: root/compiler.d
diff options
context:
space:
mode:
authormryouse2023-06-01 20:17:37 -0400
committermryouse2023-06-01 20:17:37 -0400
commitaf07e3fba55ef98aabd54057c6e3433734b81111 (patch)
tree87c7bb5e83c9beeed488dd1bdb9254eb450ffdec /compiler.d
parentd034b5d68b4addfa0a305746f9804d6db5cce988 (diff)
split concat/append into 2 ops
Diffstat (limited to 'compiler.d')
-rw-r--r--compiler.d3
1 files changed, 1 insertions, 2 deletions
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) {