Replace bool with b1, b8, b16, ...

The b1 type is an abstract boolean value. The others are concrete
representations.
This commit is contained in:
Jakob Stoklund Olesen
2016-04-01 15:32:00 -07:00
parent 4b265c2ee3
commit f72f47aece
4 changed files with 64 additions and 17 deletions

View File

@@ -2,14 +2,19 @@
The cretonne.types module predefines all the Cretonne scalar types.
"""
from . import ScalarType, IntType, FloatType
from . import ScalarType, IntType, FloatType, BoolType
#: Boolean.
bool = ScalarType('bool', 0,
b1 = ScalarType('b1', 0,
"""
A boolean value that is either true or false.
""")
b8 = BoolType(8) #: 8-bit bool.
b16 = BoolType(16) #: 16-bit bool.
b32 = BoolType(32) #: 32-bit bool.
b64 = BoolType(64) #: 64-bit bool.
i8 = IntType(8) #: 8-bit int.
i16 = IntType(16) #: 16-bit int.
i32 = IntType(32) #: 32-bit int.