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

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

Issue 1535723002: [heap] Use HashMap as scratchpad backing store (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Revive the founder counter on the AllocationSite Created 4 years, 11 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/mark-compact.cc ('k') | src/heap/spaces.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 10 matching lines...) Expand all
21 21
22 // If the first word is a forwarding address, the object has already been 22 // If the first word is a forwarding address, the object has already been
23 // copied. 23 // copied.
24 if (first_word.IsForwardingAddress()) { 24 if (first_word.IsForwardingAddress()) {
25 HeapObject* dest = first_word.ToForwardingAddress(); 25 HeapObject* dest = first_word.ToForwardingAddress();
26 DCHECK(object->GetIsolate()->heap()->InFromSpace(*p)); 26 DCHECK(object->GetIsolate()->heap()->InFromSpace(*p));
27 *p = dest; 27 *p = dest;
28 return; 28 return;
29 } 29 }
30 30
31 Heap::UpdateAllocationSiteFeedback(object, Heap::IGNORE_SCRATCHPAD_SLOT); 31 object->GetHeap()->UpdateAllocationSite(
32 object, object->GetHeap()->global_pretenuring_feedback_);
32 33
33 // AllocationMementos are unrooted and shouldn't survive a scavenge 34 // AllocationMementos are unrooted and shouldn't survive a scavenge
34 DCHECK(object->map() != object->GetHeap()->allocation_memento_map()); 35 DCHECK(object->map() != object->GetHeap()->allocation_memento_map());
35 // Call the slow part of scavenge object. 36 // Call the slow part of scavenge object.
36 return ScavengeObjectSlow(p, object); 37 return ScavengeObjectSlow(p, object);
37 } 38 }
38 39
39 40
40 // static 41 // static
41 void StaticScavengeVisitor::VisitPointer(Heap* heap, HeapObject* obj, 42 void StaticScavengeVisitor::VisitPointer(Heap* heap, HeapObject* obj,
42 Object** p) { 43 Object** p) {
43 Object* object = *p; 44 Object* object = *p;
44 if (!heap->InNewSpace(object)) return; 45 if (!heap->InNewSpace(object)) return;
45 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), 46 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p),
46 reinterpret_cast<HeapObject*>(object)); 47 reinterpret_cast<HeapObject*>(object));
47 } 48 }
48 49
49 } // namespace internal 50 } // namespace internal
50 } // namespace v8 51 } // namespace v8
51 52
52 #endif // V8_HEAP_SCAVENGER_INL_H_ 53 #endif // V8_HEAP_SCAVENGER_INL_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698