Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r49928:d0d82346acf2 Date: 2011-11-28 19:08 +0100 http://bitbucket.org/pypy/pypy/changeset/d0d82346acf2/
Log: Fix. 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 @@ -1021,21 +1021,16 @@ # a jump back to itself and possibly a few bridges ending with finnish. # Only the operations within the loop formed by that single jump will # be counted. + + # XXX hacked version, ignore and remove me when jit-targets is merged. loops = self.get_all_loops() + loops = [loop for loop in loops if 'Preamble' not in repr(loop)] #XXX assert len(loops) == 1 - loop = loops[0] + loop, = loops jumpop = loop.operations[-1] assert jumpop.getopnum() == rop.JUMP - assert self.check_resops(jump=1) - labels = [op for op in loop.operations if op.getopnum() == rop.LABEL] - targets = [op._descr_wref() for op in labels] - assert None not in targets # TargetToken was freed, give up - target = jumpop._descr_wref() - assert target - assert targets.count(target) == 1 - i = loop.operations.index(labels[targets.index(target)]) insns = {} - for op in loop.operations[i:]: + for op in loop.operations: opname = op.getopname() insns[opname] = insns.get(opname, 0) + 1 return self._check_insns(insns, expected, check) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit