diff src/parallel_execution/RedBlackTree.cbc @ 418:a74bec89c198

generate main
author mir3636
date Fri, 06 Oct 2017 14:39:36 +0900
parents eec6553a2aa6
children 3c6af75b13d4
line wrap: on
line diff
--- a/src/parallel_execution/RedBlackTree.cbc	Thu Oct 05 17:00:48 2017 +0900
+++ b/src/parallel_execution/RedBlackTree.cbc	Fri Oct 06 14:39:36 2017 +0900
@@ -7,7 +7,7 @@
 Tree* createRedBlackTree(struct Context* context) {
     struct Tree* tree = new Tree();
     struct RedBlackTree* redBlackTree = new RedBlackTree();
-    tree->tree = (union Data*)createRedBlackTree;
+    tree->tree = (union Data*)redBlackTree;
     redBlackTree->root = NULL;
     redBlackTree->nodeStack = (union Data*)createSingleLinkedStack(context);
     tree->put = C_putRedBlackTree;
@@ -45,11 +45,9 @@
     if (root) {
         tree->current = root;
         tree->result = compare(tree->current, node);
-        // goto replaceNode(tree, tree->nodeStack);
-        goto meta(context, C_replaceNode);
+        goto replaceNode(tree, tree->nodeStack);
     }
-    // goto insertNode(tree, tree->nodeStack, node);
-    goto meta(context, C_insertNode);
+    goto insertNode(tree, tree->nodeStack, node);
 }
 
 __code replaceNode(struct RedBlackTree* tree, struct Stack* nodeStack) {