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

Unified Diff: src/crankshaft/typing.cc

Issue 2361043002: [Ignition] Use binary operation feedback from Ignition to Crankshaft. (Closed)
Patch Set: Removed iostream from type-info.cc Created 4 years, 3 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 | « no previous file | src/type-feedback-vector-inl.h » ('j') | src/type-info.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/typing.cc
diff --git a/src/crankshaft/typing.cc b/src/crankshaft/typing.cc
index bf2c8037ea5ed2e7521caf051da3540122989a62..d2b56e255b1fff19906e6899d929db9753a41fe5 100644
--- a/src/crankshaft/typing.cc
+++ b/src/crankshaft/typing.cc
@@ -211,7 +211,8 @@ void AstTyper::VisitSwitchStatement(SwitchStatement* stmt) {
AstType* label_type;
AstType* combined_type;
oracle()->CompareType(clause->CompareId(),
- &tag_type, &label_type, &combined_type);
+ clause->CompareOperationFeedbackSlot(), &tag_type,
+ &label_type, &combined_type);
NarrowLowerType(stmt->tag(), tag_type);
NarrowLowerType(label, label_type);
clause->set_compare_type(combined_type);
@@ -614,7 +615,8 @@ void AstTyper::VisitCountOperation(CountOperation* expr) {
oracle()->CountReceiverTypes(slot, expr->GetReceiverTypes());
expr->set_store_mode(store_mode);
expr->set_key_type(key_type);
- expr->set_type(oracle()->CountType(expr->CountBinOpFeedbackId()));
+ expr->set_type(oracle()->CountType(expr->CountBinOpFeedbackId(),
+ expr->CountBinaryOpFeedbackSlot()));
// TODO(rossberg): merge the count type with the generic expression type.
RECURSE(Visit(expr->expression()));
@@ -627,7 +629,6 @@ void AstTyper::VisitCountOperation(CountOperation* expr) {
}
}
-
void AstTyper::VisitBinaryOperation(BinaryOperation* expr) {
// Collect type feedback.
AstType* type;
@@ -636,8 +637,10 @@ void AstTyper::VisitBinaryOperation(BinaryOperation* expr) {
Maybe<int> fixed_right_arg = Nothing<int>();
Handle<AllocationSite> allocation_site;
oracle()->BinaryType(expr->BinaryOperationFeedbackId(),
- &left_type, &right_type, &type, &fixed_right_arg,
- &allocation_site, expr->op());
+ expr->BinaryOperationFeedbackSlot(), &left_type,
+ &right_type, &type, &fixed_right_arg, &allocation_site,
+ expr->op());
+
NarrowLowerType(expr, type);
NarrowLowerType(expr->left(), left_type);
NarrowLowerType(expr->right(), right_type);
@@ -739,7 +742,8 @@ void AstTyper::VisitCompareOperation(CompareOperation* expr) {
AstType* right_type;
AstType* combined_type;
oracle()->CompareType(expr->CompareOperationFeedbackId(),
- &left_type, &right_type, &combined_type);
+ expr->CompareOperationFeedbackSlot(), &left_type,
+ &right_type, &combined_type);
NarrowLowerType(expr->left(), left_type);
NarrowLowerType(expr->right(), right_type);
expr->set_combined_type(combined_type);
« no previous file with comments | « no previous file | src/type-feedback-vector-inl.h » ('j') | src/type-info.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698