Author: Ronan Lamy <[email protected]>
Branch: framestate
Changeset: r74684:1ee1acf65ff1
Date: 2014-05-05 02:28 +0100
http://bitbucket.org/pypy/pypy/changeset/1ee1acf65ff1/

Log:    Add SETUP_EXCEPT instruction

diff --git a/rpython/flowspace/bytecode.py b/rpython/flowspace/bytecode.py
--- a/rpython/flowspace/bytecode.py
+++ b/rpython/flowspace/bytecode.py
@@ -331,6 +331,13 @@
     target_block, _ = graph.pos_index[self.arg]
     graph.add_jump(block, target_block)
 
+@bc_reader.register_opcode
+class SETUP_EXCEPT(BCInstruction):
+    def eval(self, ctx):
+        from rpython.flowspace.flowcontext import ExceptBlock
+        block = ExceptBlock(ctx, self.arg)
+        ctx.blockstack.append(block)
+
 _unary_ops = [
     ('UNARY_POSITIVE', op.pos),
     ('UNARY_NEGATIVE', op.neg),
diff --git a/rpython/flowspace/flowcontext.py b/rpython/flowspace/flowcontext.py
--- a/rpython/flowspace/flowcontext.py
+++ b/rpython/flowspace/flowcontext.py
@@ -734,10 +734,6 @@
         block = LoopBlock(self, target)
         self.blockstack.append(block)
 
-    def SETUP_EXCEPT(self, target):
-        block = ExceptBlock(self, target)
-        self.blockstack.append(block)
-
     def SETUP_FINALLY(self, target):
         block = FinallyBlock(self, target)
         self.blockstack.append(block)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to