[pypy-commit] pypy framestate: wip

rlamy noreply at buildbot.pypy.org
Mon Nov 24 17:30:18 CET 2014


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: framestate
Changeset: r74704:fa3cd9adfed5
Date: 2014-11-24 02:19 +0000
http://bitbucket.org/pypy/pypy/changeset/fa3cd9adfed5/

Log:	wip

diff --git a/rpython/flowspace/bytecode.py b/rpython/flowspace/bytecode.py
--- a/rpython/flowspace/bytecode.py
+++ b/rpython/flowspace/bytecode.py
@@ -221,9 +221,9 @@
     def next_pos(self, opcode):
         return self._next_pos[opcode.offset]
 
-    def add_jump(self, block, target_block):
+    def add_jump(self, block, target_block, target_offset):
         last_op = block.operations[-1]
-        self._next_pos[last_op.offset] = target_block.startpos
+        self._next_pos[last_op.offset] = target_offset
         block.set_exits([target_block])
 
 
@@ -401,7 +401,7 @@
     block = reader.curr_block
     graph = reader.graph
     target_block = reader.get_block_at(self.arg)
-    graph.add_jump(block, target_block)
+    graph.add_jump(block, target_block, self.arg)
 
 def prepare(self, reader):
     block = reader.curr_block
@@ -416,7 +416,7 @@
     block = reader.curr_block
     graph = reader.graph
     target_block = reader.get_block_at(self.arg)
-    graph.add_jump(block, target_block)
+    graph.add_jump(block, target_block, self.arg)
 
 def prepare(self, reader):
     block = reader.curr_block


More information about the pypy-commit mailing list