[pypy-commit] pypy ffistruct: make it elidable_promote, it should completely optimize away the offset/type lookup

antocuni noreply at buildbot.pypy.org
Wed Sep 7 17:38:47 CEST 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: ffistruct
Changeset: r47147:f407a607b971
Date: 2011-09-07 17:35 +0200
http://bitbucket.org/pypy/pypy/changeset/f407a607b971/

Log:	make it elidable_promote, it should completely optimize away the
	offset/type lookup

diff --git a/pypy/module/_ffi/interp_struct.py b/pypy/module/_ffi/interp_struct.py
--- a/pypy/module/_ffi/interp_struct.py
+++ b/pypy/module/_ffi/interp_struct.py
@@ -46,7 +46,7 @@
     def allocate(self, space):
         return W__StructInstance(self)
 
-    @jit.elidable
+    @jit.elidable_promote()
     def get_type_and_offset_for_field(self, name):
         try:
             w_field = self.name2w_field[name]


More information about the pypy-commit mailing list