Skip to content

Add disasm libs#851

Open
tvorogme wants to merge 6 commits intoton-blockchain:testnetfrom
disintar:disassm-libs
Open

Add disasm libs#851
tvorogme wants to merge 6 commits intoton-blockchain:testnetfrom
disintar:disassm-libs

Conversation

@tvorogme
Copy link
Copy Markdown
Contributor

@tvorogme tvorogme commented Jan 9, 2024

This is not the best way, but it's really helpful. Please notice me, if it's needed in main repo.

The main problem is that a lot of users use PUSHREF in mainnet to load libs, and current disassembler not disassemble them. The one way it can be done is follow: check if cell is special, and if it is, and we know such lib - add lib disassemble to code.

Also, I've added <spec to load special cells as slices, it might be needed :)

Before:

(592A3699870F04DA0FFDF26D0FF47AD0684F5B48B4FBB144854397FBFD2EA46C) PUSHREF
BLESS
EXECUTE

After:

// LIB: DA2BB4D0547F78C3B2199F9815274E14BB1F31F737F71B0572039980F5B6F9C4 
    0 SETCP
    19 (xC_) DICTPUSHCONST
    DICTIGETJMPZ {
      0 => <{
        70 PUSHINT
        DIV
      }>
    }
    11 THROWARG
(592A3699870F04DA0FFDF26D0FF47AD0684F5B48B4FBB144854397FBFD2EA46C) PUSHREF
BLESS
EXECUTE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant