| 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 void GlobalHandles::ClearWeakness(Object** location) { | 441 void GlobalHandles::ClearWeakness(Object** location) { |
| 442 Node::FromLocation(location)->ClearWeakness(this); | 442 Node::FromLocation(location)->ClearWeakness(this); |
| 443 } | 443 } |
| 444 | 444 |
| 445 | 445 |
| 446 void GlobalHandles::MarkIndependent(Object** location) { | 446 void GlobalHandles::MarkIndependent(Object** location) { |
| 447 Node::FromLocation(location)->MarkIndependent(); | 447 Node::FromLocation(location)->MarkIndependent(); |
| 448 } | 448 } |
| 449 | 449 |
| 450 | 450 |
| 451 bool GlobalHandles::IsIndependent(Object** location) { |
| 452 return Node::FromLocation(location)->is_independent(); |
| 453 } |
| 454 |
| 455 |
| 451 bool GlobalHandles::IsNearDeath(Object** location) { | 456 bool GlobalHandles::IsNearDeath(Object** location) { |
| 452 return Node::FromLocation(location)->IsNearDeath(); | 457 return Node::FromLocation(location)->IsNearDeath(); |
| 453 } | 458 } |
| 454 | 459 |
| 455 | 460 |
| 456 bool GlobalHandles::IsWeak(Object** location) { | 461 bool GlobalHandles::IsWeak(Object** location) { |
| 457 return Node::FromLocation(location)->IsWeak(); | 462 return Node::FromLocation(location)->IsWeak(); |
| 458 } | 463 } |
| 459 | 464 |
| 460 | 465 |
| 461 void GlobalHandles::SetWrapperClassId(Object** location, uint16_t class_id) { | 466 void GlobalHandles::SetWrapperClassId(Object** location, uint16_t class_id) { |
| 462 Node::FromLocation(location)->set_wrapper_class_id(class_id); | 467 Node::FromLocation(location)->set_wrapper_class_id(class_id); |
| 463 } | 468 } |
| 464 | 469 |
| 470 uint16_t GlobalHandles::GetWrapperClassId(Object** location) { |
| 471 return Node::FromLocation(location)->wrapper_class_id(); |
| 472 } |
| 465 | 473 |
| 466 void GlobalHandles::IterateWeakRoots(ObjectVisitor* v) { | 474 void GlobalHandles::IterateWeakRoots(ObjectVisitor* v) { |
| 467 for (NodeIterator it(this); !it.done(); it.Advance()) { | 475 for (NodeIterator it(this); !it.done(); it.Advance()) { |
| 468 if (it.node()->IsWeakRetainer()) v->VisitPointer(it.node()->location()); | 476 if (it.node()->IsWeakRetainer()) v->VisitPointer(it.node()->location()); |
| 469 } | 477 } |
| 470 } | 478 } |
| 471 | 479 |
| 472 | 480 |
| 473 void GlobalHandles::IterateWeakRoots(WeakReferenceGuest f, | 481 void GlobalHandles::IterateWeakRoots(WeakReferenceGuest f, |
| 474 WeakReferenceCallback callback) { | 482 WeakReferenceCallback callback) { |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 implicit_ref_groups_.Clear(); | 723 implicit_ref_groups_.Clear(); |
| 716 } | 724 } |
| 717 | 725 |
| 718 | 726 |
| 719 void GlobalHandles::TearDown() { | 727 void GlobalHandles::TearDown() { |
| 720 // TODO(1428): invoke weak callbacks. | 728 // TODO(1428): invoke weak callbacks. |
| 721 } | 729 } |
| 722 | 730 |
| 723 | 731 |
| 724 } } // namespace v8::internal | 732 } } // namespace v8::internal |
| OLD | NEW |