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

Unified Diff: src/heap/object-stats.cc

Issue 2655853010: [TypeFeedbackVector] Combine the literals array and the feedback vector. (Closed)
Patch Set: more comments. Created 3 years, 11 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/heap/heap.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/object-stats.cc
diff --git a/src/heap/object-stats.cc b/src/heap/object-stats.cc
index 9f534a20e4ccf8850dc6ea5fd25e906a4eb63eb1..0a5a59b09a5564e163547b5277fcd6310f6374f1 100644
--- a/src/heap/object-stats.cc
+++ b/src/heap/object-stats.cc
@@ -330,7 +330,7 @@ static bool CanRecordFixedArray(Heap* heap, FixedArrayBase* array) {
array->map() != heap->fixed_double_array_map() &&
array != heap->empty_fixed_array() &&
array != heap->empty_byte_array() &&
- array != heap->empty_literals_array() &&
+ array != heap->empty_type_feedback_vector() &&
array != heap->empty_sloppy_arguments_elements() &&
array != heap->empty_slow_element_dictionary() &&
array != heap->empty_descriptor_array() &&
@@ -554,30 +554,27 @@ void ObjectStatsCollector::RecordSharedFunctionInfoDetails(
int len = optimized_code_map->length();
for (int i = SharedFunctionInfo::kEntriesStart; i < len;
i += SharedFunctionInfo::kEntryLength) {
- Object* slot =
- optimized_code_map->get(i + SharedFunctionInfo::kLiteralsOffset);
- LiteralsArray* literals = nullptr;
+ Object* slot = optimized_code_map->get(
+ i + SharedFunctionInfo::kFeedbackVectorOffset);
+ TypeFeedbackVector* vector = nullptr;
if (slot->IsWeakCell()) {
WeakCell* cell = WeakCell::cast(slot);
if (!cell->cleared()) {
- literals = LiteralsArray::cast(cell->value());
+ vector = TypeFeedbackVector::cast(cell->value());
}
} else {
- literals = LiteralsArray::cast(slot);
+ vector = TypeFeedbackVector::cast(slot);
}
- if (literals != nullptr) {
- RecordFixedArrayHelper(sfi, literals, LITERALS_ARRAY_SUB_TYPE, 0);
- RecordFixedArrayHelper(sfi, literals->feedback_vector(),
- TYPE_FEEDBACK_VECTOR_SUB_TYPE, 0);
+ if (vector != nullptr) {
+ RecordFixedArrayHelper(sfi, vector, TYPE_FEEDBACK_VECTOR_SUB_TYPE, 0);
}
}
}
}
void ObjectStatsCollector::RecordJSFunctionDetails(JSFunction* function) {
- LiteralsArray* literals = function->literals();
- RecordFixedArrayHelper(function, literals, LITERALS_ARRAY_SUB_TYPE, 0);
- RecordFixedArrayHelper(function, literals->feedback_vector(),
+ TypeFeedbackVector* feedback_vector = function->feedback_vector();
+ RecordFixedArrayHelper(function, feedback_vector,
TYPE_FEEDBACK_VECTOR_SUB_TYPE, 0);
}
« no previous file with comments | « src/heap/heap.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698