Chromium Code Reviews| Index: src/snapshot/serialize.cc |
| diff --git a/src/snapshot/serialize.cc b/src/snapshot/serialize.cc |
| index 47d4c9fafeac94eeaef3580fdaf4ab91683caa6b..28d5dfd12e026436925b8b9539ce752828eccadb 100644 |
| --- a/src/snapshot/serialize.cc |
| +++ b/src/snapshot/serialize.cc |
| @@ -54,8 +54,6 @@ ExternalReferenceTable::ExternalReferenceTable(Isolate* isolate) { |
| "StackGuard::address_of_real_jslimit()"); |
| Add(ExternalReference::new_space_start(isolate).address(), |
| "Heap::NewSpaceStart()"); |
| - Add(ExternalReference::new_space_mask(isolate).address(), |
| - "Heap::NewSpaceMask()"); |
| Add(ExternalReference::new_space_allocation_limit_address(isolate).address(), |
| "Heap::NewSpaceAllocationLimitAddress()"); |
| Add(ExternalReference::new_space_allocation_top_address(isolate).address(), |
| @@ -1016,9 +1014,11 @@ bool Deserializer::ReadData(Object** current, Object** limit, int source_space, |
| } \ |
| if (emit_write_barrier && write_barrier_needed) { \ |
| Address current_address = reinterpret_cast<Address>(current); \ |
| + /* Builtins have been filtered above, so we are on-heap. */ \ |
|
Yang
2016/02/09 09:54:26
This comment makes no sense to me. Maybe you mean
Michael Lippautz
2016/02/09 13:28:53
Thanks for the clarification!
As discussed offlin
|
| isolate->heap()->RecordWrite( \ |
| - current_object_address, \ |
| - static_cast<int>(current_address - current_object_address)); \ |
| + reinterpret_cast<Object*>(current_object_address + 1), \ |
| + static_cast<int>(current_address - current_object_address), \ |
| + *reinterpret_cast<Object**>(current_address)); \ |
| } \ |
| if (!current_was_incremented) { \ |
| current++; \ |
| @@ -1250,11 +1250,12 @@ bool Deserializer::ReadData(Object** current, Object** limit, int source_space, |
| int index = data & kHotObjectMask; |
| Object* hot_object = hot_objects_.Get(index); |
| UnalignedCopy(current, &hot_object); |
| - if (write_barrier_needed && isolate->heap()->InNewSpace(hot_object)) { |
| + if (write_barrier_needed) { |
| Address current_address = reinterpret_cast<Address>(current); |
| isolate->heap()->RecordWrite( |
| - current_object_address, |
| - static_cast<int>(current_address - current_object_address)); |
| + reinterpret_cast<Object*>(current_object_address + 1), |
| + static_cast<int>(current_address - current_object_address), |
| + hot_object); |
| } |
| current++; |
| break; |