Commits

Armin Rigo committed d4f1606

More attempts at translation fixes

  • Participants
  • Parent commits bc07df4

Comments (0)

Files changed (2)

pypy/module/pypyjit/interp_resop.py

     jit hook won't be called for that.
     """
     cache = space.fromcache(Cache)
+    assert w_hook is not None
     cache.w_compile_hook = w_hook
     cache.in_recursion = NonConstant(False)
 
     as attributes on JitLoopInfo object.
     """
     cache = space.fromcache(Cache)
+    assert w_hook is not None
     cache.w_abort_hook = w_hook
     cache.in_recursion = NonConstant(False)
 

pypy/module/pypyjit/policy.py

         cache = space.fromcache(Cache)
         if cache.in_recursion:
             return
-        w_abort_hook = cache.w_abort_hook
-        assert w_abort_hook is not None
-        if space.is_true(w_abort_hook):
+        if space.is_true(cache.w_abort_hook):
             cache.in_recursion = True
             oplist_w = wrap_oplist(space, logops, operations)
             try:
                 try:
-                    space.call_function(w_abort_hook,
+                    space.call_function(cache.w_abort_hook,
                         space.wrap(jitdriver.name),
                         wrap_greenkey(space, jitdriver, greenkey, greenkey_repr),
                         space.wrap(Counters.counter_names[reason]),
                         space.newlist(oplist_w)
                     )
                 except OperationError, e:
-                    e.write_unraisable(space, "jit hook ", w_abort_hook)
+                    e.write_unraisable(space, "jit hook ", cache.w_abort_hook)
             finally:
                 cache.in_recursion = False