| Index: src/compiler/typed-optimization.cc
|
| diff --git a/src/compiler/typed-optimization.cc b/src/compiler/typed-optimization.cc
|
| index 6c958bdac49b6fa5f8f27bf92ef5d23ce4a59b98..b95e22a2e5b73df5f9eb3228e9c844d847b0e603 100644
|
| --- a/src/compiler/typed-optimization.cc
|
| +++ b/src/compiler/typed-optimization.cc
|
| @@ -78,6 +78,8 @@ Reduction TypedOptimization::Reduce(Node* node) {
|
| return ReduceCheckHeapObject(node);
|
| case IrOpcode::kCheckMaps:
|
| return ReduceCheckMaps(node);
|
| + case IrOpcode::kCheckNumber:
|
| + return ReduceCheckNumber(node);
|
| case IrOpcode::kCheckString:
|
| return ReduceCheckString(node);
|
| case IrOpcode::kLoadField:
|
| @@ -152,6 +154,16 @@ Reduction TypedOptimization::ReduceCheckMaps(Node* node) {
|
| return NoChange();
|
| }
|
|
|
| +Reduction TypedOptimization::ReduceCheckNumber(Node* node) {
|
| + Node* const input = NodeProperties::GetValueInput(node, 0);
|
| + Type* const input_type = NodeProperties::GetType(input);
|
| + if (input_type->Is(Type::Number())) {
|
| + ReplaceWithValue(node, input);
|
| + return Replace(input);
|
| + }
|
| + return NoChange();
|
| +}
|
| +
|
| Reduction TypedOptimization::ReduceCheckString(Node* node) {
|
| Node* const input = NodeProperties::GetValueInput(node, 0);
|
| Type* const input_type = NodeProperties::GetType(input);
|
|
|