alexcrichton opened PR #4236 from lift-lower-split
to main
:
This commit splits the current
ComponentValue
trait into three
separate traits:
ComponentType
- contains size/align/typecheck information in
addition to the "lower" representation.
Lift
- only containslift
andload
Lower
- only containslower
andstore
When describing the original implementation of host functions to Nick he
immediately pointed out this superior solution to the traits involved
with Wasmtime's support for typed parameters/returns in exported and
imported functions. Instead of having dynamic errors at runtime for
things like "you can't lift aString
" that's instead a static
compile-time error now.While I was doing this split I also refactored the
ComponentParams
trait a bit to haveComponentType
as a supertrait instead of a subtype
which made its implementations a bit more compact. Additionally its impl
blocks were folded into the existing tuple impl blocks.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
alexcrichton requested fitzgen for a review on PR #4236.
fitzgen submitted PR review.
alexcrichton merged PR #4236.
Last updated: Dec 23 2024 at 12:05 UTC