commit 8bd0c44a615ac3bc42d1d06db1aa0edb6e79f9de
parent 8c287b909bb4d6ed2254717b51fbb1ca24177b04
Author: lash <dev@holbrook.no>
Date: Sun, 2 Apr 2023 12:20:35 +0100
Remove BACK symbol
Diffstat:
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git 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 <symbol> <signal>` - Jump to symbol if signal is set (see `signals` below).
* `CROAK <signal>` - Clear state and restart execution from top if signal is set (see `signals` below).
* `LOAD <symbol> <size>` - 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
@@ -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
@@ -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: