Stella Laurenzo
340f109742
Add implicit return and expression statements where the value id discarded.
2020-06-09 18:34:07 -07:00
Stella Laurenzo
22cbe044c2
Add IfExp emission.
2020-06-09 17:10:52 -07:00
Stella Laurenzo
e18e8e0a96
Add boolean/logical operations (and, or, not).
...
* Adds a new to_boolean op to evaluate a value as a truthy i1
* Uses cascading scf.if ops to properly evaluate and/or sequences (short-circuit and original value returning)
* Adds a helper to construct select ops and uses it to implement 'not'
2020-06-09 00:01:21 -07:00
Stella Laurenzo
b0a80e04f1
Make binary_expr and binary_compare have similar asm syntax.
2020-06-08 18:29:14 -07:00
Stella Laurenzo
1ef3614682
Add support for short-circuit comparisons with scf.if.
2020-06-08 17:52:07 -07:00
Stella Laurenzo
85b724e70c
Adds ODS and import support for binary_expr and binary_compare ops.
...
* Currently only supports non-short-circuit comparisons.
2020-06-08 13:46:06 -07:00
Stella Laurenzo
7c176ed872
Add None constants.
2020-06-07 16:21:00 -07:00
Stella Laurenzo
72499e0319
Add bytes constants.
2020-06-07 16:00:29 -07:00
Stella Laurenzo
a1e6ff4ab7
Add ellipsis constants.
2020-06-07 15:49:39 -07:00
Stella Laurenzo
f3829b1d4f
Add string constants.
2020-06-07 15:46:28 -07:00
Stella Laurenzo
869228e316
Add bool constants.
2020-06-07 15:15:19 -07:00
Stella Laurenzo
8280b86c05
Aggregate all lit test targets under check-npcomp.
2020-06-07 14:35:58 -07:00
Stella Laurenzo
af4466197e
Add lit test suite for python compiler.
...
* Adds a test for simple constants and fixes issues.
2020-06-07 14:29:39 -07:00