Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 0e455508456d7b23465fa893194b51993e316c78..71afb1536c507b84ec7c3b19fb445cdd2a389699 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -2060,6 +2060,21 @@ void ExternalFloatArray::set(int index, float value) { |
ptr[index] = value; |
} |
+inline Scavenger Map::scavenger() { |
+ Scavenger callback = reinterpret_cast<Scavenger>( |
+ READ_INTPTR_FIELD(this, kScavengerCallbackOffset)); |
+ |
+ ASSERT(callback == Heap::GetScavenger(instance_type(), |
+ instance_size())); |
+ |
+ return callback; |
+} |
+ |
+inline void Map::set_scavenger(Scavenger callback) { |
+ WRITE_INTPTR_FIELD(this, |
+ kScavengerCallbackOffset, |
+ reinterpret_cast<intptr_t>(callback)); |
+} |
int Map::instance_size() { |
return READ_BYTE_FIELD(this, kInstanceSizeOffset) << kPointerSizeLog2; |