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

Unified Diff: src/type-info.cc

Issue 2406843002: [Interpreter] Collect feedback about Oddballs in Subtract Stub. (Closed)
Patch Set: Trying with a landmine. 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 ce0ab6ca6a63e8d0321e110e7f4ffad60dac3d4d..efbc9b1f0759923717ee551cc98ae99328bfb4e3 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -210,19 +210,21 @@ AstType* CompareOpHintToType(CompareOperationHint hint) {
return AstType::None();
}
-AstType* BinaryOpHintToType(BinaryOperationHint hint) {
+AstType* BinaryOpFeedbackToType(int hint) {
switch (hint) {
- case BinaryOperationHint::kNone:
+ case BinaryOperationFeedback::kNone:
return AstType::None();
- case BinaryOperationHint::kSignedSmall:
+ case BinaryOperationFeedback::kSignedSmall:
return AstType::SignedSmall();
- case BinaryOperationHint::kSigned32:
- return AstType::Signed32();
- case BinaryOperationHint::kNumberOrOddball:
+ case BinaryOperationFeedback::kNumber:
return AstType::Number();
- case BinaryOperationHint::kString:
+ case BinaryOperationFeedback::kString:
return AstType::String();
- case BinaryOperationHint::kAny:
+ // TODO(mythria): Merge Number and NumberOrOddball feedback, after
+ // fixing crankshaft to handle Oddballs along with Numbers.
+ case BinaryOperationFeedback::kNumberOrOddball:
+ case BinaryOperationFeedback::kAny:
+ default:
return AstType::Any();
}
UNREACHABLE();
@@ -299,7 +301,7 @@ void TypeFeedbackOracle::BinaryType(TypeFeedbackId id, FeedbackVectorSlot slot,
DCHECK(!slot.IsInvalid());
BinaryOpICNexus nexus(feedback_vector_, slot);
*left = *right = *result =
- BinaryOpHintToType(nexus.GetBinaryOperationFeedback());
+ BinaryOpFeedbackToType(Smi::cast(nexus.GetFeedback())->value());
*fixed_right_arg = Nothing<int>();
*allocation_site = Handle<AllocationSite>::null();
@@ -334,7 +336,8 @@ AstType* TypeFeedbackOracle::CountType(TypeFeedbackId id,
DCHECK(!slot.IsInvalid());
BinaryOpICNexus nexus(feedback_vector_, slot);
- AstType* type = BinaryOpHintToType(nexus.GetBinaryOperationFeedback());
+ AstType* type =
+ BinaryOpFeedbackToType(Smi::cast(nexus.GetFeedback())->value());
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