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

Unified Diff: src/wasm/module-decoder.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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/flags.cc ('k') | src/wasm/wasm-js.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/module-decoder.cc
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
index d3feb4c3571b62f673ad90ccefc26ea80b907680..255b76d18f2fa939ff42aa5b4c6dd5163853ddec 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -313,8 +313,8 @@ class ModuleDecoder : public Decoder {
expect_u8("element type", kWasmAnyFunctionTypeForm);
WasmIndirectFunctionTable* table = &module->function_tables.back();
consume_resizable_limits("element count", "elements",
- kV8MaxWasmTableSize, &table->min_size,
- &table->has_max, kV8MaxWasmTableSize,
+ FLAG_wasm_max_table_size, &table->min_size,
+ &table->has_max, FLAG_wasm_max_table_size,
&table->max_size);
break;
}
@@ -381,9 +381,10 @@ class ModuleDecoder : public Decoder {
false, false, SignatureMap()});
WasmIndirectFunctionTable* table = &module->function_tables.back();
expect_u8("table type", kWasmAnyFunctionTypeForm);
- consume_resizable_limits(
- "table elements", "elements", kV8MaxWasmTableSize, &table->min_size,
- &table->has_max, kV8MaxWasmTableSize, &table->max_size);
+ consume_resizable_limits("table elements", "elements",
+ FLAG_wasm_max_table_size, &table->min_size,
+ &table->has_max, FLAG_wasm_max_table_size,
+ &table->max_size);
}
section_iter.advance();
}
@@ -526,7 +527,7 @@ class ModuleDecoder : public Decoder {
// ===== Elements section ================================================
if (section_iter.section_code() == kElementSectionCode) {
uint32_t element_count =
- consume_count("element count", kV8MaxWasmTableSize);
+ consume_count("element count", FLAG_wasm_max_table_size);
for (uint32_t i = 0; ok() && i < element_count; ++i) {
const byte* pos = pc();
uint32_t table_index = consume_u32v("table index");
« no previous file with comments | « src/flags.cc ('k') | src/wasm/wasm-js.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698