| Index: src/compiler/escape-analysis-reducer.cc
|
| diff --git a/src/compiler/escape-analysis-reducer.cc b/src/compiler/escape-analysis-reducer.cc
|
| index f833ebdf73060aaa86824a0e6a7444bb6fce77e3..d7b79b0733c68e74d756e1bbda623f819ed12de7 100644
|
| --- a/src/compiler/escape-analysis-reducer.cc
|
| +++ b/src/compiler/escape-analysis-reducer.cc
|
| @@ -34,6 +34,8 @@ Reduction EscapeAnalysisReducer::Reduce(Node* node) {
|
| return ReduceFinishRegion(node);
|
| case IrOpcode::kReferenceEqual:
|
| return ReduceReferenceEqual(node);
|
| + case IrOpcode::kObjectIsSmi:
|
| + return ReduceObjectIsSmi(node);
|
| case IrOpcode::kStateValues:
|
| case IrOpcode::kFrameState:
|
| return ReplaceWithDeoptDummy(node);
|
| @@ -146,6 +148,20 @@ Reduction EscapeAnalysisReducer::ReduceReferenceEqual(Node* node) {
|
| }
|
|
|
|
|
| +Reduction EscapeAnalysisReducer::ReduceObjectIsSmi(Node* node) {
|
| + DCHECK_EQ(node->opcode(), IrOpcode::kObjectIsSmi);
|
| + Node* input = NodeProperties::GetValueInput(node, 0);
|
| + if (escape_analysis()->IsAllocation(input)) {
|
| + ReplaceWithValue(node, jsgraph()->FalseConstant());
|
| + if (FLAG_trace_turbo_escape) {
|
| + PrintF("Replaced ObjectIsSmi #%d with false\n", node->id());
|
| + }
|
| + return Replace(node);
|
| + }
|
| + return NoChange();
|
| +}
|
| +
|
| +
|
| // TODO(sigurds): This is a temporary solution until escape analysis
|
| // supports deoptimization.
|
| Reduction EscapeAnalysisReducer::ReplaceWithDeoptDummy(Node* node) {
|
|
|