Commits

Armin Rigo committed bc07df4

Translation fixes

Comments (0)

Files changed (2)

pypy/module/pypyjit/policy.py

         cache = space.fromcache(Cache)
         if cache.in_recursion:
             return
-        if space.is_true(cache.w_abort_hook):
+        w_abort_hook = cache.w_abort_hook
+        assert w_abort_hook is not None
+        if space.is_true(w_abort_hook):
             cache.in_recursion = True
             oplist_w = wrap_oplist(space, logops, operations)
             try:
                 try:
-                    space.call_function(cache.w_abort_hook,
+                    space.call_function(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 ", cache.w_abort_hook)
+                    e.write_unraisable(space, "jit hook ", w_abort_hook)
             finally:
                 cache.in_recursion = False
 

rpython/rlib/objectmodel.py

         return repr(self.key)
 
 
+@specialize.call_location()
 def prepare_dict_update(dict, n_elements):
     """RPython hint that the given dict (or r_dict) will soon be
     enlarged by n_elements."""