diff options
author | Adrian Thurston <thurston@complang.org> | 2015-01-27 16:59:22 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-01-27 16:59:22 -0500 |
commit | 6f9c7f12e3888c525a4b9be7712294929d690790 (patch) | |
tree | d53632c5fd2ee42df1f0ef45ab824e896e000d88 /src/program.c | |
parent | 09c75e4b10915cb32786d2482af6727841659b80 (diff) | |
download | colm-6f9c7f12e3888c525a4b9be7712294929d690790.tar.gz |
first cut of value-based ints, test cases pass
Diffstat (limited to 'src/program.c')
-rw-r--r-- | src/program.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/program.c b/src/program.c index 83ad04e4..cdd0f335 100644 --- a/src/program.c +++ b/src/program.c @@ -188,15 +188,15 @@ Program *colm_new_program( RuntimeData *rtd ) initPoolAlloc( &prg->headPool, sizeof(Head) ); initPoolAlloc( &prg->locationPool, sizeof(Location) ); - Int *trueInt = (Int*) treeAllocate( prg ); - trueInt->id = LEL_ID_BOOL; - trueInt->refs = 1; - trueInt->value = 1; - - Int *falseInt = (Int*) treeAllocate( prg ); - falseInt->id = LEL_ID_BOOL; - falseInt->refs = 1; - falseInt->value = 0; + Int *trueInt = (Int*) 1; //treeAllocate( prg ); +// trueInt->id = LEL_ID_BOOL; +// trueInt->refs = 1; +// trueInt->value = 1; +// + Int *falseInt = (Int*) 0; //treeAllocate( prg ); +// falseInt->id = LEL_ID_BOOL; +// falseInt->refs = 1; +// falseInt->value = 0; prg->trueVal = (Tree*)trueInt; prg->falseVal = (Tree*)falseInt; @@ -297,8 +297,8 @@ int colm_delete_program( Program *prg ) treeDownref( prg, sp, prg->returnVal ); colm_clear_heap( prg, sp ); - treeDownref( prg, sp, prg->trueVal ); - treeDownref( prg, sp, prg->falseVal ); +// treeDownref( prg, sp, prg->trueVal ); +// treeDownref( prg, sp, prg->falseVal ); treeDownref( prg, sp, prg->error ); |