[pypy-commit] pypy ffi-backend: Add a promotion here, to constant-fold the rest of the decoding of the

arigo noreply at buildbot.pypy.org
Wed Aug 8 12:09:11 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: ffi-backend
Changeset: r56650:7318a0b71e0e
Date: 2012-08-08 11:45 +0200
http://bitbucket.org/pypy/pypy/changeset/7318a0b71e0e/

Log:	Add a promotion here, to constant-fold the rest of the decoding of
	the W_CTypeFunc.

diff --git a/pypy/module/_cffi_backend/ctypefunc.py b/pypy/module/_cffi_backend/ctypefunc.py
--- a/pypy/module/_cffi_backend/ctypefunc.py
+++ b/pypy/module/_cffi_backend/ctypefunc.py
@@ -88,6 +88,7 @@
     def call(self, funcaddr, args_w):
         if self.cif_descr:
             # regular case: this function does not take '...' arguments
+            self = jit.promote(self)
             nargs_declared = len(self.fargs)
             if len(args_w) != nargs_declared:
                 space = self.space


More information about the pypy-commit mailing list