Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: src/wasm/wasm-module.cc

Issue 2619113002: [wasm] remove unused WasmInstance fields (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/wasm/wasm-module.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 6
7 #include "src/assembler-inl.h" 7 #include "src/assembler-inl.h"
8 #include "src/base/adapters.h" 8 #include "src/base/adapters.h"
9 #include "src/base/atomic-utils.h" 9 #include "src/base/atomic-utils.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 841
842 WasmInstance temp_instance(this); 842 WasmInstance temp_instance(this);
843 temp_instance.context = isolate->native_context(); 843 temp_instance.context = isolate->native_context();
844 temp_instance.mem_size = WasmModule::kPageSize * min_mem_pages; 844 temp_instance.mem_size = WasmModule::kPageSize * min_mem_pages;
845 temp_instance.mem_start = nullptr; 845 temp_instance.mem_start = nullptr;
846 temp_instance.globals_start = nullptr; 846 temp_instance.globals_start = nullptr;
847 847
848 // Initialize the indirect tables with placeholders. 848 // Initialize the indirect tables with placeholders.
849 int function_table_count = static_cast<int>(function_tables.size()); 849 int function_table_count = static_cast<int>(function_tables.size());
850 Handle<FixedArray> function_tables = 850 Handle<FixedArray> function_tables =
851 factory->NewFixedArray(function_table_count); 851 factory->NewFixedArray(function_table_count, TENURED);
852 for (int i = 0; i < function_table_count; ++i) { 852 for (int i = 0; i < function_table_count; ++i) {
853 temp_instance.function_tables[i] = factory->NewFixedArray(0); 853 temp_instance.function_tables[i] = factory->NewFixedArray(0, TENURED);
854 function_tables->set(i, *temp_instance.function_tables[i]); 854 function_tables->set(i, *temp_instance.function_tables[i]);
855 } 855 }
856 856
857 HistogramTimerScope wasm_compile_module_time_scope( 857 HistogramTimerScope wasm_compile_module_time_scope(
858 isolate->counters()->wasm_compile_module_time()); 858 isolate->counters()->wasm_compile_module_time());
859 859
860 ModuleBytesEnv module_env(this, &temp_instance, wire_bytes); 860 ModuleBytesEnv module_env(this, &temp_instance, wire_bytes);
861 861
862 // The {code_table} array contains import wrappers and functions (which 862 // The {code_table} array contains import wrappers and functions (which
863 // are both included in {functions.size()}, and export wrappers. 863 // are both included in {functions.size()}, and export wrappers.
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after
2298 CHECK(!compiled_module->has_weak_owning_instance()); 2298 CHECK(!compiled_module->has_weak_owning_instance());
2299 } 2299 }
2300 2300
2301 void testing::ValidateOrphanedInstance(Isolate* isolate, 2301 void testing::ValidateOrphanedInstance(Isolate* isolate,
2302 Handle<WasmInstanceObject> instance) { 2302 Handle<WasmInstanceObject> instance) {
2303 DisallowHeapAllocation no_gc; 2303 DisallowHeapAllocation no_gc;
2304 WasmCompiledModule* compiled_module = instance->compiled_module(); 2304 WasmCompiledModule* compiled_module = instance->compiled_module();
2305 CHECK(compiled_module->has_weak_wasm_module()); 2305 CHECK(compiled_module->has_weak_wasm_module());
2306 CHECK(compiled_module->ptr_to_weak_wasm_module()->cleared()); 2306 CHECK(compiled_module->ptr_to_weak_wasm_module()->cleared());
2307 } 2307 }
OLDNEW
« no previous file with comments | « src/wasm/wasm-module.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698