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 2348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2359 CHECK_VAR(f32, Bounds(cache.kFloat32Array)); | 2359 CHECK_VAR(f32, Bounds(cache.kFloat32Array)); |
2360 CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum)); | 2360 CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum)); |
2361 } | 2361 } |
2362 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); | 2362 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); |
2363 } | 2363 } |
2364 } | 2364 } |
2365 CHECK_SKIP(); | 2365 CHECK_SKIP(); |
2366 } | 2366 } |
2367 CHECK_FUNC_TYPES_END | 2367 CHECK_FUNC_TYPES_END |
2368 } | 2368 } |
| 2369 |
| 2370 TEST(NegateDouble) { |
| 2371 CHECK_FUNC_TYPES_BEGIN( |
| 2372 "function bar() { var x = 0.0; x = -x; }\n" |
| 2373 "function foo() { bar(); }") { |
| 2374 CHECK_EXPR(FunctionLiteral, FUNC_V_TYPE) { |
| 2375 CHECK_EXPR(Assignment, Bounds(cache.kAsmDouble)) { |
| 2376 CHECK_VAR(x, Bounds(cache.kAsmDouble)); |
| 2377 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); |
| 2378 } |
| 2379 CHECK_EXPR(Assignment, Bounds(cache.kAsmDouble)) { |
| 2380 CHECK_VAR(x, Bounds(cache.kAsmDouble)); |
| 2381 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmDouble)) { |
| 2382 CHECK_VAR(x, Bounds(cache.kAsmDouble)); |
| 2383 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); |
| 2384 } |
| 2385 } |
| 2386 } |
| 2387 CHECK_SKIP(); |
| 2388 } |
| 2389 CHECK_FUNC_TYPES_END |
| 2390 } |
OLD | NEW |