[pypy-commit] pypy framestate: Directly call ctx.unroll() in some cases

rlamy noreply at buildbot.pypy.org
Tue Feb 10 18:44:01 CET 2015


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: framestate
Changeset: r75804:f4c41b6cf812
Date: 2015-02-10 01:17 +0000
http://bitbucket.org/pypy/pypy/changeset/f4c41b6cf812/

Log:	Directly call ctx.unroll() in some cases

diff --git a/rpython/flowspace/bytecode.py b/rpython/flowspace/bytecode.py
--- a/rpython/flowspace/bytecode.py
+++ b/rpython/flowspace/bytecode.py
@@ -529,7 +529,7 @@
 class BREAK_LOOP(BCInstruction):
     def eval(self, ctx):
         from rpython.flowspace.flowcontext import Break
-        raise Break
+        return ctx.unroll(Break())
 
 @bc_reader.register_opcode
 class CONTINUE_LOOP(BCInstruction):
@@ -539,7 +539,7 @@
 
     def eval(self, ctx):
         from rpython.flowspace.flowcontext import Continue
-        raise Continue(self.target)
+        return ctx.unroll(Continue(self.target))
 
 class SetupInstruction(BCInstruction):
     def bc_flow(self, reader):


More information about the pypy-commit mailing list