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 |
1863 private: | 1867 private: |
1864 void MarkObjectByPointer(Object** p) { | 1868 void MarkObjectByPointer(Object** p) { |
1865 if (!(*p)->IsHeapObject()) return; | 1869 if (!(*p)->IsHeapObject()) return; |
1866 | 1870 |
1867 // Replace flat cons strings in place. | 1871 // Replace flat cons strings in place. |
1868 HeapObject* object = ShortCircuitConsString(p); | 1872 HeapObject* object = ShortCircuitConsString(p); |
1869 MarkBit mark_bit = Marking::MarkBitFrom(object); | 1873 MarkBit mark_bit = Marking::MarkBitFrom(object); |
1870 if (mark_bit.Get()) return; | 1874 if (mark_bit.Get()) return; |
1871 | 1875 |
1872 Map* map = object->map(); | 1876 Map* map = object->map(); |
(...skipping 2604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4477 while (buffer != NULL) { | 4481 while (buffer != NULL) { |
4478 SlotsBuffer* next_buffer = buffer->next(); | 4482 SlotsBuffer* next_buffer = buffer->next(); |
4479 DeallocateBuffer(buffer); | 4483 DeallocateBuffer(buffer); |
4480 buffer = next_buffer; | 4484 buffer = next_buffer; |
4481 } | 4485 } |
4482 *buffer_address = NULL; | 4486 *buffer_address = NULL; |
4483 } | 4487 } |
4484 | 4488 |
4485 | 4489 |
4486 } } // namespace v8::internal | 4490 } } // namespace v8::internal |
OLD | NEW |