[pypy-svn] r34164 - pypy/dist/pypy/jit/hintannotator

arigo at codespeak.net arigo at codespeak.net
Sat Nov 4 13:26:06 CET 2006


Author: arigo
Date: Sat Nov  4 13:26:04 2006
New Revision: 34164

Modified:
   pypy/dist/pypy/jit/hintannotator/model.py
Log:
Avoid crashing on the debug_assert operation.


Modified: pypy/dist/pypy/jit/hintannotator/model.py
==============================================================================
--- pypy/dist/pypy/jit/hintannotator/model.py	(original)
+++ pypy/dist/pypy/jit/hintannotator/model.py	Sat Nov  4 13:26:04 2006
@@ -15,7 +15,8 @@
                       cast_char_to_int
                       cast_bool_to_int
                       ptr_nonzero
-                      ptr_iszero""".split()
+                      ptr_iszero
+                      debug_assert""".split()
 
 BINARY_OPERATIONS = """int_add int_sub int_mul int_mod int_and int_rshift int_floordiv int_xor int_or
                        uint_add uint_sub uint_mul uint_mod uint_and uint_lshift uint_rshift uint_floordiv
@@ -273,7 +274,10 @@
 
         raise HintError("hint %s makes no sense on %r" % (hs_flags.const,
                                                           hs_v1))
-    
+
+    def debug_assert(hs_v1, *args_hs):
+        pass
+
     def getfield(hs_v1, hs_fieldname):
         S = hs_v1.concretetype.TO
         FIELD_TYPE = getattr(S, hs_fieldname.const)
@@ -341,6 +345,9 @@
                                           deepfrozen = True)
         return SomeLLAbstractValue.hint(hs_c1, hs_flags)
 
+    def debug_assert(hs_c1, *args_hs):
+        pass
+
     def direct_call(hs_f1, *args_hs):
         bookkeeper = getbookkeeper()
         fnobj = hs_f1.const._obj



More information about the Pypy-commit mailing list