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

Unified Diff: src/heap/heap.h

Issue 640303006: Weak Cells (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Skip cleared weak cells Created 6 years, 2 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/factory.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index df3d2c674390cc404961e710934b3e261d476d64..7186bb6dac9e540e75d7c27fda50ccbf6fab9946 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -52,6 +52,7 @@ namespace internal {
V(Map, fixed_cow_array_map, FixedCOWArrayMap) \
V(Map, fixed_double_array_map, FixedDoubleArrayMap) \
V(Map, constant_pool_array_map, ConstantPoolArrayMap) \
+ V(Map, weak_cell_map, WeakCellMap) \
V(Oddball, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \
V(Map, hash_table_map, HashTableMap) \
V(Map, ordered_hash_table_map, OrderedHashTableMap) \
@@ -223,6 +224,7 @@ namespace internal {
V(fixed_cow_array_map) \
V(fixed_double_array_map) \
V(constant_pool_array_map) \
+ V(weak_cell_map) \
V(no_interceptor_result_sentinel) \
V(hash_table_map) \
V(ordered_hash_table_map) \
@@ -829,6 +831,11 @@ class Heap {
return encountered_weak_collections_;
}
+ void set_encountered_weak_cells(Object* weak_cell) {
+ encountered_weak_cells_ = weak_cell;
+ }
+ Object* encountered_weak_cells() const { return encountered_weak_cells_; }
+
// Number of mark-sweeps.
unsigned int ms_count() { return ms_count_; }
@@ -1559,6 +1566,8 @@ class Heap {
// contains Smi(0) while marking is not active.
Object* encountered_weak_collections_;
+ Object* encountered_weak_cells_;
+
StoreBufferRebuilder store_buffer_rebuilder_;
struct StringTypeTable {
@@ -1839,6 +1848,8 @@ class Heap {
// Allocate a tenured JS global property cell initialized with the hole.
MUST_USE_RESULT AllocationResult AllocatePropertyCell();
+ MUST_USE_RESULT AllocationResult AllocateWeakCell(HeapObject* value);
+
// Allocates a new utility object in the old generation.
MUST_USE_RESULT AllocationResult AllocateStruct(InstanceType type);
« no previous file with comments | « src/factory.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698