Index: src/compiler/js-call-reducer.cc |
diff --git a/src/compiler/js-call-reducer.cc b/src/compiler/js-call-reducer.cc |
index 5719a9230a4fd354994d6538ff24993ea3ce3e6e..475fd3f742a859b942d9573d9b0eadac0be410fd 100644 |
--- a/src/compiler/js-call-reducer.cc |
+++ b/src/compiler/js-call-reducer.cc |
@@ -745,6 +745,8 @@ Reduction JSCallReducer::ReduceJSCall(Node* node) { |
return ReduceReflectGetPrototypeOf(node); |
case Builtins::kArrayForEach: |
return ReduceArrayForEach(function, node); |
+ case Builtins::kReturnReceiver: |
+ return ReduceReturnReceiver(node); |
default: |
break; |
} |
@@ -1002,6 +1004,13 @@ Reduction JSCallReducer::ReduceJSConstructWithSpread(Node* node) { |
return ReduceSpreadCall(node, arity); |
} |
+Reduction JSCallReducer::ReduceReturnReceiver(Node* node) { |
+ DCHECK_EQ(IrOpcode::kJSCall, node->opcode()); |
+ Node* receiver = NodeProperties::GetValueInput(node, 1); |
+ ReplaceWithValue(node, receiver); |
+ return Replace(receiver); |
+} |
+ |
Graph* JSCallReducer::graph() const { return jsgraph()->graph(); } |
Isolate* JSCallReducer::isolate() const { return jsgraph()->isolate(); } |