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

Side by Side Diff: src/incremental-marking-inl.h

Issue 10310168: Implement map collection for incremental marking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/incremental-marking.cc ('k') | src/mark-compact.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
11 // with the distribution. 11 // with the distribution.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 allocation_marking_factor_ = kMaxAllocationMarkingFactor; 112 allocation_marking_factor_ = kMaxAllocationMarkingFactor;
113 } 113 }
114 } 114 }
115 115
116 marking_deque_.UnshiftGrey(obj); 116 marking_deque_.UnshiftGrey(obj);
117 } 117 }
118 118
119 119
120 void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) { 120 void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) {
121 WhiteToGrey(obj, mark_bit); 121 Marking::WhiteToGrey(mark_bit);
122 marking_deque_.PushGrey(obj); 122 marking_deque_.PushGrey(obj);
123 } 123 }
124 124
125 125
126 void IncrementalMarking::WhiteToGrey(HeapObject* obj, MarkBit mark_bit) { 126 bool IncrementalMarking::MarkObjectAndPush(HeapObject* obj) {
127 Marking::WhiteToGrey(mark_bit); 127 MarkBit mark_bit = Marking::MarkBitFrom(obj);
128 if (!mark_bit.Get()) {
129 WhiteToGreyAndPush(obj, mark_bit);
130 return true;
131 }
132 return false;
128 } 133 }
129 134
130 135
136 bool IncrementalMarking::MarkObjectWithoutPush(HeapObject* obj) {
137 MarkBit mark_bit = Marking::MarkBitFrom(obj);
138 if (!mark_bit.Get()) {
139 mark_bit.Set();
140 MemoryChunk::IncrementLiveBytesFromGC(obj->address(), obj->Size());
141 return true;
142 }
143 return false;
144 }
145
146
131 } } // namespace v8::internal 147 } } // namespace v8::internal
132 148
133 #endif // V8_INCREMENTAL_MARKING_INL_H_ 149 #endif // V8_INCREMENTAL_MARKING_INL_H_
OLDNEW
« no previous file with comments | « src/incremental-marking.cc ('k') | src/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698