Commits

Armin Rigo committed 193a44c

isinstance(x, int) -> is_valid_int(x)

  • Participants
  • Parent commits 0e936d2

Comments (0)

Files changed (1)

File pypy/jit/metainterp/history.py

 from pypy.rpython.ootypesystem import ootype
 from pypy.rlib.objectmodel import we_are_translated, Symbolic
 from pypy.rlib.objectmodel import compute_unique_id
-from pypy.rlib.rarithmetic import r_int64
+from pypy.rlib.rarithmetic import r_int64, is_valid_int
 from pypy.conftest import option
 
 from pypy.jit.metainterp.resoperation import ResOperation, rop
 
     def __init__(self, value):
         if not we_are_translated():
-            if isinstance(value, int):
+            if is_valid_int(value):
                 value = int(value)    # bool -> int
             else:
                 assert isinstance(value, Symbolic)