Author: Tim Felgentreff <[email protected]>
Branch: 
Changeset: r275:69e7111b08cb
Date: 2013-04-16 13:11 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/69e7111b08cb/

Log:    revert ovfcheck on LPI left shift

diff --git a/spyvm/model.py b/spyvm/model.py
--- a/spyvm/model.py
+++ b/spyvm/model.py
@@ -267,15 +267,12 @@
         return "W_LargePositiveInteger1Word(%d)" % r_uint(self.value)
 
     def lshift(self, space, shift):
-        from rpython.rlib.rarithmetic import ovfcheck, intmask, r_uint
+        from rpython.rlib.rarithmetic import intmask, r_uint
         # shift > 0, therefore the highest bit of upperbound is not set,
         # i.e. upperbound is positive
         upperbound = intmask(r_uint(-1) >> shift)
         if 0 <= self.value <= upperbound:
-            try:
-                shifted = intmask(ovfcheck(self.value << shift))
-            except OverflowError:
-                raise error.PrimitiveFailedError()
+            shifted = intmask(self.value << shift)
             return space.wrap_positive_32bit_int(shifted)
         else:
             raise error.PrimitiveFailedError()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to