aboutsummaryrefslogtreecommitdiff
path: root/pkg/lang/vm/text
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-05-20 00:05:20 +0200
committerMel <einebeere@gmail.com>2022-05-20 00:05:20 +0200
commit360f092fe693f66219891581417026a3cffd2709 (patch)
tree61370560419450ce0b306a68d20e85ce2c9f69a5 /pkg/lang/vm/text
parentfe93d5c015e8e2c883d2c1e74f2e5ce071256cb5 (diff)
downloadjinx-360f092fe693f66219891581417026a3cffd2709.tar.zst
jinx-360f092fe693f66219891581417026a3cffd2709.zip
More VM operations needed for Fib
Diffstat (limited to 'pkg/lang/vm/text')
-rw-r--r--pkg/lang/vm/text/op.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkg/lang/vm/text/op.go b/pkg/lang/vm/text/op.go
index a8f3663..bbcc2d4 100644
--- a/pkg/lang/vm/text/op.go
+++ b/pkg/lang/vm/text/op.go
@@ -15,18 +15,25 @@ var (
code.OpPushArray: "push_array",
code.OpPushFunction: "push_function",
code.OpPushObject: "push_object",
+ code.OpDrop: "drop",
code.OpGetGlobal: "get_global",
code.OpGetLocal: "get_local",
code.OpGetMember: "get_member",
+ code.OpGetMethod: "get_method",
code.OpGetArg: "get_arg",
code.OpGetEnv: "get_env",
code.OpAdd: "add",
code.OpSub: "sub",
code.OpIndex: "index",
+ code.OpLte: "lte",
code.OpCall: "call",
code.OpJmp: "jmp",
- code.OpJez: "jez",
+ code.OpJt: "jt",
+ code.OpJf: "jf",
code.OpRet: "ret",
+
+ code.OpTempArrPush: "temp_arr_push",
+ code.OpTempArrLen: "temp_arr_len",
}
stringToOp = reverseMap(opToString)
)