[pypy-commit] pypy vmprof: The new test should never occur in practice. Add an assert and
arigo
noreply at buildbot.pypy.org
Sat Apr 4 12:11:50 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch: vmprof
Changeset: r76710:c6efe755d7b3
Date: 2015-04-04 12:11 +0200
http://bitbucket.org/pypy/pypy/changeset/c6efe755d7b3/
Log: The new test should never occur in practice. Add an assert and an
explanation.
diff --git a/rpython/jit/backend/llsupport/codemap.py b/rpython/jit/backend/llsupport/codemap.py
--- a/rpython/jit/backend/llsupport/codemap.py
+++ b/rpython/jit/backend/llsupport/codemap.py
@@ -151,6 +151,12 @@
return
assert unique_id & 1 == 0
if call_depth > self.last_call_depth:
+ assert call_depth == self.last_call_depth + 1
+ # ^^^ It should never be the case that we see
+ # debug_merge_points that suddenly go more than *one*
+ # call deeper than the previous one (unless we're at
+ # the start of a bridge, handled by
+ # inherit_code_from_position()).
self.l.append(unique_id)
self.l.append(pos) # <- this is a relative pos
self.patch_position.append(len(self.l))
diff --git a/rpython/jit/backend/llsupport/test/test_codemap.py b/rpython/jit/backend/llsupport/test/test_codemap.py
--- a/rpython/jit/backend/llsupport/test/test_codemap.py
+++ b/rpython/jit/backend/llsupport/test/test_codemap.py
@@ -91,8 +91,3 @@
codemap.free_asm_block(200, 300)
assert unpack_traceback(225) == []
codemap.free()
-
-def test_codemaps_bug1():
- builder = CodemapBuilder()
- builder.debug_merge_point(3, 102, 0)
- builder.debug_merge_point(0, 104, 10)
More information about the pypy-commit
mailing list