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

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

Issue 2955793002: Revert of Make some functions that are hit during renderer startup available for inlining (Closed)
Patch Set: Created 3 years, 5 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') | src/interpreter/bytecodes.h » ('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 19 matching lines...) Expand all
30 30
31 object->GetHeap()->UpdateAllocationSite<Heap::kGlobal>( 31 object->GetHeap()->UpdateAllocationSite<Heap::kGlobal>(
32 object, object->GetHeap()->global_pretenuring_feedback_); 32 object, object->GetHeap()->global_pretenuring_feedback_);
33 33
34 // AllocationMementos are unrooted and shouldn't survive a scavenge 34 // AllocationMementos are unrooted and shouldn't survive a scavenge
35 DCHECK(object->map() != object->GetHeap()->allocation_memento_map()); 35 DCHECK(object->map() != object->GetHeap()->allocation_memento_map());
36 // Call the slow part of scavenge object. 36 // Call the slow part of scavenge object.
37 return ScavengeObjectSlow(p, object); 37 return ScavengeObjectSlow(p, object);
38 } 38 }
39 39
40 void Scavenger::ScavengeObjectSlow(HeapObject** p, HeapObject* object) {
41 SLOW_DCHECK(object->GetIsolate()->heap()->InFromSpace(object));
42 MapWord first_word = object->map_word();
43 SLOW_DCHECK(!first_word.IsForwardingAddress());
44 Map* map = first_word.ToMap();
45 Scavenger* scavenger = map->GetHeap()->scavenge_collector_;
46 scavenger->scavenging_visitors_table_.GetVisitor(map)(map, p, object);
47 }
48
49 SlotCallbackResult Scavenger::CheckAndScavengeObject(Heap* heap, 40 SlotCallbackResult Scavenger::CheckAndScavengeObject(Heap* heap,
50 Address slot_address) { 41 Address slot_address) {
51 Object** slot = reinterpret_cast<Object**>(slot_address); 42 Object** slot = reinterpret_cast<Object**>(slot_address);
52 Object* object = *slot; 43 Object* object = *slot;
53 if (heap->InFromSpace(object)) { 44 if (heap->InFromSpace(object)) {
54 HeapObject* heap_object = reinterpret_cast<HeapObject*>(object); 45 HeapObject* heap_object = reinterpret_cast<HeapObject*>(object);
55 DCHECK(heap_object->IsHeapObject()); 46 DCHECK(heap_object->IsHeapObject());
56 47
57 ScavengeObject(reinterpret_cast<HeapObject**>(slot), heap_object); 48 ScavengeObject(reinterpret_cast<HeapObject**>(slot), heap_object);
58 49
(...skipping 18 matching lines...) Expand all
77 if (!heap_->InNewSpace(object)) continue; 68 if (!heap_->InNewSpace(object)) continue;
78 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), 69 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p),
79 reinterpret_cast<HeapObject*>(object)); 70 reinterpret_cast<HeapObject*>(object));
80 } 71 }
81 } 72 }
82 73
83 } // namespace internal 74 } // namespace internal
84 } // namespace v8 75 } // namespace v8
85 76
86 #endif // V8_HEAP_SCAVENGER_INL_H_ 77 #endif // V8_HEAP_SCAVENGER_INL_H_
OLDNEW
« no previous file with comments | « src/heap/scavenger.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698