[pypy-commit] pypy default: disable reciprocal until it can translate
bdkearns
noreply at buildbot.pypy.org
Tue Feb 26 09:19:14 CET 2013
Author: Brian Kearns <bdkearns at gmail.com>
Branch:
Changeset: r61815:6df9ec9e24d4
Date: 2013-02-26 03:18 -0500
http://bitbucket.org/pypy/pypy/changeset/6df9ec9e24d4/
Log: disable reciprocal until it can translate
diff --git a/pypy/module/micronumpy/types.py b/pypy/module/micronumpy/types.py
--- a/pypy/module/micronumpy/types.py
+++ b/pypy/module/micronumpy/types.py
@@ -502,16 +502,17 @@
def invert(self, v):
return ~v
- @simple_unary_op
- def reciprocal(self, v):
- if v == 0:
- # XXX good place to warn
- if self.T in (rffi.INT, rffi.LONG):
- return most_neg_value_of(self.T)
+ if 0: # XXX breaks translation
+ @simple_unary_op
+ def reciprocal(self, v):
+ if v == 0:
+ # XXX good place to warn
+ if self.T in (rffi.INT, rffi.LONG):
+ return most_neg_value_of(self.T)
+ return 0
+ if v == 1 or v == -1:
+ return v
return 0
- if v == 1 or v == -1:
- return v
- return 0
@raw_unary_op
def signbit(self, v):
More information about the pypy-commit
mailing list