1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Merge branch 'disassm-libs' of github.com:disintar/ton into disassm-libs

This commit is contained in:
Andrey Tvorozhkov 2024-01-10 15:48:05 +03:00
commit bc8878f5bd

View file

@ -13,7 +13,7 @@ variable 'disasm
vmlib@ {
."// LIB: " swap X. cr ref@ <s disasm
} {
2drop // Only library special cell supported
drop // Lib not found
} cond
} {
drop // Only library special cell supported
@ -59,7 +59,7 @@ variable @indent @indent 0!
drop dup count 2 = stack-disasm? and { second `LSHIFT# swap pair } if } {
dup `RSHIFT eq? {
drop dup count 2 = stack-disasm? and { second `RSHIFT# swap pair } if } {
drop
drop
} cond } cond } cond
} : adjust-op
@ -138,7 +138,7 @@ variable @contX variable @contY variable @cdict
.indent type ." {" cr +indent @cdict @ @cdict null! unpair
rot {
swap .indent . ."=> <{" cr +indent disasm -indent .indent ."}>" cr true
} swap ' idictforeach ' dictforeach cond drop
} swap ' idictforeach ' dictforeach cond drop
-indent .indent ."}" cr
} : show-const-dict-op
@ -172,4 +172,4 @@ variable @contX variable @contY variable @cdict
{ { fetch-one-op } { swap @curop ! adjust-op show-op } while } : disasm-slice
{ { disasm-slice dup sbitrefs 1- or 0= } { ref@ <s } while flush-dict flush-cont } : disasm-chain
{ @curop @ swap disasm-chain dup sbitrefs or { .indent ."Cannot disassemble: " csr. } { drop } cond @curop ! }
'disasm !
'disasm !