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

Unified Diff: src/heap/mark-compact.cc

Issue 1169743002: Reland "Replace ad-hoc weakness in prototype transitions with WeakCell." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add missing slots recording Created 5 years, 6 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 | « no previous file | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 53bd132ac0be4da9bc3241c4800e9ccc65dcd3d6..5a4a1a7036739a6aa79154c924a182b72a7442f0 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -2404,11 +2404,13 @@ void MarkCompactCollector::ClearNonLivePrototypeTransitions(Map* map) {
const int header = TransitionArray::kProtoTransitionHeaderSize;
int new_number_of_transitions = 0;
for (int i = 0; i < number_of_transitions; i++) {
- Object* cached_map = prototype_transitions->get(header + i);
- if (IsMarked(cached_map)) {
+ Object* cell = prototype_transitions->get(header + i);
+ if (!WeakCell::cast(cell)->cleared()) {
if (new_number_of_transitions != i) {
- prototype_transitions->set(header + new_number_of_transitions,
- cached_map, SKIP_WRITE_BARRIER);
+ prototype_transitions->set(header + new_number_of_transitions, cell);
+ Object** slot = prototype_transitions->RawFieldOfElementAt(
+ header + new_number_of_transitions);
+ RecordSlot(slot, slot, cell);
}
new_number_of_transitions++;
}
« no previous file with comments | « no previous file | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698