| 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 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1354 } | 1354 } |
| 1355 | 1355 |
| 1356 | 1356 |
| 1357 TEST(CompareMismatchInt32Float32) { | 1357 TEST(CompareMismatchInt32Float32) { |
| 1358 CHECK_FUNC_ERROR( | 1358 CHECK_FUNC_ERROR( |
| 1359 "function bar() { var x = 1; var y = 2.0; return (x < fround(y))|0; }\n" | 1359 "function bar() { var x = 1; var y = 2.0; return (x < fround(y))|0; }\n" |
| 1360 "function foo() { bar(); }", | 1360 "function foo() { bar(); }", |
| 1361 "asm: line 1: left and right side of comparison must match\n"); | 1361 "asm: line 1: left and right side of comparison must match\n"); |
| 1362 } | 1362 } |
| 1363 | 1363 |
| 1364 TEST(FunctionRepeated) { |
| 1365 CHECK_FUNC_ERROR( |
| 1366 "function foo() { return 0; }\n" |
| 1367 "function foo() { return 0; }", |
| 1368 "asm: line 2: function repeated in module\n"); |
| 1369 } |
| 1364 | 1370 |
| 1365 TEST(Float64ToInt32) { | 1371 TEST(Float64ToInt32) { |
| 1366 CHECK_FUNC_TYPES_BEGIN( | 1372 CHECK_FUNC_TYPES_BEGIN( |
| 1367 "function bar() { var x = 1; var y = 0.0; x = ~~y; }\n" | 1373 "function bar() { var x = 1; var y = 0.0; x = ~~y; }\n" |
| 1368 "function foo() { bar(); }") { | 1374 "function foo() { bar(); }") { |
| 1369 CHECK_EXPR(FunctionLiteral, FUNC_V_TYPE) { | 1375 CHECK_EXPR(FunctionLiteral, FUNC_V_TYPE) { |
| 1370 CHECK_EXPR(Assignment, Bounds(cache.kAsmInt)) { | 1376 CHECK_EXPR(Assignment, Bounds(cache.kAsmInt)) { |
| 1371 CHECK_VAR(x, Bounds(cache.kAsmInt)); | 1377 CHECK_VAR(x, Bounds(cache.kAsmInt)); |
| 1372 CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum)); | 1378 CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum)); |
| 1373 } | 1379 } |
| (...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2500 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmDouble)) { | 2506 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmDouble)) { |
| 2501 CHECK_VAR(x, Bounds(cache.kAsmDouble)); | 2507 CHECK_VAR(x, Bounds(cache.kAsmDouble)); |
| 2502 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); | 2508 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); |
| 2503 } | 2509 } |
| 2504 } | 2510 } |
| 2505 } | 2511 } |
| 2506 CHECK_SKIP(); | 2512 CHECK_SKIP(); |
| 2507 } | 2513 } |
| 2508 CHECK_FUNC_TYPES_END | 2514 CHECK_FUNC_TYPES_END |
| 2509 } | 2515 } |
| OLD | NEW |