OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |