Mercurial > hg > Members > Moririn
changeset 455:a44dbeb08895
Fix nodeStack
author | innparusu |
---|---|
date | Mon, 11 Dec 2017 20:11:40 +0900 |
parents | 77de0283ac92 |
children | 3025d00eb87d |
files | src/parallel_execution/RedBlackTree.cbc |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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;