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

Unified Diff: src/type-info.cc

Issue 2407923002: Revert of [Interpreter] Collect feedback about Oddballs in Subtract Stub. (Closed)
Patch Set: Created 4 years, 2 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/type-feedback-vector-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index efbc9b1f0759923717ee551cc98ae99328bfb4e3..ce0ab6ca6a63e8d0321e110e7f4ffad60dac3d4d 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -210,21 +210,19 @@
return AstType::None();
}
-AstType* BinaryOpFeedbackToType(int hint) {
+AstType* BinaryOpHintToType(BinaryOperationHint hint) {
switch (hint) {
- case BinaryOperationFeedback::kNone:
+ case BinaryOperationHint::kNone:
return AstType::None();
- case BinaryOperationFeedback::kSignedSmall:
+ case BinaryOperationHint::kSignedSmall:
return AstType::SignedSmall();
- case BinaryOperationFeedback::kNumber:
+ case BinaryOperationHint::kSigned32:
+ return AstType::Signed32();
+ case BinaryOperationHint::kNumberOrOddball:
return AstType::Number();
- case BinaryOperationFeedback::kString:
+ case BinaryOperationHint::kString:
return AstType::String();
- // TODO(mythria): Merge Number and NumberOrOddball feedback, after
- // fixing crankshaft to handle Oddballs along with Numbers.
- case BinaryOperationFeedback::kNumberOrOddball:
- case BinaryOperationFeedback::kAny:
- default:
+ case BinaryOperationHint::kAny:
return AstType::Any();
}
UNREACHABLE();
@@ -301,7 +299,7 @@
DCHECK(!slot.IsInvalid());
BinaryOpICNexus nexus(feedback_vector_, slot);
*left = *right = *result =
- BinaryOpFeedbackToType(Smi::cast(nexus.GetFeedback())->value());
+ BinaryOpHintToType(nexus.GetBinaryOperationFeedback());
*fixed_right_arg = Nothing<int>();
*allocation_site = Handle<AllocationSite>::null();
@@ -336,8 +334,7 @@
DCHECK(!slot.IsInvalid());
BinaryOpICNexus nexus(feedback_vector_, slot);
- AstType* type =
- BinaryOpFeedbackToType(Smi::cast(nexus.GetFeedback())->value());
+ AstType* type = BinaryOpHintToType(nexus.GetBinaryOperationFeedback());
if (!object->IsCode()) return type;
« no previous file with comments | « src/type-feedback-vector-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698