Author: Maciej Fijalkowski <[email protected]>
Branch: vmprof
Changeset: r75683:c93a10fdfeef
Date: 2015-02-03 20:05 +0200
http://bitbucket.org/pypy/pypy/changeset/c93a10fdfeef/
Log: add some asserts
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
@@ -52,5 +52,13 @@
pos = self.patch_position.pop()
self.l[pos] = size
self.l[pos + 1] = len(self.l)
+ # at the end there should be no zeros
+ for i in range(len(self.l) / 4):
+ item = self.l[i * 4] # unique_id
+ assert item > 0 # no zeros here
+ item = self.l[i * 4 + 2] # end in asm
+ assert item > 0
+ item = self.l[i * 4 + 3] # end in l
+ assert item > 0
return (addr, size, self.l) # XXX compact self.l
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit