OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 5011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5022 }; | 5022 }; |
5023 | 5023 |
5024 void MarkUnreachableObjects() { | 5024 void MarkUnreachableObjects() { |
5025 HeapIterator iterator; | 5025 HeapIterator iterator; |
5026 for (HeapObject* obj = iterator.next(); | 5026 for (HeapObject* obj = iterator.next(); |
5027 obj != NULL; | 5027 obj != NULL; |
5028 obj = iterator.next()) { | 5028 obj = iterator.next()) { |
5029 obj->SetMark(); | 5029 obj->SetMark(); |
5030 } | 5030 } |
5031 UnmarkingVisitor visitor; | 5031 UnmarkingVisitor visitor; |
5032 Heap::IterateRoots(&visitor, VISIT_ONLY_STRONG); | 5032 Heap::IterateRoots(&visitor, VISIT_ALL); |
5033 while (visitor.can_process()) | 5033 while (visitor.can_process()) |
5034 visitor.ProcessNext(); | 5034 visitor.ProcessNext(); |
5035 } | 5035 } |
5036 | 5036 |
5037 AssertNoAllocation no_alloc; | 5037 AssertNoAllocation no_alloc; |
5038 }; | 5038 }; |
5039 | 5039 |
5040 | 5040 |
5041 HeapIterator::HeapIterator() | 5041 HeapIterator::HeapIterator() |
5042 : filtering_(HeapIterator::kNoFiltering), | 5042 : filtering_(HeapIterator::kNoFiltering), |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5536 void ExternalStringTable::TearDown() { | 5536 void ExternalStringTable::TearDown() { |
5537 new_space_strings_.Free(); | 5537 new_space_strings_.Free(); |
5538 old_space_strings_.Free(); | 5538 old_space_strings_.Free(); |
5539 } | 5539 } |
5540 | 5540 |
5541 | 5541 |
5542 List<Object*> ExternalStringTable::new_space_strings_; | 5542 List<Object*> ExternalStringTable::new_space_strings_; |
5543 List<Object*> ExternalStringTable::old_space_strings_; | 5543 List<Object*> ExternalStringTable::old_space_strings_; |
5544 | 5544 |
5545 } } // namespace v8::internal | 5545 } } // namespace v8::internal |
OLD | NEW |