Prepare FACT for supporting more memory types#12972
Open
alexcrichton wants to merge 1 commit intobytecodealliance:mainfrom
Open
Prepare FACT for supporting more memory types#12972alexcrichton wants to merge 1 commit intobytecodealliance:mainfrom
alexcrichton wants to merge 1 commit intobytecodealliance:mainfrom
Conversation
This commit refactors the internals of FACT, wasmtime's component-to-component trampoline compiler, to better handle memories of different types. When FACT was originally written it had support for memory64, despite components not having support for memory64, but since then more types of memories have showed up in core wasm. For example FACT didn't handle shared memories or custom-page-sizes memories well. This commit manually updates some `memory64: bool` fields/etc to `ty: Memory` to have a full-fledged memory type on-hand during translation. This affects how the memory is imported, for example, as well as bounds checks. Note that components do not currently support 64-bit memories, nor shared memories, nor custom-page-size memories. This refactoring is for future support of these features internally within FACT itself, but more support will be necessary to fully support these features throughout the runtime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit refactors the internals of FACT, wasmtime's component-to-component trampoline compiler, to better handle memories of different types. When FACT was originally written it had support for memory64, despite components not having support for memory64, but since then more types of memories have showed up in core wasm. For example FACT didn't handle shared memories or custom-page-sizes memories well. This commit manually updates some
memory64: boolfields/etc toty: Memoryto have a full-fledged memory type on-hand during translation. This affects how the memory is imported, for example, as well as bounds checks.Note that components do not currently support 64-bit memories, nor shared memories, nor custom-page-size memories. This refactoring is for future support of these features internally within FACT itself, but more support will be necessary to fully support these features throughout the runtime.