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

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: Fix compile error Created 5 years, 8 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/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 a924d8dc08ef69567c64747b9ceb5b11b475fbe4..6814ce6e8f2091e6fedcb1d88509b0ad87046d22 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -2557,7 +2557,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::SEQUENTIAL_TO_SWEEPER>(
t, trim * TransitionArray::kTransitionSize);
t->SetNumberOfTransitions(transition_index);
// The map still has a full transition array.
@@ -2573,7 +2573,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::SEQUENTIAL_TO_SWEEPER>(
descriptors, to_trim * DescriptorArray::kDescriptorSize);
descriptors->SetNumberOfDescriptors(number_of_own_descriptors);
@@ -2601,12 +2601,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::SEQUENTIAL_TO_SWEEPER>(
+ 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::SEQUENTIAL_TO_SWEEPER>(enum_indices_cache,
+ to_trim);
}
« no previous file with comments | « src/heap/heap.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698