Commit b350024e authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[cleanup] Remove --wasm-grow-shaerd-memory

R=gdeepti@chromium.org

Bug: v8:11384
Change-Id: Icbf4ec5014bb1553da618b5958a3e1d5f487cfde
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2700037Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72856}
parent 6c922e39
......@@ -932,9 +932,6 @@ DEFINE_DEBUG_BOOL(trace_wasm_lazy_compilation, false,
"trace lazy compilation of wasm functions")
DEFINE_BOOL(wasm_lazy_validation, false,
"enable lazy validation for lazily compiled wasm functions")
DEFINE_BOOL(wasm_grow_shared_memory, true,
"allow growing shared WebAssembly memory objects")
DEFINE_BOOL(wasm_simd_post_mvp, false,
"allow experimental SIMD operations for prototyping that are not "
"included in the current proposal")
......
......@@ -858,7 +858,7 @@ MaybeHandle<WasmMemoryObject> WasmMemoryObject::New(Isolate* isolate,
// limits the number of memories that can be allocated, causing OOMs in many
// tests. For now, on 32-bit we never reserve more than initial, unless the
// memory is shared.
if (shared == SharedFlag::kNotShared || !FLAG_wasm_grow_shared_memory) {
if (shared == SharedFlag::kNotShared) {
heuristic_maximum = initial;
}
#endif
......@@ -936,11 +936,11 @@ int32_t WasmMemoryObject::Grow(Isolate* isolate,
// Try to handle shared memory first.
if (old_buffer->is_shared()) {
if (FLAG_wasm_grow_shared_memory) {
base::Optional<size_t> result =
backing_store->GrowWasmMemoryInPlace(isolate, pages, maximum_pages);
// Shared memories can only be grown in place; no copying.
if (result.has_value()) {
if (!result.has_value()) return -1;
BackingStore::BroadcastSharedWasmMemoryGrow(isolate, backing_store);
// Broadcasting the update should update this memory object too.
CHECK_NE(*old_buffer, memory_object->array_buffer());
......@@ -958,9 +958,6 @@ int32_t WasmMemoryObject::Grow(Isolate* isolate,
// read-modify-write behavior required by the spec.
return static_cast<int32_t>(result.value()); // success
}
}
return -1;
}
base::Optional<size_t> result =
backing_store->GrowWasmMemoryInPlace(isolate, pages, maximum_pages);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment