[pypy-commit] pypy default: Translation fixes

arigo noreply at buildbot.pypy.org
Thu Jul 3 20:03:46 CEST 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r72333:bc07df429f7b
Date: 2014-07-03 18:20 +0200
http://bitbucket.org/pypy/pypy/changeset/bc07df429f7b/

Log:	Translation fixes

diff --git a/pypy/module/pypyjit/policy.py b/pypy/module/pypyjit/policy.py
--- a/pypy/module/pypyjit/policy.py
+++ b/pypy/module/pypyjit/policy.py
@@ -13,19 +13,21 @@
         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
 
diff --git a/rpython/rlib/objectmodel.py b/rpython/rlib/objectmodel.py
--- a/rpython/rlib/objectmodel.py
+++ b/rpython/rlib/objectmodel.py
@@ -740,6 +740,7 @@
         return repr(self.key)
 
 
+ at 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."""


More information about the pypy-commit mailing list