wasm-tools icon indicating copy to clipboard operation
wasm-tools copied to clipboard

Correctly calculate type size for indexed types

Open imikushin opened this issue 2 years ago • 0 comments

Currently, for funcs the size is just a number of all of func's parameters and returned values + 1, and, for arrays it's just 2.

          This'll need to change because the "type size" query is intended to encapsulate the recursive size of the type, so it needs to be 1 plus the size of the payload of the array.

Originally posted by @alexcrichton in https://github.com/bytecodealliance/wasm-tools/pull/1022#discussion_r1192457577

We need to calculate size for all known user defined types: funds, arrays and structs.

imikushin avatar May 16 '23 20:05 imikushin