aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/compile/compile.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/compile/compile.go b/internal/compile/compile.go
index 99e9d54..8da415b 100644
--- a/internal/compile/compile.go
+++ b/internal/compile/compile.go
@@ -152,6 +152,7 @@ var opcodeNames = [...]string{
DUP2: "dup2",
DUP: "dup",
EQL: "eql",
+ EXCH: "exch",
FALSE: "false",
FREE: "free",
GE: "ge",
@@ -271,7 +272,9 @@ var stackEffect = [...]int8{
func (op Opcode) String() string {
if op < OpcodeMax {
- return opcodeNames[op]
+ if name := opcodeNames[op]; name != "" {
+ return name
+ }
}
return fmt.Sprintf("illegal op (%d)", op)
}