aboutsummaryrefslogtreecommitdiff
path: root/pkg/lang/vm/text
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/lang/vm/text')
-rw-r--r--pkg/lang/vm/text/compiler_test.go6
-rw-r--r--pkg/lang/vm/text/op.go2
2 files changed, 3 insertions, 5 deletions
diff --git a/pkg/lang/vm/text/compiler_test.go b/pkg/lang/vm/text/compiler_test.go
index cf2f6a9..237e884 100644
--- a/pkg/lang/vm/text/compiler_test.go
+++ b/pkg/lang/vm/text/compiler_test.go
@@ -13,8 +13,7 @@ import (
func TestSimple(t *testing.T) {
src := `
- get_arg
- get_arg
+ add
sub
ret
`
@@ -24,8 +23,7 @@ func TestSimple(t *testing.T) {
require.NoError(t, err)
parts := [][]byte{
- opBin(code.OpGetArg),
- opBin(code.OpGetArg),
+ opBin(code.OpAdd),
opBin(code.OpSub),
opBin(code.OpRet),
}
diff --git a/pkg/lang/vm/text/op.go b/pkg/lang/vm/text/op.go
index bbcc2d4..df40d8f 100644
--- a/pkg/lang/vm/text/op.go
+++ b/pkg/lang/vm/text/op.go
@@ -15,12 +15,12 @@ var (
code.OpPushArray: "push_array",
code.OpPushFunction: "push_function",
code.OpPushObject: "push_object",
+ code.OpShift: "shift",
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",