| Index: test/mjsunit/asm/asm-validation.js
|
| diff --git a/test/mjsunit/asm/asm-validation.js b/test/mjsunit/asm/asm-validation.js
|
| index bf1e1ba80c41d6c471fc62d746d05d3b9c75a9e1..cc0bd8244af96439016a0df34dbd1cb44346cd03 100644
|
| --- a/test/mjsunit/asm/asm-validation.js
|
| +++ b/test/mjsunit/asm/asm-validation.js
|
| @@ -302,7 +302,7 @@ function assertValidAsm(func) {
|
| assertEquals(0xffffffff, m.foo());
|
| })();
|
|
|
| -(function TestBadBooleanAnnotation() {
|
| +(function TestBadBooleanParamAnnotation() {
|
| function Module() {
|
| "use asm";
|
| function foo(x) {
|
| @@ -316,6 +316,23 @@ function assertValidAsm(func) {
|
| assertEquals(3, m.foo(3));
|
| })();
|
|
|
| +(function TestBadishBooleanExprAnnotation() {
|
| + function Module() {
|
| + "use asm";
|
| + function foo(x) {
|
| + x = x | 0;
|
| + x = (x + 1) | false;
|
| + return x | 0;
|
| + }
|
| + return { foo: foo };
|
| + }
|
| + var m = Module();
|
| + // We all false here because the parser optimizes expressons like:
|
| + // !123 to false.
|
| + assertTrue(%IsAsmWasmCode(Module));
|
| + assertEquals(4, m.foo(3));
|
| +})();
|
| +
|
| (function TestBadCase() {
|
| function Module() {
|
| "use asm";
|
|
|