aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-07-27 21:18:40 +0000
committerMel <einebeere@gmail.com>2022-07-27 21:18:40 +0000
commitbe281507daf2d1d7f66f32daa42ef78daa48c5dd (patch)
tree7c1c597d7608312fea21b1e47b6950685ee47db7
parent22a69393f58abcf3bcf9e7039f994dae78422213 (diff)
downloadjinx-be281507daf2d1d7f66f32daa42ef78daa48c5dd.tar.zst
jinx-be281507daf2d1d7f66f32daa42ef78daa48c5dd.zip
Update VM usages
-rw-r--r--cmd/lang/main.go2
-rw-r--r--cmd/vm/main.go2
-rw-r--r--pkg/bot/cmds.go4
3 files changed, 4 insertions, 4 deletions
diff --git a/cmd/lang/main.go b/cmd/lang/main.go
index 042a84e..0a8eee8 100644
--- a/cmd/lang/main.go
+++ b/cmd/lang/main.go
@@ -65,7 +65,7 @@ func main() {
}
if *run {
- vm := vm.New(&bc)
+ vm := vm.New(&bc, nil)
if err := vm.Run(); err != nil {
exit("execution failed: %v", err)
}
diff --git a/cmd/vm/main.go b/cmd/vm/main.go
index 013899a..5ee954e 100644
--- a/cmd/vm/main.go
+++ b/cmd/vm/main.go
@@ -90,7 +90,7 @@ func main() {
}
if *run {
- vm := vm.New(&bc)
+ vm := vm.New(&bc, nil)
if err := vm.Run(); err != nil {
exit("execution failed: %v", err)
}
diff --git a/pkg/bot/cmds.go b/pkg/bot/cmds.go
index ec0a943..b5ded6f 100644
--- a/pkg/bot/cmds.go
+++ b/pkg/bot/cmds.go
@@ -35,7 +35,7 @@ func vmCmd(b *Bot, content string, msg events.Message) error {
return err
}
- vm := vm.New(&bc)
+ vm := vm.New(&bc, nil)
if err := vm.Run(); err != nil {
return err
@@ -80,7 +80,7 @@ func langCmd(b *Bot, content string, msg events.Message) error {
b.client.SendMessage(msg.ChannelID, fmt.Sprintf("resulting decompiled bytecode:\n```\n%s\n```", decompRes))
- vm := vm.New(&bc)
+ vm := vm.New(&bc, nil)
b.client.SendMessage(msg.ChannelID, "executing code...")