-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't support stack machine "flat" syntax #15
Comments
Hey, it looks like that binary is in |
Cleos told me, that it was wast: "saving wast..", but anyway, thank you! |
Then there must be a mistake on Ceos' behalf, because You can see the two syntax's mix on line 178 of (func $75
(param $0 i32)
(param $1 i64)
(param $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i64)
(local $6 i64)
(local $7 i64)
(local $8 i64)
(local $9 i32)
(local $10 i32)
(local $11 i64)
get_global $31
i32.const 128
i32.sub
tee_local $3
set_global $31
get_local $0
i64.load
call $35
i32.const 0
set_local $4
;; truncated function body
) In the example on the wasmdec README, you can clearly see the difference (func $addTwo (param i32 i32) (result i32)
(return
(i32.add
;; Notice how the get_local instructions are structured like a tree rather than stack values
(get_local 0)
(get_local 1)
)
)
) |
oh, I see. Thank, I'll write to eosio. |
Sorry, the WebAssembly text format is a bit confusing. The Both formats allow S-expressions (what we call "folded") and the "flat" syntax. The folded format is syntactic sugar for the flat format. For example, Some tools like binaryen only parse the folded format, so many of the |
Thank you for the clarification, I'll rename the issue accordingly. |
I have attached a WASM in txt format from EOS that shows the same issues. File: chintailease.txt |
Hi!
If u will get wast from EOS system (cleos -u https://mainnet.eoscalgary.io:443 get code eosio.token -c a.txt ) , it cannot be decompiled by your decompile, but wast is ok.
sorce code cpp is here : https://github.com/EOSIO/eosio.contracts/blob/master/eosio.token/include/eosio.token/eosio.token.hpp
wast is attached: a.txt
The text was updated successfully, but these errors were encountered: