[pypy-commit] pypy better-jit-hooks: remove nonworking stuff and return space.w_None

fijal noreply at buildbot.pypy.org
Sun Jan 8 21:03:51 CET 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: better-jit-hooks
Changeset: r51146:22a0d8fd2ca8
Date: 2012-01-08 22:03 +0200
http://bitbucket.org/pypy/pypy/changeset/22a0d8fd2ca8/

Log:	remove nonworking stuff and return space.w_None

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
@@ -60,7 +60,6 @@
     cache = space.fromcache(Cache)
     cache.w_compile_hook = w_hook
     cache.in_recursion = NonConstant(False)
-    return space.w_None
 
 def set_optimize_hook(space, w_hook):
     """ set_compile_hook(hook)
@@ -91,7 +90,6 @@
     cache = space.fromcache(Cache)
     cache.w_optimize_hook = w_hook
     cache.in_recursion = NonConstant(False)
-    return space.w_None
 
 def set_abort_hook(space, w_hook):
     """ set_abort_hook(hook)
@@ -107,7 +105,6 @@
     cache = space.fromcache(Cache)
     cache.w_abort_hook = w_hook
     cache.in_recursion = NonConstant(False)
-    return space.w_None
 
 def wrap_oplist(space, logops, operations, ops_offset):
     return [WrappedOp(jit_hooks._cast_to_gcref(op),
@@ -168,16 +165,13 @@
     @unwrap_spec(no=int, box=WrappedBox)
     def descr_setarg(self, space, no, box):
         jit_hooks.resop_setarg(self.op, no, box.llbox)
-        return space.w_None
 
     def descr_getresult(self, space):
         return WrappedBox(jit_hooks.resop_getresult(self.op))
 
-    @unwrap_spec(box=WrappedBox)
-    def descr_setresult(self, space, box):
-        assert isinstance(box, WrappedBox)
+    def descr_setresult(self, space, w_box):
+        box = space.interp_w(WrappedBox, w_box)
         jit_hooks.resop_setresult(self.op, box.llbox)
-        return space.w_None
 
 WrappedOp.typedef = TypeDef(
     'ResOperation',


More information about the pypy-commit mailing list