[pypy-commit] pypy ffi-backend: Remove the jit.oopspec annotations, which are not valid any more

arigo noreply at buildbot.pypy.org
Mon Aug 6 20:28:33 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: ffi-backend
Changeset: r56609:1d124f71d33a
Date: 2012-08-06 17:42 +0000
http://bitbucket.org/pypy/pypy/changeset/1d124f71d33a/

Log:	Remove the jit.oopspec annotations, which are not valid any more

diff --git a/pypy/rlib/libffi.py b/pypy/rlib/libffi.py
--- a/pypy/rlib/libffi.py
+++ b/pypy/rlib/libffi.py
@@ -280,7 +280,8 @@
     # JIT friendly interface
     # the following methods are supposed to be seen opaquely by the optimizer
 
-    @jit.oopspec('libffi_prepare_call(self)')
+    #@jit.oopspec('libffi_prepare_call(self)')
+    @jit.dont_look_inside
     def _prepare(self):
         ll_args = lltype.malloc(rffi.VOIDPP.TO, len(self.argtypes), flavor='raw')
         return ll_args
@@ -290,7 +291,8 @@
     # the annotator.  However, specialization doesn't work well with oopspec,
     # so we specialize them by hand
 
-    @jit.oopspec('libffi_push_int(self, value, ll_args, i)')
+    #@jit.oopspec('libffi_push_int(self, value, ll_args, i)')
+    @jit.dont_look_inside
     @enforceargs( None, int,   None,    int) # fix the annotation for tests
     def _push_int(self, value, ll_args, i):
         self._push_arg(value, ll_args, i)
@@ -299,30 +301,36 @@
     def _push_raw(self, value, ll_args, i):
         ll_args[i] = value
 
-    @jit.oopspec('libffi_push_float(self, value, ll_args, i)')
+    #@jit.oopspec('libffi_push_float(self, value, ll_args, i)')
+    @jit.dont_look_inside
     @enforceargs(   None, float, None,    int) # fix the annotation for tests
     def _push_float(self, value, ll_args, i):
         self._push_arg(value, ll_args, i)
 
-    @jit.oopspec('libffi_push_singlefloat(self, value, ll_args, i)')
+    #@jit.oopspec('libffi_push_singlefloat(self, value, ll_args, i)')
+    @jit.dont_look_inside
     @enforceargs(None, r_singlefloat, None, int) # fix the annotation for tests
     def _push_singlefloat(self, value, ll_args, i):
         self._push_arg(value, ll_args, i)
 
-    @jit.oopspec('libffi_push_longlong(self, value, ll_args, i)')
+    #@jit.oopspec('libffi_push_longlong(self, value, ll_args, i)')
+    @jit.dont_look_inside
     @enforceargs(None, r_longlong, None, int) # fix the annotation for tests
     def _push_longlong(self, value, ll_args, i):
         self._push_arg(value, ll_args, i)
 
-    @jit.oopspec('libffi_call_int(self, funcsym, ll_args)')
+    #@jit.oopspec('libffi_call_int(self, funcsym, ll_args)')
+    @jit.dont_look_inside
     def _do_call_int(self, funcsym, ll_args):
         return self._do_call(funcsym, ll_args, rffi.SIGNED)
 
-    @jit.oopspec('libffi_call_float(self, funcsym, ll_args)')
+    #@jit.oopspec('libffi_call_float(self, funcsym, ll_args)')
+    @jit.dont_look_inside
     def _do_call_float(self, funcsym, ll_args):
         return self._do_call(funcsym, ll_args, rffi.DOUBLE)
 
-    @jit.oopspec('libffi_call_singlefloat(self, funcsym, ll_args)')
+    #@jit.oopspec('libffi_call_singlefloat(self, funcsym, ll_args)')
+    @jit.dont_look_inside
     def _do_call_singlefloat(self, funcsym, ll_args):
         return self._do_call(funcsym, ll_args, rffi.FLOAT)
 
@@ -331,11 +339,13 @@
         # same as _do_call_int, but marked as jit.dont_look_inside
         return self._do_call(funcsym, ll_args, rffi.SIGNED)
 
-    @jit.oopspec('libffi_call_longlong(self, funcsym, ll_args)')
+    #@jit.oopspec('libffi_call_longlong(self, funcsym, ll_args)')
+    @jit.dont_look_inside
     def _do_call_longlong(self, funcsym, ll_args):
         return self._do_call(funcsym, ll_args, rffi.LONGLONG)
 
-    @jit.oopspec('libffi_call_void(self, funcsym, ll_args)')
+    #@jit.oopspec('libffi_call_void(self, funcsym, ll_args)')
+    @jit.dont_look_inside
     def _do_call_void(self, funcsym, ll_args):
         return self._do_call(funcsym, ll_args, lltype.Void)
 
