Author: Ronan Lamy <[email protected]>
Branch: fix-broken-types
Changeset: r88565:dc76b2116960
Date: 2016-11-23 03:23 +0000
http://bitbucket.org/pypy/pypy/changeset/dc76b2116960/

Log:    fixes

diff --git a/rpython/jit/metainterp/jitprof.py 
b/rpython/jit/metainterp/jitprof.py
--- a/rpython/jit/metainterp/jitprof.py
+++ b/rpython/jit/metainterp/jitprof.py
@@ -52,8 +52,8 @@
 class Profiler(BaseProfiler):
     initialized = False
     timer = staticmethod(time.time)
-    starttime = 0
-    t1 = 0
+    starttime = 0.
+    t1 = 0.
     times = None
     counters = None
     calls = 0
@@ -63,7 +63,7 @@
     def start(self):
         self.starttime = self.timer()
         self.t1 = self.starttime
-        self.times = [0, 0]
+        self.times = [0., 0.]
         self.counters = [0] * (Counters.ncounters - _CPU_LINES)
         self.calls = 0
         self.current = []
diff --git a/rpython/jit/metainterp/test/test_vector.py 
b/rpython/jit/metainterp/test/test_vector.py
--- a/rpython/jit/metainterp/test/test_vector.py
+++ b/rpython/jit/metainterp/test/test_vector.py
@@ -478,7 +478,7 @@
             va = lltype.malloc(T, d, flavor='raw', zero=True)
             for i in range(d):
                 va[i] = value
-            r = 0
+            r = 0.
             i = 0
             k = d + 2
             # in this case a guard k <= d is inserted which fails right away!
diff --git a/rpython/rlib/rstruct/ieee.py b/rpython/rlib/rstruct/ieee.py
--- a/rpython/rlib/rstruct/ieee.py
+++ b/rpython/rlib/rstruct/ieee.py
@@ -68,7 +68,7 @@
             exp = r_ulonglong(0x7ff) << 52
             sign = r_ulonglong(sign) << 63
             if MANT_DIG < 53:
-                mant = r_ulonglong(mant) << (53 - MANT_DIG) 
+                mant = r_ulonglong(mant) << (53 - MANT_DIG)
             if mant == 0:
                 result = rfloat.NAN
             else:
@@ -77,11 +77,11 @@
             return result
     elif exp == 0:
         # subnormal or zero
-        result = math.ldexp(mant, MIN_EXP - MANT_DIG)
+        result = math.ldexp(float(mant), MIN_EXP - MANT_DIG)
     else:
         # normal: add implicit one value
         mant += one << MANT_DIG - 1
-        result = math.ldexp(mant, exp + MIN_EXP - MANT_DIG - 1)
+        result = math.ldexp(float(mant), exp + MIN_EXP - MANT_DIG - 1)
     return -result if sign else result
 
 def float_unpack80(QQ, size):
diff --git a/rpython/rlib/test/test_longlong2float.py 
b/rpython/rlib/test/test_longlong2float.py
--- a/rpython/rlib/test/test_longlong2float.py
+++ b/rpython/rlib/test/test_longlong2float.py
@@ -41,7 +41,7 @@
             ll = float2longlong(f1)
             return longlong2float(ll)
         except Exception:
-            return 500
+            return 500.
 
     for x in enum_floats():
         res = interpret(f, [x])
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to