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

Unified Diff: src/type-feedback-vector.cc

Issue 2144183002: Revert "Avoid creating weak cells for literal arrays that are empty of literals." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 4 years, 5 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-feedback-vector.cc
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc
index 661aa2feac43c129745b8544930cc7b8e1ec9267..699cd08822ce87dfc40bc008e3603fb2cd9d8bc5 100644
--- a/src/type-feedback-vector.cc
+++ b/src/type-feedback-vector.cc
@@ -362,19 +362,11 @@ void TypeFeedbackVector::ClearAllKeyedStoreICs(Isolate* isolate) {
int length = optimized_code_map->length();
for (int i = SharedFunctionInfo::kEntriesStart; i < length;
i += SharedFunctionInfo::kEntryLength) {
- Object* lits =
- optimized_code_map->get(i + SharedFunctionInfo::kLiteralsOffset);
- TypeFeedbackVector* vector = nullptr;
- if (lits->IsWeakCell()) {
- WeakCell* cell = WeakCell::cast(lits);
- if (cell->value()->IsLiteralsArray()) {
- vector = LiteralsArray::cast(cell->value())->feedback_vector();
- }
- } else {
- DCHECK(lits->IsLiteralsArray());
- vector = LiteralsArray::cast(lits)->feedback_vector();
- }
- if (vector != nullptr) {
+ WeakCell* cell = WeakCell::cast(
+ optimized_code_map->get(i + SharedFunctionInfo::kLiteralsOffset));
+ if (cell->value()->IsLiteralsArray()) {
+ TypeFeedbackVector* vector =
+ LiteralsArray::cast(cell->value())->feedback_vector();
vector->ClearKeyedStoreICs(shared);
}
}
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698