[pypy-commit] pypy jit-targets: fix test

hakanardo noreply at buildbot.pypy.org
Thu Nov 24 20:12:38 CET 2011


Author: Hakan Ardo <hakan at debian.org>
Branch: jit-targets
Changeset: r49750:a831e44587ae
Date: 2011-11-24 07:39 +0100
http://bitbucket.org/pypy/pypy/changeset/a831e44587ae/

Log:	fix test

diff --git a/pypy/jit/metainterp/history.py b/pypy/jit/metainterp/history.py
--- a/pypy/jit/metainterp/history.py
+++ b/pypy/jit/metainterp/history.py
@@ -992,6 +992,7 @@
         self.aborted_count = 0
 
     def add_jitcell_token(self, token):
+        assert isinstance(token, JitCellToken)
         self.jitcell_token_wrefs.add(weakref.ref(token))
         
     def set_history(self, history):
diff --git a/pypy/module/pypyjit/test/test_jit_hook.py b/pypy/module/pypyjit/test/test_jit_hook.py
--- a/pypy/module/pypyjit/test/test_jit_hook.py
+++ b/pypy/module/pypyjit/test/test_jit_hook.py
@@ -3,7 +3,7 @@
 from pypy.conftest import gettestobjspace, option
 from pypy.interpreter.pycode import PyCode
 from pypy.interpreter.gateway import interp2app
-from pypy.jit.metainterp.history import LoopToken
+from pypy.jit.metainterp.history import JitCellToken
 from pypy.jit.metainterp.resoperation import ResOperation, rop
 from pypy.jit.metainterp.logger import Logger
 from pypy.rpython.annlowlevel import (cast_instance_to_base_ptr,
@@ -41,11 +41,11 @@
         """, namespace={'ptr0': code_gcref}).operations
 
         def interp_on_compile():
-            pypyjitdriver.on_compile(logger, LoopToken(), oplist, 'loop',
+            pypyjitdriver.on_compile(logger, JitCellToken(), oplist, 'loop',
                                      0, False, ll_code)
 
         def interp_on_compile_bridge():
-            pypyjitdriver.on_compile_bridge(logger, LoopToken(), oplist, 0)
+            pypyjitdriver.on_compile_bridge(logger, JitCellToken(), oplist, 0)
         
         cls.w_on_compile = space.wrap(interp2app(interp_on_compile))
         cls.w_on_compile_bridge = space.wrap(interp2app(interp_on_compile_bridge))


More information about the pypy-commit mailing list