[pypy-commit] pypy jitypes2: fix the jit hook to use the new logger interface

antocuni noreply at buildbot.pypy.org
Mon Jun 6 10:18:40 CEST 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: jitypes2
Changeset: r44729:7d62ff210f3e
Date: 2011-06-06 10:16 +0200
http://bitbucket.org/pypy/pypy/changeset/7d62ff210f3e/

Log:	fix the jit hook to use the new logger interface

diff --git a/pypy/jit/metainterp/logger.py b/pypy/jit/metainterp/logger.py
--- a/pypy/jit/metainterp/logger.py
+++ b/pypy/jit/metainterp/logger.py
@@ -53,7 +53,6 @@
         return logops
 
     def _make_log_operations(self):
-        # hook for tests
         return LogOperations(self.metainterp_sd, self.guard_number)
 
 
diff --git a/pypy/module/pypyjit/interp_jit.py b/pypy/module/pypyjit/interp_jit.py
--- a/pypy/module/pypyjit/interp_jit.py
+++ b/pypy/module/pypyjit/interp_jit.py
@@ -58,8 +58,8 @@
         space = self.space
         cache = space.fromcache(Cache)
         if space.is_true(cache.w_compile_hook):
-            memo = {}
-            list_w = [space.wrap(logger.repr_of_resop(memo, op))
+            logops = logger._make_log_operations()
+            list_w = [space.wrap(logops.repr_of_resop(op))
                       for op in operations]
             pycode = cast_base_ptr_to_instance(PyCode, ll_pycode)
             try:
@@ -77,8 +77,8 @@
         space = self.space
         cache = space.fromcache(Cache)
         if space.is_true(cache.w_compile_hook):
-            memo = {}
-            list_w = [space.wrap(logger.repr_of_resop(memo, op))
+            logops = logger._make_log_operations()
+            list_w = [space.wrap(logops.repr_of_resop(op))
                       for op in operations]
             try:
                 space.call_function(cache.w_compile_hook,


More information about the pypy-commit mailing list