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 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1853 : collector_(heap->mark_compact_collector()) { } | 1853 : collector_(heap->mark_compact_collector()) { } |
1854 | 1854 |
1855 void VisitPointer(Object** p) { | 1855 void VisitPointer(Object** p) { |
1856 MarkObjectByPointer(p); | 1856 MarkObjectByPointer(p); |
1857 } | 1857 } |
1858 | 1858 |
1859 void VisitPointers(Object** start, Object** end) { | 1859 void VisitPointers(Object** start, Object** end) { |
1860 for (Object** p = start; p < end; p++) MarkObjectByPointer(p); | 1860 for (Object** p = start; p < end; p++) MarkObjectByPointer(p); |
1861 } | 1861 } |
1862 | 1862 |
1863 // Skip the weak next code link in a code object, which is visited in | |
1864 // ProcessTopOptimizedFrame. | |
1865 void VisitNextCodeLink(Object** p) { } | |
1866 | |
1867 private: | 1863 private: |
1868 void MarkObjectByPointer(Object** p) { | 1864 void MarkObjectByPointer(Object** p) { |
1869 if (!(*p)->IsHeapObject()) return; | 1865 if (!(*p)->IsHeapObject()) return; |
1870 | 1866 |
1871 // Replace flat cons strings in place. | 1867 // Replace flat cons strings in place. |
1872 HeapObject* object = ShortCircuitConsString(p); | 1868 HeapObject* object = ShortCircuitConsString(p); |
1873 MarkBit mark_bit = Marking::MarkBitFrom(object); | 1869 MarkBit mark_bit = Marking::MarkBitFrom(object); |
1874 if (mark_bit.Get()) return; | 1870 if (mark_bit.Get()) return; |
1875 | 1871 |
1876 Map* map = object->map(); | 1872 Map* map = object->map(); |
(...skipping 2640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4517 while (buffer != NULL) { | 4513 while (buffer != NULL) { |
4518 SlotsBuffer* next_buffer = buffer->next(); | 4514 SlotsBuffer* next_buffer = buffer->next(); |
4519 DeallocateBuffer(buffer); | 4515 DeallocateBuffer(buffer); |
4520 buffer = next_buffer; | 4516 buffer = next_buffer; |
4521 } | 4517 } |
4522 *buffer_address = NULL; | 4518 *buffer_address = NULL; |
4523 } | 4519 } |
4524 | 4520 |
4525 | 4521 |
4526 } } // namespace v8::internal | 4522 } } // namespace v8::internal |
OLD | NEW |