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

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

Issue 2692753004: [turbofan] escape analysis supports arguments object and rest elements (Closed)
Patch Set: handle the case where Deoptimizer::function_ is a Smi 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
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/js-create-lowering.cc » ('j') | 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 a7c9c001bfc357e52bbc3667729a9763c5c0c8e1..162acbb3ec56f226e8ed904274234b1bd1ba1e8a 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
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/js-create-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698