[pypy-commit] pypy ppc-jit-backend: merge heads

hager noreply at buildbot.pypy.org
Tue Feb 14 10:50:29 CET 2012


Author: hager <sven.hager at uni-duesseldorf.de>
Branch: ppc-jit-backend
Changeset: r52439:f2eb1e6f9cc1
Date: 2012-02-14 10:45 +0100
http://bitbucket.org/pypy/pypy/changeset/f2eb1e6f9cc1/

Log:	merge heads

diff --git a/pypy/jit/backend/ppc/test/test_runner.py b/pypy/jit/backend/ppc/test/test_runner.py
--- a/pypy/jit/backend/ppc/test/test_runner.py
+++ b/pypy/jit/backend/ppc/test/test_runner.py
@@ -11,6 +11,7 @@
                                          ConstObj, BoxFloat, ConstFloat)
 from pypy.rpython.lltypesystem import lltype, llmemory, rstr, rffi, rclass
 from pypy.jit.codewriter.effectinfo import EffectInfo
+from pypy.jit.metainterp.resoperation import ResOperation, rop
 import py
 
 class FakeStats(object):
@@ -93,3 +94,36 @@
         for i in range(numargs):
             assert self.cpu.get_latest_value_int(i) == i + 1
 
+    def test_unicodesetitem_really_needs_temploc(self):
+        py.test.xfail("problems with longevity")
+        u_box = self.alloc_unicode(u"abcdefg")
+        
+        i0 = BoxInt()
+        i1 = BoxInt()
+        i2 = BoxInt()
+        i3 = BoxInt()
+        i4 = BoxInt()
+        i5 = BoxInt()
+        i6 = BoxInt()
+        i7 = BoxInt()
+        i8 = BoxInt()
+        i9 = BoxInt()
+
+        inputargs = [i0,i1,i2,i3,i4,i5,i6,i7,i8,i9]
+        looptoken = JitCellToken()
+        targettoken = TargetToken()
+        faildescr = BasicFailDescr(1)
+
+        operations = [
+            ResOperation(rop.LABEL, inputargs, None, descr=targettoken),
+            ResOperation(rop.UNICODESETITEM, 
+                         [u_box, BoxInt(4), BoxInt(123)], None),
+            ResOperation(rop.FINISH, inputargs, None, descr=faildescr)
+            ]
+
+        args = [(i + 1) for i in range(10)]
+        self.cpu.compile_loop(inputargs, operations, looptoken)
+        fail = self.cpu.execute_token(looptoken, *args)
+        assert fail.identifier == 1
+        for i in range(10):
+            assert self.cpu.get_latest_value_int(i) == args[i]


More information about the pypy-commit mailing list