saulecabrera requested alexcrichton for a review on PR #6443.
saulecabrera opened PR #6443 from saulecabrera:winch-drop-func-env
to bytecodealliance:main
:
This commit is a small cleanup to drop the usage of the
FuncEnv
trait.In https://github.com/bytecodealliance/wasmtime/pull/6358, we agreed on making
winch-codegen
directly depend onwasmtime-environ
.Introducing a direct relatioship between
winch-codegen
andwasmtime-environ
means that theFuncEnv
trait is no longer serving its original purpose, and we can drop the usage of the trait and use the types exposed fromwinch-codegen
directly instead.Even though this change drops the
FuncEnv
trait, it still keeps aFuncEnv
struct, which is used during code generation.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
saulecabrera requested elliottt for a review on PR #6443.
saulecabrera requested wasmtime-compiler-reviewers for a review on PR #6443.
saulecabrera requested wasmtime-core-reviewers for a review on PR #6443.
saulecabrera requested wasmtime-default-reviewers for a review on PR #6443.
saulecabrera updated PR #6443.
alexcrichton submitted PR review.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
I'm not all that familiar with the design of these generics, but I would naively expect that a choice of either
MacroAssembler
orABI
would implyPtrSize
. If that's the case would it perhaps be possible to haveP
be an associated type of either prior trait?Or would it, for example, make sense to put both
ABI
andPtrSize
inside of theMacroAssembler
trait as an associated type?
saulecabrera created PR review comment:
That makes sense. Taking a closer look, I'm leaning towards having the
PtrSize
as an associated type inside theABI
trait, which already provides similar information (e.g.word_bytes
).
saulecabrera created PR review comment:
Upon a second look, having both of these as associated types in the
MacroAssembler
makes more sense I think, and it's going to result in quite a decent cut in boilerplate. I started working on the change, but I'm anticipating that it's going to be a decent amount of changes unrelated to this PR, so I think I prefer landing this and putting the refactor once this lands.
saulecabrera created PR review comment:
It's also in my todo to standardize the signatures in the
ABI
trait (e.g. there's no reason to have them borrow&self
), so I'm thinking I'll bundle those improvements in the refactoring too.
saulecabrera updated PR #6443.
saulecabrera merged PR #6443.
Last updated: Nov 22 2024 at 17:03 UTC