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

Unified Diff: src/heap/scavenger-inl.h

Issue 2950993002: Make some functions that are hit during renderer startup available for inlining (Closed)
Patch Set: rebase Created 3 years, 6 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/scavenger.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/scavenger-inl.h
diff --git a/src/heap/scavenger-inl.h b/src/heap/scavenger-inl.h
index 3fb6b29122c637996f56bd0ea0f874ab1137bc74..0cf84d5f15acb9b0285317fe9f05348baffc5670 100644
--- a/src/heap/scavenger-inl.h
+++ b/src/heap/scavenger-inl.h
@@ -37,6 +37,15 @@ void Scavenger::ScavengeObject(HeapObject** p, HeapObject* object) {
return ScavengeObjectSlow(p, object);
}
+void Scavenger::ScavengeObjectSlow(HeapObject** p, HeapObject* object) {
+ SLOW_DCHECK(object->GetIsolate()->heap()->InFromSpace(object));
+ MapWord first_word = object->map_word();
+ SLOW_DCHECK(!first_word.IsForwardingAddress());
+ Map* map = first_word.ToMap();
+ Scavenger* scavenger = map->GetHeap()->scavenge_collector_;
+ scavenger->scavenging_visitors_table_.GetVisitor(map)(map, p, object);
+}
+
SlotCallbackResult Scavenger::CheckAndScavengeObject(Heap* heap,
Address slot_address) {
Object** slot = reinterpret_cast<Object**>(slot_address);
« 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