[pypy-commit] pypy faster-rstruct-2: @enforceargs does not play well with @specialize, use _annenforceargs_ directly

antocuni pypy.commits at gmail.com
Mon May 22 18:23:04 EDT 2017


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: faster-rstruct-2
Changeset: r91379:616c5957da8d
Date: 2017-05-23 00:19 +0200
http://bitbucket.org/pypy/pypy/changeset/616c5957da8d/

Log:	@enforceargs does not play well with @specialize, use
	_annenforceargs_ directly

diff --git a/rpython/jit/backend/llsupport/llmodel.py b/rpython/jit/backend/llsupport/llmodel.py
--- a/rpython/jit/backend/llsupport/llmodel.py
+++ b/rpython/jit/backend/llsupport/llmodel.py
@@ -5,8 +5,7 @@
 from rpython.rtyper.annlowlevel import llhelper, MixLevelHelperAnnotator
 from rpython.rtyper.annlowlevel import hlstr, hlunicode
 from rpython.rtyper.llannotation import lltype_to_annotation
-from rpython.rlib.objectmodel import (we_are_translated, specialize, compute_hash,
-                                      enforceargs)
+from rpython.rlib.objectmodel import we_are_translated, specialize, compute_hash
 from rpython.jit.metainterp import history, compile
 from rpython.jit.metainterp.optimize import SpeculativeError
 from rpython.jit.codewriter import heaptracker, longlong
@@ -495,9 +494,9 @@
         return llop.raw_load(longlong.FLOATSTORAGE, gcref, ofs)
 
     @specialize.argtype(1)
-    @enforceargs(newvalue=longlong.r_float_storage)
     def write_float_at_mem(self, gcref, ofs, newvalue):
         llop.raw_store(lltype.Void, gcref, ofs, newvalue)
+    write_float_at_mem._annenforceargs_ = [None, None, None, longlong.r_float_storage]
 
     # ____________________________________________________________
 


More information about the pypy-commit mailing list