@@ -435,7 +445,8 @@
 
 # ======================================================================
 
- at jit.oopspec('libffi_struct_getfield(ffitype, addr, offset)')
+#@jit.oopspec('libffi_struct_getfield(ffitype, addr, offset)')
+ at jit.dont_look_inside
 def struct_getfield_int(ffitype, addr, offset):
     """
     Return the field of type ``ffitype`` at ``addr+offset``, widened to
@@ -448,7 +459,8 @@
     assert False, "cannot find the given ffitype"
 
 
- at jit.oopspec('libffi_struct_setfield(ffitype, addr, offset, value)')
+#@jit.oopspec('libffi_struct_setfield(ffitype, addr, offset, value)')
+ at jit.dont_look_inside
 def struct_setfield_int(ffitype, addr, offset, value):
     """
     Set the field of type ``ffitype`` at ``addr+offset``.  ``value`` is of
@@ -462,7 +474,8 @@
     assert False, "cannot find the given ffitype"
 
 
- at jit.oopspec('libffi_struct_getfield(ffitype, addr, offset)')
+#@jit.oopspec('libffi_struct_getfield(ffitype, addr, offset)')
+ at jit.dont_look_inside
 def struct_getfield_longlong(ffitype, addr, offset):
     """
     Return the field of type ``ffitype`` at ``addr+offset``, casted to
@@ -471,7 +484,8 @@
     value = _struct_getfield(lltype.SignedLongLong, addr, offset)
     return value
 
- at jit.oopspec('libffi_struct_setfield(ffitype, addr, offset, value)')
+#@jit.oopspec('libffi_struct_setfield(ffitype, addr, offset, value)')
+ at jit.dont_look_inside
 def struct_setfield_longlong(ffitype, addr, offset, value):
     """
     Set the field of type ``ffitype`` at ``addr+offset``.  ``value`` is of
@@ -480,22 +494,26 @@
     _struct_setfield(lltype.SignedLongLong, addr, offset, value)
 
 
- at jit.oopspec('libffi_struct_getfield(ffitype, addr, offset)')
+#@jit.oopspec('libffi_struct_getfield(ffitype, addr, offset)')
+ at jit.dont_look_inside
 def struct_getfield_float(ffitype, addr, offset):
     value = _struct_getfield(lltype.Float, addr, offset)
     return value
 
- at jit.oopspec('libffi_struct_setfield(ffitype, addr, offset, value)')
+#@jit.oopspec('libffi_struct_setfield(ffitype, addr, offset, value)')
+ at jit.dont_look_inside
 def struct_setfield_float(ffitype, addr, offset, value):
     _struct_setfield(lltype.Float, addr, offset, value)
 
 
- at jit.oopspec('libffi_struct_getfield(ffitype, addr, offset)')
+#@jit.oopspec('libffi_struct_getfield(ffitype, addr, offset)')
+ at jit.dont_look_inside
 def struct_getfield_singlefloat(ffitype, addr, offset):
     value = _struct_getfield(lltype.SingleFloat, addr, offset)
     return value
 
- at jit.oopspec('libffi_struct_setfield(ffitype, addr, offset, value)')
+#@jit.oopspec('libffi_struct_setfield(ffitype, addr, offset, value)')
+ at jit.dont_look_inside
 def struct_setfield_singlefloat(ffitype, addr, offset, value):
     _struct_setfield(lltype.SingleFloat, addr, offset, value)
 
@@ -527,7 +545,8 @@
 # you can't hash a pointer obj, which the specialize machinery wants to do.
 # Given the present usage of these functions, it's good enough.
 @specialize.call_location()
- at jit.oopspec("libffi_array_getitem(ffitype, width, addr, index, offset)")
+#@jit.oopspec("libffi_array_getitem(ffitype, width, addr, index, offset)")
+ at jit.dont_look_inside
 def array_getitem(ffitype, width, addr, index, offset):
     for TYPE, ffitype2 in clibffi.ffitype_map:
         if ffitype is ffitype2:
@@ -542,7 +561,8 @@
     return rffi.cast(rffi.CArrayPtr(TYPE), addr)[0]
 
 @specialize.call_location()
- at jit.oopspec("libffi_array_setitem(ffitype, width, addr, index, offset, value)")
+#@jit.oopspec("libffi_array_setitem(ffitype, width, addr, index, offset, value)")
+ at jit.dont_look_inside
 def array_setitem(ffitype, width, addr, index, offset, value):
     for TYPE, ffitype2 in clibffi.ffitype_map:
         if ffitype is ffitype2:


More information about the pypy-commit mailing list