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

Unified Diff: src/heap/incremental-marking.h

Issue 437993003: Move a bunch of GC related files to heap/ subdirectory (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: make presubmit happy Created 6 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/heap/heap-inl.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking.h
diff --git a/src/incremental-marking.h b/src/heap/incremental-marking.h
similarity index 84%
rename from src/incremental-marking.h
rename to src/heap/incremental-marking.h
index e5d0f5b6e88be384fde92563ecc9641f2c0ed47e..d9259e8bc930f2e01b490b2304caf31835090997 100644
--- a/src/incremental-marking.h
+++ b/src/heap/incremental-marking.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef V8_INCREMENTAL_MARKING_H_
-#define V8_INCREMENTAL_MARKING_H_
+#ifndef V8_HEAP_INCREMENTAL_MARKING_H_
+#define V8_HEAP_INCREMENTAL_MARKING_H_
#include "src/execution.h"
-#include "src/mark-compact.h"
+#include "src/heap/mark-compact.h"
#include "src/objects.h"
namespace v8 {
@@ -16,17 +16,9 @@ namespace internal {
class IncrementalMarking {
public:
- enum State {
- STOPPED,
- SWEEPING,
- MARKING,
- COMPLETE
- };
-
- enum CompletionAction {
- GC_VIA_STACK_GUARD,
- NO_GC_VIA_STACK_GUARD
- };
+ enum State { STOPPED, SWEEPING, MARKING, COMPLETE };
+
+ enum CompletionAction { GC_VIA_STACK_GUARD, NO_GC_VIA_STACK_GUARD };
explicit IncrementalMarking(Heap* heap);
@@ -102,8 +94,7 @@ class IncrementalMarking {
}
}
- static void RecordWriteFromCode(HeapObject* obj,
- Object** slot,
+ static void RecordWriteFromCode(HeapObject* obj, Object** slot,
Isolate* isolate);
// Record a slot for compaction. Returns false for objects that are
@@ -114,17 +105,14 @@ class IncrementalMarking {
// the incremental cycle (stays white).
INLINE(bool BaseRecordWrite(HeapObject* obj, Object** slot, Object* value));
INLINE(void RecordWrite(HeapObject* obj, Object** slot, Object* value));
- INLINE(void RecordWriteIntoCode(HeapObject* obj,
- RelocInfo* rinfo,
+ INLINE(void RecordWriteIntoCode(HeapObject* obj, RelocInfo* rinfo,
Object* value));
- INLINE(void RecordWriteOfCodeEntry(JSFunction* host,
- Object** slot,
+ INLINE(void RecordWriteOfCodeEntry(JSFunction* host, Object** slot,
Code* value));
void RecordWriteSlow(HeapObject* obj, Object** slot, Object* value);
- void RecordWriteIntoCodeSlow(HeapObject* obj,
- RelocInfo* rinfo,
+ void RecordWriteIntoCodeSlow(HeapObject* obj, RelocInfo* rinfo,
Object* value);
void RecordWriteOfCodeEntrySlow(JSFunction* host, Object** slot, Code* value);
void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value);
@@ -154,22 +142,19 @@ class IncrementalMarking {
if (IsMarking()) {
if (marking_speed_ < kFastMarking) {
if (FLAG_trace_gc) {
- PrintPID("Increasing marking speed to %d "
- "due to high promotion rate\n",
- static_cast<int>(kFastMarking));
+ PrintPID(
+ "Increasing marking speed to %d "
+ "due to high promotion rate\n",
+ static_cast<int>(kFastMarking));
}
marking_speed_ = kFastMarking;
}
}
}
- void EnterNoMarkingScope() {
- no_marking_scope_depth_++;
- }
+ void EnterNoMarkingScope() { no_marking_scope_depth_++; }
- void LeaveNoMarkingScope() {
- no_marking_scope_depth_--;
- }
+ void LeaveNoMarkingScope() { no_marking_scope_depth_--; }
void UncommitMarkingDeque();
@@ -192,8 +177,7 @@ class IncrementalMarking {
static void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space);
void DeactivateIncrementalWriteBarrier();
- static void SetOldSpacePageFlags(MemoryChunk* chunk,
- bool is_marking,
+ static void SetOldSpacePageFlags(MemoryChunk* chunk, bool is_marking,
bool is_compacting);
static void SetNewSpacePageFlags(NewSpacePage* chunk, bool is_marking);
@@ -231,7 +215,7 @@ class IncrementalMarking {
DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking);
};
+}
+} // namespace v8::internal
-} } // namespace v8::internal
-
-#endif // V8_INCREMENTAL_MARKING_H_
+#endif // V8_HEAP_INCREMENTAL_MARKING_H_
« no previous file with comments | « src/heap/heap-inl.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698