From 8bd0c44a615ac3bc42d1d06db1aa0edb6e79f9de Mon Sep 17 00:00:00 2001 From: lash Date: Sun, 2 Apr 2023 12:20:35 +0100 Subject: [PATCH] Remove BACK symbol --- README.md | 1 - go/vm/opcodes.go | 2 +- go/vm/runner.go | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index d62b608..0ee3724 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ Original motivation was to create a simple templating renderer for USSD clients, The VM defines the following opcode symbols: -* `BACK` - Return to the previous execution frame (will fail if at top frame). It leaves to the state of the execution layer to define what "previous" means. * `CATCH ` - Jump to symbol if signal is set (see `signals` below). * `CROAK ` - Clear state and restart execution from top if signal is set (see `signals` below). * `LOAD ` - Execute the code symbol `symbol` and cache the data, constrained to the given `size`. Can be exposed with `MAP` within scope, diff --git a/go/vm/opcodes.go b/go/vm/opcodes.go index 14e1e77..d375e88 100644 --- a/go/vm/opcodes.go +++ b/go/vm/opcodes.go @@ -6,7 +6,7 @@ type Opcode uint16 // VM Opcodes const ( - BACK = 0 + NOOP = 0 CATCH = 1 CROAK = 2 LOAD = 3 diff --git a/go/vm/runner.go b/go/vm/runner.go index 730af93..c41df01 100644 --- a/go/vm/runner.go +++ b/go/vm/runner.go @@ -38,8 +38,6 @@ func Run(instruction []byte, st *state.State, rs resource.Resource, ctx context. instruction, err = RunMap(instruction[2:], st, rs, ctx) case MOVE: instruction, err = RunMove(instruction[2:], st, rs, ctx) - case BACK: - instruction, err = RunBack(instruction[2:], st, rs, ctx) case INCMP: instruction, err = RunIncmp(instruction[2:], st, rs, ctx) case HALT: