summaryrefslogtreecommitdiff
path: root/src/program.c
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2015-01-27 16:59:22 -0500
committerAdrian Thurston <thurston@complang.org>2015-01-27 16:59:22 -0500
commit6f9c7f12e3888c525a4b9be7712294929d690790 (patch)
treed53632c5fd2ee42df1f0ef45ab824e896e000d88 /src/program.c
parent09c75e4b10915cb32786d2482af6727841659b80 (diff)
downloadcolm-6f9c7f12e3888c525a4b9be7712294929d690790.tar.gz
first cut of value-based ints, test cases pass
Diffstat (limited to 'src/program.c')
-rw-r--r--src/program.c22
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 );