X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fearly-c.lisp;h=1faa6f835a5de35c9c79f514585ebe04eff47a28;hb=e049902f5e7c30501d2dbb7a41d058a0c717fc1f;hp=e2c677a62c082187015526f30aee78a7bc530f25;hpb=f46d27c212eb12011b772cb8eefe904da4e7c778;p=sbcl.git diff --git a/src/compiler/early-c.lisp b/src/compiler/early-c.lisp index e2c677a..1faa6f8 100644 --- a/src/compiler/early-c.lisp +++ b/src/compiler/early-c.lisp @@ -165,3 +165,19 @@ dynamic binding, even though the symbol name follows the usual naming~@ convention (names like *FOO*) for special variables" symbol)) (values)) + +;;; shorthand for creating debug names from source names or other +;;; stems, e.g. +;;; (DEBUG-NAMIFY "FLET ~S" SOURCE-NAME) +;;; (DEBUG-NAMIFY "top level form ~S" FORM) +;;; +;;; FIXME: This function seems to have a lot in common with +;;; STRINGIFY-FORM, and perhaps there's some way to merge the two +;;; functions. +(defun debug-namify (format-string &rest format-arguments) + (with-standard-io-syntax + (let ((*print-readably* nil) + (*package* *cl-package*) + (*print-length* 3) + (*print-level* 2)) + (apply #'format nil format-string format-arguments))))