Stream: git-wasmtime

Topic: wasmtime / PR #4353 Change `ComponentType::{size, align}`...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2022 at 15:02):

alexcrichton opened PR #4353 from const-size to main:

The more I read over this again the more I think that these should be
constants to explicitly indicate that we're supposed to be able to
optimize for them. Currently I'm predicting that adding memory64 support
will probably double the surface area of each trait (e.g. lower32 and
lower64) rather than have a parameter passed around. This is in the
hopes that having specialized 32 and 64-bit paths will enable better
optimizations within each path instead of having to check all bounds
everywhere.

Additionally one day I'd like to have fn load(bytes: &[u8; Self::SIZE32]) but that doesn't work today in Rust.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2022 at 15:02):

alexcrichton requested fitzgen for a review on PR #4353.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2022 at 15:24):

dicej created PR review comment:

Would it be possible to make next_field const so we could keep using it here?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2022 at 15:24):

dicej submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2022 at 15:24):

dicej submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2022 at 15:26):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2022 at 15:26):

alexcrichton created PR review comment:

I initially attempted that yeah but in const Rust we apparently can't take &mut references which prevented me from calling that. I figured that the amount of duplication here isn't too too big so I'm hoping it won't be too bad.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2022 at 21:27):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2022 at 21:30):

alexcrichton merged PR #4353.


Last updated: Nov 22 2024 at 16:03 UTC