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

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

Issue 2289613002: [turbofan] Remove special JSForInStep and JSForInDone. (Closed)
Patch Set: Created 4 years, 4 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') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 94c7dc4d5c84f99c2f30dc84e8ea40e8f50e03e4..93bc847c44f0906488040e3485bece34e187acf9 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -1546,13 +1546,15 @@ void BytecodeGraphBuilder::BuildForInPrepare() {
void BytecodeGraphBuilder::VisitForInPrepare() { BuildForInPrepare(); }
-void BytecodeGraphBuilder::VisitForInDone() {
+void BytecodeGraphBuilder::VisitForInContinue() {
FrameStateBeforeAndAfter states(this);
Node* index =
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
Node* cache_length =
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(1));
- Node* exit_cond = NewNode(javascript()->ForInDone(), index, cache_length);
+ Node* exit_cond =
+ NewNode(javascript()->LessThan(CompareOperationHint::kSignedSmall), index,
+ cache_length);
environment()->BindAccumulator(exit_cond, &states);
}
@@ -1579,7 +1581,8 @@ void BytecodeGraphBuilder::VisitForInStep() {
FrameStateBeforeAndAfter states(this);
Node* index =
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
- index = NewNode(javascript()->ForInStep(), index);
+ index = NewNode(javascript()->Add(BinaryOperationHint::kSignedSmall), index,
+ jsgraph()->OneConstant());
environment()->BindAccumulator(index, &states);
}
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698