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 2063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2074 marking_deque_end); | 2074 marking_deque_end); |
2075 ASSERT(!marking_deque_.overflowed()); | 2075 ASSERT(!marking_deque_.overflowed()); |
2076 | 2076 |
2077 if (incremental_marking_overflowed) { | 2077 if (incremental_marking_overflowed) { |
2078 // There are overflowed objects left in the heap after incremental marking. | 2078 // There are overflowed objects left in the heap after incremental marking. |
2079 marking_deque_.SetOverflowed(); | 2079 marking_deque_.SetOverflowed(); |
2080 } | 2080 } |
2081 | 2081 |
2082 PrepareForCodeFlushing(); | 2082 PrepareForCodeFlushing(); |
2083 | 2083 |
2084 // There is no write barrier on cells so we have to scan them now at the end | |
2085 // of the incremental sweeping. | |
Vyacheslav Egorov (Chromium)
2011/12/06 15:28:15
at the end of incremental marking
| |
2086 { | |
Vyacheslav Egorov (Chromium)
2011/12/06 15:28:15
Please check that we actually _had_ incremental ma
| |
2087 HeapObjectIterator cell_iterator(heap()->cell_space()); | |
2088 HeapObject* cell; | |
2089 while ((cell = cell_iterator.Next()) != NULL) { | |
2090 ASSERT(cell->IsJSGlobalPropertyCell()); | |
2091 if (IsMarked(cell)) { | |
2092 int offset = JSGlobalPropertyCell::kValueOffset; | |
2093 StaticMarkingVisitor::VisitPointer( | |
2094 heap(), | |
2095 reinterpret_cast<Object**>(cell->address() + offset)); | |
2096 } | |
2097 } | |
2098 } | |
2099 | |
2084 RootMarkingVisitor root_visitor(heap()); | 2100 RootMarkingVisitor root_visitor(heap()); |
2085 MarkRoots(&root_visitor); | 2101 MarkRoots(&root_visitor); |
2086 | 2102 |
2087 // The objects reachable from the roots are marked, yet unreachable | 2103 // The objects reachable from the roots are marked, yet unreachable |
2088 // objects are unmarked. Mark objects reachable due to host | 2104 // objects are unmarked. Mark objects reachable due to host |
2089 // application specific logic. | 2105 // application specific logic. |
2090 ProcessExternalMarking(); | 2106 ProcessExternalMarking(); |
2091 | 2107 |
2092 // The objects reachable from the roots or object groups are marked, | 2108 // The objects reachable from the roots or object groups are marked, |
2093 // yet unreachable objects are unmarked. Mark objects reachable | 2109 // yet unreachable objects are unmarked. Mark objects reachable |
(...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3867 while (buffer != NULL) { | 3883 while (buffer != NULL) { |
3868 SlotsBuffer* next_buffer = buffer->next(); | 3884 SlotsBuffer* next_buffer = buffer->next(); |
3869 DeallocateBuffer(buffer); | 3885 DeallocateBuffer(buffer); |
3870 buffer = next_buffer; | 3886 buffer = next_buffer; |
3871 } | 3887 } |
3872 *buffer_address = NULL; | 3888 *buffer_address = NULL; |
3873 } | 3889 } |
3874 | 3890 |
3875 | 3891 |
3876 } } // namespace v8::internal | 3892 } } // namespace v8::internal |
OLD | NEW |