Commit 8b380d51 authored by mtrofin's avatar mtrofin Committed by Commit bot

[wasm] Remove max_mem_pages from WasmCompiledModule

It's not necessary at finalization, and may be obtained from
the shared, native object.

BUG=

Review-Url: https://codereview.chromium.org/2804863002
Cr-Commit-Position: refs/heads/master@{#44441}
parent dd7ce93c
......@@ -647,7 +647,7 @@ uint32_t WasmInstanceObject::GetMaxMemoryPages() {
if (maximum < FLAG_wasm_max_mem_pages) return maximum;
}
}
uint32_t compiled_max_pages = compiled_module()->max_mem_pages();
uint32_t compiled_max_pages = compiled_module()->module()->max_mem_pages;
Isolate* isolate = GetIsolate();
auto* histogram = (compiled_module()->module()->is_wasm()
? isolate->counters()->wasm_wasm_max_mem_pages_count()
......@@ -969,11 +969,10 @@ Handle<WasmCompiledModule> WasmCompiledModule::New(
maybe_empty_function_tables.ToHandleChecked());
}
// TODO(mtrofin): we copy these because the order of finalization isn't
// reliable, and we need some of these at Reset (which is called at
// reliable, and we need these at Reset (which is called at
// finalization). If the order were reliable, and top-down, we could instead
// just get them from shared().
compiled_module->set_min_mem_pages(shared->module()->min_mem_pages);
compiled_module->set_max_mem_pages(shared->module()->max_mem_pages);
compiled_module->set_num_imported_functions(
shared->module()->num_imported_functions);
return compiled_module;
......
......@@ -356,7 +356,6 @@ class WasmCompiledModule : public FixedArray {
MACRO(LARGE_NUMBER, size_t, globals_start) \
MACRO(LARGE_NUMBER, uint32_t, embedded_mem_size) \
MACRO(SMALL_CONST_NUMBER, uint32_t, min_mem_pages) \
MACRO(SMALL_CONST_NUMBER, uint32_t, max_mem_pages) \
MACRO(WEAK_LINK, WasmCompiledModule, next_instance) \
MACRO(WEAK_LINK, WasmCompiledModule, prev_instance) \
MACRO(WEAK_LINK, JSObject, owning_instance) \
......
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