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

Unified Diff: src/compiler/graph-builder.cc

Issue 890543002: [turbofan] Fix OSR compilations of for-in. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/ast-graph-builder.cc ('k') | test/mjsunit/asm/int32modb.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph-builder.cc
diff --git a/src/compiler/graph-builder.cc b/src/compiler/graph-builder.cc
index 181af2fea1e199dcb5bd88e3661e17ecb4ee55e6..aa268c0e2515f3b82b7a1b9af38d6f474cba31e8 100644
--- a/src/compiler/graph-builder.cc
+++ b/src/compiler/graph-builder.cc
@@ -201,16 +201,11 @@ void StructuredGraphBuilder::Environment::PrepareForLoop(BitVector* assigned,
for (int i = 0; i < size; ++i) {
Node* val = values()->at(i);
- // TODO(titzer): use IrOpcode::IsConstant() or similar.
- if (val->opcode() == IrOpcode::kNumberConstant ||
- val->opcode() == IrOpcode::kInt32Constant ||
- val->opcode() == IrOpcode::kInt64Constant ||
- val->opcode() == IrOpcode::kFloat64Constant ||
- val->opcode() == IrOpcode::kHeapConstant)
- continue;
- Node* osr_value =
- graph->NewNode(builder_->common()->OsrValue(i), osr_loop_entry);
- values()->at(i) = builder_->MergeValue(val, osr_value, control);
+ if (!IrOpcode::IsConstantOpcode(val->opcode())) {
+ Node* osr_value =
+ graph->NewNode(builder_->common()->OsrValue(i), osr_loop_entry);
+ values()->at(i) = builder_->MergeValue(val, osr_value, control);
+ }
}
}
}
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | test/mjsunit/asm/int32modb.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698