[pypy-svn] r51918 - in pypy/branch/jit-refactoring/pypy/jit: rainbow timeshifter
cfbolz at codespeak.net
cfbolz at codespeak.net
Thu Feb 28 16:18:48 CET 2008
Author: cfbolz
Date: Thu Feb 28 16:18:47 2008
New Revision: 51918
Modified:
pypy/branch/jit-refactoring/pypy/jit/rainbow/interpreter.py
pypy/branch/jit-refactoring/pypy/jit/timeshifter/oop.py
Log:
make oop handlers a bit more rpython
Modified: pypy/branch/jit-refactoring/pypy/jit/rainbow/interpreter.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/rainbow/interpreter.py (original)
+++ pypy/branch/jit-refactoring/pypy/jit/rainbow/interpreter.py Thu Feb 28 16:18:47 2008
@@ -522,19 +522,19 @@
@arguments("oopspec", "bool", returns="red")
def opimpl_red_oopspec_call_0(self, oopspec, deepfrozen):
- return oopspec.ll_handler(self.jitstate, oopspec, deepfrozen)
+ return oopspec.ll_handler_0(self.jitstate, oopspec, deepfrozen)
@arguments("oopspec", "bool", "red", returns="red")
def opimpl_red_oopspec_call_1(self, oopspec, deepfrozen, arg1):
- return oopspec.ll_handler(self.jitstate, oopspec, deepfrozen, arg1)
+ return oopspec.ll_handler_1(self.jitstate, oopspec, deepfrozen, arg1)
@arguments("oopspec", "bool", "red", "red", returns="red")
def opimpl_red_oopspec_call_2(self, oopspec, deepfrozen, arg1, arg2):
- return oopspec.ll_handler(self.jitstate, oopspec, deepfrozen, arg1, arg2)
+ return oopspec.ll_handler_2(self.jitstate, oopspec, deepfrozen, arg1, arg2)
@arguments("oopspec", "bool", "red", "red", "red", returns="red")
def opimpl_red_oopspec_call_3(self, oopspec, deepfrozen, arg1, arg2, arg3):
- return oopspec.ll_handler(self.jitstate, oopspec, deepfrozen, arg1, arg2, arg3)
+ return oopspec.ll_handler_3(self.jitstate, oopspec, deepfrozen, arg1, arg2, arg3)
@arguments("red", "calldesc", "bool", "red_varargs", "promotiondesc")
def opimpl_red_residual_call(self, funcbox, calldesc, withexc,
Modified: pypy/branch/jit-refactoring/pypy/jit/timeshifter/oop.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/timeshifter/oop.py (original)
+++ pypy/branch/jit-refactoring/pypy/jit/timeshifter/oop.py Thu Feb 28 16:18:47 2008
@@ -86,8 +86,11 @@
vmodule = __import__('pypy.jit.timeshifter.v%s' % (typename,),
None, None, [method])
self.typedesc = vmodule.TypeDesc(RGenOp, rtyper, SELFTYPE)
- self.ll_handler = getattr(vmodule, method)
- self.couldfold = getattr(self.ll_handler, 'couldfold', False)
+ handler = getattr(vmodule, method)
+ setattr(self, "ll_handler_%s" % (len(OOPARGTYPES), ), handler)
+
+ self.ll_handler = handler
+ self.couldfold = getattr(handler, 'couldfold', False)
if self.couldfold:
oopargcheck = ll_func.oopargcheck # required if couldfold=True
More information about the Pypy-commit
mailing list