abrown commented on Issue #1352:
I don't understand a couple of things:
- from #1329, why isn't
is_wasm_parameter
calledis_normal_parameter
?- why add a new method instead of just changing
param_types
andreturn_types
to use thisis_wasm_parameter/is_normal_parameter
?
abrown edited a comment on Issue #1352:
I don't understand a couple of things:
- from #1329, why isn't
is_wasm_parameter
calledis_normal_parameter
? (edit: I mean, don't translations from other languages--e.g. rust--need the same type of check?)- why add a new method instead of just changing
param_types
andreturn_types
to use thisis_wasm_parameter/is_normal_parameter
?
sunfishcode commented on Issue #1352:
It's
is_wasm_parameter
because it isn't counting the number ofArgumentPurpose::Normal
parameters. Wasmtime is now passing extra arguments which areNormal
but are not wasm parameters, so we addedis_wasm_parameter
to theFuncEnvironment
trait to let it tell cranelift-wasm which parameters need to be translated as wasm locals.I think we can just remove the
param_types
function altogether now. We could removereturn_types
too, if we added a similaris_wasm_return
toFuncEnvironment
, which we don't need right now, but would keep things consistent.
alexcrichton commented on Issue #1352:
Sure thing, updated!
alexcrichton commented on Issue #1352:
Would it be ok to get a release to land https://github.com/bytecodealliance/wasmtime/pull/789?
Last updated: Nov 22 2024 at 17:03 UTC