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

Unified Diff: test/mjsunit/wasm/wasm-module-builder.js

Issue 2643783002: [wasm] check that there is at most 1 table (Closed)
Patch Set: Tweak module builder 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 | « test/mjsunit/wasm/indirect-tables.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/wasm-module-builder.js
diff --git a/test/mjsunit/wasm/wasm-module-builder.js b/test/mjsunit/wasm/wasm-module-builder.js
index d7bf9a67c881c9a677711ba98a930e112712beae..5fade5bc8dbda288463539b565bf9342211e299a 100644
--- a/test/mjsunit/wasm/wasm-module-builder.js
+++ b/test/mjsunit/wasm/wasm-module-builder.js
@@ -227,12 +227,12 @@ class WasmModuleBuilder {
this.exports.push({name: name, kind: kExternalMemory, index: 0});
}
- addFunctionTableInit(base, is_global, array) {
+ addFunctionTableInit(base, is_global, array, is_import = false) {
this.function_table_inits.push({base: base, is_global: is_global,
array: array});
if (!is_global) {
var length = base + array.length;
- if (length > this.function_table_length) {
+ if (length > this.function_table_length && !is_import) {
this.function_table_length = length;
}
}
« no previous file with comments | « test/mjsunit/wasm/indirect-tables.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698