# HG changeset patch # User ichikitakahiro # Date 1636618419 -32400 # Node ID 0ee98fba0503240a20c133dde27556acf8d45dc9 # Parent 65066d677a13a5d5ff0ad9e7707ca6c77edc8de0 commit to pull diff -r 65066d677a13 -r 0ee98fba0503 src/parallel_execution/RedBlackTree.cbc --- a/src/parallel_execution/RedBlackTree.cbc Thu Oct 28 14:06:45 2021 +0900 +++ b/src/parallel_execution/RedBlackTree.cbc Thu Nov 11 17:13:39 2021 +0900 @@ -40,7 +40,7 @@ __code putRedBlackTree(struct RedBlackTree* tree, struct Node* node) { struct Node* newNode = &ALLOCATE(context, Node)->Node; struct Node* root = tree->root; - //printTree((union Data*)(tree->root)); + printTree((union Data*)(tree->root)); tree->newNode = newNode; tree->root = newNode; // this should done at stackClear tree->parent = NULL; @@ -290,7 +290,7 @@ if (tree->root) { tree->current = tree->root; - goto search(); + goto search(); //inputDGに探すnodeを入れるべき?。 } goto next(...); diff -r 65066d677a13 -r 0ee98fba0503 src/parallel_execution/test/rbTree_test.cbc --- a/src/parallel_execution/test/rbTree_test.cbc Thu Oct 28 14:06:45 2021 +0900 +++ b/src/parallel_execution/test/rbTree_test.cbc Thu Nov 11 17:13:39 2021 +0900 @@ -69,9 +69,9 @@ printf("test5\n"); Node* node = new Node(); node->value = (union Data*)new Integer(); - ((Integer*)node->value)->value = 8; - node->key = 8; - goto tree->remove(node,exit_code); + ((Integer*)node->value)->value = 0; + node->key = 7; + goto tree->get(rbTreeTest6); } __code rbTreeTest5_stub(struct Context* context) { @@ -80,6 +80,19 @@ } +__code rbTreeTest6(struct Tree* tree) { + printf("test6\n"); + Node* node = new Node(); + node->value = (union Data*)new Integer(); + ((Integer*)node->value)->value = 9; + node->key = 9; + goto tree->put(node,exit_code); +} + +__code rbTreeTest6_stub(struct Context* context) { + Tree* tree = (struct Tree*)Gearef(context, Tree)->tree; + goto rbTreeTest6(context,tree); +} int main(int argc, char const* argv[]) { printf("test_main\n");