diff options
author | Adrian Thurston <thurston@colm.net> | 2018-12-12 12:19:06 +0200 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2018-12-12 12:19:06 +0200 |
commit | 46afc4c66c0075d01646df65d0939571c91e9050 (patch) | |
tree | 57013b98ea88e158672d1ecd009cdbbd4fa7ee2d /src/program.c | |
parent | 779a96e143c9aaccebd24f5de48dee04e46aeab6 (diff) | |
download | colm-46afc4c66c0075d01646df65d0939571c91e9050.tar.gz |
make it optional to clean trees as we reduce
Was always freeing trees after each reduction action. Can now turn this off and
have the trees underneath what we have reduced available.
Diffstat (limited to 'src/program.c')
-rw-r--r-- | src/program.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/program.c b/src/program.c index 5555207a..0675c239 100644 --- a/src/program.c +++ b/src/program.c @@ -170,6 +170,11 @@ void colm_set_debug( program_t *prg, long active_realm ) prg->active_realm = active_realm; } +void colm_set_reduce_clean( struct colm_program *prg, unsigned char reduce_clean ) +{ + prg->reduce_clean = reduce_clean; +} + program_t *colm_new_program( struct colm_sections *rtd ) { program_t *prg = malloc(sizeof(program_t)); @@ -180,6 +185,7 @@ program_t *colm_new_program( struct colm_sections *rtd ) prg->rtd = rtd; prg->ctx_dep_parsing = 1; + prg->reduce_clean = 1; init_pool_alloc( &prg->kid_pool, sizeof(kid_t) ); init_pool_alloc( &prg->tree_pool, sizeof(tree_t) ); |