[pypy-commit] pypy default: simplification. We're not java
fijal
noreply at buildbot.pypy.org
Sun Jan 8 14:33:04 CET 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r51135:014afe8c57ac
Date: 2012-01-08 15:32 +0200
http://bitbucket.org/pypy/pypy/changeset/014afe8c57ac/
Log: simplification. We're not java
diff --git a/pypy/jit/metainterp/resoperation.py b/pypy/jit/metainterp/resoperation.py
--- a/pypy/jit/metainterp/resoperation.py
+++ b/pypy/jit/metainterp/resoperation.py
@@ -16,15 +16,13 @@
# debug
name = ""
pc = 0
+ opnum = 0
def __init__(self, result):
self.result = result
- # methods implemented by each concrete class
- # ------------------------------------------
-
def getopnum(self):
- raise NotImplementedError
+ return self.opnum
# methods implemented by the arity mixins
# ---------------------------------------
@@ -590,12 +588,9 @@
baseclass = PlainResOp
mixin = arity2mixin.get(arity, N_aryOp)
- def getopnum(self):
- return opnum
-
cls_name = '%s_OP' % name
bases = (get_base_class(mixin, baseclass),)
- dic = {'getopnum': getopnum}
+ dic = {'opnum': opnum}
return type(cls_name, bases, dic)
setup(__name__ == '__main__') # print out the table when run directly
More information about the pypy-commit
mailing list