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

Unified Diff: src/heap/heap.h

Issue 1115043005: Revert of Remove the weak list of array buffers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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-snapshot-generator.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 75e47ea4d3e88de9b8f7fb9b729058eb83779292..d019293c7b0e08cac803f3a6dfb756100b500c60 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -6,7 +6,6 @@
#define V8_HEAP_HEAP_H_
#include <cmath>
-#include <map>
#include "src/allocation.h"
#include "src/assert-scope.h"
@@ -875,6 +874,16 @@
}
Object* native_contexts_list() const { return native_contexts_list_; }
+ void set_array_buffers_list(Object* object) { array_buffers_list_ = object; }
+ Object* array_buffers_list() const { return array_buffers_list_; }
+
+ void set_last_array_buffer_in_list(Object* object) {
+ last_array_buffer_in_list_ = object;
+ }
+ Object* last_array_buffer_in_list() const {
+ return last_array_buffer_in_list_;
+ }
+
void set_allocation_sites_list(Object* object) {
allocation_sites_list_ = object;
}
@@ -1481,11 +1490,6 @@
bool deserialization_complete() const { return deserialization_complete_; }
- void RegisterNewArrayBuffer(void* data, size_t length);
- void UnregisterArrayBuffer(void* data);
- void RegisterLiveArrayBuffer(void* data);
- void FreeDeadArrayBuffers();
-
protected:
// Methods made available to tests.
@@ -1656,6 +1660,8 @@
// Weak list heads, threaded through the objects.
// List heads are initialized lazily and contain the undefined_value at start.
Object* native_contexts_list_;
+ Object* array_buffers_list_;
+ Object* last_array_buffer_in_list_;
Object* allocation_sites_list_;
// List of encountered weak collections (JSWeakMap and JSWeakSet) during
@@ -1989,6 +1995,7 @@
void MarkCompactEpilogue();
void ProcessNativeContexts(WeakObjectRetainer* retainer);
+ void ProcessArrayBuffers(WeakObjectRetainer* retainer, bool stop_after_young);
void ProcessAllocationSites(WeakObjectRetainer* retainer);
// Deopts all code that contains allocation instruction which are tenured or
@@ -2148,9 +2155,6 @@
bool deserialization_complete_;
bool concurrent_sweeping_enabled_;
-
- std::map<void*, size_t> live_array_buffers_;
- std::map<void*, size_t> not_yet_discovered_array_buffers_;
friend class AlwaysAllocateScope;
friend class Deserializer;
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698