From d84c0f36afcde4e5af2907d70931de75957d5277 Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 16 Aug 2022 20:33:41 +0000 Subject: Implement setting values at index in an array --- pkg/lang/vm/text/decompiler.go | 1 + pkg/lang/vm/text/op.go | 1 + 2 files changed, 2 insertions(+) (limited to 'pkg/lang/vm/text') diff --git a/pkg/lang/vm/text/decompiler.go b/pkg/lang/vm/text/decompiler.go index 8a85d49..df9e1ed 100644 --- a/pkg/lang/vm/text/decompiler.go +++ b/pkg/lang/vm/text/decompiler.go @@ -67,6 +67,7 @@ func (d *Decompiler) decompileInstruction(bc code.Raw) (string, code.Raw) { code.OpLte, code.OpGte, code.OpIndex, + code.OpSetAtIndex, code.OpRet, code.OpTempArrLen, code.OpTempArrPush: diff --git a/pkg/lang/vm/text/op.go b/pkg/lang/vm/text/op.go index ff3c568..213656b 100644 --- a/pkg/lang/vm/text/op.go +++ b/pkg/lang/vm/text/op.go @@ -40,6 +40,7 @@ var ( code.OpLte: "lte", code.OpGte: "gte", code.OpIndex: "index", + code.OpSetAtIndex: "set_at_index", code.OpCall: "call", code.OpJmp: "jmp", code.OpJt: "jt", -- cgit 1.4.1