Author: Philip Jenvey <[email protected]>
Branch: remove-intlong-smm
Changeset: r69139:47afe1f67e8f
Date: 2014-02-14 12:03 -0800
http://bitbucket.org/pypy/pypy/changeset/47afe1f67e8f/

Log:    maybe less work for the typical path

diff --git a/pypy/objspace/std/intobject.py b/pypy/objspace/std/intobject.py
--- a/pypy/objspace/std/intobject.py
+++ b/pypy/objspace/std/intobject.py
@@ -498,13 +498,11 @@
         return float(self.intval)
 
     def int(self, space):
-        if (type(self) is not W_IntObject and
-            space.is_overloaded(self, space.w_int, '__int__')):
-            return W_Root.int(self, space)
-        if space.is_w(space.type(self), space.w_int):
+        if type(self) is W_IntObject:
             return self
-        a = self.intval
-        return space.newint(a)
+        if not space.is_overloaded(self, space.w_int, '__int__'):
+            return space.newint(self.intval)
+        return W_Root.int(self, space)
 
 
 def _recover_with_smalllong(space):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to