0.7.1.43
[sbcl.git] / src / compiler / ir1tran.lisp
index 3151b25..74832d6 100644 (file)
   (unless (symbolp name)
     (compiler-error "The lambda variable ~S is not a symbol." name))
   (when (member name names-so-far :test #'eq)
-    (compiler-error "The variable ~S occurs more than once in the lambda-list."
+    (compiler-error "The variable ~S occurs more than once in the lambda list."
                    name))
   (let ((kind (info :variable :kind name)))
     (when (or (keywordp name) (eq kind :constant))
                   (eq (arg-info-kind info) :keyword)
                   (eq (arg-info-key info) key))
          (compiler-error
-          "The keyword ~S appears more than once in the lambda-list."
+          "The keyword ~S appears more than once in the lambda list."
           key))))
     key))
 
          (continuation-starts-block cont1)
          (link-node-to-previous-continuation bind cont1)
          (use-continuation bind cont2)
-         (ir1-convert-special-bindings cont2 result body aux-vars aux-vals
-                                       (svars)))
+         (ir1-convert-special-bindings cont2 result
+                                       (if (policy bind
+                                                   (or (> safety
+                                                          (max speed space))
+                                                       (= safety 3)))
+                                           ;; (Stuffing this in at IR1 level
+                                           ;; like this is pretty crude. And
+                                           ;; it's particularly inefficient
+                                           ;; to execute it on *every* LAMBDA,
+                                           ;; including LET-converted LAMBDAs.
+                                           ;; But when SAFETY is high, it's
+                                           ;; still arguably an improvement
+                                           ;; over the old CMU CL approach of
+                                           ;; doing nothing (proactively
+                                           ;; waiting for evolution to breed
+                                           ;; stronger programmers:-). -- WHN)
+                                           `((%detect-stack-exhaustion)
+                                             ,@body)
+                                           body)
+                                       aux-vars aux-vals (svars)))
 
        (let ((block (continuation-block result)))
          (when block