From 7d08d38cd2844510cb75082c97d5a6bfcca7a567 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Fri, 24 Jul 2020 17:21:46 +0300 Subject: [PATCH] vm: pretty-print PUSHINT* opcodes --- pkg/vm/vm.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/vm/vm.go b/pkg/vm/vm.go index cfaf03f1c..df2cb76c8 100644 --- a/pkg/vm/vm.go +++ b/pkg/vm/vm.go @@ -198,6 +198,10 @@ func (v *VM) PrintOps() { desc = fmt.Sprintf("%d local, %d arg", parameter[0], parameter[1]) case opcode.SYSCALL: desc = fmt.Sprintf("%q", parameter) + case opcode.PUSHINT8, opcode.PUSHINT16, opcode.PUSHINT32, + opcode.PUSHINT64, opcode.PUSHINT128, opcode.PUSHINT256: + val := bigint.FromBytes(parameter) + desc = fmt.Sprintf("%d (%x)", val, parameter) default: if utf8.Valid(parameter) { desc = fmt.Sprintf("%x (%q)", parameter, parameter)