[pypy-commit] pypy numpy-dtype-refactor: Teach llimpl about {get, set}interiorfield_raw with floats.

alex_gaynor noreply at buildbot.pypy.org
Wed Nov 16 00:07:37 CET 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: numpy-dtype-refactor
Changeset: r49450:b2bbe6d8f5fa
Date: 2011-11-15 18:06 -0500
http://bitbucket.org/pypy/pypy/changeset/b2bbe6d8f5fa/

Log:	Teach llimpl about {get,set}interiorfield_raw with floats.

diff --git a/pypy/jit/backend/llgraph/llimpl.py b/pypy/jit/backend/llgraph/llimpl.py
--- a/pypy/jit/backend/llgraph/llimpl.py
+++ b/pypy/jit/backend/llgraph/llimpl.py
@@ -1432,6 +1432,10 @@
     res = _getinteriorfield_raw(libffi.types.slong, array, index, width, ofs)
     return res
 
+def do_getinteriorfield_raw_float(array, index, width, ofs):
+    res = _getinteriorfield_raw(libffi.types.double, array, index, width, ofs)
+    return res
+
 def _getfield_raw(struct, fieldnum):
     STRUCT, fieldname = symbolic.TokenToField[fieldnum]
     ptr = cast_from_int(lltype.Ptr(STRUCT), struct)
@@ -1516,6 +1520,7 @@
         return libffi.array_setitem(ffitype, width, addr, index, ofs, newvalue)
     return do_setinteriorfield_raw
 do_setinteriorfield_raw_int = new_setinteriorfield_raw(libffi.types.slong)
+do_setinteriorfield_raw_float = new_setinteriorfield_raw(libffi.types.double)
 
 def do_setfield_raw_int(struct, fieldnum, newvalue):
     STRUCT, fieldname = symbolic.TokenToField[fieldnum]


More information about the pypy-commit mailing list