Skip to content

Wasm binary to wat conversion with type numbers but no renumbering? #5785

Answered by kripken
osa1 asked this question in Q&A
Discussion options

You must be logged in to vote

I don't think there is a way to do that, sorry. --name-types picks arbitrary indexes for the types, and it's not possible to match them to the binary indexes, because Binaryen will reorder types in the binary writing. That is, in Binaryen IR we don't have type indexes, just types. When we write a binary we collect the types, sort by use frequency (to minimize binary size) and then use those indexes.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by osa1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants