Add mypy types for gen_instr.py.

Declare the Instruction.number opcode number field.
This commit is contained in:
Jakob Stoklund Olesen
2017-03-30 16:20:40 -07:00
parent b94d01f892
commit c5f2ef8edb
2 changed files with 19 additions and 6 deletions

View File

@@ -107,6 +107,9 @@ class Instruction(object):
self.outs = self._to_operand_tuple(outs)
self.format = InstructionFormat.lookup(self.ins, self.outs)
# Opcode number, assigned by gen_instr.py.
self.number = None # type: int
# Indexes into `self.outs` for value results.
# Other results are `variable_args`.
self.value_results = tuple(