[pypy-svn] r51874 - in pypy/branch/jit-refactoring/pypy/jit/rainbow: . test
arigo at codespeak.net
arigo at codespeak.net
Tue Feb 26 17:59:00 CET 2008
Author: arigo
Date: Tue Feb 26 17:58:57 2008
New Revision: 51874
Modified:
pypy/branch/jit-refactoring/pypy/jit/rainbow/interpreter.py
pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_portal.py
Log:
This test passes with the same hack as in llinterp.py.
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 Tue Feb 26 17:58:57 2008
@@ -1,5 +1,6 @@
from pypy.rlib.rarithmetic import intmask
from pypy.rlib.unroll import unrolling_iterable
+from pypy.rlib.objectmodel import we_are_translated, CDefinedIntSymbolic
from pypy.jit.timeshifter import rtimeshift, rcontainer
from pypy.jit.timeshifter.greenkey import empty_key, GreenKey, newgreendict
from pypy.rpython.lltypesystem import lltype, llmemory
@@ -686,6 +687,11 @@
genconst = self.get_greenarg()
arg = genconst.revealconst(opdesc.ARGS[i])
args += (arg, )
+ if not we_are_translated():
+ if opdesc.opname == "int_is_true":
+ # special case for tests, as in llinterp.py
+ if type(args[1]) is CDefinedIntSymbolic:
+ args = (args[0], args[1].default)
result = self.rgenop.genconst(opdesc.llop(*args))
self.green_result(result)
implementation.argspec = ("green",) * len(list(numargs))
Modified: pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_portal.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_portal.py (original)
+++ pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_portal.py Tue Feb 26 17:58:57 2008
@@ -233,7 +233,6 @@
self.check_insns(indirect_call=2)
def test_method_call_promote(self):
- py.test.skip("not working yet")
class Base(object):
pass
class Int(Base):
More information about the Pypy-commit
mailing list