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

Side by Side Diff: src/heap/scavenger-inl.h

Issue 2397713002: [heap] Remove PromotionMode used by Scavenger (Closed)
Patch Set: Remove introduced tests Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « src/heap/scavenger.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_SCAVENGER_INL_H_ 5 #ifndef V8_HEAP_SCAVENGER_INL_H_
6 #define V8_HEAP_SCAVENGER_INL_H_ 6 #define V8_HEAP_SCAVENGER_INL_H_
7 7
8 #include "src/heap/scavenger.h" 8 #include "src/heap/scavenger.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 if (heap->InToSpace(object)) { 55 if (heap->InToSpace(object)) {
56 return KEEP_SLOT; 56 return KEEP_SLOT;
57 } 57 }
58 } 58 }
59 // Slots can point to "to" space if the slot has been recorded multiple 59 // Slots can point to "to" space if the slot has been recorded multiple
60 // times in the remembered set. We remove the redundant slot now. 60 // times in the remembered set. We remove the redundant slot now.
61 return REMOVE_SLOT; 61 return REMOVE_SLOT;
62 } 62 }
63 63
64 // static 64 // static
65 template <PromotionMode promotion_mode> 65 void StaticScavengeVisitor::VisitPointer(Heap* heap, HeapObject* obj,
66 void StaticScavengeVisitor<promotion_mode>::VisitPointer(Heap* heap, 66 Object** p) {
67 HeapObject* obj,
68 Object** p) {
69 Object* object = *p; 67 Object* object = *p;
70 if (!heap->InNewSpace(object)) return; 68 if (!heap->InNewSpace(object)) return;
71 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), 69 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p),
72 reinterpret_cast<HeapObject*>(object)); 70 reinterpret_cast<HeapObject*>(object));
73 } 71 }
74 72
75 } // namespace internal 73 } // namespace internal
76 } // namespace v8 74 } // namespace v8
77 75
78 #endif // V8_HEAP_SCAVENGER_INL_H_ 76 #endif // V8_HEAP_SCAVENGER_INL_H_
OLDNEW
« no previous file with comments | « src/heap/scavenger.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698