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

Unified Diff: src/objects.cc

Issue 172203002: When clearing filled call target caches we should go back to the Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 6 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/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
===================================================================
--- src/objects.cc (revision 19457)
+++ src/objects.cc (working copy)
@@ -10637,12 +10637,16 @@
if (raw_info->IsTypeFeedbackInfo()) {
FixedArray* feedback_vector =
TypeFeedbackInfo::cast(raw_info)->feedback_vector();
+ Object* premonomorphic_sentinel =
+ TypeFeedbackInfo::RawPremonomorphicSentinel(heap);
for (int i = 0; i < feedback_vector->length(); i++) {
Object* obj = feedback_vector->get(i);
- if (!obj->IsAllocationSite()) {
- // TODO(mvstanton): Can't I avoid a write barrier for this sentinel?
- feedback_vector->set(i,
- TypeFeedbackInfo::RawUninitializedSentinel(heap));
+ // If the cache is monomorphic (non-arrays) or megamorphic we go
+ // back to premonomorphic.
+ ASSERT_EQ(*TypeFeedbackInfo::MegamorphicSentinel(heap->isolate()),
+ heap->undefined_value());
+ if (obj->IsUndefined() || obj->IsJSFunction()) {
+ feedback_vector->set(i, premonomorphic_sentinel, SKIP_WRITE_BARRIER);
}
}
}
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698