| 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 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1658 if (frame->is_optimized()) { | 1658 if (frame->is_optimized()) { |
| 1659 MarkInlinedFunctionsCode(frame->LookupCode()); | 1659 MarkInlinedFunctionsCode(frame->LookupCode()); |
| 1660 } | 1660 } |
| 1661 } | 1661 } |
| 1662 } | 1662 } |
| 1663 | 1663 |
| 1664 | 1664 |
| 1665 void MarkCompactCollector::PrepareForCodeFlushing() { | 1665 void MarkCompactCollector::PrepareForCodeFlushing() { |
| 1666 ASSERT(heap() == Isolate::Current()->heap()); | 1666 ASSERT(heap() == Isolate::Current()->heap()); |
| 1667 | 1667 |
| 1668 // TODO(1609) Currently incremental marker does not support code flushing. | |
| 1669 if (!FLAG_flush_code || was_marked_incrementally_) { | |
| 1670 EnableCodeFlushing(false); | |
| 1671 return; | |
| 1672 } | |
| 1673 | |
| 1674 #ifdef ENABLE_DEBUGGER_SUPPORT | 1668 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 1675 if (heap()->isolate()->debug()->IsLoaded() || | 1669 if (heap()->isolate()->debug()->IsLoaded() || |
| 1676 heap()->isolate()->debug()->has_break_points()) { | 1670 heap()->isolate()->debug()->has_break_points()) { |
| 1677 EnableCodeFlushing(false); | 1671 EnableCodeFlushing(false); |
| 1678 return; | 1672 return; |
| 1679 } | 1673 } |
| 1680 #endif | 1674 #endif |
| 1681 | 1675 |
| 1682 EnableCodeFlushing(true); | 1676 EnableCodeFlushing(true); |
| 1683 | 1677 |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1968 if (marking_deque->IsFull()) return; | 1962 if (marking_deque->IsFull()) return; |
| 1969 } | 1963 } |
| 1970 } | 1964 } |
| 1971 } | 1965 } |
| 1972 | 1966 |
| 1973 | 1967 |
| 1974 static inline int MarkWordToObjectStarts(uint32_t mark_bits, int* starts); | 1968 static inline int MarkWordToObjectStarts(uint32_t mark_bits, int* starts); |
| 1975 | 1969 |
| 1976 | 1970 |
| 1977 static void DiscoverGreyObjectsOnPage(MarkingDeque* marking_deque, Page* p) { | 1971 static void DiscoverGreyObjectsOnPage(MarkingDeque* marking_deque, Page* p) { |
| 1972 ASSERT(!marking_deque->IsFull()); |
| 1978 ASSERT(strcmp(Marking::kWhiteBitPattern, "00") == 0); | 1973 ASSERT(strcmp(Marking::kWhiteBitPattern, "00") == 0); |
| 1979 ASSERT(strcmp(Marking::kBlackBitPattern, "10") == 0); | 1974 ASSERT(strcmp(Marking::kBlackBitPattern, "10") == 0); |
| 1980 ASSERT(strcmp(Marking::kGreyBitPattern, "11") == 0); | 1975 ASSERT(strcmp(Marking::kGreyBitPattern, "11") == 0); |
| 1981 ASSERT(strcmp(Marking::kImpossibleBitPattern, "01") == 0); | 1976 ASSERT(strcmp(Marking::kImpossibleBitPattern, "01") == 0); |
| 1982 | 1977 |
| 1983 MarkBit::CellType* cells = p->markbits()->cells(); | 1978 MarkBit::CellType* cells = p->markbits()->cells(); |
| 1984 | 1979 |
| 1985 int last_cell_index = | 1980 int last_cell_index = |
| 1986 Bitmap::IndexToCell( | 1981 Bitmap::IndexToCell( |
| 1987 Bitmap::CellAlignIndex( | 1982 Bitmap::CellAlignIndex( |
| (...skipping 2153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4141 while (buffer != NULL) { | 4136 while (buffer != NULL) { |
| 4142 SlotsBuffer* next_buffer = buffer->next(); | 4137 SlotsBuffer* next_buffer = buffer->next(); |
| 4143 DeallocateBuffer(buffer); | 4138 DeallocateBuffer(buffer); |
| 4144 buffer = next_buffer; | 4139 buffer = next_buffer; |
| 4145 } | 4140 } |
| 4146 *buffer_address = NULL; | 4141 *buffer_address = NULL; |
| 4147 } | 4142 } |
| 4148 | 4143 |
| 4149 | 4144 |
| 4150 } } // namespace v8::internal | 4145 } } // namespace v8::internal |
| OLD | NEW |