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