Mercurial > repos > tabletprog
annotate modules/true.tp @ 354:a6cdcc1b1c02
Fix il and llcompile modules enough that it actually attempts to run the compiled program
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 15 Apr 2015 20:08:38 -0700 |
parents | bb2b4613fdc8 |
children |
rev | line source |
---|---|
68
3a169ebb3224
Change strategy for handling true and false to avoid some initialization order problems and improve performance. Add support for negative integer literals. Update samples to reflect true/false change.
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 #{ |
70
0efd25a4958a
Update true and false with improved versions from ICFP contest project
Mike Pavone <pavone@retrodev.com>
parents:
68
diff
changeset
|
2 if <- :self trueblock { |
0efd25a4958a
Update true and false with improved versions from ICFP contest project
Mike Pavone <pavone@retrodev.com>
parents:
68
diff
changeset
|
3 trueblock: |
0efd25a4958a
Update true and false with improved versions from ICFP contest project
Mike Pavone <pavone@retrodev.com>
parents:
68
diff
changeset
|
4 } |
97
59a94f3ad56f
Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
71
diff
changeset
|
5 ifnot <- :self falseblock { |
59a94f3ad56f
Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
71
diff
changeset
|
6 self |
59a94f3ad56f
Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
71
diff
changeset
|
7 } |
68
3a169ebb3224
Change strategy for handling true and false to avoid some initialization order problems and improve performance. Add support for negative integer literals. Update samples to reflect true/false change.
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 if:else <- :self trueblock :elseblock { |
3a169ebb3224
Change strategy for handling true and false to avoid some initialization order problems and improve performance. Add support for negative integer literals. Update samples to reflect true/false change.
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 trueblock: |
3a169ebb3224
Change strategy for handling true and false to avoid some initialization order problems and improve performance. Add support for negative integer literals. Update samples to reflect true/false change.
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
10 } |
71
01b6f8204cdf
added 'not' message to 'true' and 'false' modules
William Morgan <bill@mrgn.org>
parents:
70
diff
changeset
|
11 not <- { |
01b6f8204cdf
added 'not' message to 'true' and 'false' modules
William Morgan <bill@mrgn.org>
parents:
70
diff
changeset
|
12 false |
01b6f8204cdf
added 'not' message to 'true' and 'false' modules
William Morgan <bill@mrgn.org>
parents:
70
diff
changeset
|
13 } |
197
1417f13f219c
Added string method to true and false modules
Mike Pavone <pavone@retrodev.com>
parents:
97
diff
changeset
|
14 string <- { "true" } |
272
bb2b4613fdc8
Added support for encoding integers and booleans as JSON
Michael Pavone <pavone@retrodev.com>
parents:
197
diff
changeset
|
15 jsonEncode <- { "true" } |
68
3a169ebb3224
Change strategy for handling true and false to avoid some initialization order problems and improve performance. Add support for negative integer literals. Update samples to reflect true/false change.
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
16 } |