OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
8 #include "src/ast/ast-expression-visitor.h" | 8 #include "src/ast/ast-expression-visitor.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/parsing/parser.h" | 10 #include "src/parsing/parser.h" |
(...skipping 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1718 | 1718 |
1719 TEST(NeStrict) { | 1719 TEST(NeStrict) { |
1720 CHECK_FUNC_ERROR( | 1720 CHECK_FUNC_ERROR( |
1721 "function bar() { return (0 !== 0)|0; }\n" | 1721 "function bar() { return (0 !== 0)|0; }\n" |
1722 "function foo() { bar(); }", | 1722 "function foo() { bar(); }", |
1723 "asm: line 39: illegal comparison operator\n"); | 1723 "asm: line 39: illegal comparison operator\n"); |
1724 } | 1724 } |
1725 | 1725 |
1726 | 1726 |
1727 TEST(InstanceOf) { | 1727 TEST(InstanceOf) { |
| 1728 const char* errorMsg = FLAG_harmony_instanceof |
| 1729 ? "asm: line 0: do-expression encountered\n" |
| 1730 : "asm: line 39: illegal comparison operator\n"; |
| 1731 |
1728 CHECK_FUNC_ERROR( | 1732 CHECK_FUNC_ERROR( |
1729 "function bar() { return (0 instanceof 0)|0; }\n" | 1733 "function bar() { return (0 instanceof 0)|0; }\n" |
1730 "function foo() { bar(); }", | 1734 "function foo() { bar(); }", |
1731 "asm: line 39: illegal comparison operator\n"); | 1735 errorMsg); |
1732 } | 1736 } |
1733 | 1737 |
1734 | 1738 |
1735 TEST(InOperator) { | 1739 TEST(InOperator) { |
1736 CHECK_FUNC_ERROR( | 1740 CHECK_FUNC_ERROR( |
1737 "function bar() { return (0 in 0)|0; }\n" | 1741 "function bar() { return (0 in 0)|0; }\n" |
1738 "function foo() { bar(); }", | 1742 "function foo() { bar(); }", |
1739 "asm: line 39: illegal comparison operator\n"); | 1743 "asm: line 39: illegal comparison operator\n"); |
1740 } | 1744 } |
1741 | 1745 |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2405 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmDouble)) { | 2409 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmDouble)) { |
2406 CHECK_VAR(x, Bounds(cache.kAsmDouble)); | 2410 CHECK_VAR(x, Bounds(cache.kAsmDouble)); |
2407 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); | 2411 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); |
2408 } | 2412 } |
2409 } | 2413 } |
2410 } | 2414 } |
2411 CHECK_SKIP(); | 2415 CHECK_SKIP(); |
2412 } | 2416 } |
2413 CHECK_FUNC_TYPES_END | 2417 CHECK_FUNC_TYPES_END |
2414 } | 2418 } |
OLD | NEW |