Lines Matching refs:tl

65   TreeList<Chunk>* tl = tc->embedded_list();
66 tc->set_list(tl);
68 tl->set_protecting_lock(NULL);
70 tl->set_hint(0);
71 tl->set_size(tc->size());
72 tl->link_head(tc);
73 tl->link_tail(tc);
74 tl->set_count(1);
75 tl->init_statistics(true /* split_birth */);
76 tl->set_parent(NULL);
77 tl->set_left(NULL);
78 tl->set_right(NULL);
79 return tl;
98 TreeList<Chunk>* tl = TreeList<Chunk>::as_TreeList(tc);
99 return tl;
490 TreeList<Chunk>* tl = find_list(size);
491 if (tl == NULL) {
494 return tl->verify_chunk_in_free_list(tc);
521 TreeList<Chunk>* tl = tc->list();
524 if (tl == _root) {
533 assert(tl != NULL, "List should be set");
534 assert(tl->parent() == NULL || tl == tl->parent()->left() ||
535 tl == tl->parent()->right(), "list is inconsistent");
542 TreeList<Chunk>* replacementTL = tl->remove_chunk_replace_if_needed(tc);
548 if (tl == root()) {
553 if (tl != replacementTL) {
594 assert(tl == root(), "Incorrectly replacing root");
654 TreeList<Chunk>* BinaryTreeDictionary<Chunk>::remove_tree_minimum(TreeList<Chunk>* tl) {
655 assert(tl != NULL && tl->parent() != NULL, "really need a proper sub-tree");
657 TreeList<Chunk>* curTL = tl;
665 // If the list tl has no left child, then curTL may be
781 size_t BinaryTreeDictionary<Chunk>::total_list_length(TreeList<Chunk>* tl) const {
783 res = tl->count();
786 Chunk* tc = tl->head();
794 size_t BinaryTreeDictionary<Chunk>::total_size_in_tree(TreeList<Chunk>* tl) const {
795 if (tl == NULL)
797 return (tl->size() * total_list_length(tl)) +
798 total_size_in_tree(tl->left()) +
799 total_size_in_tree(tl->right());
803 double BinaryTreeDictionary<Chunk>::sum_of_squared_block_sizes(TreeList<Chunk>* const tl) const {
804 if (tl == NULL) {
807 double size = (double)(tl->size());
808 double curr = size * size * total_list_length(tl);
809 curr += sum_of_squared_block_sizes(tl->left());
810 curr += sum_of_squared_block_sizes(tl->right());
815 size_t BinaryTreeDictionary<Chunk>::total_free_blocks_in_tree(TreeList<Chunk>* tl) const {
816 if (tl == NULL)
818 return total_list_length(tl) +
819 total_free_blocks_in_tree(tl->left()) +
820 total_free_blocks_in_tree(tl->right());
831 size_t BinaryTreeDictionary<Chunk>::tree_height_helper(TreeList<Chunk>* tl) const {
832 if (tl == NULL)
834 return 1 + MAX2(tree_height_helper(tl->left()),
835 tree_height_helper(tl->right()));
844 size_t BinaryTreeDictionary<Chunk>::total_nodes_helper(TreeList<Chunk>* tl) const {
845 if (tl == NULL) {
848 return 1 + total_nodes_helper(tl->left()) +
849 total_nodes_helper(tl->right());
853 size_t BinaryTreeDictionary<Chunk>::total_nodes_in_tree(TreeList<Chunk>* tl) const {
907 virtual void do_tree(TreeList<Chunk>* tl) = 0;
914 void do_tree(TreeList<Chunk>* tl) {
915 if (tl != NULL) {
916 do_tree(tl->left());
917 do_list(tl);
918 do_tree(tl->right());
927 void do_tree(TreeList<Chunk>* tl) {
928 if (tl != NULL) {
929 do_tree(tl->right());
930 do_list(tl);
931 do_tree(tl->left());
972 virtual bool do_tree(TreeList<Chunk>* tl) = 0;
979 bool do_tree(TreeList<Chunk>* tl) {
980 if (tl != NULL) {
981 if (do_tree(tl->left())) return true;
982 if (do_list(tl)) return true;
983 if (do_tree(tl->right())) return true;
994 bool do_tree(TreeList<Chunk>* tl) {
995 if (tl != NULL) {
996 if (do_tree(tl->right())) return true;
997 if (do_list(tl)) return true;
998 if (do_tree(tl->left())) return true;
1293 size_t BinaryTreeDictionary<Chunk>::verify_prev_free_ptrs(TreeList<Chunk>* tl) {
1295 for (Chunk* curFC = tl->head(); curFC != NULL; curFC = curFC->next()) {
1307 void BinaryTreeDictionary<Chunk>::verify_tree_helper(TreeList<Chunk>* tl) const {
1308 if (tl == NULL)
1310 guarantee(tl->size() != 0, "A list must has a size");
1311 guarantee(tl->left() == NULL || tl->left()->parent() == tl,
1313 guarantee(tl->right() == NULL || tl->right()->parent() == tl,
1315 guarantee(tl->left() == NULL || tl->left()->size() < tl->size(),
1317 guarantee(tl->right() == NULL || tl->right()->size() > tl->size(),
1319 guarantee(tl->head() == NULL || tl->head()->is_free(), "!Free");
1320 guarantee(tl->head() == NULL || tl->head_as_TreeChunk()->list() == tl,
1322 guarantee(tl->count() > 0 || (tl->head() == NULL && tl->tail() == NULL),
1324 guarantee(tl->count() > 1 || tl->head() == tl->tail(),
1326 size_t count = verify_prev_free_ptrs(tl);
1327 guarantee(count == (size_t)tl->count(), "Node count is incorrect");
1328 if (tl->head() != NULL) {
1329 tl->head_as_TreeChunk()->verify_tree_chunk_list();
1331 verify_tree_helper(tl->left());
1332 verify_tree_helper(tl->right());