From 9cc6e2236539e885cffe600fa2806f7928d3117a Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Sat, 25 Jul 2020 09:50:09 +0300 Subject: [PATCH] vm: pretty-print ST*/LD* opcodes --- pkg/vm/vm.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/vm/vm.go b/pkg/vm/vm.go index df2cb76c8..247631d38 100644 --- a/pkg/vm/vm.go +++ b/pkg/vm/vm.go @@ -202,6 +202,8 @@ func (v *VM) PrintOps() { opcode.PUSHINT64, opcode.PUSHINT128, opcode.PUSHINT256: val := bigint.FromBytes(parameter) desc = fmt.Sprintf("%d (%x)", val, parameter) + case opcode.LDLOC, opcode.STLOC, opcode.LDARG, opcode.STARG, opcode.LDSFLD, opcode.STSFLD: + desc = fmt.Sprintf("%d (%x)", parameter[0], parameter) default: if utf8.Valid(parameter) { desc = fmt.Sprintf("%x (%q)", parameter, parameter)