From: Nikodemus Siivola Date: Sun, 3 Jul 2011 15:24:12 +0000 (+0300) Subject: inhibit &REST -> &MORE conversion when DEBUG is 3 X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=4cd96b3be366d23b972a147965e40ea022329259;p=sbcl.git inhibit &REST -> &MORE conversion when DEBUG is 3 Explicitly inhibit in BREAK. --- diff --git a/src/code/cold-error.lisp b/src/code/cold-error.lisp index ba9bfae..f61708f 100644 --- a/src/code/cold-error.lisp +++ b/src/code/cold-error.lisp @@ -152,7 +152,8 @@ (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))) diff --git a/src/compiler/policies.lisp b/src/compiler/policies.lisp index 55e5de3..736d287 100644 --- a/src/compiler/policies.lisp +++ b/src/compiler/policies.lisp @@ -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")) diff --git a/src/compiler/srctran.lisp b/src/compiler/srctran.lisp index aec88cb..ce1ac5a 100644 --- a/src/compiler/srctran.lisp +++ b/src/compiler/srctran.lisp @@ -3935,7 +3935,8 @@ (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))