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

Unified Diff: test/mjsunit/wasm/ensure-wasm-binaries-up-to-date.js

Issue 2345593003: [wasm] Master CL for Binary 0xC changes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test failures and TSAN races. Created 4 years, 3 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/debug-disassembly.js ('k') | test/mjsunit/wasm/exceptions.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/ensure-wasm-binaries-up-to-date.js
diff --git a/test/mjsunit/wasm/ensure-wasm-binaries-up-to-date.js b/test/mjsunit/wasm/ensure-wasm-binaries-up-to-date.js
index 3fab8c65b1e7a00232035098c633ad5124d03668..26bdf8ece81b3bed5b7c8c32a96e52c466304f77 100644
--- a/test/mjsunit/wasm/ensure-wasm-binaries-up-to-date.js
+++ b/test/mjsunit/wasm/ensure-wasm-binaries-up-to-date.js
@@ -7,6 +7,27 @@
// Ensure checked in wasm binaries used by integration tests from v8 hosts
// (such as chromium) are up to date.
+(function print_incrementer() {
+ if (true) return; // remove to regenerate the module
+
+ load('test/mjsunit/wasm/wasm-constants.js');
+ load('test/mjsunit/wasm/wasm-module-builder.js');
+
+ var module = new WasmModuleBuilder();
+ module.addFunction(undefined, kSig_i_i)
+ .addBody([kExprGetLocal, 0, kExprI32Const, 1, kExprI32Add])
+ .exportAs("increment");
+
+ var buffer = module.toBuffer(true);
+ var view = new Uint8Array(buffer);
+
+ print("const unsigned char module[] = {");
+ for (var i = 0; i < buffer.byteLength; i++) {
+ print(" " + view[i] + ",");
+ }
+ print("};");
+})();
+
(function ensure_incrementer() {
var buff = readbuffer("test/mjsunit/wasm/incrementer.wasm");
var mod = new WebAssembly.Module(buff);
« no previous file with comments | « test/mjsunit/wasm/debug-disassembly.js ('k') | test/mjsunit/wasm/exceptions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698