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

Unified Diff: src/compiler/js-typed-lowering.cc

Issue 2531183003: Revert of [turbofan] Utilize String comparison feedback. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-typed-lowering.cc
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
index 3ad838c33198f8bc4b03c4bb37b378530d60c087..00cf092175889b56919424d94249c7396de8acc7 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -72,16 +72,6 @@
case CompareOperationHint::kString:
break;
}
- }
- return false;
- }
-
- bool IsStringCompareOperation() {
- if (lowering_->flags() & JSTypedLowering::kDeoptimizationEnabled) {
- DCHECK_EQ(1, node_->op()->EffectOutputCount());
- return (CompareOperationHintOf(node_->op()) ==
- CompareOperationHint::kString) &&
- BothInputsMaybe(Type::String());
}
return false;
}
@@ -112,23 +102,6 @@
}
}
return false;
- }
-
- // Checks that both inputs are String, and if we don't know statically that
- // one side is already a String, insert a CheckString node.
- void CheckInputsToString() {
- if (!left_type()->Is(Type::String())) {
- Node* left_input = graph()->NewNode(simplified()->CheckString(), left(),
- effect(), control());
- node_->ReplaceInput(0, left_input);
- update_effect(left_input);
- }
- if (!right_type()->Is(Type::String())) {
- Node* right_input = graph()->NewNode(simplified()->CheckString(), right(),
- effect(), control());
- node_->ReplaceInput(1, right_input);
- update_effect(right_input);
- }
}
void ConvertInputsToNumber() {
@@ -344,10 +317,6 @@
bool BothInputsAre(Type* t) { return LeftInputIs(t) && RightInputIs(t); }
- bool BothInputsMaybe(Type* t) {
- return left_type()->Maybe(t) && right_type()->Maybe(t);
- }
-
bool OneInputCannotBe(Type* t) {
return !left_type()->Maybe(t) || !right_type()->Maybe(t);
}
@@ -778,10 +747,6 @@
r.ConvertInputsToNumber();
less_than = simplified()->NumberLessThan();
less_than_or_equal = simplified()->NumberLessThanOrEqual();
- } else if (r.IsStringCompareOperation()) {
- r.CheckInputsToString();
- less_than = simplified()->StringLessThan();
- less_than_or_equal = simplified()->StringLessThanOrEqual();
} else {
return NoChange();
}
@@ -920,9 +885,6 @@
simplified()->SpeculativeNumberEqual(hint), invert, Type::Boolean());
} else if (r.BothInputsAre(Type::Number())) {
return r.ChangeToPureOperator(simplified()->NumberEqual(), invert);
- } else if (r.IsStringCompareOperation()) {
- r.CheckInputsToString();
- return r.ChangeToPureOperator(simplified()->StringEqual(), invert);
}
return NoChange();
}
@@ -985,9 +947,6 @@
simplified()->SpeculativeNumberEqual(hint), invert, Type::Boolean());
} else if (r.BothInputsAre(Type::Number())) {
return r.ChangeToPureOperator(simplified()->NumberEqual(), invert);
- } else if (r.IsStringCompareOperation()) {
- r.CheckInputsToString();
- return r.ChangeToPureOperator(simplified()->StringEqual(), invert);
}
return NoChange();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698