diff --git a/pkg/vm/vm.go b/pkg/vm/vm.go index 14a3a435e..cfaf03f1c 100644 --- a/pkg/vm/vm.go +++ b/pkg/vm/vm.go @@ -191,6 +191,9 @@ func (v *VM) PrintOps() { v.getOffsetDesc(ctx, catchP), v.getOffsetDesc(ctx, finallyP)) case opcode.INITSSLOT: desc = fmt.Sprint(parameter[0]) + case opcode.CONVERT, opcode.ISTYPE: + typ := stackitem.Type(parameter[0]) + desc = fmt.Sprintf("%s (%x)", typ, parameter[0]) case opcode.INITSLOT: desc = fmt.Sprintf("%d local, %d arg", parameter[0], parameter[1]) case opcode.SYSCALL: diff --git a/pkg/vm/vm_test.go b/pkg/vm/vm_test.go index cb55e949b..a61b41a4f 100644 --- a/pkg/vm/vm_test.go +++ b/pkg/vm/vm_test.go @@ -244,6 +244,8 @@ func TestISTYPE(t *testing.T) { func testCONVERT(to stackitem.Type, item, res stackitem.Item) func(t *testing.T) { return func(t *testing.T) { prog := []byte{byte(opcode.CONVERT), byte(to)} + v := load(prog) + v.PrintOps() runWithArgs(t, prog, res, item) } }