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

Unified Diff: test/mjsunit/wasm/globals.js

Issue 2627723007: [wasm] Exporting i64 globals causes a link error. (Closed)
Patch Set: 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/wasm/wasm-module.cc ('k') | test/mjsunit/wasm/wasm-module-builder.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/globals.js
diff --git a/test/mjsunit/wasm/globals.js b/test/mjsunit/wasm/globals.js
index d32185f1b7fbde7de1d55ca724ef89704445bc42..6ebd123748675e00e218c9cc112fb292daabf080 100644
--- a/test/mjsunit/wasm/globals.js
+++ b/test/mjsunit/wasm/globals.js
@@ -44,6 +44,17 @@ TestExported(kWasmI32, 455.5, 455);
TestExported(kWasmF32, -999.34343, Math.fround(-999.34343));
TestExported(kWasmF64, 87347.66666, 87347.66666);
+(function TestI64Exported() {
+ var builder = new WasmModuleBuilder();
+ var sig = makeSig([kWasmI64], []);
+ builder.addGlobal(kWasmI32); // pad
+ var g = builder.addGlobal(kWasmI64, false)
+ .exportAs("foo");
+ g.init = 1234;
+ builder.addGlobal(kWasmI32); // pad
+
+ assertThrows(()=> {builder.instantiate()}, WebAssembly.LinkError);
+})();
function TestImportedExported(type, val, expected) {
print("TestImportedExported " + type + "(" + val +")" + " = " + expected);
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/mjsunit/wasm/wasm-module-builder.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698