Make room for SpecialType in the value type numbering.

The value types are now classified into three groups:

1. Lane types are scalar types that can also be used to form vectors.
2. Vector types 2-256 copies of a lane type.
3. Special types. This is where the CPU flag types will go.

The special types can't be used to form vectors.

Change the numbering scheme for value types to make room for the special
types and add `is_lane()` and `is_special()` classification methods.

The VOID type still has number 0, but it can no longer appear as a
vector lane. It classifies as special now.
This commit is contained in:
Jakob Stoklund Olesen
2017-10-12 12:10:27 -07:00
parent 89a24b2f13
commit dbaa919ca9
3 changed files with 91 additions and 27 deletions

View File

@@ -166,18 +166,15 @@ Concrete value types are represented as instances of :class:`ValueType`. There
are subclasses to represent scalar and vector types.
.. autoclass:: ValueType
.. inheritance-diagram:: ValueType LaneType VectorType IntType FloatType BoolType
.. inheritance-diagram:: ValueType LaneType VectorType SpecialType IntType FloatType BoolType
:parts: 1
.. autoclass:: LaneType
:members:
.. autoclass:: VectorType
:members:
.. autoclass:: SpecialType
.. autoclass:: IntType
:members:
.. autoclass:: FloatType
:members:
.. autoclass:: BoolType
:members:
.. automodule:: base.types
:members: