Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: src/heap.cc

Issue 6226004: Visit all roots in the UnreachableObjectsFilter. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/profile-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698