X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcode%2Ftarget-alieneval.lisp;h=5d0036a285a33f649f3827e954ede4edec225261;hb=085501b44cc1cbdd9e260139d30b383372ddd1b8;hp=21585e6870d025dedc6ee9308f97e9d4b20ca92c;hpb=6fa968aaa8051da23cc3153a1c0e67addbea85f6;p=sbcl.git diff --git a/src/code/target-alieneval.lisp b/src/code/target-alieneval.lisp index 21585e6..5d0036a 100644 --- a/src/code/target-alieneval.lisp +++ b/src/code/target-alieneval.lisp @@ -538,33 +538,38 @@ allocated using ``malloc'', so it can be passed to foreign functions which use ;;;; NATURALIZE, DEPORT, EXTRACT-ALIEN-VALUE, DEPOSIT-ALIEN-VALUE +(defun coerce-to-interpreted-function (lambda-form) + (let (#!+sb-eval + (*evaluator-mode* :interpret)) + (coerce lambda-form 'function))) + (defun naturalize (alien type) (declare (type alien-type type)) - (funcall (coerce (compute-naturalize-lambda type) 'function) + (funcall (coerce-to-interpreted-function (compute-naturalize-lambda type)) alien type)) (defun deport (value type) (declare (type alien-type type)) - (funcall (coerce (compute-deport-lambda type) 'function) + (funcall (coerce-to-interpreted-function (compute-deport-lambda type)) value type)) (defun deport-alloc (value type) (declare (type alien-type type)) - (funcall (coerce (compute-deport-alloc-lambda type) 'function) + (funcall (coerce-to-interpreted-function (compute-deport-alloc-lambda type)) value type)) (defun extract-alien-value (sap offset type) (declare (type system-area-pointer sap) (type unsigned-byte offset) (type alien-type type)) - (funcall (coerce (compute-extract-lambda type) 'function) + (funcall (coerce-to-interpreted-function (compute-extract-lambda type)) sap offset type)) (defun deposit-alien-value (sap offset type value) (declare (type system-area-pointer sap) (type unsigned-byte offset) (type alien-type type)) - (funcall (coerce (compute-deposit-lambda type) 'function) + (funcall (coerce-to-interpreted-function (compute-deposit-lambda type)) sap offset type value)) ;;;; ALIEN-FUNCALL, DEFINE-ALIEN-ROUTINE