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

Unified Diff: src/heap/heap.cc

Issue 893073006: Add map-based read barrier to WeakCell Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix merge Created 5 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/heap/heap.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 0742aafc83913c1c3e4a46792ca6da2e415c2ebe..d8e4b684f0fb85d431f2c53900ab1858382d8e1a 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -2702,7 +2702,8 @@ bool Heap::CreateInitialMaps() {
ALLOCATE_MAP(CELL_TYPE, Cell::kSize, cell)
ALLOCATE_MAP(PROPERTY_CELL_TYPE, PropertyCell::kSize, global_property_cell)
- ALLOCATE_MAP(WEAK_CELL_TYPE, WeakCell::kSize, weak_cell)
+ ALLOCATE_MAP(WEAK_CELL_TYPE, WeakCell::kSize, used_weak_cell)
+ ALLOCATE_MAP(WEAK_CELL_TYPE, WeakCell::kSize, unused_weak_cell)
ALLOCATE_MAP(FILLER_TYPE, kPointerSize, one_pointer_filler)
ALLOCATE_MAP(FILLER_TYPE, 2 * kPointerSize, two_pointer_filler)
@@ -2839,7 +2840,7 @@ AllocationResult Heap::AllocateWeakCell(HeapObject* value) {
AllocateRaw(size, OLD_POINTER_SPACE, OLD_POINTER_SPACE);
if (!allocation.To(&result)) return allocation;
}
- result->set_map_no_write_barrier(weak_cell_map());
+ result->set_map_no_write_barrier(used_weak_cell_map());
WeakCell::cast(result)->initialize(value);
WeakCell::cast(result)->set_next(undefined_value(), SKIP_WRITE_BARRIER);
return result;
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698