inhibit &REST -> &MORE conversion when DEBUG is 3
authorNikodemus Siivola <nikodemus@random-state.net>
Sun, 3 Jul 2011 15:24:12 +0000 (18:24 +0300)
committerNikodemus Siivola <nikodemus@random-state.net>
Sun, 3 Jul 2011 17:07:10 +0000 (20:07 +0300)
  Explicitly inhibit in BREAK.

src/code/cold-error.lisp
src/compiler/policies.lisp
src/compiler/srctran.lisp

index ba9bfae..f61708f 100644 (file)
 (defun break (&optional (datum "break") &rest arguments)
   #!+sb-doc
   "Print a message and invoke the debugger without allowing any possibility
-   of condition handling occurring."
+of condition handling occurring."
+  (declare (optimize (sb!c::rest-conversion 0)))
   (let ((*debugger-hook* nil)) ; as specifically required by ANSI
     (apply #'%break 'break datum arguments)))
 
index 55e5de3..736d287 100644 (file)
@@ -45,6 +45,12 @@ Enabling this option can increase heap consing of closures.")
   ("off" "maybe" "on" "on")
   "Control inline-substitution of used-once local functions.")
 
+(define-optimization-quality rest-conversion
+    (if (= debug 3) 0 3)
+  ("off" "maybe" "on" "on")
+  "Control conversion of &REST argments to &MORE arguments when
+only used as the final argument to APPLY.")
+
 (define-optimization-quality verify-arg-count
     (if (zerop safety) 0 3)
   ("no" "maybe" "yes" "yes"))
index aec88cb..ce1ac5a 100644 (file)
                    (consp (arg-info-default info))
                    (not (lambda-var-specvar var))
                    (not (lambda-var-sets var))
-                   (every #'ref-good-for-more-context-p (lambda-var-refs var)))))
+                   (every #'ref-good-for-more-context-p (lambda-var-refs var))
+                   (policy node (= 3 rest-conversion)))))
         (cond (context-ok
                (destructuring-bind (context count &optional used) (arg-info-default info)
                  (declare (ignore used))