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

Unified Diff: test/mjsunit/wasm/asm-wasm-f32.js

Issue 2264913002: [wasm] asm.js - Remove Wasm.instantiateModuleFromAsm, use asm.js directly. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix 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 | « test/mjsunit/wasm/asm-wasm-deopt.js ('k') | test/mjsunit/wasm/asm-wasm-f64.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/asm-wasm-f32.js
diff --git a/test/mjsunit/wasm/asm-wasm-f32.js b/test/mjsunit/wasm/asm-wasm-f32.js
index a94994d26faf321eee6f5b981ccfcea36f111428..a5d5a6c2cc2c6e01503764ac2bc626da51264838 100644
--- a/test/mjsunit/wasm/asm-wasm-f32.js
+++ b/test/mjsunit/wasm/asm-wasm-f32.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --expose-wasm
+// Flags: --validate-asm --allow-natives-syntax
function WrapInAsmModule(func) {
function MODULE_NAME(stdlib) {
@@ -26,22 +26,19 @@ function WrapInAsmModule(func) {
return eval("(" + source + ")");
}
-function RunThreeWayTest(asmfunc, expect) {
+function RunAsmJsTest(asmfunc, expect) {
var asm_source = asmfunc.toString();
var nonasm_source = asm_source.replace(new RegExp("use asm"), "");
var stdlib = {Math: Math};
- var js_module = eval("(" + nonasm_source + ")")(stdlib);
print("Testing " + asmfunc.name + " (js)...");
+ var js_module = eval("(" + nonasm_source + ")")(stdlib);
expect(js_module);
print("Testing " + asmfunc.name + " (asm.js)...");
var asm_module = asmfunc(stdlib);
+ assertTrue(%IsAsmWasmCode(asmfunc));
expect(asm_module);
-
- print("Testing " + asmfunc.name + " (wasm)...");
- var wasm_module = Wasm.instantiateModuleFromAsm(asm_source, stdlib);
- expect(wasm_module);
}
const fround = Math.fround;
@@ -218,7 +215,7 @@ var funcs = [
(function () {
for (func of funcs) {
- RunThreeWayTest(WrapInAsmModule(func), function (module) {
+ RunAsmJsTest(WrapInAsmModule(func), function (module) {
if (func.length == 1) {
for (a of inputs) {
assertEquals(func(a), module.main(a));
« no previous file with comments | « test/mjsunit/wasm/asm-wasm-deopt.js ('k') | test/mjsunit/wasm/asm-wasm-f64.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698