| Index: src/heap/heap-inl.h
|
| diff --git a/src/heap/heap-inl.h b/src/heap/heap-inl.h
|
| index d54d644bdb4e542069b8693dddcceb1882961c1b..347a0879b479257d246584a18b3160deae6e99bf 100644
|
| --- a/src/heap/heap-inl.h
|
| +++ b/src/heap/heap-inl.h
|
| @@ -359,10 +359,6 @@ bool Heap::InNewSpace(Object* object) {
|
| return result;
|
| }
|
|
|
| -
|
| -bool Heap::InNewSpace(Address address) { return new_space_.Contains(address); }
|
| -
|
| -
|
| bool Heap::InFromSpace(Object* object) {
|
| return new_space_.FromSpaceContains(object);
|
| }
|
| @@ -372,6 +368,9 @@ bool Heap::InToSpace(Object* object) {
|
| return new_space_.ToSpaceContains(object);
|
| }
|
|
|
| +bool Heap::InNewSpaceSlow(Address address) {
|
| + return new_space_.ContainsSlow(address);
|
| +}
|
|
|
| bool Heap::InOldSpace(Address address) { return old_space_->Contains(address); }
|
|
|
| @@ -394,18 +393,15 @@ bool Heap::ShouldBePromoted(Address old_address, int object_size) {
|
| (!page->ContainsLimit(age_mark) || old_address < age_mark);
|
| }
|
|
|
| -
|
| -void Heap::RecordWrite(Address address, int offset) {
|
| - if (!InNewSpace(address)) store_buffer_.Mark(address + offset);
|
| +void Heap::RecordWriteSlow(Address address, int offset) {
|
| + if (!InNewSpaceSlow(address)) store_buffer_.Mark(address + offset);
|
| }
|
|
|
| -
|
| -void Heap::RecordWrites(Address address, int start, int len) {
|
| - if (!InNewSpace(address)) {
|
| - for (int i = 0; i < len; i++) {
|
| - store_buffer_.Mark(address + start + i * kPointerSize);
|
| - }
|
| +inline void Heap::RecordWrite(Object* object, int offset) {
|
| + if (!object->IsHeapObject() || InNewSpace(object)) {
|
| + return;
|
| }
|
| + store_buffer_.Mark(HeapObject::cast(object)->address() + offset);
|
| }
|
|
|
|
|
|
|