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

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

Issue 2049513003: [wasm] Support undefined indirect table entries, behind a flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix formatting Created 4 years, 6 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
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 bfc4460d91b899d4ca640502cbfd625ef35ea1b4..4cdcab8a63059f9171cb44bdfc132117c23d7ca7 100644
--- a/test/mjsunit/wasm/wasm-module-builder.js
+++ b/test/mjsunit/wasm/wasm-module-builder.js
@@ -36,6 +36,7 @@ function WasmModuleBuilder() {
this.function_table = [];
this.data_segments = [];
this.explicit = [];
+ this.pad = null;
return this;
}
@@ -48,6 +49,11 @@ WasmModuleBuilder.prototype.addMemory = function(min, max, exp) {
return this;
}
+WasmModuleBuilder.prototype.addPad = function(size) {
+ this.pad = size;
+ return this;
+}
+
WasmModuleBuilder.prototype.addExplicitSection = function(bytes) {
this.explicit.push(bytes);
return this;
@@ -323,6 +329,14 @@ WasmModuleBuilder.prototype.toArray = function(debug) {
});
}
+ // Add an indirect function table pad section.
+ if (wasm.pad !== null) {
+ if (debug) print("emitting indirect function table pad @ " + bytes.length);
bradn 2016/06/21 17:42:37 >80 columns
+ emit_section(bytes, kDeclFunctionTablePad, function(bytes) {
+ emit_varint(bytes, wasm.pad);
+ });
+ }
+
// End the module.
if (debug) print("emitting end @ " + bytes.length);
emit_section(bytes, kDeclEnd, function(bytes) {});
« test/mjsunit/wasm/default-func-call.js ('K') | « test/mjsunit/wasm/wasm-constants.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698