Correctly count the number of wasm parameters. (#1337)
* Correctly count the number of wasm parameters. Following up on #1329, this further replaces `num_normal_params` with a function which calls `is_wasm_parameter` to correctly count the number of wasm parameters a function has. * Move is_wasm_parameter's implementation into the trait.
This commit is contained in:
@@ -201,10 +201,6 @@ impl<'dummy_environment> TargetEnvironment for DummyFuncEnvironment<'dummy_envir
|
||||
}
|
||||
|
||||
impl<'dummy_environment> FuncEnvironment for DummyFuncEnvironment<'dummy_environment> {
|
||||
fn is_wasm_parameter(&self, func: &ir::Function, index: usize) -> bool {
|
||||
func.signature.params[index].purpose == ir::ArgumentPurpose::Normal
|
||||
}
|
||||
|
||||
fn return_mode(&self) -> ReturnMode {
|
||||
self.return_mode
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user