[pypy-commit] pypy jit-targets: merge heads

arigo noreply at buildbot.pypy.org
Thu Nov 24 22:57:51 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: jit-targets
Changeset: r49765:c034ba0e1478
Date: 2011-11-24 22:57 +0100
http://bitbucket.org/pypy/pypy/changeset/c034ba0e1478/

Log:	merge heads

diff --git a/pypy/jit/backend/x86/assembler.py b/pypy/jit/backend/x86/assembler.py
--- a/pypy/jit/backend/x86/assembler.py
+++ b/pypy/jit/backend/x86/assembler.py
@@ -690,7 +690,10 @@
                    ResOperation(rop.INT_ADD, [box, ConstInt(1)], box2),
                    ResOperation(rop.SETFIELD_RAW, [c_adr, box2],
                                 None, descr=self.debug_counter_descr)]
-            operations = ops + operations
+            if operations[0].getopnum() == rop.LABEL:
+                operations = [operations[0]] + ops + operations[1:]
+            else:
+                operations =  ops + operations
         return operations
 
     def _assemble(self, regalloc, operations):
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.append(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))
diff --git a/pypy/rlib/rsre/test/test_zjit.py b/pypy/rlib/rsre/test/test_zjit.py
--- a/pypy/rlib/rsre/test/test_zjit.py
+++ b/pypy/rlib/rsre/test/test_zjit.py
@@ -70,7 +70,8 @@
     def test_simple_match_repeated(self):
         res = self.meta_interp_match(r"abcdef", "abcdef", repeat=10)
         assert res == 6
-        self.check_tree_loop_count(1)
+        self.check_trace_count(1)
+        self.check_jitcell_token_count(1)
 
     def test_match_minrepeat_1(self):
         res = self.meta_interp_match(r".*?abc", "xxxxxxxxxxxxxxabc")


More information about the pypy-commit mailing list