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

Unified Diff: src/typing.cc

Issue 955243002: Remove RecordTypeFeedback() methods from some AST classes and move into typing.cc. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/ast.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typing.cc
diff --git a/src/typing.cc b/src/typing.cc
index 48528705bf1e1abb605d2a243199eb7a7ab05e30..794accc48399d7095bea85aac88e0bb5954594cc 100644
--- a/src/typing.cc
+++ b/src/typing.cc
@@ -410,7 +410,12 @@ void AstTyper::VisitObjectLiteral(ObjectLiteral* expr) {
if (!prop->is_computed_name() &&
prop->key()->AsLiteral()->value()->IsInternalizedString() &&
prop->emit_store()) {
- prop->RecordTypeFeedback(oracle());
+ // Record type feed back for the property.
+ TypeFeedbackId id = prop->key()->AsLiteral()->LiteralFeedbackId();
+ SmallMapList maps;
+ oracle()->CollectReceiverTypes(id, &maps);
+ prop->set_receiver_type(maps.length() == 1 ? maps.at(0)
+ : Handle<Map>::null());
}
}
@@ -562,7 +567,17 @@ void AstTyper::VisitCall(Call* expr) {
void AstTyper::VisitCallNew(CallNew* expr) {
// Collect type feedback.
- expr->RecordTypeFeedback(oracle());
+ FeedbackVectorSlot allocation_site_feedback_slot =
+ FLAG_pretenuring_call_new ? expr->AllocationSiteFeedbackSlot()
+ : expr->CallNewFeedbackSlot();
+ expr->set_allocation_site(
+ oracle()->GetCallNewAllocationSite(allocation_site_feedback_slot));
+ bool monomorphic =
+ oracle()->CallNewIsMonomorphic(expr->CallNewFeedbackSlot());
+ expr->set_is_monomorphic(monomorphic);
+ if (monomorphic) {
+ expr->set_target(oracle()->GetCallNewTarget(expr->CallNewFeedbackSlot()));
+ }
RECURSE(Visit(expr->expression()));
ZoneList<Expression*>* args = expr->arguments();
« no previous file with comments | « src/ast.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698