[pypy-commit] pypy default: Make really JUMP_IF_NOT_DEBUG's target relative.
arigo
noreply at buildbot.pypy.org
Tue Jun 4 11:58:56 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r64763:ea2d3e68529d
Date: 2013-06-04 11:52 +0200
http://bitbucket.org/pypy/pypy/changeset/ea2d3e68529d/
Log: Make really JUMP_IF_NOT_DEBUG's target relative.
diff --git a/pypy/interpreter/astcompiler/codegen.py b/pypy/interpreter/astcompiler/codegen.py
--- a/pypy/interpreter/astcompiler/codegen.py
+++ b/pypy/interpreter/astcompiler/codegen.py
@@ -373,7 +373,7 @@
def visit_Assert(self, asrt):
self.update_position(asrt.lineno)
end = self.new_block()
- self.emit_jump(ops.JUMP_IF_NOT_DEBUG, end, True)
+ self.emit_jump(ops.JUMP_IF_NOT_DEBUG, end)
asrt.test.accept_jump_if(self, True, end)
self.emit_op_name(ops.LOAD_GLOBAL, self.names, "AssertionError")
if asrt.msg:
diff --git a/pypy/interpreter/pyopcode.py b/pypy/interpreter/pyopcode.py
--- a/pypy/interpreter/pyopcode.py
+++ b/pypy/interpreter/pyopcode.py
@@ -876,9 +876,9 @@
self.popvalue()
return next_instr
- def JUMP_IF_NOT_DEBUG(self, target, next_instr):
+ def JUMP_IF_NOT_DEBUG(self, jumpby, next_instr):
if not self.space.sys.debug:
- return target
+ next_instr += jumpby
return next_instr
def GET_ITER(self, oparg, next_instr):
More information about the pypy-commit
mailing list