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

Unified Diff: src/compiler/escape-analysis-reducer.cc

Issue 2729163002: [turbofan] compute arguments length in deoptimizer (Closed)
Patch Set: fix comment 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/common-operator.cc ('k') | src/compiler/instruction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/escape-analysis-reducer.cc
diff --git a/src/compiler/escape-analysis-reducer.cc b/src/compiler/escape-analysis-reducer.cc
index 22ece9d24b768f9388d17bfd3741dd14df45cadf..d59f4a931b06424ee9fa3ff151ba2527dc5840b4 100644
--- a/src/compiler/escape-analysis-reducer.cc
+++ b/src/compiler/escape-analysis-reducer.cc
@@ -411,6 +411,28 @@ void EscapeAnalysisReducer::Finalize() {
Node* arguments_length = NodeProperties::GetValueInput(node, 1);
if (arguments_length->opcode() != IrOpcode::kArgumentsLength) continue;
+ Node* arguments_length_state = nullptr;
+ for (Edge edge : arguments_length->use_edges()) {
+ Node* use = edge.from();
+ switch (use->opcode()) {
+ case IrOpcode::kObjectState:
+ case IrOpcode::kTypedObjectState:
+ case IrOpcode::kStateValues:
+ case IrOpcode::kTypedStateValues:
+ if (!arguments_length_state) {
+ arguments_length_state = jsgraph()->graph()->NewNode(
+ jsgraph()->common()->ArgumentsLengthState(
+ IsRestLengthOf(arguments_length->op())));
+ NodeProperties::SetType(arguments_length_state,
+ Type::OtherInternal());
+ }
+ edge.UpdateTo(arguments_length_state);
+ break;
+ default:
+ break;
+ }
+ }
+
bool escaping_use = false;
ZoneVector<Node*> loads(zone());
for (Edge edge : node->use_edges()) {
« no previous file with comments | « src/compiler/common-operator.cc ('k') | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698