mypy
5db3e1a0 - [mypyc] Add 'bit' primitive type and streamline branching (#9606)

Commit
5 years ago
[mypyc] Add 'bit' primitive type and streamline branching (#9606) Add the `bit` primitive type that only has two valid values: 0 and 1. The existing boolean primitive type is different as it also supports a third value (for error). This makes boolean a poor fit for low-level IR operations which never raise an exception. Use `bit` as the result type of comparison operations and various primitives. Also simplify the branch operation to not have a special mode for branching on negative values, since it's needlessly ad hoc. Primitives still support this mode, but it gets converted away during IR building. Work on mypyc/mypyc#748.
Author
Parents
Loading