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/compiler/simplified-lowering.h" | 5 #include "src/compiler/simplified-lowering.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/address-map.h" | 9 #include "src/address-map.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 // fail on a boolean. OperationTyper should have a function that | 450 // fail on a boolean. OperationTyper should have a function that |
451 // computes a more precise type. | 451 // computes a more precise type. |
452 Type* lhs = op_typer_.ToNumber(FeedbackTypeOf(node->InputAt(0))); | 452 Type* lhs = op_typer_.ToNumber(FeedbackTypeOf(node->InputAt(0))); |
453 Type* rhs = op_typer_.ToNumber(FeedbackTypeOf(node->InputAt(1))); | 453 Type* rhs = op_typer_.ToNumber(FeedbackTypeOf(node->InputAt(1))); |
454 Type* computed_type = op_typer_.NumberModulus(lhs, rhs); | 454 Type* computed_type = op_typer_.NumberModulus(lhs, rhs); |
455 new_type = Type::Intersect(computed_type, info->restriction_type(), | 455 new_type = Type::Intersect(computed_type, info->restriction_type(), |
456 graph_zone()); | 456 graph_zone()); |
457 break; | 457 break; |
458 } | 458 } |
459 | 459 |
| 460 case IrOpcode::kPlainPrimitiveToNumber: |
| 461 new_type = op_typer_.ToNumber(FeedbackTypeOf(node->InputAt(0))); |
| 462 break; |
| 463 |
460 case IrOpcode::kNumberAbs: { | 464 case IrOpcode::kNumberAbs: { |
461 new_type = op_typer_.NumberAbs(FeedbackTypeOf(node->InputAt(0))); | 465 new_type = op_typer_.NumberAbs(FeedbackTypeOf(node->InputAt(0))); |
462 break; | 466 break; |
463 } | 467 } |
464 | 468 |
465 case IrOpcode::kPhi: { | 469 case IrOpcode::kPhi: { |
466 new_type = TypePhi(node); | 470 new_type = TypePhi(node); |
467 if (type != nullptr) { | 471 if (type != nullptr) { |
468 new_type = Weaken(node, type, new_type); | 472 new_type = Weaken(node, type, new_type); |
469 } | 473 } |
(...skipping 2872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3342 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 3346 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
3343 Operator::kNoProperties); | 3347 Operator::kNoProperties); |
3344 to_number_operator_.set(common()->Call(desc)); | 3348 to_number_operator_.set(common()->Call(desc)); |
3345 } | 3349 } |
3346 return to_number_operator_.get(); | 3350 return to_number_operator_.get(); |
3347 } | 3351 } |
3348 | 3352 |
3349 } // namespace compiler | 3353 } // namespace compiler |
3350 } // namespace internal | 3354 } // namespace internal |
3351 } // namespace v8 | 3355 } // namespace v8 |
OLD | NEW |