[pypy-commit] pypy better-jit-hooks: what's untested is broken

fijal noreply at buildbot.pypy.org
Sat Jan 7 13:02:43 CET 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: better-jit-hooks
Changeset: r51107:80d78ac9430f
Date: 2012-01-07 14:02 +0200
http://bitbucket.org/pypy/pypy/changeset/80d78ac9430f/

Log:	what's untested is broken

diff --git a/pypy/module/pypyjit/interp_resop.py b/pypy/module/pypyjit/interp_resop.py
--- a/pypy/module/pypyjit/interp_resop.py
+++ b/pypy/module/pypyjit/interp_resop.py
@@ -83,9 +83,10 @@
                       logops.repr_of_resop(op)) for op in operations]
 
 @unwrap_spec(num=int, offset=int, repr=str)
-def descr_new_resop(space, num, w_args, w_res=NoneNotWrapped, offset=-1,
+def descr_new_resop(space, w_tp, num, w_args, w_res=NoneNotWrapped, offset=-1,
                     repr=''):
-    args = [jit_hooks.boxint_new(space.int_w(w_arg)) for w_arg in w_args]
+    args = [jit_hooks.boxint_new(space.int_w(w_arg)) for w_arg in
+            space.listview(w_args)]
     if w_res is None:
         llres = lltype.nullptr(llmemory.GCREF)
     else:
diff --git a/pypy/module/pypyjit/test/test_jit_hook.py b/pypy/module/pypyjit/test/test_jit_hook.py
--- a/pypy/module/pypyjit/test/test_jit_hook.py
+++ b/pypy/module/pypyjit/test/test_jit_hook.py
@@ -158,3 +158,9 @@
         pypyjit.set_abort_hook(hook)
         self.on_abort()
         assert l == [('pypyjit', 'ABORT_TOO_LONG')]
+
+    def test_creation(self):
+        import pypyjit
+
+        op = pypyjit.ResOperation(self.int_add_num, [1, 3], 4)
+        assert op.num == self.int_add_num


More information about the pypy-commit mailing list