forked from TrueCloudLab/neoneo-go
vm: pretty-print ST*/LD* opcodes
This commit is contained in:
parent
7d08d38cd2
commit
9cc6e22365
1 changed files with 2 additions and 0 deletions
|
@ -202,6 +202,8 @@ func (v *VM) PrintOps() {
|
||||||
opcode.PUSHINT64, opcode.PUSHINT128, opcode.PUSHINT256:
|
opcode.PUSHINT64, opcode.PUSHINT128, opcode.PUSHINT256:
|
||||||
val := bigint.FromBytes(parameter)
|
val := bigint.FromBytes(parameter)
|
||||||
desc = fmt.Sprintf("%d (%x)", val, 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:
|
default:
|
||||||
if utf8.Valid(parameter) {
|
if utf8.Valid(parameter) {
|
||||||
desc = fmt.Sprintf("%x (%q)", parameter, parameter)
|
desc = fmt.Sprintf("%x (%q)", parameter, parameter)
|
||||||
|
|
Loading…
Reference in a new issue