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

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

Issue 2059653002: [turbofan] Introduce PlainPrimitiveToNumber. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweak Created 4 years, 6 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/compiler/verifier.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/compilation-dependencies.h" 5 #include "src/compilation-dependencies.h"
6 #include "src/compiler/js-graph.h" 6 #include "src/compiler/js-graph.h"
7 #include "src/compiler/js-typed-lowering.h" 7 #include "src/compiler/js-typed-lowering.h"
8 #include "src/compiler/machine-operator.h" 8 #include "src/compiler/machine-operator.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 485
486 486
487 TEST(JSToNumberOfNumberOrOtherPrimitive) { 487 TEST(JSToNumberOfNumberOrOtherPrimitive) {
488 JSTypedLoweringTester R; 488 JSTypedLoweringTester R;
489 Type* others[] = {Type::Undefined(), Type::Null(), Type::Boolean(), 489 Type* others[] = {Type::Undefined(), Type::Null(), Type::Boolean(),
490 Type::String()}; 490 Type::String()};
491 491
492 for (size_t i = 0; i < arraysize(others); i++) { 492 for (size_t i = 0; i < arraysize(others); i++) {
493 Type* t = Type::Union(Type::Number(), others[i], R.main_zone()); 493 Type* t = Type::Union(Type::Number(), others[i], R.main_zone());
494 Node* r = R.ReduceUnop(R.javascript.ToNumber(), t); 494 Node* r = R.ReduceUnop(R.javascript.ToNumber(), t);
495 CHECK_EQ(IrOpcode::kJSToNumber, r->opcode()); 495 CHECK_EQ(IrOpcode::kPlainPrimitiveToNumber, r->opcode());
496 } 496 }
497 } 497 }
498 498
499 499
500 TEST(JSToString1) { 500 TEST(JSToString1) {
501 JSTypedLoweringTester R; 501 JSTypedLoweringTester R;
502 502
503 for (size_t i = 0; i < arraysize(kStringTypes); i++) { 503 for (size_t i = 0; i < arraysize(kStringTypes); i++) {
504 Node* r = R.ReduceUnop(R.javascript.ToString(), kStringTypes[i]); 504 Node* r = R.ReduceUnop(R.javascript.ToString(), kStringTypes[i]);
505 CHECK_EQ(IrOpcode::kParameter, r->opcode()); 505 CHECK_EQ(IrOpcode::kParameter, r->opcode());
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 CHECK_EQ(p1, r->InputAt(1)); 1218 CHECK_EQ(p1, r->InputAt(1));
1219 } 1219 }
1220 } 1220 }
1221 } 1221 }
1222 } 1222 }
1223 } 1223 }
1224 1224
1225 } // namespace compiler 1225 } // namespace compiler
1226 } // namespace internal 1226 } // namespace internal
1227 } // namespace v8 1227 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/verifier.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698