Statistics
| Branch: | Tag: | Revision:

root / lib / opcodes.py.in_after @ f3aebf6f

History | View | Annotate | Download (391 Bytes)

1

    
2

    
3
def _GetOpList():
4
  """Returns list of all defined opcodes.
5

    
6
  Does not eliminate duplicates by C{OP_ID}.
7

    
8
  """
9
  return [v for v in globals().values()
10
          if (isinstance(v, type) and issubclass(v, OpCode) and
11
              hasattr(v, "OP_ID") and v is not OpCode and
12
              v.OP_ID != 'OP_INSTANCE_MULTI_ALLOC_BASE')]
13

    
14

    
15
OP_MAPPING = dict((v.OP_ID, v) for v in _GetOpList())