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

Unified Diff: src/snapshot/serialize.cc

Issue 1632913003: [heap] Move to page lookups for SemiSpace, NewSpace, and Heap containment methods (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips ports Created 4 years, 10 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/objects-inl.h ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/serialize.cc
diff --git a/src/snapshot/serialize.cc b/src/snapshot/serialize.cc
index 47d4c9fafeac94eeaef3580fdaf4ab91683caa6b..89d37be1df467879f6703f553bd863abab391229 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); \
+ SLOW_DCHECK(isolate->heap()->ContainsSlow(current_object_address)); \
isolate->heap()->RecordWrite( \
- current_object_address, \
- static_cast<int>(current_address - current_object_address)); \
+ HeapObject::FromAddress(current_object_address), \
+ static_cast<int>(current_address - current_object_address), \
+ *reinterpret_cast<Object**>(current_address)); \
} \
if (!current_was_incremented) { \
current++; \
@@ -1250,11 +1250,13 @@ 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);
+ SLOW_DCHECK(isolate->heap()->ContainsSlow(current_object_address));
isolate->heap()->RecordWrite(
- current_object_address,
- static_cast<int>(current_address - current_object_address));
+ HeapObject::FromAddress(current_object_address),
+ static_cast<int>(current_address - current_object_address),
+ hot_object);
}
current++;
break;
« no previous file with comments | « src/objects-inl.h ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698