Index: src/heap.h |
diff --git a/src/heap.h b/src/heap.h |
index 320b67681a9ac594ecf88e6229e9fb317925f1eb..d12d316cb1bcd57f5592f676747a6180648fd459 100644 |
--- a/src/heap.h |
+++ b/src/heap.h |
@@ -1308,6 +1308,9 @@ class Heap { |
Object* allocation_sites_list() { return allocation_sites_list_; } |
Object** allocation_sites_list_address() { return &allocation_sites_list_; } |
+ Object* weak_object_to_code_table() { return weak_object_to_code_table_; } |
+ |
+ |
Hannes Payer (out of office)
2013/10/02 12:21:47
remove one newline
ulan
2013/10/02 12:36:49
Done.
|
// Number of mark-sweeps. |
unsigned int ms_count() { return ms_count_; } |
@@ -1853,6 +1856,16 @@ class Heap { |
Heap* heap_; |
}; |
+ MaybeObject* AddWeakObjectToCodeDependency(Object* obj, DependentCode* dep); |
+ |
+ DependentCode* LookupWeakObjectToCodeDependency(Object* obj); |
+ |
+ void InitializeWeakObjectToCodeTable() { |
+ set_weak_object_to_code_table(undefined_value()); |
+ } |
+ |
+ void EnsureWeakObjectToCodeTable(); |
+ |
private: |
Heap(); |
@@ -1967,10 +1980,16 @@ class Heap { |
bool old_gen_exhausted_; |
// Weak list heads, threaded through the objects. |
+ // List heads are initilized lazily and contain the undefined_value at start. |
Object* native_contexts_list_; |
Object* array_buffers_list_; |
Object* allocation_sites_list_; |
+ // WeakHashTable that maps objects embedded in optimized code to dependent |
+ // code list. It is initilized lazily and contains the undefined_value at |
+ // start. |
+ Object* weak_object_to_code_table_; |
+ |
StoreBufferRebuilder store_buffer_rebuilder_; |
struct StringTypeTable { |
@@ -2279,6 +2298,15 @@ class Heap { |
void ClearObjectStats(bool clear_last_time_stats = false); |
+ void set_weak_object_to_code_table(Object* value) { |
+ ASSERT(!InNewSpace(value)); |
+ weak_object_to_code_table_ = value; |
+ } |
+ |
+ Object** weak_object_to_code_table_address() { |
+ return &weak_object_to_code_table_; |
+ } |
+ |
static const int kInitialStringTableSize = 2048; |
static const int kInitialEvalCacheSize = 64; |
static const int kInitialNumberStringCacheSize = 256; |