Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: src/compiler/js-call-reducer.cc

Issue 2938683002: [turbofan] Inline ReturnReceiver builtin into TurboFan. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-call-reducer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(); }
« no previous file with comments | « src/compiler/js-call-reducer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698