# HG changeset patch # User mir3636 # Date 1479216888 -32400 # Node ID 7cd629c290509b2d2466e9aba04ab8c1fe20e0c7 # Parent 0aa2265660a01cc4cb6be964da4f2a4ef2260d8e fix diff -r 0aa2265660a0 -r 7cd629c29050 src/parallel_execution/rb_tree.cbc --- a/src/parallel_execution/rb_tree.cbc Tue Nov 15 20:17:31 2016 +0900 +++ b/src/parallel_execution/rb_tree.cbc Tue Nov 15 22:34:48 2016 +0900 @@ -111,7 +111,7 @@ traverse->current = traverse->grandparent; nodeStack->stack = (union Data*)traverse->nodeStack; nodeStack->next = insertCase1; - goto traverse->nodeStack->pop2(); + goto traverse->nodeStack->pop2(nodeStack); } goto insertCase4(traverse, traverse->rotateTree); } @@ -128,7 +128,7 @@ nodeStack->stack = (union Data*)traverse->nodeStack; nodeStack->next = rotateLeft; - goto meta(context, nodeStack->pop); + goto nodeStack->pop(nodeStack); } else if ((traverse->current == traverse->parent->left) && (traverse->parent == traverse->grandparent->right)) { traverse->parent = traverse->grandparent; traverse->current = traverse->current->right; @@ -138,7 +138,7 @@ nodeStack->stack = (union Data*)traverse->nodeStack; nodeStack->next = rotateRight; - goto nodeStack->pop(); + goto nodeStack->pop(nodeStack); } goto insertCase5(traverse); @@ -148,7 +148,7 @@ Stack* stack = new Stack; nodeStack->stack = (union Data*)traverse->nodeStack; nodeStack->next = insertCase51; - goto traverse->nodeStack->pop2(); + goto traverse->nodeStack->pop2(nodeStack); } __code insertCase51(struct Traverse* traverse, struct RotateTree *rotateTree, struct Node* current, struct Node* parent, struct Node* grandparent) { @@ -173,7 +173,7 @@ Stack* nodeStack = new Stack(); nodeStack->stack = (union Data*)traverse->nodeStack; nodeStack->next = rotateLeft1; - goto traverse->nodeStack->get(); + goto traverse->nodeStack->get(nodeStack); } __code rotateLeft1(struct Node* node, struct Tree* tree, struct Traverse* traverse, struct Node *parent,struct RotateTree *rotateTree) { @@ -199,7 +199,7 @@ Stack* nodeStack = new Stack(); nodeStack->stack = (union Data*)traverse->nodeStack; nodeStack->next = rotateRight1; - goto traverse->nodeStack->get(); + goto traverse->nodeStack->get(nodeStack); } __code rotateRight1(struct Node* node, struct Tree* tree, struct Traverse* traverse,struct Node *parent,struct RotateTree *rotateTree) { @@ -226,7 +226,7 @@ traverse->current = 0; nodeStack->stack = (union Data*)traverse->nodeStack; nodeStack->next = context->next; - goto traverse->nodeStack->clear(); + goto traverse->nodeStack->clear(nodeStack); } __code get(struct Tree* tree, struct Traverse* traverse) { @@ -245,7 +245,7 @@ if (traverse->result == EQ) { *node = *traverse->current; - goto meta(context, traverse->next); + goto traverse->next(...); } else if (traverse->result == GT) { traverse->current = traverse->current->right; } else { @@ -253,7 +253,7 @@ } if (traverse->current) - goto search(traverse); + goto search(traverse, traverse->node); goto traverse->next(...); }