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

Side by Side Diff: src/mark-compact-inl.h

Issue 9212045: Do not follow accessor map transitions when marking descriptor arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Incorporated online and offline feedback Created 8 years, 11 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/mark-compact.cc ('k') | no next file » | 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 2011 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
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void MarkCompactCollector::MarkObject(HeapObject* obj, MarkBit mark_bit) { 59 void MarkCompactCollector::MarkObject(HeapObject* obj, MarkBit mark_bit) {
60 ASSERT(Marking::MarkBitFrom(obj) == mark_bit); 60 ASSERT(Marking::MarkBitFrom(obj) == mark_bit);
61 if (!mark_bit.Get()) { 61 if (!mark_bit.Get()) {
62 mark_bit.Set(); 62 mark_bit.Set();
63 MemoryChunk::IncrementLiveBytesFromGC(obj->address(), obj->Size()); 63 MemoryChunk::IncrementLiveBytesFromGC(obj->address(), obj->Size());
64 ProcessNewlyMarkedObject(obj); 64 ProcessNewlyMarkedObject(obj);
65 } 65 }
66 } 66 }
67 67
68 68
69 bool MarkCompactCollector::MarkObjectWithoutPush(HeapObject* object) {
70 MarkBit mark = Marking::MarkBitFrom(object);
71 bool old_mark = mark.Get();
72 if (!old_mark) SetMark(object, mark);
73 return old_mark;
74 }
75
76
77 void MarkCompactCollector::MarkObjectAndPush(HeapObject* object) {
78 if (!MarkObjectWithoutPush(object)) marking_deque_.PushBlack(object);
79 }
80
81
69 void MarkCompactCollector::SetMark(HeapObject* obj, MarkBit mark_bit) { 82 void MarkCompactCollector::SetMark(HeapObject* obj, MarkBit mark_bit) {
70 ASSERT(!mark_bit.Get()); 83 ASSERT(!mark_bit.Get());
71 ASSERT(Marking::MarkBitFrom(obj) == mark_bit); 84 ASSERT(Marking::MarkBitFrom(obj) == mark_bit);
72 mark_bit.Set(); 85 mark_bit.Set();
73 MemoryChunk::IncrementLiveBytesFromGC(obj->address(), obj->Size()); 86 MemoryChunk::IncrementLiveBytesFromGC(obj->address(), obj->Size());
74 if (obj->IsMap()) { 87 if (obj->IsMap()) {
75 ClearCacheOnMap(Map::cast(obj)); 88 ClearCacheOnMap(Map::cast(obj));
76 } 89 }
77 } 90 }
78 91
(...skipping 17 matching lines...) Expand all
96 SlotsBuffer::FAIL_ON_OVERFLOW)) { 109 SlotsBuffer::FAIL_ON_OVERFLOW)) {
97 EvictEvacuationCandidate(object_page); 110 EvictEvacuationCandidate(object_page);
98 } 111 }
99 } 112 }
100 } 113 }
101 114
102 115
103 } } // namespace v8::internal 116 } } // namespace v8::internal
104 117
105 #endif // V8_MARK_COMPACT_INL_H_ 118 #endif // V8_MARK_COMPACT_INL_H_
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698