[pypy-commit] pypy default: unroll this

alex_gaynor noreply at buildbot.pypy.org
Sun Mar 4 21:58:39 CET 2012


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r53213:96a806a8537a
Date: 2012-03-04 15:57 -0500
http://bitbucket.org/pypy/pypy/changeset/96a806a8537a/

Log:	unroll this

diff --git a/pypy/rlib/rstruct/nativefmttable.py b/pypy/rlib/rstruct/nativefmttable.py
--- a/pypy/rlib/rstruct/nativefmttable.py
+++ b/pypy/rlib/rstruct/nativefmttable.py
@@ -3,13 +3,15 @@
 The table 'native_fmttable' is also used by pypy.module.array.interp_array.
 """
 import struct
+
+from pypy.rlib import jit
+from pypy.rlib.objectmodel import specialize
+from pypy.rlib.rarithmetic import r_singlefloat
 from pypy.rlib.rstruct import standardfmttable as std
 from pypy.rlib.rstruct.error import StructError
 from pypy.rpython.tool import rffi_platform
 from pypy.rpython.lltypesystem import lltype, rffi
-from pypy.rlib.rarithmetic import r_singlefloat
 from pypy.translator.tool.cbuild import ExternalCompilationInfo
-from pypy.rlib.objectmodel import specialize
 
 native_is_bigendian = struct.pack("=i", 1) == struct.pack(">i", 1)
 
@@ -25,6 +27,7 @@
 double_buf = lltype.malloc(rffi.DOUBLEP.TO, 1, flavor='raw', immortal=True)
 float_buf = lltype.malloc(rffi.FLOATP.TO, 1, flavor='raw', immortal=True)
 
+ at jit.unroll_safe
 def pack_double(fmtiter):
     doubleval = fmtiter.accept_float_arg()
     double_buf[0] = doubleval


More information about the pypy-commit mailing list