[pypy-commit] pypy optresult-unroll: ups you can't compare floats with ==
fijal
noreply at buildbot.pypy.org
Sun Sep 6 09:56:59 CEST 2015
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: optresult-unroll
Changeset: r79466:1e183beac86b
Date: 2015-09-06 09:57 +0200
http://bitbucket.org/pypy/pypy/changeset/1e183beac86b/
Log: ups you can't compare floats with ==
diff --git a/rpython/jit/metainterp/pyjitpl.py b/rpython/jit/metainterp/pyjitpl.py
--- a/rpython/jit/metainterp/pyjitpl.py
+++ b/rpython/jit/metainterp/pyjitpl.py
@@ -726,7 +726,10 @@
assert resvalue == upd.currfieldbox.getref_base()
else:
assert type == 'f'
- assert resvalue == upd.currfieldbox.getfloatstorage()
+ # make the comparison more robust again NaNs
+ # see ConstFloat.same_constant
+ assert ConstFloat(resvalue).same_constant(
+ upd.currfieldbox.constbox())
return upd.currfieldbox
resbox = self.execute_with_descr(opnum, fielddescr, box)
upd.getfield_now_known(resbox)
More information about the pypy-commit
mailing list