diff options
| author | Mel <einebeere@gmail.com> | 2022-08-16 20:33:41 +0000 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2022-08-16 20:33:41 +0000 |
| commit | d84c0f36afcde4e5af2907d70931de75957d5277 (patch) | |
| tree | 9eb056ca70c6bedf0ee6456baa4c1f7251384463 /pkg/lang/vm/text | |
| parent | 51eb7626b788dc031c53016f203a54a2af762d9e (diff) | |
| download | jinx-d84c0f36afcde4e5af2907d70931de75957d5277.tar.zst jinx-d84c0f36afcde4e5af2907d70931de75957d5277.zip | |
Implement setting values at index in an array
Diffstat (limited to 'pkg/lang/vm/text')
| -rw-r--r-- | pkg/lang/vm/text/decompiler.go | 1 | ||||
| -rw-r--r-- | pkg/lang/vm/text/op.go | 1 |
2 files changed, 2 insertions, 0 deletions
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", |
