mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
b16d363657
This commit modifies WasmMemoryObject, ArrayBufferObject, SharedArrayBufferObject to support conditionally using huge memory based on the global flag. The memory logic is fairly involved and entangled, making this change a bit tricky. The following changes were made: * Stopped conditionally compiling huge memory constants and prefixed them with `Huge` * Stopped conditionally compiling `ExtendBufferMapping` and `wasmMovingGrowToSize` * Renamed `CreateBuffer` to `CreateSpecificWasmBuffer` * For clarity * Moved maxSize clamping into `CreateSpecificWasmBuffer` * Lets us keep one callsite to `wasm::IsHugeMemoryEnabled` during memory creation * Moved mappedSize computation out of `RawbufT::Allocate` to `CreateSpecificWasmBuffer` * Lets us keep one callsite to `wasm::IsHugeMemoryEnabled` during memory creation * Moved `boundsCheckLimit` computation from `ArrayBufferObjectMaybeShared` to `WasmMemoryObject` * Lets WasmMemoryObject be responsible for knowing whether it is 'huge' or not * Added method to determine if a `WasmMemoryObject` is huge or not * Lets use know whether we support `movingGrow` or have a `boundsCheckLimit` * Refactored `WasmMemoryObject::grow` to have one callsite to `wasmMovingGrowToSize` * For clarity * Added release assert in `Module::instantiateMemory` * Ensures we have a huge memory or bounds checks if needed Differential Revision: https://phabricator.services.mozilla.com/D41869 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
ductwork/debugger | ||
examples | ||
ipc | ||
public | ||
rust | ||
src | ||
xpconnect | ||
app.mozbuild | ||
ffi.configure | ||
moz.build | ||
moz.configure | ||
sub.configure |