+
+(defun compile (name &optional (definition (or (macro-function name)
+ (fdefinition name))))
+ #!+sb-doc
+ "Coerce DEFINITION (by default, the function whose name is NAME)
+ to a compiled function, returning (VALUES THING WARNINGS-P FAILURE-P),
+ where if NAME is NIL, THING is the result of compilation, and
+ 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."
+ (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)))