[pypy-svn] r53534 - pypy/branch/jit-hotpath/pypy/jit/tl

arigo at codespeak.net arigo at codespeak.net
Mon Apr 7 19:29:09 CEST 2008


Author: arigo
Date: Mon Apr  7 19:29:09 2008
New Revision: 53534

Modified:
   pypy/branch/jit-hotpath/pypy/jit/tl/tiny3_hotpath.py
Log:
Revert r53533: myfloat is marked "don't look" by the hint-annotator policy.


Modified: pypy/branch/jit-hotpath/pypy/jit/tl/tiny3_hotpath.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/tl/tiny3_hotpath.py	(original)
+++ pypy/branch/jit-hotpath/pypy/jit/tl/tiny3_hotpath.py	Mon Apr  7 19:29:09 2008
@@ -51,7 +51,7 @@
     def as_int(self):
         return self.intval
     def as_float(self):
-        return float(self.intval)
+        return myfloat(self.intval)
     def as_str(self):
         return str(self.intval)
 
@@ -202,7 +202,7 @@
                 try:
                     v = IntBox(int(opcode))
                 except ValueError:
-                    v = FloatBox(float(opcode))
+                    v = FloatBox(myfloat(opcode))
                 stack = Stack(v, stack)
             except ValueError:
                 pass # ignore rest
@@ -249,6 +249,9 @@
             raise ValueError
     return n
 
+ at specialize.argtype(0)
+def myfloat(i):
+    return float(i)
 # ------------------------------
 
 


More information about the pypy-svn mailing list