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

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

Issue 2134333003: V8. ASM-2-WASM. Migrates asm-wasm-builder to the new asm-typer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addresses comments. Created 4 years, 5 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/regress/regress-599717.js ('k') | test/mjsunit/wasm/asm-wasm-stdlib.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/asm-wasm.js
diff --git a/test/mjsunit/wasm/asm-wasm.js b/test/mjsunit/wasm/asm-wasm.js
index be4981d94ae1af9eb29d6212e46189c804639c5f..5e62fefdaa672cfc4b93bbe78e15bfe9236afe1f 100644
--- a/test/mjsunit/wasm/asm-wasm.js
+++ b/test/mjsunit/wasm/asm-wasm.js
@@ -43,9 +43,11 @@ function IntTest() {
function sum(a, b) {
a = a|0;
b = b|0;
- var c = (b + 1)|0
+ var c = 0;
var d = 3.0;
- var e = ~~d; // double conversion
+ var e = 0;
+ e = ~~d; // double conversion
+ c = (b + 1)|0
return (a + c + 1)|0;
}
@@ -68,8 +70,9 @@ function Float64Test() {
}
function caller() {
- var a = +sum(70.1,10.2);
+ var a = 0.0;
var ret = 0|0;
+ a = +sum(70.1,10.2);
if (a == 80.3) {
ret = 1|0;
} else {
@@ -89,7 +92,8 @@ function BadModule() {
function caller(a, b) {
a = a|0;
b = b+0;
- var c = (b + 1)|0
+ var c = 0;
+ c = (b + 1)|0
return (a + c + 1)|0;
}
@@ -293,12 +297,12 @@ function TestBreakInNestedWhile() {
function caller() {
var x = 1.0;
+ var ret = 0;
while(x < 1.5) {
while(1)
break;
x = +(x + 0.25);
}
- var ret = 0;
if (x == 1.5) {
ret = 9;
}
@@ -405,7 +409,8 @@ function TestNot() {
"use asm";
function caller() {
- var a = !(2 > 3);
+ var a = 0;
+ a = !(2 > 3);
return a | 0;
}
@@ -886,7 +891,9 @@ function TestFunctionTableSingleFunction() {
}
function caller() {
- return function_table[0&0]() | 0;
+ // TODO(jpp): the parser optimizes function_table[0&0] to function table[0].
+ var v = 0;
+ return function_table[v&0]() | 0;
}
var function_table = [dummy]
@@ -911,8 +918,9 @@ function TestFunctionTableMultipleFunctions() {
}
function caller() {
- if ((function_table[0&1](50)|0) == 51) {
- if ((function_table[1&1](60)|0) == 62) {
+ var i = 0, j = 1;
+ if ((function_table[i&1](50)|0) == 51) {
+ if ((function_table[j&1](60)|0) == 62) {
return 73;
}
}
@@ -1350,7 +1358,7 @@ assertWasm(1, TestXor);
"use asm";
function func() {
var a = 1;
- return ((a * 3) + (4 * a)) | 0;
+ return (((a * 3)|0) + ((4 * a)|0)) | 0;
}
return {func: func};
}
« no previous file with comments | « test/mjsunit/regress/regress-599717.js ('k') | test/mjsunit/wasm/asm-wasm-stdlib.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698