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

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

Issue 2692753004: [turbofan] escape analysis supports arguments object and rest elements (Closed)
Patch Set: replaced obscure for-loop Created 3 years, 10 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
Index: src/compiler/js-call-reducer.cc
diff --git a/src/compiler/js-call-reducer.cc b/src/compiler/js-call-reducer.cc
index 5080c7a734879a945821cf629278cb04e88654ca..2dbc7ab2287610976269f2a247f4a3bdaedfa698 100644
--- a/src/compiler/js-call-reducer.cc
+++ b/src/compiler/js-call-reducer.cc
@@ -136,20 +136,6 @@ Reduction JSCallReducer::ReduceFunctionPrototypeApply(Node* node) {
// the outermost function.
Node* outer_state = frame_state->InputAt(kFrameStateOuterStateInput);
if (outer_state->opcode() != IrOpcode::kFrameState) {
- // TODO(jarin,bmeurer): Support the NewUnmappedArgumentsElement and
- // NewRestParameterElements in the EscapeAnalysis and Deoptimizer
- // instead, then we don't need this hack.
- // Only works with zero formal parameters because of lacking deoptimizer
- // support.
- if (type != CreateArgumentsType::kRestParameter &&
- formal_parameter_count == 0) {
- // There are no other uses of the {arg_array} except in StateValues,
- // so we just replace {arg_array} with a marker for the Deoptimizer
- // that this refers to the arguments object.
- Node* arguments = graph()->NewNode(common()->ArgumentsObjectState());
- ReplaceWithValue(arg_array, arguments);
- }
-
// Reduce {node} to a JSCallForwardVarargs operation, which just
// re-pushes the incoming arguments and calls the {target}.
node->RemoveInput(0); // Function.prototype.apply

Powered by Google App Engine
This is Rietveld 408576698