Upgrade to parity-wasm v0.42.1

This commit is contained in:
Michael Mueller
2020-12-08 12:50:41 +01:00
parent 7da376062a
commit d6127afd1d
5 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -173,7 +173,7 @@ pub(crate) fn compute(func_idx: u32, module: &elements::Module) -> Result<u32, E
// Add implicit frame for the function. Breaks to this frame and execution of
// the last end should deal with this frame.
let func_arity: u32 = if func_signature.return_type().is_some() {
let func_arity: u32 = if !func_signature.results().is_empty() {
1
} else {
0
@@ -279,7 +279,7 @@ pub(crate) fn compute(func_idx: u32, module: &elements::Module) -> Result<u32, E
stack.pop_values(ty.params().len() as u32)?;
// Push result of the function execution to the stack.
let callee_arity = if ty.return_type().is_some() { 1 } else { 0 };
let callee_arity = if !ty.results().is_empty() { 1 } else { 0 };
stack.push_values(callee_arity)?;
}
CallIndirect(x, _) => {
@@ -295,7 +295,7 @@ pub(crate) fn compute(func_idx: u32, module: &elements::Module) -> Result<u32, E
stack.pop_values(ty.params().len() as u32)?;
// Push result of the function execution to the stack.
let callee_arity = if ty.return_type().is_some() { 1 } else { 0 };
let callee_arity = if !ty.results().is_empty() { 1 } else { 0 };
stack.push_values(callee_arity)?;
}
Drop => {
+1 -1
View File
@@ -99,7 +99,7 @@ pub(crate) fn generate_thunks(
// Signature of the thunk should match the original function signature.
.signature()
.with_params(thunk.signature.params().to_vec())
.with_return_type(thunk.signature.return_type())
.with_results(thunk.signature.results().to_vec())
.build()
.body()
.with_instructions(elements::Instructions::new(