Commits

Philip Jenvey committed 3b13a84

cleanup

  • Participants
  • Parent commits 88b0527
  • Branches remove-intlong-smm

Comments (0)

Files changed (2)

File pypy/objspace/std/intobject.py

     descr_add, descr_radd = _make_generic_descr_binop('add')
     descr_sub, descr_rsub = _make_generic_descr_binop('sub')
     descr_mul, descr_rmul = _make_generic_descr_binop('mul')
+
     descr_and, descr_rand = _make_generic_descr_binop('and', ovf=False)
     descr_or, descr_ror = _make_generic_descr_binop('or', ovf=False)
     descr_xor, descr_rxor = _make_generic_descr_binop('xor', ovf=False)

File pypy/objspace/std/smalllongobject.py

         return W_SmallLongObject(res)
     descr_and, descr_rand = _make_descr_binop(_and, ovf=False)
 
+    def _or(self, space, w_other):
+        a = self.longlong
+        b = w_other.longlong
+        res = a | b
+        return W_SmallLongObject(res)
+    descr_or, descr_ror = _make_descr_binop(_or, ovf=False)
+
     def _xor(self, space, w_other):
         a = self.longlong
         b = w_other.longlong
         return W_SmallLongObject(res)
     descr_xor, descr_rxor = _make_descr_binop(_xor, ovf=False)
 
-    def _or(self, space, w_other):
-        a = self.longlong
-        b = w_other.longlong
-        res = a | b
-        return W_SmallLongObject(res)
-    descr_or, descr_ror = _make_descr_binop(_or, ovf=False)
-
-
-# ____________________________________________________________
 
 def _llong_mul_ovf(a, b):
     # xxx duplication of the logic from translator/c/src/int.h
         return longprod
     raise OverflowError("integer multiplication")
 
-# ____________________________________________________________
 
 def delegate_SmallLong2Float(space, w_small):
     return space.newfloat(float(w_small.longlong))
 
+
 def delegate_SmallLong2Complex(space, w_small):
     return space.newcomplex(float(w_small.longlong), 0.0)
 
+
 def _int2small(space, w_int):
     # XXX: W_IntObject.descr_long should probably return W_SmallLongs
     return W_SmallLongObject(r_longlong(w_int.int_w(space)))
 
+
 def _small2long(space, w_small):
     return W_LongObject(w_small.asbigint())
 
+
 def _pow_impl(space, iv, w_int2, iz):
     iw = space.int_w(w_int2)
     if iw < 0:
         ix %= iz
     return W_SmallLongObject(ix)
 
+
 def add_ovr(space, w_int1, w_int2):
     x = r_longlong(space.int_w(w_int1))
     y = r_longlong(space.int_w(w_int2))