Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r74226:76cd145da640 Date: 2014-10-25 17:20 +0200 http://bitbucket.org/pypy/pypy/changeset/76cd145da640/
Log: Fix for issue reported with pixie (Timothy): if there is no floats at all, this crashes. Not 100% sure why. diff --git a/rpython/jit/backend/llsupport/descr.py b/rpython/jit/backend/llsupport/descr.py --- a/rpython/jit/backend/llsupport/descr.py +++ b/rpython/jit/backend/llsupport/descr.py @@ -313,17 +313,18 @@ # ____________________________________________________________ # CallDescrs +def _missing_call_stub_i(func, args_i, args_r, args_f): + return 0 +def _missing_call_stub_r(func, args_i, args_r, args_f): + return lltype.nullptr(llmemory.GCREF.TO) +def _missing_call_stub_f(func,args_i,args_r,args_f): + return longlong.ZEROF + class CallDescr(AbstractDescr): arg_classes = '' # <-- annotation hack result_type = '\x00' result_flag = '\x00' ffi_flags = 1 - call_stub_i = staticmethod(lambda func, args_i, args_r, args_f: - 0) - call_stub_r = staticmethod(lambda func, args_i, args_r, args_f: - lltype.nullptr(llmemory.GCREF.TO)) - call_stub_f = staticmethod(lambda func,args_i,args_r,args_f: - longlong.ZEROF) def __init__(self, arg_classes, result_type, result_signed, result_size, extrainfo=None, ffi_flags=1): @@ -340,6 +341,9 @@ self.result_size = result_size self.extrainfo = extrainfo self.ffi_flags = ffi_flags + self.call_stub_i = _missing_call_stub_i + self.call_stub_t = _missing_call_stub_r + self.call_stub_f = _missing_call_stub_f # NB. the default ffi_flags is 1, meaning FUNCFLAG_CDECL, which # makes sense on Windows as it's the one for all the C functions # we are compiling together with the JIT. On non-Windows platforms _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit