Get rid of operand_kind()

This method caused lots of import cycles when type checking.

Use isinstance() in the Operand constructor instead to decipher the
OperandSpec union type.
This commit is contained in:
Jakob Stoklund Olesen
2016-11-08 11:24:21 -08:00
parent 5498169ca0
commit 93a1387f2f
3 changed files with 15 additions and 28 deletions

View File

@@ -32,14 +32,6 @@ class OperandKind(object):
# type: () -> str
return 'OperandKind({})'.format(self.name)
def operand_kind(self):
# type: () -> OperandKind
"""
An `OperandKind` instance can be used directly as the type of an
`Operand` when defining an instruction.
"""
return self
def free_typevar(self):
# Return the free typevariable controlling the type of this operand.
return None