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

Unified Diff: src/objects.cc

Issue 196283015: Revert "Moved type feedback vector to SharedFunctionInfo." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 492f7528f0d4631558807e6c698dc42e0aca41e8..f1ab81f3fe3a3e3cce43ab16dc4eb1bed63473c5 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -10640,16 +10640,19 @@ void Code::ClearInlineCaches(Code::Kind* kind) {
}
-void SharedFunctionInfo::ClearTypeFeedbackInfo(Heap* heap) {
- FixedArray* vector = feedback_vector();
- for (int i = 0; i < vector->length(); i++) {
- Object* obj = vector->get(i);
- if (!obj->IsAllocationSite()) {
- // The assert verifies we can skip the write barrier.
- ASSERT(heap->uninitialized_symbol() ==
- TypeFeedbackInfo::RawUninitializedSentinel(heap));
- vector->set(i, TypeFeedbackInfo::RawUninitializedSentinel(heap),
- SKIP_WRITE_BARRIER);
+void Code::ClearTypeFeedbackInfo(Heap* heap) {
+ if (kind() != FUNCTION) return;
+ Object* raw_info = type_feedback_info();
+ if (raw_info->IsTypeFeedbackInfo()) {
+ FixedArray* feedback_vector =
+ TypeFeedbackInfo::cast(raw_info)->feedback_vector();
+ 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));
+ }
}
}
}
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698