-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More refactoring to remove
MemoryStyle
(#9543)
* Remove tuple return value of `MemorysStyle::for_memory` The second option is always `tunables.memory_guard_size`, so propagate this to the various locations reading it. * Remove `offset_guard_size` from compiler `Heap` structs Push reading `Tunables` down further into where it's needed instead of having duplicate storage per-heap. * Plumb wasm memory types further down in Winch This commit plumbs `wasmtime_environ::Memory` further down the stack in Winch to where heaps are processed. This avoids an extra layer of indirection through a `Heap` type which peels apart a `Memory` to pick out a few fields. In the future this'll be used with more helpers on `Memory` to simplify the static/dynamic memory cases. * Plumb memory type further down in Cranelift This commit removes the `HeapStyle` structure from Cranelift and instead plumbs the `wasmtime_environ::Memory` type further down the stack through in `HeapData` (same as Winch before this commit). This removes redundant fields in `MemoryType` and continues to push down the `MemoryStyle` structure even further. This commit additionally and unconditionally defines a `GlobalValue` for the heap limit of memory. This is unused most of the time for 32-bit wasm and is conditionally used depending on how bounds checks are generated. This is a small amount of bloat to each function since previously functions that didn't need this `GlobalValue` elided it. A future refactoring, however, will make it a bit more clear how this is used even for "static" memories. * Update test expectations
- Loading branch information
1 parent
b5627a8
commit 65181b3
Showing
99 changed files
with
654 additions
and
590 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.