diff options
author | Adrian Thurston <thurston@colm.net> | 2018-05-05 11:26:25 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2018-05-05 11:26:25 -0400 |
commit | 62db4bb1d2007030ff1ef419d279d28128f421e6 (patch) | |
tree | ada73b9021a72f1c27ec877020a9ced8036ec66b /src/tree.c | |
parent | 4cd76a8dbe465ef293c2c96ba586720c1ab65c08 (diff) | |
download | colm-62db4bb1d2007030ff1ef419d279d28128f421e6.tar.gz |
removed some commented-out code
Diffstat (limited to 'src/tree.c')
-rw-r--r-- | src/tree.c | 31 |
1 files changed, 4 insertions, 27 deletions
@@ -841,25 +841,12 @@ tree_t *copy_real_tree( program_t *prg, tree_t *tree, kid_t *old_next_down, kid_ tree_t *colm_copy_tree( program_t *prg, tree_t *tree, kid_t *old_next_down, kid_t **new_next_down ) { -// struct lang_el_info *lelInfo = prg->rtd->lelInfo; -// long genericId = lelInfo[tree->id].genericId; -// if ( genericId > 0 ) -// assert(false); - if ( tree->id == LEL_ID_PTR ) - assert(false); -// else if ( tree->id == LEL_ID_BOOL ) -// assert(false); -// else if ( tree->id == LEL_ID_INT ) -// assert(false); - else if ( tree->id == LEL_ID_STR ) - assert(false); -// else if ( tree->id == LEL_ID_STREAM ) -// assert(false); - else { - tree = copy_real_tree( prg, tree, old_next_down, new_next_down ); - } + assert( tree->id != LEL_ID_PTR && tree->id != LEL_ID_STR ); + + tree = copy_real_tree( prg, tree, old_next_down, new_next_down ); assert( tree->refs == 0 ); + return tree; } @@ -952,11 +939,8 @@ void colm_tree_downref( program_t *prg, tree_t **sp, tree_t *tree ) void object_free_rec( program_t *prg, tree_t **sp, tree_t *tree ) { tree_t **top = vm_ptop(); -// struct lang_el_info *lelInfo; -// long genericId; free_tree: -// lelInfo = prg->rtd->lelInfo; switch ( tree->id ) { case LEL_ID_STR: { @@ -965,17 +949,10 @@ free_tree: tree_free( prg, tree ); break; } -// case LEL_ID_BOOL: -// case LEL_ID_INT: { -// tree_free( prg, tree ); -// break; -// } case LEL_ID_PTR: { tree_free( prg, tree ); break; } -// case LEL_ID_STREAM: { -// } default: { if ( tree->id != LEL_ID_IGNORE ) string_free( prg, tree->tokdata ); |