Home | History | Annotate | Download | only in src

Lines Matching refs:node

26 class GlobalHandles::Node {
39 // Maps handle location (slot) to the containing node.
40 static Node* FromLocation(Object** location) {
41 DCHECK(offsetof(Node, object_) == 0);
42 return reinterpret_cast<Node*>(location);
45 Node() {
46 DCHECK(offsetof(Node, class_id_) == Internals::kNodeClassIdOffset);
47 DCHECK(offsetof(Node, flags_) == Internals::kNodeFlagsOffset);
62 ~Node() {
80 void Initialize(int index, Node** first_free) {
243 // Accessors for next free node in the free list.
244 Node* next_free() {
248 void set_next_free(Node* value) {
322 if (state() != Node::PENDING) return false;
393 Node* next_free;
396 DISALLOW_COPY_AND_ASSIGN(Node);
411 void PutNodesOnFreeList(Node** first_free) {
417 Node* node_at(int index) {
455 Node nodes_[kSize];
464 GlobalHandles* GlobalHandles::Node::GetGlobalHandles() {
469 GlobalHandles::NodeBlock* GlobalHandles::Node::FindBlock() {
471 ptr = ptr - index_ * sizeof(Node);
478 void GlobalHandles::Node::IncreaseBlockUses() {
487 void GlobalHandles::Node::DecreaseBlockUses() {
506 Node* node() const {
578 // Take the first node in the free list.
579 Node* result = first_free_;
593 return Node::FromLocation(location)->GetGlobalHandles()->Create(*location);
598 if (location != NULL) Node::FromLocation(location)->Release();
604 Node::FromLocation(location)->MakeWeak(parameter, weak_callback);
614 Node::FromLocation(location)->MakeWeak(parameter, phantom_callback, type);
619 return Node::FromLocation(location)->ClearWeakness();
624 Node::FromLocation(location)->MarkIndependent();
629 Node::FromLocation(location)->MarkPartiallyDependent();
634 return Node::FromLocation(location)->is_independent();
639 return Node::FromLocation(location)->IsNearDeath();
644 return Node::FromLocation(location)->IsWeak();
650 Node* node = it.node();
651 if (node->IsWeakRetainer()) {
653 if (node->state() == Node::PENDING &&
654 node->weakness_type() != NORMAL_WEAK) {
655 node->CollectPhantomCallbackData(isolate(),
658 v->VisitPointer(node->location());
667 if (it.node()->IsWeak() && f(it.node()->location())) {
668 it.node()->MarkPending();
676 Node* node = new_space_nodes_[i];
678 if (node->IsStrongRetainer() ||
679 (node->IsWeakRetainer() && !node->is_independent() &&
680 node->is_active())) {
681 v->VisitPointer(node->location());
684 if (node->IsStrongRetainer() ||
685 (node->IsWeakRetainer() && !node->is_independent() &&
686 !node->is_partially_dependent())) {
687 v->VisitPointer(node->location());
697 Node* node = new_space_nodes_[i];
698 DCHECK(node->is_in_new_space_list());
699 if ((node->is_independent() || node->is_partially_dependent()) &&
700 node->IsWeak() && f(isolate_->heap(), node->location())) {
701 node->MarkPending();
709 Node* node = new_space_nodes_[i];
710 DCHECK(node->is_in_new_space_list());
711 if ((node->is_independent() || node->is_partially_dependent()) &&
712 node->IsWeakRetainer()) {
714 if (node->state() == Node::PENDING &&
715 node->weakness_type() != NORMAL_WEAK) {
716 node->CollectPhantomCallbackData(isolate(),
719 v->VisitPointer(node->location());
729 Node* node = new_space_nodes_[i];
730 if (node->IsWeak() && !is_unmodified(node->location())) {
731 node->set_active(true);
740 Node* node = new_space_nodes_[i];
741 DCHECK(node->is_in_new_space_list());
742 if ((node->is_independent() || !node->is_active()) && node->IsWeak() &&
743 is_unscavenged(isolate_->heap(), node->location())) {
744 node->MarkPending();
752 Node* node = new_space_nodes_[i];
753 DCHECK(node->is_in_new_space_list());
754 if ((node->is_independent() || !node->is_active()) &&
755 node->IsWeakRetainer()) {
757 if (node->state() == Node::PENDING &&
758 node->weakness_type() != NORMAL_WEAK) {
759 node->CollectPhantomCallbackData(isolate(),
762 v->VisitPointer(node->location());
819 DCHECK(callback.node() == nullptr);
832 Node* node = new_space_nodes_[i];
833 DCHECK(node->is_in_new_space_list());
834 if (!node->IsRetainer()) {
844 if (!node->is_independent() && (node->is_active())) {
845 node->set_active(false);
848 node->set_active(false);
850 if (!node->is_independent() && !node->is_partially_dependent()) {
853 node->clear_partially_dependent();
856 if (node->PostGarbageCollectionProcessing(isolate_)) {
859 // PostGarbageCollection processing. The current node might
865 if (!node->IsRetainer()) {
877 if (!it.node()->IsRetainer()) {
883 it.node()->set_active(false);
885 it.node()->clear_partially_dependent();
887 if (it.node()->PostGarbageCollectionProcessing(isolate_)) {
893 if (!it.node()->IsRetainer()) {
904 Node* node = new_space_nodes_[i];
905 DCHECK(node->is_in_new_space_list());
906 if (node->IsRetainer()) {
907 if (isolate_->heap()->InNewSpace(node->object())) {
908 new_space_nodes_[last++] = node;
911 node->set_in_new_space_list(false);
915 node->set_in_new_space_list(false);
933 if (callback->node() == nullptr) continue;
961 DCHECK(node_->state() == Node::NEAR_DEATH);
971 DCHECK(node_->state() == Node::FREE);
1014 if (it.node()->IsStrongRetainer()) {
1015 v->VisitPointer(it.node()->location());
1023 if (it.node()->IsRetainer()) {
1024 v->VisitPointer(it.node()->location());
1032 if (it.node()->IsRetainer() && it.node()->has_wrapper_class_id()) {
1033 v->VisitEmbedderReference(it.node()->location(),
1034 it.node()->wrapper_class_id());
1042 Node* node = new_space_nodes_[i];
1043 if (node->IsRetainer() && node->has_wrapper_class_id()) {
1044 v->VisitEmbedderReference(node->location(),
1045 node->wrapper_class_id());
1053 Node* node = new_space_nodes_[i];
1054 if (node->has_wrapper_class_id() && node->IsWeak()) {
1055 v->VisitEmbedderReference(node->location(), node->wrapper_class_id());
1064 if (it.node()->IsWeakRetainer()) {
1075 if (it.node()->IsWeakRetainer() &&
1076 it.node
1092 if (it.node()->state() == Node::WEAK) {
1094 } else if (it.node()->state() == Node::PENDING) {
1096 } else if (it.node()->state() == Node::NEAR_DEATH) {
1098 } else if (it.node()->state() == Node::FREE) {
1115 if (it.node()->state() == Node::WEAK) weak++;
1116 if (it.node()->state() == Node::PENDING) pending++;
1117 if (it.node()->state() == Node::NEAR_DEATH) near_death++;
1118 if (it.node()->state() == Node::FREE) destroyed++;
1122 PrintF(" allocated memory = %" V8_PTR_PREFIX "dB\n", sizeof(Node) * total);
1135 reinterpret_cast<void*>(it.node()->location()),
1136 reinterpret_cast<void*>(it.node()->object()),
1137 it.node()->IsWeak() ? " (weak)" : "");
1150 DCHECK(!Node::FromLocation(handles[i])->is_independent());
1178 DCHECK(!Node::FromLocation(child)->is_independent());
1184 DCHECK(!Node::FromLocation(child)->is_independent());