Statistics
| Branch: | Tag: | Revision:

root / lib / opcodes.py.in_after @ f3aebf6f

History | View | Annotate | Download (391 Bytes)

1 580b1fdd Jose A. Lopes
2 580b1fdd Jose A. Lopes
3 580b1fdd Jose A. Lopes
def _GetOpList():
4 580b1fdd Jose A. Lopes
  """Returns list of all defined opcodes.
5 580b1fdd Jose A. Lopes
6 580b1fdd Jose A. Lopes
  Does not eliminate duplicates by C{OP_ID}.
7 580b1fdd Jose A. Lopes
8 580b1fdd Jose A. Lopes
  """
9 580b1fdd Jose A. Lopes
  return [v for v in globals().values()
10 580b1fdd Jose A. Lopes
          if (isinstance(v, type) and issubclass(v, OpCode) and
11 580b1fdd Jose A. Lopes
              hasattr(v, "OP_ID") and v is not OpCode and
12 580b1fdd Jose A. Lopes
              v.OP_ID != 'OP_INSTANCE_MULTI_ALLOC_BASE')]
13 580b1fdd Jose A. Lopes
14 580b1fdd Jose A. Lopes
15 580b1fdd Jose A. Lopes
OP_MAPPING = dict((v.OP_ID, v) for v in _GetOpList())