1.0.13.37: skip compilation of null and non-symbol toplevel atoms
authorNikodemus Siivola <nikodemus@random-state.net>
Tue, 15 Jan 2008 13:28:46 +0000 (13:28 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Tue, 15 Jan 2008 13:28:46 +0000 (13:28 +0000)
 * 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.)

src/compiler/main.lisp
version.lisp-expr

index 57ec2ee..9ee255c 100644 (file)
 ;;; *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
index 06ac8f7..f010578 100644 (file)
@@ -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"