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 353dc72b5b
commit 1a066c4054
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(