From: Nikodemus Siivola Date: Tue, 15 Jan 2008 13:28:46 +0000 (+0000) Subject: 1.0.13.37: skip compilation of null and non-symbol toplevel atoms X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=26bd73ecbd7af2473ff97bfbdc7eae9e39f54ba4;p=sbcl.git 1.0.13.37: skip compilation of null and non-symbol toplevel atoms * Not a performance consideration, but rather part of tidying up code paths that lead DEBUG-NAME to be called with NIL as the second argument (in IR1-TOPLEVEL the form becomes part of the TOP-LEVEL-FORM debug-name.) --- diff --git a/src/compiler/main.lisp b/src/compiler/main.lisp index 57ec2ee..9ee255c 100644 --- a/src/compiler/main.lisp +++ b/src/compiler/main.lisp @@ -870,19 +870,21 @@ ;;; *TOPLEVEL-LAMBDAS* instead. (defun convert-and-maybe-compile (form path) (declare (list path)) - (if (fopcompilable-p form) - (let ((*fopcompile-label-counter* 0)) - (fopcompile form path nil)) - (let* ((*top-level-form-noted* (note-top-level-form form t)) - (*lexenv* (make-lexenv - :policy *policy* - :handled-conditions *handled-conditions* - :disabled-package-locks *disabled-package-locks*)) - (tll (ir1-toplevel form path nil))) - (if (eq *block-compile* t) - (push tll *toplevel-lambdas*) - (compile-toplevel (list tll) nil)) - nil))) + (let ((*top-level-form-noted* (note-top-level-form form t))) + ;; Don't bother to compile simple objects that just sit there. + (when (and form (or (symbolp form) (consp form))) + (if (fopcompilable-p form) + (let ((*fopcompile-label-counter* 0)) + (fopcompile form path nil)) + (let ((*lexenv* (make-lexenv + :policy *policy* + :handled-conditions *handled-conditions* + :disabled-package-locks *disabled-package-locks*)) + (tll (ir1-toplevel form path nil))) + (if (eq *block-compile* t) + (push tll *toplevel-lambdas*) + (compile-toplevel (list tll) nil)) + nil))))) ;;; Macroexpand FORM in the current environment with an error handler. ;;; We only expand one level, so that we retain all the intervening diff --git a/version.lisp-expr b/version.lisp-expr index 06ac8f7..f010578 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.13.36" +"1.0.13.37"