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

Unified Diff: src/compiler/type-hint-analyzer.cc

Issue 2222983002: [turbofan] Also consume number type feedback for abstract equality. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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/simplified-operator.cc ('k') | src/compiler/type-hints.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/type-hint-analyzer.cc
diff --git a/src/compiler/type-hint-analyzer.cc b/src/compiler/type-hint-analyzer.cc
index e3cafb4112deb29f7d0fd586c4c164ab9e76a41a..bf30f873aba08ccaa75c32b4c527a289f2a4b76d 100644
--- a/src/compiler/type-hint-analyzer.cc
+++ b/src/compiler/type-hint-analyzer.cc
@@ -26,7 +26,7 @@ BinaryOperationHints::Hint ToBinaryOperationHint(Type* type) {
}
CompareOperationHints::Hint ToCompareOperationHint(
- CompareICState::State state) {
+ Token::Value op, CompareICState::State state) {
switch (state) {
case CompareICState::UNINITIALIZED:
return CompareOperationHints::kNone;
@@ -35,7 +35,9 @@ CompareOperationHints::Hint ToCompareOperationHint(
case CompareICState::SMI:
return CompareOperationHints::kSignedSmall;
case CompareICState::NUMBER:
- return CompareOperationHints::kNumberOrOddball;
+ return Token::IsOrderedRelationalCompareOp(op)
+ ? CompareOperationHints::kNumberOrOddball
+ : CompareOperationHints::kNumber;
case CompareICState::STRING:
return CompareOperationHints::kString;
case CompareICState::INTERNALIZED_STRING:
@@ -79,9 +81,10 @@ bool TypeHintAnalysis::GetCompareOperationHints(
if (raw_map != nullptr) Map::TryUpdate(handle(raw_map)).ToHandle(&map);
CompareICStub stub(code->stub_key(), code->GetIsolate());
- *hints = CompareOperationHints(ToCompareOperationHint(stub.left()),
- ToCompareOperationHint(stub.right()),
- ToCompareOperationHint(stub.state()));
+ *hints =
+ CompareOperationHints(ToCompareOperationHint(stub.op(), stub.left()),
+ ToCompareOperationHint(stub.op(), stub.right()),
+ ToCompareOperationHint(stub.op(), stub.state()));
return true;
}
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | src/compiler/type-hints.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698