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

Unified Diff: src/heap/heap.h

Issue 1317553002: [heap] Prevent direct access to StoreBuffer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 4 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/assembler.cc ('k') | src/heap/mark-compact.h » ('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 540185731cc4eb02d3c8d21ddb47f870253a8500..fd74ff2f498f40d151399fa71cfd16d7af3ba1fd 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -994,10 +994,6 @@ class Heap {
roots_[kEmptyScriptRootIndex] = script;
}
- void public_set_store_buffer_top(Address* top) {
- roots_[kStoreBufferTopRootIndex] = reinterpret_cast<Smi*>(top);
- }
-
void public_set_materialized_objects(FixedArray* objects) {
roots_[kMaterializedObjectsRootIndex] = objects;
}
@@ -1005,10 +1001,6 @@ class Heap {
// Generated code can embed this address to get access to the roots.
Object** roots_array_start() { return roots_; }
- Address* store_buffer_top_address() {
- return reinterpret_cast<Address*>(&roots_[kStoreBufferTopRootIndex]);
- }
-
void CheckHandleCount();
// Number of "runtime allocations" done so far.
@@ -1029,12 +1021,6 @@ class Heap {
return index < OBJECT_STATS_COUNT ? object_sizes_last_time_[index] : 0;
}
- // Write barrier support for address[offset] = o.
- INLINE(void RecordWrite(Address address, int offset));
-
- // Write barrier support for address[start : start + len[ = o.
- INLINE(void RecordWrites(Address address, int start, int len));
-
inline HeapState gc_state() { return gc_state_; }
inline bool IsInGCPostProcessing() { return gc_post_processing_depth_ > 0; }
@@ -1094,10 +1080,6 @@ class Heap {
void IncrementDeferredCount(v8::Isolate::UseCounterFeature feature);
- ExternalStringTable* external_string_table() {
- return &external_string_table_;
- }
-
bool concurrent_sweeping_enabled() { return concurrent_sweeping_enabled_; }
inline bool OldGenerationAllocationLimitReached();
@@ -1307,7 +1289,9 @@ class Heap {
return &mark_compact_collector_;
}
- StoreBuffer* store_buffer() { return &store_buffer_; }
+ ExternalStringTable* external_string_table() {
+ return &external_string_table_;
+ }
// ===========================================================================
// Inline allocation. ========================================================
@@ -1365,6 +1349,20 @@ class Heap {
ObjectSlotCallback callback);
// ===========================================================================
+ // Store buffer API. =========================================================
+ // ===========================================================================
+
+ // Write barrier support for address[offset] = o.
+ INLINE(void RecordWrite(Address address, int offset));
+
+ // Write barrier support for address[start : start + len[ = o.
+ INLINE(void RecordWrites(Address address, int start, int len));
+
+ Address* store_buffer_top_address() {
+ return reinterpret_cast<Address*>(&roots_[kStoreBufferTopRootIndex]);
+ }
+
+ // ===========================================================================
// Incremental marking API. ==================================================
// ===========================================================================
@@ -1683,6 +1681,8 @@ class Heap {
ROOT_LIST(ROOT_ACCESSOR)
#undef ROOT_ACCESSOR
+ StoreBuffer* store_buffer() { return &store_buffer_; }
+
void set_current_gc_flags(int flags) {
current_gc_flags_ = flags;
DCHECK(!ShouldFinalizeIncrementalMarking() ||
@@ -2411,6 +2411,7 @@ class Heap {
friend class MarkCompactMarkingVisitor;
friend class MapCompact;
friend class Page;
+ friend class StoreBuffer;
// Used in cctest.
friend class HeapTester;
« no previous file with comments | « src/assembler.cc ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698