OLD | NEW |
1 // Copyright 2012 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 |
(...skipping 2128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2139 HeapObject* heap_object = HeapObject::cast(o); | 2139 HeapObject* heap_object = HeapObject::cast(o); |
2140 MarkBit mark = Marking::MarkBitFrom(heap_object); | 2140 MarkBit mark = Marking::MarkBitFrom(heap_object); |
2141 return !mark.Get(); | 2141 return !mark.Get(); |
2142 } | 2142 } |
2143 | 2143 |
2144 | 2144 |
2145 void MarkCompactCollector::MarkStringTable(RootMarkingVisitor* visitor) { | 2145 void MarkCompactCollector::MarkStringTable(RootMarkingVisitor* visitor) { |
2146 StringTable* string_table = heap()->string_table(); | 2146 StringTable* string_table = heap()->string_table(); |
2147 // Mark the string table itself. | 2147 // Mark the string table itself. |
2148 MarkBit string_table_mark = Marking::MarkBitFrom(string_table); | 2148 MarkBit string_table_mark = Marking::MarkBitFrom(string_table); |
2149 SetMark(string_table, string_table_mark); | 2149 if (!string_table_mark.Get()) { |
| 2150 // String table could have already been marked by visiting the handles list. |
| 2151 SetMark(string_table, string_table_mark); |
| 2152 } |
2150 // Explicitly mark the prefix. | 2153 // Explicitly mark the prefix. |
2151 string_table->IteratePrefix(visitor); | 2154 string_table->IteratePrefix(visitor); |
2152 ProcessMarkingDeque(); | 2155 ProcessMarkingDeque(); |
2153 } | 2156 } |
2154 | 2157 |
2155 | 2158 |
2156 void MarkCompactCollector::MarkAllocationSite(AllocationSite* site) { | 2159 void MarkCompactCollector::MarkAllocationSite(AllocationSite* site) { |
2157 MarkBit mark_bit = Marking::MarkBitFrom(site); | 2160 MarkBit mark_bit = Marking::MarkBitFrom(site); |
2158 SetMark(site, mark_bit); | 2161 SetMark(site, mark_bit); |
2159 } | 2162 } |
(...skipping 2415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4575 while (buffer != NULL) { | 4578 while (buffer != NULL) { |
4576 SlotsBuffer* next_buffer = buffer->next(); | 4579 SlotsBuffer* next_buffer = buffer->next(); |
4577 DeallocateBuffer(buffer); | 4580 DeallocateBuffer(buffer); |
4578 buffer = next_buffer; | 4581 buffer = next_buffer; |
4579 } | 4582 } |
4580 *buffer_address = NULL; | 4583 *buffer_address = NULL; |
4581 } | 4584 } |
4582 | 4585 |
4583 | 4586 |
4584 } } // namespace v8::internal | 4587 } } // namespace v8::internal |
OLD | NEW |