Commits

Maciej Fijalkowski  committed 2a4d96b

RPython fixes

  • Participants
  • Parent commits ccf0847
  • Branches out-of-line-guards

Comments (0)

Files changed (1)

File pypy/jit/metainterp/optimizeopt/rewrite.py

 
     def optimize_GUARD_TRUE(self, op):
         value = self.getvalue(op.getarg(0))
-        v = self.optimizer.int_to_bool_nullity.get(value)
+        v = self.optimizer.int_to_bool_nullity.get(value, None)
         if v:
             v, int_is_true = v
             if int_is_true:
 
     def optimize_GUARD_FALSE(self, op):
         value = self.getvalue(op.getarg(0))
-        v = self.optimizer.int_to_bool_nullity.get(value)
+        v = self.optimizer.int_to_bool_nullity.get(value, None)
         if v:
             v, int_is_true = v
             if int_is_true: