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

Side by Side Diff: test/unittests/compiler/js-typed-lowering-unittest.cc

Issue 852153003: Revert of [turbofan] Use PlainPrimitiveToNumber whenever possible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/access-builder.h" 5 #include "src/compiler/access-builder.h"
6 #include "src/compiler/js-graph.h" 6 #include "src/compiler/js-graph.h"
7 #include "src/compiler/js-operator.h" 7 #include "src/compiler/js-operator.h"
8 #include "src/compiler/js-typed-lowering.h" 8 #include "src/compiler/js-typed-lowering.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node-properties-inl.h" 10 #include "src/compiler/node-properties-inl.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 365
366 366
367 TEST_F(JSTypedLoweringTest, JSToNumberWithPlainPrimitive) { 367 TEST_F(JSTypedLoweringTest, JSToNumberWithPlainPrimitive) {
368 Node* const input = Parameter(Type::PlainPrimitive(), 0); 368 Node* const input = Parameter(Type::PlainPrimitive(), 0);
369 Node* const context = Parameter(Type::Any(), 1); 369 Node* const context = Parameter(Type::Any(), 1);
370 Node* const effect = graph()->start(); 370 Node* const effect = graph()->start();
371 Node* const control = graph()->start(); 371 Node* const control = graph()->start();
372 Reduction r = Reduce(graph()->NewNode(javascript()->ToNumber(), input, 372 Reduction r = Reduce(graph()->NewNode(javascript()->ToNumber(), input,
373 context, effect, control)); 373 context, effect, control));
374 ASSERT_TRUE(r.Changed()); 374 ASSERT_TRUE(r.Changed());
375 EXPECT_THAT(r.replacement(), IsPlainPrimitiveToNumber(input)); 375 EXPECT_THAT(r.replacement(), IsToNumber(input, IsNumberConstant(BitEq(0.0)),
376 graph()->start(), control));
376 } 377 }
377 378
378 379
379 // ----------------------------------------------------------------------------- 380 // -----------------------------------------------------------------------------
380 // JSStrictEqual 381 // JSStrictEqual
381 382
382 383
383 TEST_F(JSTypedLoweringTest, JSStrictEqualWithTheHole) { 384 TEST_F(JSTypedLoweringTest, JSStrictEqualWithTheHole) {
384 Node* const the_hole = HeapConstant(factory()->the_hole_value()); 385 Node* const the_hole = HeapConstant(factory()->the_hole_value());
385 Node* const context = UndefinedConstant(); 386 Node* const context = UndefinedConstant();
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 IsStoreElement( 799 IsStoreElement(
799 access, IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), 800 access, IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])),
800 key, value, effect, control)); 801 key, value, effect, control));
801 } 802 }
802 } 803 }
803 } 804 }
804 805
805 } // namespace compiler 806 } // namespace compiler
806 } // namespace internal 807 } // namespace internal
807 } // namespace v8 808 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-js-typed-lowering.cc ('k') | test/unittests/compiler/node-test-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698