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

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

Issue 2648223004: [wasm] Change the constant kV8MaxWasmTableSize to a command line flag. (Closed)
Patch Set: Use the wasm-limits.h values in flag-definitions.h Created 3 years, 10 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-limits.h ('k') | test/fuzzer/wasm.cc » ('j') | 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 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 weak_exported_functions->set(export_index, *weak_export); 1977 weak_exported_functions->set(export_index, *weak_export);
1978 break; 1978 break;
1979 } 1979 }
1980 case kExternalTable: { 1980 case kExternalTable: {
1981 // Export a table as a WebAssembly.Table object. 1981 // Export a table as a WebAssembly.Table object.
1982 TableInstance& table_instance = table_instances_[exp.index]; 1982 TableInstance& table_instance = table_instances_[exp.index];
1983 WasmIndirectFunctionTable& table = 1983 WasmIndirectFunctionTable& table =
1984 module_->function_tables[exp.index]; 1984 module_->function_tables[exp.index];
1985 if (table_instance.table_object.is_null()) { 1985 if (table_instance.table_object.is_null()) {
1986 uint32_t maximum = 1986 uint32_t maximum =
1987 table.has_max ? table.max_size : kV8MaxWasmTableSize; 1987 table.has_max ? table.max_size : FLAG_wasm_max_table_size;
1988 table_instance.table_object = WasmTableObject::New( 1988 table_instance.table_object = WasmTableObject::New(
1989 isolate_, table.min_size, maximum, &table_instance.js_wrappers); 1989 isolate_, table.min_size, maximum, &table_instance.js_wrappers);
1990 } 1990 }
1991 desc.set_value(table_instance.table_object); 1991 desc.set_value(table_instance.table_object);
1992 break; 1992 break;
1993 } 1993 }
1994 case kExternalMemory: { 1994 case kExternalMemory: {
1995 // Export the memory as a WebAssembly.Memory object. 1995 // Export the memory as a WebAssembly.Memory object.
1996 Handle<WasmMemoryObject> memory_object; 1996 Handle<WasmMemoryObject> memory_object;
1997 if (!instance->has_memory_object()) { 1997 if (!instance->has_memory_object()) {
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
2684 2684
2685 JSObject::AddProperty(entry, name_string, export_name.ToHandleChecked(), 2685 JSObject::AddProperty(entry, name_string, export_name.ToHandleChecked(),
2686 NONE); 2686 NONE);
2687 JSObject::AddProperty(entry, kind_string, export_kind, NONE); 2687 JSObject::AddProperty(entry, kind_string, export_kind, NONE);
2688 2688
2689 storage->set(index, *entry); 2689 storage->set(index, *entry);
2690 } 2690 }
2691 2691
2692 return array_object; 2692 return array_object;
2693 } 2693 }
OLDNEW
« no previous file with comments | « src/wasm/wasm-limits.h ('k') | test/fuzzer/wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698