OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2093 marking_deque_end); | 2093 marking_deque_end); |
2094 ASSERT(!marking_deque_.overflowed()); | 2094 ASSERT(!marking_deque_.overflowed()); |
2095 | 2095 |
2096 if (incremental_marking_overflowed) { | 2096 if (incremental_marking_overflowed) { |
2097 // There are overflowed objects left in the heap after incremental marking. | 2097 // There are overflowed objects left in the heap after incremental marking. |
2098 marking_deque_.SetOverflowed(); | 2098 marking_deque_.SetOverflowed(); |
2099 } | 2099 } |
2100 | 2100 |
2101 PrepareForCodeFlushing(); | 2101 PrepareForCodeFlushing(); |
2102 | 2102 |
| 2103 if (was_marked_incrementally_) { |
| 2104 // There is no write barrier on cells so we have to scan them now at the end |
| 2105 // of the incremental marking. |
| 2106 { |
| 2107 HeapObjectIterator cell_iterator(heap()->cell_space()); |
| 2108 HeapObject* cell; |
| 2109 while ((cell = cell_iterator.Next()) != NULL) { |
| 2110 ASSERT(cell->IsJSGlobalPropertyCell()); |
| 2111 if (IsMarked(cell)) { |
| 2112 int offset = JSGlobalPropertyCell::kValueOffset; |
| 2113 StaticMarkingVisitor::VisitPointer( |
| 2114 heap(), |
| 2115 reinterpret_cast<Object**>(cell->address() + offset)); |
| 2116 } |
| 2117 } |
| 2118 } |
| 2119 } |
| 2120 |
2103 RootMarkingVisitor root_visitor(heap()); | 2121 RootMarkingVisitor root_visitor(heap()); |
2104 MarkRoots(&root_visitor); | 2122 MarkRoots(&root_visitor); |
2105 | 2123 |
2106 // The objects reachable from the roots are marked, yet unreachable | 2124 // The objects reachable from the roots are marked, yet unreachable |
2107 // objects are unmarked. Mark objects reachable due to host | 2125 // objects are unmarked. Mark objects reachable due to host |
2108 // application specific logic. | 2126 // application specific logic. |
2109 ProcessExternalMarking(); | 2127 ProcessExternalMarking(); |
2110 | 2128 |
2111 // The objects reachable from the roots or object groups are marked, | 2129 // The objects reachable from the roots or object groups are marked, |
2112 // yet unreachable objects are unmarked. Mark objects reachable | 2130 // yet unreachable objects are unmarked. Mark objects reachable |
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3881 while (buffer != NULL) { | 3899 while (buffer != NULL) { |
3882 SlotsBuffer* next_buffer = buffer->next(); | 3900 SlotsBuffer* next_buffer = buffer->next(); |
3883 DeallocateBuffer(buffer); | 3901 DeallocateBuffer(buffer); |
3884 buffer = next_buffer; | 3902 buffer = next_buffer; |
3885 } | 3903 } |
3886 *buffer_address = NULL; | 3904 *buffer_address = NULL; |
3887 } | 3905 } |
3888 | 3906 |
3889 | 3907 |
3890 } } // namespace v8::internal | 3908 } } // namespace v8::internal |
OLD | NEW |