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

Side by Side Diff: src/global-handles.cc

Issue 109012: Some cleanup of the mark-sweep/compact collector following the symbol... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 7 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
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 for (Node* current = head_; current != NULL; current = current->next()) { 251 for (Node* current = head_; current != NULL; current = current->next()) {
252 if (current->state_ == Node::WEAK 252 if (current->state_ == Node::WEAK
253 || current->state_ == Node::PENDING 253 || current->state_ == Node::PENDING
254 || current->state_ == Node::NEAR_DEATH) { 254 || current->state_ == Node::NEAR_DEATH) {
255 v->VisitPointer(&current->object_); 255 v->VisitPointer(&current->object_);
256 } 256 }
257 } 257 }
258 } 258 }
259 259
260 260
261 void GlobalHandles::MarkWeakRoots(WeakSlotCallback f) { 261 void GlobalHandles::IdentifyWeakHandles(WeakSlotCallback f) {
262 for (Node* current = head_; current != NULL; current = current->next()) { 262 for (Node* current = head_; current != NULL; current = current->next()) {
263 if (current->state_ == Node::WEAK) { 263 if (current->state_ == Node::WEAK) {
264 if (f(&current->object_)) { 264 if (f(&current->object_)) {
265 current->state_ = Node::PENDING; 265 current->state_ = Node::PENDING;
266 LOG(HandleEvent("GlobalHandle::Pending", current->handle().location())); 266 LOG(HandleEvent("GlobalHandle::Pending", current->handle().location()));
267 } 267 }
268 } 268 }
269 } 269 }
270 } 270 }
271 271
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 void GlobalHandles::RemoveObjectGroups() { 374 void GlobalHandles::RemoveObjectGroups() {
375 List<ObjectGroup*>* object_groups = ObjectGroups(); 375 List<ObjectGroup*>* object_groups = ObjectGroups();
376 for (int i = 0; i< object_groups->length(); i++) { 376 for (int i = 0; i< object_groups->length(); i++) {
377 delete object_groups->at(i); 377 delete object_groups->at(i);
378 } 378 }
379 object_groups->Clear(); 379 object_groups->Clear();
380 } 380 }
381 381
382 382
383 } } // namespace v8::internal 383 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/global-handles.h ('k') | src/mark-compact.h » ('j') | src/mark-compact.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698