| 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 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1985 } | 1985 } |
| 1986 } | 1986 } |
| 1987 } | 1987 } |
| 1988 | 1988 |
| 1989 | 1989 |
| 1990 void LargeObjectSpace::FreeUnmarkedObjects() { | 1990 void LargeObjectSpace::FreeUnmarkedObjects() { |
| 1991 LargePage* previous = NULL; | 1991 LargePage* previous = NULL; |
| 1992 LargePage* current = first_page_; | 1992 LargePage* current = first_page_; |
| 1993 while (current != NULL) { | 1993 while (current != NULL) { |
| 1994 HeapObject* object = current->GetObject(); | 1994 HeapObject* object = current->GetObject(); |
| 1995 if (Marking::IsMarked(object)) { | 1995 MarkBit mark_bit = Marking::MarkBitFrom(object); |
| 1996 Marking::ClearMark(object); | 1996 if (mark_bit.Get()) { |
| 1997 mark_bit.Clear(); |
| 1997 MarkCompactCollector::tracer()->decrement_marked_count(); | 1998 MarkCompactCollector::tracer()->decrement_marked_count(); |
| 1998 previous = current; | 1999 previous = current; |
| 1999 current = current->next_page(); | 2000 current = current->next_page(); |
| 2000 } else { | 2001 } else { |
| 2001 LargePage* page = current; | 2002 LargePage* page = current; |
| 2002 // Cut the chunk out from the chunk list. | 2003 // Cut the chunk out from the chunk list. |
| 2003 current = current->next_page(); | 2004 current = current->next_page(); |
| 2004 if (previous == NULL) { | 2005 if (previous == NULL) { |
| 2005 first_page_ = current; | 2006 first_page_ = current; |
| 2006 } else { | 2007 } else { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2114 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) { | 2115 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) { |
| 2115 if (obj->IsCode()) { | 2116 if (obj->IsCode()) { |
| 2116 Code* code = Code::cast(obj); | 2117 Code* code = Code::cast(obj); |
| 2117 code_kind_statistics[code->kind()] += code->Size(); | 2118 code_kind_statistics[code->kind()] += code->Size(); |
| 2118 } | 2119 } |
| 2119 } | 2120 } |
| 2120 } | 2121 } |
| 2121 #endif // DEBUG | 2122 #endif // DEBUG |
| 2122 | 2123 |
| 2123 } } // namespace v8::internal | 2124 } } // namespace v8::internal |
| OLD | NEW |