OLD | NEW |
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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 | 392 |
393 void GlobalHandles::IterateRoots(ObjectVisitor* v) { | 393 void GlobalHandles::IterateRoots(ObjectVisitor* v) { |
394 // Traversal of global handles marked as NORMAL or NEAR_DEATH. | 394 // Traversal of global handles marked as NORMAL or NEAR_DEATH. |
395 for (Node* current = head_; current != NULL; current = current->next()) { | 395 for (Node* current = head_; current != NULL; current = current->next()) { |
396 if (current->state_ == Node::NORMAL) { | 396 if (current->state_ == Node::NORMAL) { |
397 v->VisitPointer(¤t->object_); | 397 v->VisitPointer(¤t->object_); |
398 } | 398 } |
399 } | 399 } |
400 } | 400 } |
401 | 401 |
| 402 |
402 void GlobalHandles::TearDown() { | 403 void GlobalHandles::TearDown() { |
403 // Reset all the lists. | 404 // Reset all the lists. |
404 set_head(NULL); | 405 set_head(NULL); |
405 set_first_free(NULL); | 406 set_first_free(NULL); |
406 set_first_deallocated(NULL); | 407 set_first_deallocated(NULL); |
407 pool_.Release(); | 408 pool_.Release(); |
408 } | 409 } |
409 | 410 |
410 | 411 |
411 int GlobalHandles::number_of_weak_handles_ = 0; | 412 int GlobalHandles::number_of_weak_handles_ = 0; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 void GlobalHandles::RemoveObjectGroups() { | 469 void GlobalHandles::RemoveObjectGroups() { |
469 List<ObjectGroup*>* object_groups = ObjectGroups(); | 470 List<ObjectGroup*>* object_groups = ObjectGroups(); |
470 for (int i = 0; i< object_groups->length(); i++) { | 471 for (int i = 0; i< object_groups->length(); i++) { |
471 delete object_groups->at(i); | 472 delete object_groups->at(i); |
472 } | 473 } |
473 object_groups->Clear(); | 474 object_groups->Clear(); |
474 } | 475 } |
475 | 476 |
476 | 477 |
477 } } // namespace v8::internal | 478 } } // namespace v8::internal |
OLD | NEW |