Author: Armin Rigo <[email protected]>
Branch: jit-singlefloat
Changeset: r46085:d373caa523ad
Date: 2011-07-29 11:40 +0200
http://bitbucket.org/pypy/pypy/changeset/d373caa523ad/
Log: Missing a case: wrap(longlong).
diff --git a/pypy/jit/metainterp/test/test_warmstate.py
b/pypy/jit/metainterp/test/test_warmstate.py
--- a/pypy/jit/metainterp/test/test_warmstate.py
+++ b/pypy/jit/metainterp/test/test_warmstate.py
@@ -40,6 +40,10 @@
assert _is(wrap(None, 42, in_const_box=True), ConstInt(42))
assert _is(wrap(None, 42.5, in_const_box=True), constfloat(42.5))
assert _is(wrap(None, p, in_const_box=True), ConstPtr(po))
+ if longlong.supports_longlong:
+ import sys
+ value = longlong.r_float_storage(sys.maxint*17)
+ assert _is(wrap(None, value), BoxFloat(value))
def test_hash_equal_whatever_lltype():
s1 = rstr.mallocstr(2)
diff --git a/pypy/jit/metainterp/warmstate.py b/pypy/jit/metainterp/warmstate.py
--- a/pypy/jit/metainterp/warmstate.py
+++ b/pypy/jit/metainterp/warmstate.py
@@ -84,8 +84,10 @@
return history.ConstObj(value)
else:
return history.BoxObj(value)
- elif isinstance(value, float):
- value = longlong.getfloatstorage(value)
+ elif (isinstance(value, float) or
+ longlong.is_longlong(lltype.typeOf(value))):
+ if isinstance(value, float):
+ value = longlong.getfloatstorage(value)
if in_const_box:
return history.ConstFloat(value)
else:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit