[pypy-commit] pypy jit-targets: first test with a brigde passing

hakanardo noreply at buildbot.pypy.org
Sun Nov 6 10:46:24 CET 2011


Author: Hakan Ardo <hakan at debian.org>
Branch: jit-targets
Changeset: r48812:a5e1ecd1e6cf
Date: 2011-11-06 10:13 +0100
http://bitbucket.org/pypy/pypy/changeset/a5e1ecd1e6cf/

Log:	first test with a brigde passing

diff --git a/pypy/jit/metainterp/compile.py b/pypy/jit/metainterp/compile.py
--- a/pypy/jit/metainterp/compile.py
+++ b/pypy/jit/metainterp/compile.py
@@ -77,7 +77,8 @@
             # test_memgr.py)
             if descr.procedure_token is not looptoken:
                 looptoken.record_jump_to(descr.procedure_token)
-            op._descr = None    # clear reference, mostly for tests
+            # FIXME: Why? How is the jump supposed to work without a target??
+            #op._descr = None    # clear reference, mostly for tests
             if not we_are_translated():
                 op._jumptarget_number = descr.procedure_token.number
     # record this looptoken on the QuasiImmut used in the code
@@ -631,9 +632,6 @@
     new_loop.inputargs = inputargs = metainterp.history.inputargs[:]
     # clone ops, as optimize_bridge can mutate the ops
 
-    # A LABEL with descr=None will be killed by optimizer. Its only use
-    # is to pass along the inputargs to the optimizer
-    #[ResOperation(rop.LABEL, inputargs, None, descr=None)] + \
     new_loop.operations = [op.clone() for op in metainterp.history.operations]
     metainterp_sd = metainterp.staticdata
     state = metainterp.jitdriver_sd.warmstate
@@ -653,6 +651,7 @@
     # know exactly what we must do (ResumeGuardDescr/ResumeFromInterpDescr)
     resumekey.compile_and_attach(metainterp, new_loop)
     record_loop_or_bridge(metainterp_sd, new_loop)
+
     return new_loop.operations[-1].getdescr()
 
 # ____________________________________________________________
diff --git a/pypy/jit/metainterp/optimizeopt/unroll.py b/pypy/jit/metainterp/optimizeopt/unroll.py
--- a/pypy/jit/metainterp/optimizeopt/unroll.py
+++ b/pypy/jit/metainterp/optimizeopt/unroll.py
@@ -67,8 +67,6 @@
         loop = self.optimizer.loop
         self.optimizer.clear_newoperations()
 
-        import pdb; pdb.set_trace()
-
         start_label = loop.operations[0]
         if start_label.getopnum() == rop.LABEL:
             loop.operations = loop.operations[1:]
diff --git a/pypy/jit/metainterp/test/test_ajit.py b/pypy/jit/metainterp/test/test_ajit.py
--- a/pypy/jit/metainterp/test/test_ajit.py
+++ b/pypy/jit/metainterp/test/test_ajit.py
@@ -235,7 +235,7 @@
         assert res == 1692
         self.check_loop_count(3)
         self.check_resops({'int_lt': 2, 'int_gt': 4, 'guard_false': 2,
-                           'guard_true': 4, 'int_sub': 4, 'jump': 4,
+                           'guard_true': 4, 'int_sub': 4, 'jump': 3,
                            'int_mul': 3, 'int_add': 4})
 
     def test_loop_invariant_intbox(self):


More information about the pypy-commit mailing list