Author: Armin Rigo <ar...@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) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit