WIP combine

This commit is contained in:
Tony Garnock-Jones 2015-07-01 17:10:45 -04:00
parent 96fd6c455e
commit 039ec0e4bd
1 changed files with 39 additions and 0 deletions

39
route.c
View File

@ -107,3 +107,42 @@ static inline tt_node_ptr_t rupdate(tt_arena_t *a,
}
}
/* static tt_node_ptr_t combine(tt_arena_t *a, */
/* tt_node_ptr_t r1, */
/* tt_node_ptr_t r2, */
/* int left_empty_keep, */
/* int right_empty_keep, */
/* int left_base_keep, */
/* int right_base_keep, */
/* void *f_context, */
/* tt_node_ptr_t (*f)(void *f_context, tt_node_ptr_t r1, tt_node_ptr_t r2)) */
/* { */
/* tt_node_ptr_t g(tt_node_ptr_t r1, tt_node_ptr_t r2) { */
/* tt_tag_t t1, t2; */
/* if (TT_EMPTY_P(r1)) { */
/* return left_empty_keep ? r2 : TT_EMPTY; */
/* } */
/* if (TT_EMPTY_P(r2)) { */
/* return right_empty_keep ? r1 : TT_EMPTY; */
/* } */
/* t1 = tt_ptr_tag(r1); */
/* t2 = tt_ptr_tag(r2); */
/* if (t1 == TT_TAG_TAIL) { */
/* if (t2 == TT_TAG_TAIL) { */
/* return rwildseq(a, RET_IF_NO_PTR(g(TT_TAIL_TRIE(a,r1), TT_TAIL_TRIE(a,r2)))); */
/* } else { */
/* ....HERE */
/* } */
/* switch (tt_ptr_tag(r1)) { */
/* default: */
/* abort(); */
/* } */
/* } */
/* return g(r1, r2); */
/* } */