# HG changeset patch # User innparusu # Date 1512990700 -32400 # Node ID a44dbeb088954ab93ae9d7d8cbd205455e2669bf # Parent 77de0283ac9213eea4e6ec09b81e32f98d2da198 Fix nodeStack diff -r 77de0283ac92 -r a44dbeb08895 src/parallel_execution/RedBlackTree.cbc --- a/src/parallel_execution/RedBlackTree.cbc Mon Dec 11 20:01:05 2017 +0900 +++ b/src/parallel_execution/RedBlackTree.cbc Mon Dec 11 20:11:40 2017 +0900 @@ -77,7 +77,7 @@ __code insertRBTree(struct Node* node, struct RedBlackTree* tree, struct Stack* stack, __code next(...)) { // first case tree->current = root; printf("C_insertRBTree\n"); - stack = tree->nodeStack; + //stack = tree->nodeStack; printf("value->%d,key->%d\n",node->value,node->key); printf("newNode value->%d,newNode key->%d\n",tree->newNode->value,tree->newNode->key); @@ -94,7 +94,7 @@ } -__code searchInsertLocation(struct Node* node, struct RedBlackTree* tree, struct Stack* stack) { +__code searchInsertLocation(struct Node* node, struct RedBlackTree* tree) { // first case tree->current = root; PreCase remove root=NULL case.don't exist firstCase tree->current=NULL printf("C_searchInsertLocation\n"); printf("nownode->key %d , previous->key %d \n",tree->newNode->key,tree->previous->key); @@ -102,11 +102,11 @@ tree->result = compare(tree->current, node); printf("tree->current->key = %d, node->key %d\n",tree->current->key,node->key); printf("compare (%d,%d)\n",tree->current,node); + struct Stack* stack = tree->nodeStack; if (tree->current == NULL) { printf("goto insertLocationBackInsert stack->pop"); goto stack->pop(insertLocationBackInsert); } - if (tree->result == GT) { printf("GT searchInsertLocation"); tree->current = tree->current->right;