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

Unified Diff: src/heap/heap.h

Issue 1314853002: [heap] Make the current GCCallbackFlags are part of {Heap}. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: StartIncrementalMarking: made GC flags optional 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 | « no previous file | 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 5c825e77804ad06cd30b1f3ae3ae6b4d562bcd86..7417267ed16f2c11832a60748a7f55e09900ac8a 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -1362,8 +1362,9 @@ class Heap {
// Starts incremental marking assuming incremental marking is currently
// stopped.
- void StartIncrementalMarking(int gc_flags,
- const GCCallbackFlags gc_callback_flags,
+ void StartIncrementalMarking(int gc_flags = kNoGCFlags,
+ const GCCallbackFlags gc_callback_flags =
+ GCCallbackFlags::kNoGCCallbackFlags,
const char* reason = nullptr);
// Performs incremental marking steps of step_size_in_bytes as long as
@@ -1678,6 +1679,14 @@ class Heap {
!ShouldAbortIncrementalMarking());
}
Hannes Payer (out of office) 2015/08/25 09:21:20 The local variable is just used within heap. The g
Michael Lippautz 2015/08/25 10:33:39 Done.
+ GCCallbackFlags current_gc_callback_flags() {
+ return current_gc_callback_flags_;
+ }
+
+ void set_current_gc_callback_flags(GCCallbackFlags callback_flags) {
+ current_gc_callback_flags_ = callback_flags;
+ }
+
inline bool ShouldReduceMemory() const {
return current_gc_flags_ & kReduceMemoryFootprintMask;
}
@@ -2346,6 +2355,10 @@ class Heap {
// Currently set GC flags that are respected by all GC components.
int current_gc_flags_;
+ // Currently set GC callback flags that are used to pass information between
+ // the embedder and V8's GC.
+ GCCallbackFlags current_gc_callback_flags_;
+
ExternalStringTable external_string_table_;
VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_;
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698