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 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1781 MarkObject(code, code_mark); | 1781 MarkObject(code, code_mark); |
1782 if (frame->is_optimized()) { | 1782 if (frame->is_optimized()) { |
1783 MarkCompactMarkingVisitor::MarkInlinedFunctionsCode(heap(), | 1783 MarkCompactMarkingVisitor::MarkInlinedFunctionsCode(heap(), |
1784 frame->LookupCode()); | 1784 frame->LookupCode()); |
1785 } | 1785 } |
1786 } | 1786 } |
1787 } | 1787 } |
1788 | 1788 |
1789 | 1789 |
1790 void MarkCompactCollector::PrepareForCodeFlushing() { | 1790 void MarkCompactCollector::PrepareForCodeFlushing() { |
1791 ASSERT(heap() == Isolate::Current()->heap()); | |
1792 | |
1793 // Enable code flushing for non-incremental cycles. | 1791 // Enable code flushing for non-incremental cycles. |
1794 if (FLAG_flush_code && !FLAG_flush_code_incrementally) { | 1792 if (FLAG_flush_code && !FLAG_flush_code_incrementally) { |
1795 EnableCodeFlushing(!was_marked_incrementally_); | 1793 EnableCodeFlushing(!was_marked_incrementally_); |
1796 } | 1794 } |
1797 | 1795 |
1798 // If code flushing is disabled, there is no need to prepare for it. | 1796 // If code flushing is disabled, there is no need to prepare for it. |
1799 if (!is_code_flushing_enabled()) return; | 1797 if (!is_code_flushing_enabled()) return; |
1800 | 1798 |
1801 // Ensure that empty descriptor array is marked. Method MarkDescriptorArray | 1799 // Ensure that empty descriptor array is marked. Method MarkDescriptorArray |
1802 // relies on it being marked before any other descriptor array. | 1800 // relies on it being marked before any other descriptor array. |
(...skipping 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4314 while (buffer != NULL) { | 4312 while (buffer != NULL) { |
4315 SlotsBuffer* next_buffer = buffer->next(); | 4313 SlotsBuffer* next_buffer = buffer->next(); |
4316 DeallocateBuffer(buffer); | 4314 DeallocateBuffer(buffer); |
4317 buffer = next_buffer; | 4315 buffer = next_buffer; |
4318 } | 4316 } |
4319 *buffer_address = NULL; | 4317 *buffer_address = NULL; |
4320 } | 4318 } |
4321 | 4319 |
4322 | 4320 |
4323 } } // namespace v8::internal | 4321 } } // namespace v8::internal |
OLD | NEW |