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

Unified Diff: test/mjsunit/asm/asm-validation.js

Issue 2253613004: [wasm] Fix asm.js module instantiation on retry. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/runtime/runtime-compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/asm/asm-validation.js
diff --git a/test/mjsunit/asm/asm-validation.js b/test/mjsunit/asm/asm-validation.js
index ed29ede25d589d17b845a0b64a073140348cb132..5996b076772655cbbd8f36dbb7ae0f2f8152c807 100644
--- a/test/mjsunit/asm/asm-validation.js
+++ b/test/mjsunit/asm/asm-validation.js
@@ -174,6 +174,29 @@ function IsAlwaysOpt(module) {
assertEquals(123, m2.foo());
})();
+(function TestSuccessThenFailureThenRetry() {
+ function MkModule() {
+ function Module(stdlib, ffi, heap) {
+ "use asm";
+ function foo() { return 123; }
+ return { foo: foo };
+ }
+ return Module;
+ }
+ var Module1 = MkModule();
+ var Module2 = MkModule();
+ var heap = new ArrayBuffer(1024 * 1024);
+ var m1a = Module1({}, {}, heap);
+ assertTrue(%IsAsmWasmCode(Module1) || IsAlwaysOpt(Module1));
+ var m2 = Module2(1, 2, 3);
+ assertFalse(%IsAsmWasmCode(Module2));
+ var m1b = Module1({}, {}, heap);
+ assertFalse(%IsAsmWasmCode(Module1));
+ assertEquals(123, m1a.foo());
+ assertEquals(123, m1b.foo());
+ assertEquals(123, m2.foo());
+})();
+
(function TestBoundFunction() {
function Module(stdlib, ffi, heap) {
"use asm";
« no previous file with comments | « src/runtime/runtime-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698