Lines Matching refs:node
95 CacheNode* GetParent(CacheNode* node) { in GetParent() argument
96 return node->parent_index == 0u ? nullptr : nodes_ + node->parent_index; in GetParent()
99 int GetNodeIndex(CacheNode* node) { in GetNodeIndex() argument
100 return node - nodes_; in GetNodeIndex()
103 void RemoveNodeFromLRUList(CacheNode* node) { in RemoveNodeFromLRUList() argument
104 CacheNode* prev = &nodes_[node->leaf_link_prev]; in RemoveNodeFromLRUList()
105 CacheNode* next = &nodes_[node->leaf_link_next]; in RemoveNodeFromLRUList()
106 prev->leaf_link_next = node->leaf_link_next; in RemoveNodeFromLRUList()
107 next->leaf_link_prev = node->leaf_link_prev; in RemoveNodeFromLRUList()
110 void AppendNodeToLRUList(CacheNode* node) { in AppendNodeToLRUList() argument
113 node->leaf_link_next = 0; in AppendNodeToLRUList()
114 node->leaf_link_prev = next->leaf_link_prev; in AppendNodeToLRUList()
115 next->leaf_link_prev = prev->leaf_link_next = GetNodeIndex(node); in AppendNodeToLRUList()
118 void DecreaseChildCountOfNode(CacheNode* node) { in DecreaseChildCountOfNode() argument
119 if (--node->children_count == 0u) { in DecreaseChildCountOfNode()
120 node->is_leaf = true; in DecreaseChildCountOfNode()
121 AppendNodeToLRUList(node); in DecreaseChildCountOfNode()