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

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

Issue 10386046: Implement map collection for incremental marking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Major cleanup of prototype. Created 8 years, 7 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
Index: src/incremental-marking-inl.h
diff --git a/src/incremental-marking-inl.h b/src/incremental-marking-inl.h
index 5ce003f31d4c0d27e81a66df22ad269f11810ca4..11f76eac770b466acd7363ba7da5ad11bcaf58a0 100644
--- a/src/incremental-marking-inl.h
+++ b/src/incremental-marking-inl.h
@@ -1,4 +1,4 @@
-// Copyright 2011 the V8 project authors. All rights reserved.
+// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -128,6 +128,28 @@ void IncrementalMarking::WhiteToGrey(HeapObject* obj, MarkBit mark_bit) {
}
+bool IncrementalMarking::MarkObject(HeapObject* obj) {
Vyacheslav Egorov (Chromium) 2012/05/11 12:58:35 I suggest naming it MarkObjectAndPush
Michael Starzinger 2012/05/11 14:51:53 Done.
+ MarkBit mark_bit = Marking::MarkBitFrom(obj);
+ if (!mark_bit.Get()) {
+ WhiteToGreyAndPush(obj, mark_bit);
+ MemoryChunk::IncrementLiveBytesFromGC(obj->address(), obj->Size());
+ return true;
+ }
+ return false;
+}
+
+
+bool IncrementalMarking::MarkObjectWithoutPush(HeapObject* obj) {
+ MarkBit mark_bit = Marking::MarkBitFrom(obj);
+ if (!mark_bit.Get()) {
+ MarkBlackOrKeepGrey(mark_bit);
Vyacheslav Egorov (Chromium) 2012/05/11 12:58:35 Can it be grey at this point? I don't think so.
Michael Starzinger 2012/05/11 14:51:53 Done, inlined mark bit setting.
+ MemoryChunk::IncrementLiveBytesFromGC(obj->address(), obj->Size());
+ return true;
+ }
+ return false;
+}
+
+
} } // namespace v8::internal
#endif // V8_INCREMENTAL_MARKING_INL_H_

Powered by Google App Engine
This is Rietveld 408576698