Mercurial > hg > Gears > GearsAgda
annotate src/parallel_execution/rb_tree.c @ 149:63ab65b28466
Add Gearef macro
author | one |
---|---|
date | Thu, 10 Nov 2016 20:37:52 +0900 |
parents | 473b7d990a1f |
children | 73c393f0dca3 |
rev | line source |
---|---|
86 | 1 #include <stdio.h> |
2 | |
3 #include "context.h" | |
4 #include "origin_cs.h" | |
5 | |
131
a4507906938c
Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
130
diff
changeset
|
6 extern enum Relational compare(struct Node* node1, struct Node* node2); |
86 | 7 |
126 | 8 void printTree1(union Data* data) { |
132 | 9 struct Node* node = &data->node; |
126 | 10 if (node == NULL) { |
11 printf("NULL"); | |
12 } else { | |
13 printf("key = %d (", node->key); | |
133 | 14 printTree1((union Data*)(node->right)); |
126 | 15 printf("), ("); |
133 | 16 printTree1((union Data*)(node->left)); |
126 | 17 printf(")"); |
18 } | |
19 } | |
20 | |
21 void printTree(union Data* data) { | |
22 printTree1(data); | |
23 printf("\n"); | |
24 } | |
86 | 25 |
130 | 26 __code put(struct Context* context, struct Stack* nodeStack, struct Tree* tree, struct Node* node, struct Traverse* traverse, struct Node* root, struct Node* newNode) { |
133 | 27 printTree((union Data*)(tree->root)); |
122 | 28 traverse->newNode = newNode; |
29 tree->root = newNode; // this should done at stackClear | |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
30 traverse->parent = NULL; |
86 | 31 if (root) { |
91 | 32 traverse->current = root; |
131
a4507906938c
Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
130
diff
changeset
|
33 traverse->result = compare(traverse->current, node); |
144 | 34 goto meta(context, C_replaceNode); |
86 | 35 } |
36 | |
144 | 37 goto meta(context, C_insertNode); |
86 | 38 } |
39 | |
40 __code put_stub(struct Context* context) { | |
134
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
41 struct Node* newNode = &ALLOCATE(context, Node)->node; |
91 | 42 goto put(context, |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
43 &context->data[D_Stack]->stack, |
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
44 &context->data[D_Tree]->tree, |
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
45 &context->data[D_Node]->node, |
149 | 46 &context->data[D_Traverse]->Traverse, |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
47 context->data[D_Tree]->tree.root, |
134
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
48 newNode |
124 | 49 ); |
121 | 50 } |
51 | |
132 | 52 __code replaceNode(struct Context* context, struct Traverse* traverse, struct Node* oldNode, struct Node* newNode, struct Stack* nodeStack) { |
138 | 53 traverse->previous = newNode; |
121 | 54 *newNode = *oldNode; |
138 | 55 nodeStack->stack = (union Data*)traverse->nodeStack; |
133 | 56 nodeStack->data = (union Data*)(newNode); |
144 | 57 nodeStack->next = C_replaceNode1; |
138 | 58 goto meta(context, traverse->nodeStack->push); |
86 | 59 } |
60 | |
121 | 61 __code replaceNode_stub(struct Context* context) { |
62 goto replaceNode(context, | |
149 | 63 &context->data[D_Traverse]->Traverse, |
64 context->data[D_Traverse]->Traverse.current, | |
65 //context->data[D_Traverse]->Traverse.newNode, | |
66 Gearef(context, Traverse)->newNode, | |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
67 &context->data[D_Stack]->stack); |
121 | 68 } |
69 | |
70 __code replaceNode1(struct Context* context, struct Traverse* traverse, struct Node* node, struct Node* oldNode, struct Node* newNode, struct Node* newnewNode, int result) { | |
86 | 71 if (result == EQ) { |
121 | 72 newNode->value = node->value; |
117 | 73 // go to stack clear |
86 | 74 goto meta(context, context->next); |
75 } else if (result == GT) { | |
91 | 76 traverse->current = oldNode->right; |
121 | 77 newNode->right = newnewNode; |
86 | 78 } else { |
91 | 79 traverse->current = oldNode->left; |
121 | 80 newNode->left = newnewNode; |
86 | 81 } |
122 | 82 traverse->newNode = newnewNode; |
91 | 83 if (traverse->current) { |
131
a4507906938c
Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
130
diff
changeset
|
84 traverse->result = compare(traverse->current, node); |
144 | 85 goto meta(context, C_replaceNode); |
86 | 86 } |
144 | 87 goto meta(context, C_insertNode); |
121 | 88 |
86 | 89 } |
90 | |
121 | 91 __code replaceNode1_stub(struct Context* context) { |
132 | 92 struct Node* newnewNode = &ALLOCATE(context, Node)->node; |
121 | 93 goto replaceNode1(context, |
149 | 94 &context->data[D_Traverse]->Traverse, |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
95 &context->data[D_Node]->node, |
149 | 96 context->data[D_Traverse]->Traverse.current, |
97 context->data[D_Traverse]->Traverse.previous, | |
124 | 98 newnewNode, |
149 | 99 context->data[D_Traverse]->Traverse.result); |
86 | 100 } |
101 | |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
102 __code insertNode(struct Context* context, struct Traverse* traverse, struct Stack *nodeStack, struct Node* node, struct Node* newNode) { |
86 | 103 *newNode = *node; |
122 | 104 newNode->color = Red; |
91 | 105 traverse->current = newNode; |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
106 nodeStack->stack = (union Data*)traverse->nodeStack; |
144 | 107 nodeStack->next = C_insertCase1; |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
108 goto meta(context, traverse->nodeStack->get2); |
86 | 109 } |
110 | |
111 __code insertNode_stub(struct Context* context) { | |
91 | 112 goto insertNode(context, |
149 | 113 &context->data[D_Traverse]->Traverse, |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
114 &context->data[D_Stack]->stack, |
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
115 &context->data[D_Node]->node, |
149 | 116 context->data[D_Traverse]->Traverse.newNode); |
86 | 117 } |
118 | |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
119 __code insertCase1(struct Context* context,struct Traverse* traverse, struct Tree* tree,struct Node *parent, struct Node *grandparent) { |
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
120 if (parent != NULL) { |
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
121 traverse->parent = parent; |
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
122 traverse->grandparent = grandparent; |
144 | 123 goto meta(context,C_insertCase2); |
122 | 124 } |
127 | 125 tree->root->color = Black; |
144 | 126 goto meta(context, C_stackClear); |
86 | 127 } |
128 | |
144 | 129 __code insertCase1_stub(struct Context* context) { |
127 | 130 goto insertCase1(context, |
149 | 131 &context->data[D_Traverse]->Traverse, |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
132 &context->data[D_Tree]->tree, |
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
133 &context->data[D_Stack]->stack.data->node, |
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
134 &context->data[D_Stack]->stack.data1->node); |
86 | 135 } |
136 | |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
137 __code insertCase2(struct Context* context, struct Traverse* traverse) { |
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
138 if (traverse->parent->color == Black) { |
144 | 139 goto meta(context, C_stackClear); |
86 | 140 } |
144 | 141 goto meta(context,C_insertCase3); |
86 | 142 } |
143 | |
144 | 144 __code insertCase2_stub(struct Context* context) { |
149 | 145 goto insertCase2(context, &context->data[D_Traverse]->Traverse); |
86 | 146 } |
147 | |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
148 __code insertCase3(struct Context* context, struct Traverse* traverse, struct Stack* nodeStack) { |
86 | 149 struct Node* uncle; |
150 | |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
151 if (traverse->grandparent->left == traverse->parent) |
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
152 uncle = traverse->grandparent->right; |
86 | 153 else |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
154 uncle = traverse->grandparent->left; |
86 | 155 |
156 if (uncle && (uncle->color == Red)) { | |
117 | 157 // do insertcase1 on grandparent, stack must be pop by two |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
158 traverse->parent->color = Black; |
86 | 159 uncle->color = Black; |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
160 traverse->grandparent->color = Red; |
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
161 traverse->current = traverse->grandparent; |
138 | 162 nodeStack->stack = (union Data*)traverse->nodeStack; |
144 | 163 nodeStack->next = C_insertCase1; |
138 | 164 goto meta(context, traverse->nodeStack->pop2); |
86 | 165 } |
144 | 166 goto meta(context, C_insertCase4); |
86 | 167 } |
168 | |
144 | 169 __code insertCase3_stub(struct Context* context) { |
149 | 170 goto insertCase3(context, &context->data[D_Traverse]->Traverse, |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
171 &context->data[D_Stack]->stack |
122 | 172 ); |
86 | 173 } |
174 | |
147 | 175 __code insertCase4(struct Context* context, struct Traverse* traverse, struct RotateTree* rotateTree) { |
134
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
176 struct Stack* nodeStack = traverse->nodeStack; |
86 | 177 |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
178 if ((traverse->current == traverse->parent->right) && (traverse->parent == traverse->grandparent->left)) { |
134
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
179 traverse->current = traverse->current->left; |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
180 traverse->parent = traverse->grandparent; |
147 | 181 |
182 rotateTree->traverse = traverse; | |
183 rotateTree->next = C_insertCase5; | |
184 | |
138 | 185 nodeStack->stack = (union Data*)traverse->nodeStack; |
144 | 186 nodeStack->next = C_rotateLeft; |
139 | 187 goto meta(context, nodeStack->pop); |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
188 } else if ((traverse->current == traverse->parent->left) && (traverse->parent == traverse->grandparent->right)) { |
147 | 189 traverse->parent = traverse->grandparent; |
134
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
190 traverse->current = traverse->current->right; |
147 | 191 |
192 rotateTree->traverse = traverse; | |
193 rotateTree->next = C_insertCase5; | |
194 | |
138 | 195 nodeStack->stack = (union Data*)traverse->nodeStack; |
144 | 196 nodeStack->next = C_rotateRight; |
139 | 197 goto meta(context, nodeStack->pop); |
86 | 198 } |
199 | |
144 | 200 goto meta(context, C_insertCase5); |
86 | 201 } |
202 | |
144 | 203 __code insertCase4_stub(struct Context* context) { |
149 | 204 goto insertCase4(context, &context->data[D_Traverse]->Traverse, &context->data[D_RotateTree]->rotateTree); |
86 | 205 } |
206 | |
140 | 207 __code insertCase5(struct Context* context, struct Traverse* traverse,struct Stack *nodeStack) { |
138 | 208 nodeStack->stack = (union Data*)traverse->nodeStack; |
144 | 209 nodeStack->next = C_insertCase51; |
141
4f6a660c14a1
stack interface worked
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
140
diff
changeset
|
210 goto meta(context, traverse->nodeStack->pop2); |
122 | 211 } |
212 | |
144 | 213 __code insertCase5_stub(struct Context* context) { |
149 | 214 goto insertCase5(context, &context->data[D_Traverse]->Traverse, &context->data[D_Stack]->stack); |
86 | 215 } |
216 | |
147 | 217 __code insertCase51(struct Context* context, struct Traverse* traverse, struct RotateTree *rotateTree, struct Node* current, struct Node* parent, struct Node* grandparent) { |
143
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
218 traverse->parent = parent; |
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
219 traverse->grandparent = grandparent; |
34a7a21edc36
recude stack get using traverse field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
141
diff
changeset
|
220 |
86 | 221 parent->color = Black; |
222 grandparent->color = Red; | |
223 | |
91 | 224 traverse->current = grandparent; |
147 | 225 |
226 rotateTree->traverse = traverse; | |
227 rotateTree->next = C_stackClear; | |
228 | |
86 | 229 if ((current == parent->left) && (parent == grandparent->left)) |
144 | 230 goto meta(context, C_rotateRight); |
86 | 231 else |
144 | 232 goto meta(context, C_rotateLeft); |
86 | 233 } |
234 | |
144 | 235 __code insertCase51_stub(struct Context* context) { |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
236 struct Node* parent = &context->data[D_Stack]->stack.data->node; |
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
237 struct Node* grandparent = &context->data[D_Stack]->stack.data1->node; |
149 | 238 goto insertCase51(context, &context->data[D_Traverse]->Traverse,&context->data[D_RotateTree]->rotateTree, context->data[D_Traverse]->Traverse.current, parent, grandparent); |
86 | 239 } |
240 | |
140 | 241 __code rotateLeft(struct Context* context, struct Traverse* traverse,struct Stack* nodeStack) { |
138 | 242 nodeStack->stack = (union Data*)traverse->nodeStack; |
144 | 243 nodeStack->next = C_rotateLeft1; |
140 | 244 goto meta(context, traverse->nodeStack->get); |
134
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
245 } |
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
246 |
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
247 __code rotateLeft_stub(struct Context* context) { |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
248 struct Traverse* traverse = context->data[D_RotateTree]->rotateTree.traverse; |
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
249 goto rotateLeft(context, traverse, &context->data[D_Stack]->stack); |
134
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
250 } |
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
251 |
147 | 252 __code rotateLeft1(struct Context* context, struct Node* node, struct Tree* tree, struct Traverse* traverse, struct Node *parent,struct RotateTree *rotateTree) { |
86 | 253 struct Node* tmp = node->right; |
123 | 254 |
255 if (parent) { | |
146 | 256 if (node == parent->left) |
123 | 257 parent->left = tmp; |
258 else | |
259 parent->right = tmp; | |
260 } else { | |
261 tree->root = tmp; | |
262 } | |
117 | 263 |
123 | 264 node->right = tmp->left; |
265 tmp->left = node; | |
266 traverse->current = tmp; | |
267 | |
147 | 268 goto meta(context, rotateTree->next); |
123 | 269 } |
270 | |
134
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
271 __code rotateLeft1_stub(struct Context* context) { |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
272 struct Traverse* traverse = context->data[D_RotateTree]->rotateTree.traverse; |
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
273 struct Node* parent = &context->data[D_Stack]->stack.data->node; |
134
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
274 goto rotateLeft1(context, |
147 | 275 traverse->current, |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
276 &context->data[D_Tree]->tree, |
147 | 277 traverse, |
278 parent, | |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
279 &context->data[D_RotateTree]->rotateTree); |
123 | 280 } |
86 | 281 |
140 | 282 __code rotateRight(struct Context* context, struct Traverse* traverse,struct Stack *nodeStack) { |
283 nodeStack->stack = (union Data*)traverse->nodeStack; | |
144 | 284 nodeStack->next = C_rotateRight1; |
140 | 285 goto meta(context, traverse->nodeStack->get); |
134
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
286 } |
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
287 |
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
288 __code rotateRight_stub(struct Context* context) { |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
289 struct Traverse* traverse = context->data[D_RotateTree]->rotateTree.traverse; |
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
290 goto rotateLeft(context, traverse, &context->data[D_Stack]->stack); |
134
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
291 } |
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
292 |
147 | 293 __code rotateRight1(struct Context* context, struct Node* node, struct Tree* tree, struct Traverse* traverse,struct Node *parent,struct RotateTree *rotateTree) { |
123 | 294 struct Node* tmp = node->left; |
295 | |
86 | 296 if (parent) { |
146 | 297 if (node == parent->left) |
86 | 298 parent->left = tmp; |
299 else | |
300 parent->right = tmp; | |
301 } else { | |
302 tree->root = tmp; | |
303 } | |
304 | |
305 node->left = tmp->right; | |
306 tmp->right = node; | |
91 | 307 traverse->current = tmp; |
86 | 308 |
147 | 309 goto meta(context, rotateTree->next); |
86 | 310 } |
311 | |
134
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
312 __code rotateRight1_stub(struct Context* context) { |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
313 struct Traverse* traverse = context->data[D_RotateTree]->rotateTree.traverse; |
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
314 struct Node* parent = &context->data[D_Stack]->stack.data->node; |
134
2eccf4564efe
fix stack call in rb_tree
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
133
diff
changeset
|
315 goto rotateRight1(context, |
147 | 316 traverse->current, |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
317 &context->data[D_Tree]->tree, |
147 | 318 traverse, |
319 parent, | |
148
473b7d990a1f
fix data gears type enum
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
147
diff
changeset
|
320 &context->data[D_RotateTree]->rotateTree); |
86 | 321 } |
322 | |
145
cc071cf1ba85
add stack clear interface
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
144
diff
changeset
|
323 __code stackClear(struct Context* context, struct Traverse* traverse,struct Stack *nodeStack) { |
91 | 324 traverse->current = 0; |
145
cc071cf1ba85
add stack clear interface
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
144
diff
changeset
|
325 nodeStack->stack = (union Data*)traverse->nodeStack; |
cc071cf1ba85
add stack clear interface
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
144
diff
changeset
|
326 nodeStack->next = context->next; |
cc071cf1ba85
add stack clear interface
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
144
diff
changeset
|
327 goto meta(context, traverse->nodeStack->clear); |
86 | 328 } |
329 | |
330 __code stackClear_stub(struct Context* context) { | |
149 | 331 goto stackClear(context, &context->data[D_Traverse]->Traverse,&context->data[D_Stack]->stack); |
86 | 332 } |
333 | |
334 | |
92 | 335 __code get(struct Context* context, struct Tree* tree, struct Traverse* traverse) { |
336 if (tree->root) { | |
337 traverse->current = tree->root; | |
86 | 338 |
144 | 339 goto meta(context, C_search); |
92 | 340 } |
86 | 341 |
131
a4507906938c
Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
130
diff
changeset
|
342 goto meta(context, traverse->next); |
92 | 343 } |
86 | 344 |
92 | 345 __code get_stub(struct Context* context) { |
149 | 346 goto get(context, &context->data[D_Tree]->tree, &context->data[D_Traverse]->Traverse); |
92 | 347 } |
86 | 348 |
91 | 349 __code search(struct Context* context, struct Traverse* traverse, struct Node* node) { |
131
a4507906938c
Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
130
diff
changeset
|
350 // compare(context, traverse, traverse->current->key, node->key); |
a4507906938c
Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
130
diff
changeset
|
351 traverse->result = compare(traverse->current, node); |
91 | 352 if (traverse->result == EQ) { |
353 *node = *traverse->current; | |
86 | 354 |
131
a4507906938c
Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
130
diff
changeset
|
355 goto meta(context, traverse->next); |
91 | 356 } else if (traverse->result == GT) { |
357 traverse->current = traverse->current->right; | |
358 } else { | |
359 traverse->current = traverse->current->left; | |
360 } | |
86 | 361 |
91 | 362 if (traverse->current) |
144 | 363 goto meta(context, C_search); |
86 | 364 |
131
a4507906938c
Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
130
diff
changeset
|
365 goto meta(context, traverse->next); |
91 | 366 } |
86 | 367 |
91 | 368 __code search_stub(struct Context* context) { |
149 | 369 goto search(context, &context->data[D_Traverse]->Traverse, &context->data[D_Node]->node); |
91 | 370 } |
86 | 371 |
372 /* /\* __code delete(struct Context* context, struct Tree* tree) { *\/ */ | |
373 /* /\* if (tree->root) { *\/ */ | |
374 /* /\* stack_push(context->code_stack, &context->next); *\/ */ | |
375 /* /\* context->next = Delete1; *\/ */ | |
376 /* /\* goto meta(context, Get); *\/ */ | |
377 /* /\* } *\/ */ | |
378 | |
379 /* /\* goto meta(context, context->next); *\/ */ | |
380 /* /\* } *\/ */ | |
381 | |
382 /* /\* __code delete_stub(struct Context* context) { *\/ */ | |
383 /* /\* goto delete(context, &context->data[Tree]->tree); *\/ */ | |
384 /* /\* } *\/ */ | |
385 | |
386 /* /\* __code delete1(struct Context* context, struct Tree* tree, struct Allocate* allocate) { *\/ */ | |
387 /* /\* allocate->size = sizeof(struct Node); *\/ */ | |
388 /* /\* allocator(context); *\/ */ | |
389 | |
390 /* /\* struct Node* root = tree->root; *\/ */ | |
391 | |
392 /* /\* tree->root = &context->data[context->dataNum]->node; *\/ */ | |
393 /* /\* tree->current = root; *\/ */ | |
394 | |
395 /* /\* compare(context, tree, tree->current->key, context->data[Node]->node.key); *\/ */ | |
396 | |
397 /* /\* goto meta(context, Replace_d1); *\/ */ | |
398 /* /\* } *\/ */ | |
399 | |
400 /* /\* __code delete1_stub(struct Context* context) { *\/ */ | |
401 /* /\* goto delete1(context, &context->data[Tree]->tree, &context->data[Allocate]->allocate); *\/ */ | |
402 /* /\* } *\/ */ | |
403 | |
404 /* /\* __code delete2(struct Context* context, struct Node* current) { *\/ */ | |
405 /* /\* if (current->color == Black) { *\/ */ | |
406 /* /\* struct Node* child = current->right == NULL ? current->left : current->right; *\/ */ | |
407 /* /\* current->color = child == NULL ? Black : child->color; *\/ */ | |
408 | |
409 /* /\* goto meta(context, DeleteCase1); *\/ */ | |
410 /* /\* } *\/ */ | |
411 | |
412 /* /\* goto meta(context, Delete3); *\/ */ | |
413 /* /\* } *\/ */ | |
414 | |
415 /* /\* __code delete2_stub(struct Context* context) { *\/ */ | |
416 /* /\* goto delete2(context, context->data[Tree]->tree.current); *\/ */ | |
417 /* /\* } *\/ */ | |
418 | |
419 /* /\* __code delete3(struct Context* context, struct Tree* tree, struct Node* current) { *\/ */ | |
420 /* /\* struct Node* tmp = current->right == NULL ? current->left : current->right; *\/ */ | |
421 | |
422 /* /\* if (current->parent) { *\/ */ | |
423 /* /\* if (current == current->parent->left) *\/ */ | |
424 /* /\* current->parent->left = tmp; *\/ */ | |
425 /* /\* else *\/ */ | |
426 /* /\* current->parent->right = tmp; *\/ */ | |
427 /* /\* } else { *\/ */ | |
428 /* /\* tree->root = tmp; *\/ */ | |
429 /* /\* } *\/ */ | |
430 | |
431 /* /\* if (tmp) *\/ */ | |
432 /* /\* tmp->parent = current->parent; *\/ */ | |
433 | |
434 /* /\* if (current->parent == NULL && tmp) *\/ */ | |
435 /* /\* tmp->color = Black; *\/ */ | |
436 | |
437 /* /\* current == current->parent->left ? (current->parent->left = NULL) : (current->parent->right = NULL); *\/ */ | |
438 | |
439 /* /\* stack_pop(context->code_stack, &context->next); *\/ */ | |
440 /* /\* goto meta(context, context->next); *\/ */ | |
441 /* /\* } *\/ */ | |
442 | |
443 /* /\* __code delete3_stub(struct Context* context) { *\/ */ | |
444 /* /\* goto delete3(context, &context->data[Tree]->tree, context->data[Tree]->tree.current); *\/ */ | |
445 /* /\* } *\/ */ | |
446 | |
447 /* /\* __code replaceNodeForDelete1(struct Context* context, struct Tree* tree, struct Node* oldNode, struct Node* newNode, int result) { *\/ */ | |
448 /* /\* *newNode = *oldNode; *\/ */ | |
449 | |
450 /* /\* if (result == EQ) *\/ */ | |
451 /* /\* goto meta(context, Replace_d2); *\/ */ | |
452 /* /\* else if (result == GT) *\/ */ | |
453 /* /\* tree->current = newNode->right; *\/ */ | |
454 /* /\* else *\/ */ | |
455 /* /\* tree->current = newNode->left; *\/ */ | |
456 | |
457 /* /\* tree->current->parent = newNode; *\/ */ | |
458 | |
459 /* /\* if (tree->current->left == NULL && tree->current->right == NULL) *\/ */ | |
460 /* /\* goto meta(context, Delete2); *\/ */ | |
461 | |
462 /* /\* if (result == GT) *\/ */ | |
463 /* /\* newNode->right = context->heap; *\/ */ | |
464 /* /\* else if (result == LT) *\/ */ | |
465 /* /\* newNode->left = context->heap; *\/ */ | |
466 | |
467 /* /\* allocator(context); *\/ */ | |
468 | |
469 /* /\* compare(context, tree, tree->current->key, context->data[Node]->node.key); *\/ */ | |
470 | |
471 /* /\* goto meta(context, Replace_d1); *\/ */ | |
472 /* /\* } *\/ */ | |
473 | |
474 /* /\* __code replaceNodeForDelete1_stub(struct Context* context) { *\/ */ | |
475 /* /\* goto replaceNodeForDelete1(context, &context->data[Tree]->tree, context->data[Tree]->tree.current, &context->data[context->dataNum]->node, context->data[Tree]->tree.result); *\/ */ | |
476 /* /\* } *\/ */ | |
477 | |
478 /* /\* __code replaceNodeForDelete2(struct Context* context, struct Tree* tree, struct Node* newNode) { *\/ */ | |
479 /* /\* if (tree->current->left && tree->current->right) { *\/ */ | |
480 /* /\* newNode->left->parent = newNode; *\/ */ | |
481 /* /\* tree->current = newNode->left; *\/ */ | |
482 /* /\* newNode->left = context->heap; *\/ */ | |
483 /* /\* tree->deleted = newNode; *\/ */ | |
484 | |
485 /* /\* allocator(context); *\/ */ | |
486 /* /\* tree->current->parent = newNode; *\/ */ | |
487 | |
488 /* /\* goto meta(context, FindMax1); *\/ */ | |
489 /* /\* } *\/ */ | |
490 | |
491 /* /\* goto meta(context, Delete2); *\/ */ | |
492 /* /\* } *\/ */ | |
493 | |
494 /* /\* __code replaceNodeForDelete2_stub(struct Context* context) { *\/ */ | |
495 /* /\* goto replaceNodeForDelete2(context, &context->data[Tree]->tree, &context->data[context->dataNum]->node); *\/ */ | |
496 /* /\* } *\/ */ | |
497 | |
498 /* /\* __code findMax1(struct Context* context, struct Tree* tree, struct Node* oldNode, struct Node* newNode) { *\/ */ | |
499 /* /\* *newNode = *oldNode; *\/ */ | |
500 | |
501 /* /\* if (newNode->right) *\/ */ | |
502 /* /\* goto meta(context, FindMax2); *\/ */ | |
503 | |
504 /* /\* tree->deleted->key = newNode->key; *\/ */ | |
505 /* /\* tree->deleted->value = newNode->value; *\/ */ | |
506 | |
507 /* /\* tree->current = newNode; *\/ */ | |
508 | |
509 /* /\* goto meta(context, Delete2); *\/ */ | |
510 /* /\* } *\/ */ | |
511 | |
512 /* /\* __code findMax1_stub(struct Context* context) { *\/ */ | |
513 /* /\* goto findMax1(context, &context->data[Tree]->tree, context->data[Tree]->tree.current, &context->data[context->dataNum]->node); *\/ */ | |
514 /* /\* } *\/ */ | |
515 | |
516 | |
517 /* /\* __code findMax2(struct Context* context, struct Tree* tree, struct Node* oldNode, struct Node* newNode) { *\/ */ | |
518 /* /\* *newNode = *oldNode; *\/ */ | |
519 | |
520 /* /\* if (newNode->right->right) { *\/ */ | |
521 /* /\* tree->current = newNode->right; *\/ */ | |
522 /* /\* newNode->right = context->heap; *\/ */ | |
523 | |
524 /* /\* allocator(context); *\/ */ | |
525 /* /\* tree->current->parent = newNode; *\/ */ | |
526 | |
527 /* /\* goto meta(context, FindMax2); *\/ */ | |
528 /* /\* } *\/ */ | |
529 | |
530 /* /\* tree->deleted->key = newNode->right->key; *\/ */ | |
531 /* /\* tree->deleted->value = newNode->right->value; *\/ */ | |
532 | |
533 /* /\* tree->current = newNode; *\/ */ | |
534 | |
535 /* /\* goto meta(context, Delete2); *\/ */ | |
536 /* /\* } *\/ */ | |
537 | |
538 /* /\* __code findMax2_stub(struct Context* context) { *\/ */ | |
539 /* /\* goto findMax2(context, &context->data[Tree]->tree, context->data[Tree]->tree.current, &context->data[context->dataNum]->node); *\/ */ | |
540 /* /\* } *\/ */ | |
541 | |
542 /* /\* __code deleteCase1(struct Context* context, struct Node* current) { *\/ */ | |
543 /* /\* if (current->parent) *\/ */ | |
544 /* /\* goto meta(context, DeleteCase2); *\/ */ | |
545 | |
546 /* /\* goto meta(context, Delete3); *\/ */ | |
547 /* /\* } *\/ */ | |
548 | |
549 /* /\* __code deleteCase1_stub(struct Context* context) { *\/ */ | |
550 /* /\* goto deleteCase1(context, context->data[Tree]->tree.current); *\/ */ | |
551 /* /\* } *\/ */ | |
552 | |
553 /* /\* __code deleteCase2(struct Context* context, struct Tree* tree, struct Node* current) { *\/ */ | |
554 /* /\* struct Node* sibling = current == current->parent->left ? current->parent->right : current->parent->left; *\/ */ | |
555 | |
556 /* /\* if ((sibling == NULL ? Black : sibling->color) == Red) { *\/ */ | |
557 /* /\* current->parent->color = Red; *\/ */ | |
558 /* /\* sibling->color = Black; *\/ */ | |
559 | |
560 /* /\* current == current->parent->left ? (current->parent->left = context->heap) : (current->parent->right = context->heap); *\/ */ | |
561 /* /\* allocator(context); *\/ */ | |
562 /* /\* context->data[context->dataNum]->node = *sibling; *\/ */ | |
563 | |
564 /* /\* tree->current = current->parent; *\/ */ | |
565 | |
566 /* /\* context->next = DeleteCase3; *\/ */ | |
567 /* /\* stack_push(context->code_stack, &context->next); *\/ */ | |
568 | |
569 /* /\* if (current == current->parent->left) *\/ */ | |
570 /* /\* goto meta(context, RotateL); *\/ */ | |
571 /* /\* else *\/ */ | |
572 /* /\* goto meta(context, RotateR); *\/ */ | |
573 /* /\* } *\/ */ | |
574 | |
575 /* /\* goto meta(context, DeleteCase3); *\/ */ | |
576 /* /\* } *\/ */ | |
577 | |
578 /* /\* __code deleteCase2_stub(struct Context* context) { *\/ */ | |
579 /* /\* goto deleteCase2(context, &context->data[Tree]->tree, context->data[Tree]->tree.current); *\/ */ | |
580 /* /\* } *\/ */ | |
581 | |
582 /* /\* __code deleteCase3(struct Context* context, struct Tree* tree, struct Node* current) { *\/ */ | |
583 /* /\* struct Node* sibling = current == current->parent->left ? current->parent->right : current->parent->left; *\/ */ | |
584 | |
585 /* /\* if (current->parent->color == Black && *\/ */ | |
586 /* /\* (sibling == NULL ? Black : sibling->color) == Black && *\/ */ | |
587 /* /\* (sibling->left == NULL ? Black : sibling->left->color) == Black && *\/ */ | |
588 /* /\* (sibling->right == NULL ? Black : sibling->right->color) == Black) { *\/ */ | |
589 /* /\* sibling->color = Red; *\/ */ | |
590 | |
591 /* /\* tree->current = current->parent; *\/ */ | |
592 /* /\* goto meta(context, DeleteCase1); *\/ */ | |
593 /* /\* } *\/ */ | |
594 | |
595 /* /\* goto meta(context, DeleteCase4); *\/ */ | |
596 /* /\* } *\/ */ | |
597 | |
598 /* /\* __code deleteCase3_stub(struct Context* context) { *\/ */ | |
599 /* /\* goto deleteCase3(context, &context->data[Tree]->tree, context->data[Tree]->tree.current); *\/ */ | |
600 /* /\* } *\/ */ | |
601 | |
602 /* /\* __code deleteCase4(struct Context* context, struct Node* current) { *\/ */ | |
603 /* /\* struct Node* sibling = current == current->parent->left ? current->parent->right : current->parent->left; *\/ */ | |
604 | |
605 /* /\* if (current->parent->color == Red && *\/ */ | |
606 /* /\* (sibling == NULL ? Black : sibling->color) == Black && *\/ */ | |
607 /* /\* (sibling->left == NULL ? Black : sibling->left->color) == Black && *\/ */ | |
608 /* /\* (sibling->right == NULL ? Black : sibling->right->color) == Black) { *\/ */ | |
609 /* /\* sibling->color = Red; *\/ */ | |
610 /* /\* current->parent->color = Black; *\/ */ | |
611 | |
612 /* /\* goto meta(context, Delete3); *\/ */ | |
613 /* /\* } *\/ */ | |
614 | |
615 /* /\* goto meta(context, DeleteCase5); *\/ */ | |
616 /* /\* } *\/ */ | |
617 | |
618 /* /\* __code deleteCase4_stub(struct Context* context) { *\/ */ | |
619 /* /\* goto deleteCase4(context, context->data[Tree]->tree.current); *\/ */ | |
620 /* /\* } *\/ */ | |
621 | |
622 /* /\* __code deleteCase5(struct Context* context, struct Tree* tree, struct Node* current) { *\/ */ | |
623 /* /\* struct Node* sibling = current == current->parent->left ? current->parent->right : current->parent->left; *\/ */ | |
624 /* /\* sibling->parent = current->parent; *\/ */ | |
625 | |
626 /* /\* if (current == current->parent->left && *\/ */ | |
627 /* /\* (sibling == NULL ? Black : sibling->color) == Black && *\/ */ | |
628 /* /\* (sibling->left == NULL ? Black : sibling->left->color) == Red && *\/ */ | |
629 /* /\* (sibling->right == NULL ? Black : sibling->right->color) == Black) { *\/ */ | |
630 /* /\* sibling->color = Red; *\/ */ | |
631 /* /\* sibling->left->color = Black; *\/ */ | |
632 | |
633 /* /\* sibling == sibling->parent->left ? (sibling->parent->left = context->heap) : (sibling->parent->right = context->heap); *\/ */ | |
634 /* /\* allocator(context); *\/ */ | |
635 /* /\* struct Node* tmp = &context->data[context->dataNum]->node; *\/ */ | |
636 /* /\* *tmp = *sibling; *\/ */ | |
637 /* /\* tmp->parent = current; *\/ */ | |
638 | |
639 /* /\* tmp->left = context->heap; *\/ */ | |
640 /* /\* allocator(context); *\/ */ | |
641 /* /\* context->data[context->dataNum]->node = *sibling->left; *\/ */ | |
642 /* /\* context->data[context->dataNum]->node.parent = tmp; *\/ */ | |
643 | |
644 /* /\* tree->current = tmp; *\/ */ | |
645 | |
646 /* /\* context->next = DeleteCase6; *\/ */ | |
647 /* /\* stack_push(context->code_stack, &context->next); *\/ */ | |
648 | |
649 /* /\* goto meta(context, RotateR); *\/ */ | |
650 /* /\* } else if (current == current->parent->right && *\/ */ | |
651 /* /\* (sibling == NULL ? Black : sibling->color) == Black && *\/ */ | |
652 /* /\* (sibling->left == NULL ? Black : sibling->left->color) == Black && *\/ */ | |
653 /* /\* (sibling->right == NULL ? Black : sibling->right->color) == Red) { *\/ */ | |
654 /* /\* sibling->color = Red; *\/ */ | |
655 /* /\* sibling->right->color = Black; *\/ */ | |
656 | |
657 /* /\* sibling == sibling->parent->left ? (sibling->parent->left = context->heap) : (sibling->parent->right = context->heap); *\/ */ | |
658 /* /\* allocator(context); *\/ */ | |
659 /* /\* struct Node* tmp = &context->data[context->dataNum]->node; *\/ */ | |
660 /* /\* *tmp = *sibling; *\/ */ | |
661 /* /\* tmp->parent = current; *\/ */ | |
662 | |
663 /* /\* tmp->right = context->heap; *\/ */ | |
664 /* /\* allocator(context); *\/ */ | |
665 /* /\* context->data[context->dataNum]->node = *sibling->right; *\/ */ | |
666 /* /\* context->data[context->dataNum]->node.parent = tmp; *\/ */ | |
667 | |
668 /* /\* tree->current = tmp; *\/ */ | |
669 | |
670 /* /\* context->next = DeleteCase6; *\/ */ | |
671 /* /\* stack_push(context->code_stack, &context->next); *\/ */ | |
672 /* /\* goto meta(context, RotateL); *\/ */ | |
673 /* /\* } *\/ */ | |
674 | |
675 /* /\* goto meta(context, DeleteCase6); *\/ */ | |
676 /* /\* } *\/ */ | |
677 | |
678 /* /\* __code deleteCase5_stub(struct Context* context) { *\/ */ | |
679 /* /\* goto deleteCase5(context, &context->data[Tree]->tree, context->data[Tree]->tree.current); *\/ */ | |
680 /* /\* } *\/ */ | |
681 | |
682 /* /\* __code deleteCase6(struct Context* context, struct Tree* tree, struct Node* current) { *\/ */ | |
683 /* /\* struct Node* sibling = current == current->parent->left ? current->parent->right : current->parent->left; *\/ */ | |
684 | |
685 /* /\* sibling == sibling->parent->left ? (sibling->parent->left = context->heap) : (sibling->parent->right = context->heap); *\/ */ | |
686 /* /\* allocator(context); *\/ */ | |
687 /* /\* struct Node* tmp = &context->data[context->dataNum]->node; *\/ */ | |
688 /* /\* *tmp = *sibling; *\/ */ | |
689 /* /\* tmp->parent = current; *\/ */ | |
690 | |
691 /* /\* tmp->color = current->parent->color; *\/ */ | |
692 /* /\* current->parent->color = Black; *\/ */ | |
693 | |
694 /* /\* context->next = Delete3; *\/ */ | |
695 /* /\* stack_push(context->code_stack, &context->next); *\/ */ | |
696 | |
697 /* /\* if (current == current->parent->left) { *\/ */ | |
698 /* /\* tmp->right->color = Black; *\/ */ | |
699 /* /\* tree->current = current->parent; *\/ */ | |
700 | |
701 /* /\* goto meta(context, RotateL); *\/ */ | |
702 /* /\* } else { *\/ */ | |
703 /* /\* tmp->left->color = Black; *\/ */ | |
704 /* /\* tree->current = current->parent; *\/ */ | |
705 | |
706 /* /\* goto meta(context, RotateR); *\/ */ | |
707 /* /\* } *\/ */ | |
708 /* /\* } *\/ */ | |
709 | |
710 /* /\* __code deleteCase6_stub(struct Context* context) { *\/ */ | |
711 /* /\* goto deleteCase6(context, &context->data[Tree]->tree, context->data[Tree]->tree.current); *\/ */ | |
712 /* /\* } *\/ */ |