[pypy-svn] r36666 - pypy/branch/i386-regalloc/pypy/jit/codegen/i386
arigo at codespeak.net
arigo at codespeak.net
Sat Jan 13 16:27:37 CET 2007
Author: arigo
Date: Sat Jan 13 16:27:36 2007
New Revision: 36666
Modified:
pypy/branch/i386-regalloc/pypy/jit/codegen/i386/rgenop.py
Log:
Fix jumps back to the same currently-open block.
Modified: pypy/branch/i386-regalloc/pypy/jit/codegen/i386/rgenop.py
==============================================================================
--- pypy/branch/i386-regalloc/pypy/jit/codegen/i386/rgenop.py (original)
+++ pypy/branch/i386-regalloc/pypy/jit/codegen/i386/rgenop.py Sat Jan 13 16:27:36 2007
@@ -689,7 +689,12 @@
def finish_and_goto(self, outputargs_gv, targetlbl):
operands = targetlbl.inputoperands
if operands is None:
- raise NotImplementedError
+ # this occurs when jumping back to the same currently-open block;
+ # close the block and re-open it
+ self.pause_writing(outputargs_gv)
+ self.start_writing()
+ operands = targetlbl.inputoperands
+ assert operands is not None
mc = self.generate_block_code(outputargs_gv, outputargs_gv, operands)
mc.JMP(rel32(targetlbl.targetaddr))
self.rgenop.close_mc(mc)
More information about the Pypy-commit
mailing list