0.9.2.25:
[sbcl.git] / src / compiler / target-main.lisp
index 8a1cffb..a02797b 100644 (file)
             (*source-info* (make-lisp-source-info form))
             (*toplevel-lambdas* ())
             (*block-compile* nil)
+             (*allow-instrumenting* nil)
             (*compiler-error-bailout*
-             (lambda ()
+             (lambda (&optional error)
+                (declare (ignore error))
                (compiler-mumble
                 "~2&fatal error, aborting compilation~%")
                (return-from actually-compile (values nil t nil))))
   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)))