about summary refs log tree commit diff
path: root/pkg/lang/vm/text
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-08-31 14:22:28 +0000
committerMel <einebeere@gmail.com>2022-08-31 14:22:28 +0000
commitaeb63ade341572bb307f23ff7c501c48957cc7d4 (patch)
tree93cea2e714a212a4a93cc567951a18e6dff4e2f3 /pkg/lang/vm/text
parentc935cde4c4ec65192d51933202e270da1e4d2050 (diff)
downloadjinx-aeb63ade341572bb307f23ff7c501c48957cc7d4.tar.zst
jinx-aeb63ade341572bb307f23ff7c501c48957cc7d4.zip
Remove temporary array operations
Diffstat (limited to 'pkg/lang/vm/text')
-rw-r--r--pkg/lang/vm/text/decompiler.go4
-rw-r--r--pkg/lang/vm/text/op.go3
2 files changed, 1 insertions, 6 deletions
diff --git a/pkg/lang/vm/text/decompiler.go b/pkg/lang/vm/text/decompiler.go
index ed48412..ba08f1c 100644
--- a/pkg/lang/vm/text/decompiler.go
+++ b/pkg/lang/vm/text/decompiler.go
@@ -78,9 +78,7 @@ func (d *Decompiler) decompileInstruction(bc code.Raw) (string, code.Raw) {
 		code.OpGte,
 		code.OpIndex,
 		code.OpSetAtIndex,
-		code.OpRet,
-		code.OpTempArrLen,
-		code.OpTempArrPush:
+		code.OpRet:
 		return opString, bc[1:]
 
 	// Operations that take an int.
diff --git a/pkg/lang/vm/text/op.go b/pkg/lang/vm/text/op.go
index 213656b..d94ff1b 100644
--- a/pkg/lang/vm/text/op.go
+++ b/pkg/lang/vm/text/op.go
@@ -46,9 +46,6 @@ var (
 		code.OpJt:           "jt",
 		code.OpJf:           "jf",
 		code.OpRet:          "ret",
-
-		code.OpTempArrPush: "temp_arr_push",
-		code.OpTempArrLen:  "temp_arr_len",
 	}
 	stringToOp = reverseMap(opToString)
 )