X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Ftarget-main.lisp;h=a02797b5f1a9e2dc3884aae2a5bb58f9c8e3d889;hb=4898ef32c639b1c7f4ee13a5ba566ce6debd03e6;hp=5d81a457dd1ae61524973aeed558478b9d7216de;hpb=28dcf682ef2a3c80b7bcdda00787dbb5e3893abe;p=sbcl.git diff --git a/src/compiler/target-main.lisp b/src/compiler/target-main.lisp index 5d81a45..a02797b 100644 --- a/src/compiler/target-main.lisp +++ b/src/compiler/target-main.lisp @@ -114,4 +114,15 @@ otherwise THING is NAME. When NAME is not NIL, the compiled function is also set into (MACRO-FUNCTION NAME) if NAME names a macro, or into (FDEFINITION NAME) otherwise." - (compile-in-lexenv name definition (make-null-lexenv))) + (multiple-value-bind (function warnings-p failure-p) + (compile-in-lexenv name definition (make-null-lexenv)) + (values (or function + name + (lambda (&rest arguments) + (error 'simple-program-error + :format-control + "Called function compiled with errors. Original ~ + definition:~% ~S~@[~%Arguments:~% ~{ ~S~}~]" + :format-arguments (list definition arguments)))) + warnings-p + failure-p)))