You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On line 839, t2aDefns is invoked on the functions of the module with the context C. However, this context doesn't contain the signatures for the types in the module, only their ids. So, when t2a goes to calculate the indices of the variables in a function body, it doesn't have the function parameters for named types.
Here's an example from the wasm tests func.wast that fails because of this:
$var here is assigned index 0. But, it should be 1, as the (param i32) in the function signature is at index 0 already. So, when "f" gets invoked, (local.get 0) is evaluated and returned, which is where the 42 that was passed in is at.
Some information about a module doesn't get passed down to one of the text2abstract operations that need it:
wasm-semantics/pykwasm/src/pykwasm/kdist/wasm-semantics/wasm-text.md
Lines 837 to 849 in b353017
On line 839,
t2aDefns
is invoked on the functions of the module with the contextC
. However, this context doesn't contain the signatures for the types in the module, only their ids. So, when t2a goes to calculate the indices of the variables in a function body, it doesn't have the function parameters for named types.Here's an example from the wasm tests
func.wast
that fails because of this:$var
here is assigned index 0. But, it should be 1, as the(param i32)
in the function signature is at index 0 already. So, when"f"
gets invoked,(local.get 0)
is evaluated and returned, which is where the42
that was passed in is at.Relevant rules:
wasm-semantics/pykwasm/src/pykwasm/kdist/wasm-semantics/wasm-text.md
Lines 883 to 888 in b353017
wasm-semantics/pykwasm/src/pykwasm/kdist/wasm-semantics/wasm-text.md
Lines 1309 to 1325 in b353017
The text was updated successfully, but these errors were encountered: