[pypy-commit] pypy recent-pure-ops: Add more precise assertions than just one comment

arigo noreply at buildbot.pypy.org
Fri Mar 6 19:04:09 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: recent-pure-ops
Changeset: r76262:e1cfdc63467c
Date: 2015-03-06 19:04 +0100
http://bitbucket.org/pypy/pypy/changeset/e1cfdc63467c/

Log:	Add more precise assertions than just one comment

diff --git a/rpython/jit/metainterp/resoperation.py b/rpython/jit/metainterp/resoperation.py
--- a/rpython/jit/metainterp/resoperation.py
+++ b/rpython/jit/metainterp/resoperation.py
@@ -594,6 +594,13 @@
         oparity.append(arity)
         opwithdescr.append(withdescr)
     assert len(opclasses) == len(oparity) == len(opwithdescr) == len(_oplist)
+    # for optimizeopt/pure.py's getrecentops()
+    assert (rop.INT_ADD_OVF - rop._OVF_FIRST ==
+            rop.INT_ADD - rop._ALWAYS_PURE_FIRST)
+    assert (rop.INT_SUB_OVF - rop._OVF_FIRST ==
+            rop.INT_SUB - rop._ALWAYS_PURE_FIRST)
+    assert (rop.INT_MUL_OVF - rop._OVF_FIRST ==
+            rop.INT_MUL - rop._ALWAYS_PURE_FIRST)
 
 def get_base_class(mixin, base):
     try:


More information about the pypy-commit mailing list