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

Side by Side Diff: test/cctest/test-asm-validator.cc

Issue 1756693003: Allow negation of doubles in asm typer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/typing-asm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « src/typing-asm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698