[pypy-commit] pypy default: Add a precise assert that will crash more cleanly than in the following 'if...'.

arigo noreply at buildbot.pypy.org
Thu Jul 14 15:12:46 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r45592:1163bf4021a2
Date: 2011-07-14 15:12 +0200
http://bitbucket.org/pypy/pypy/changeset/1163bf4021a2/

Log:	Add a precise assert that will crash more cleanly than in the
	following 'if...'.

diff --git a/pypy/jit/codewriter/regalloc.py b/pypy/jit/codewriter/regalloc.py
--- a/pypy/jit/codewriter/regalloc.py
+++ b/pypy/jit/codewriter/regalloc.py
@@ -96,6 +96,7 @@
 
     def _try_coalesce(self, v, w):
         if isinstance(v, Variable) and getkind(v.concretetype) == self.kind:
+            assert getkind(w.concretetype) == self.kind
             dg = self._depgraph
             uf = self._unionfind
             v0 = uf.find_rep(v)


More information about the pypy-commit mailing list