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

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

Issue 1034163002: Use atomic operation to read the length of a fixed array. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« src/heap/heap.h ('K') | « src/heap/heap.cc ('k') | src/isolate.cc » ('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 489b92aca987fd251128e262404e03baafbeaa41..b4bb8ee45abcb92db3b20ca0cd92b71aa7dce9c8 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -2587,7 +2587,7 @@ void MarkCompactCollector::ClearMapTransitions(Map* map, Map* dead_transition) {
// Non-full-TransitionArray cases can never reach this point.
DCHECK(TransitionArray::IsFullTransitionArray(transitions));
TransitionArray* t = TransitionArray::cast(transitions);
- heap_->RightTrimFixedArray<Heap::FROM_GC>(
+ heap_->RightTrimFixedArray<Heap::SWEEPING_IS_OFF>(
t, trim * TransitionArray::kTransitionSize);
t->SetNumberOfTransitions(transition_index);
// The map still has a full transition array.
@@ -2603,7 +2603,7 @@ void MarkCompactCollector::TrimDescriptorArray(Map* map,
int to_trim = number_of_descriptors - number_of_own_descriptors;
if (to_trim == 0) return;
- heap_->RightTrimFixedArray<Heap::FROM_GC>(
+ heap_->RightTrimFixedArray<Heap::SWEEPING_IS_OFF>(
descriptors, to_trim * DescriptorArray::kDescriptorSize);
descriptors->SetNumberOfDescriptors(number_of_own_descriptors);
@@ -2624,12 +2624,13 @@ void MarkCompactCollector::TrimEnumCache(Map* map,
int to_trim = enum_cache->length() - live_enum;
if (to_trim <= 0) return;
- heap_->RightTrimFixedArray<Heap::FROM_GC>(descriptors->GetEnumCache(),
- to_trim);
+ heap_->RightTrimFixedArray<Heap::SWEEPING_IS_OFF>(descriptors->GetEnumCache(),
+ to_trim);
if (!descriptors->HasEnumIndicesCache()) return;
FixedArray* enum_indices_cache = descriptors->GetEnumIndicesCache();
- heap_->RightTrimFixedArray<Heap::FROM_GC>(enum_indices_cache, to_trim);
+ heap_->RightTrimFixedArray<Heap::SWEEPING_IS_OFF>(enum_indices_cache,
+ to_trim);
}
« src/heap/heap.h ('K') | « src/heap/heap.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698