# HG changeset patch # User ryokka # Date 1514440943 -32400 # Node ID 4b5f9884b7770007beaaec5b60e1536dc41a3ee0 # Parent fae47dc256b62d36df189dc46bd1d55138beb721 add rbTreeTest remove diff -r fae47dc256b6 -r 4b5f9884b777 src/parallel_execution/RedBlackTree.cbc --- a/src/parallel_execution/RedBlackTree.cbc Thu Dec 28 12:59:11 2017 +0900 +++ b/src/parallel_execution/RedBlackTree.cbc Thu Dec 28 15:02:23 2017 +0900 @@ -314,6 +314,7 @@ goto next(...); } + __code removeRedBlackTree(struct RedBlackTree* tree, struct Node* node, __code next(...)) { struct Node* newNode = &ALLOCATE(context, Node)->Node; struct Node* root = tree->root; diff -r fae47dc256b6 -r 4b5f9884b777 src/parallel_execution/Tree.h --- a/src/parallel_execution/Tree.h Thu Dec 28 12:59:11 2017 +0900 +++ b/src/parallel_execution/Tree.h Thu Dec 28 15:02:23 2017 +0900 @@ -6,7 +6,7 @@ struct Node* node; __code put(Impl* tree,Type* node, __code next(...)); // __code get(Impl* tree, __code next(...)); - // __code removeRedBlackTree(); + __code remove(Impl* tree,Type* node, __code next(...)); // __code clearRedBlackTree(); __code next(...); } Tree; diff -r fae47dc256b6 -r 4b5f9884b777 src/parallel_execution/test/rbTree_test.cbc --- a/src/parallel_execution/test/rbTree_test.cbc Thu Dec 28 12:59:11 2017 +0900 +++ b/src/parallel_execution/test/rbTree_test.cbc Thu Dec 28 15:02:23 2017 +0900 @@ -69,9 +69,9 @@ printf("test5\n"); Node* node = new Node(); node->value = (union Data*)new Int(); - node->value->Int = 7; - node->key = 7; - goto exit_code(context); + node->value->Int = 8; + node->key = 8; + goto tree->remove(node,exit_code); } __code rbTreeTest5_stub(struct Context* context) {