bind and clear *LIST-CONFLICTS-TABLE* in LIST-CONFLICTS
[sbcl.git] / src / compiler / main.lisp
index 657c137..77b3536 100644 (file)
@@ -17,7 +17,6 @@
 (declaim (special *constants* *free-vars* *component-being-compiled*
                   *code-vector* *next-location* *result-fixups*
                   *free-funs* *source-paths*
-                  *seen-blocks* *seen-funs* *list-conflicts-table*
                   *continuation-number* *continuation-numbers*
                   *number-continuations* *tn-id* *tn-ids* *id-tns*
                   *label-ids* *label-id* *id-labels*
@@ -236,17 +235,16 @@ Examples:
                        (*compiler-note-count* 0)
                        (*undefined-warnings* nil)
                        (*in-compilation-unit* t))
-                   (with-world-lock ()
-                     (handler-bind ((parse-unknown-type
-                                     (lambda (c)
-                                       (note-undefined-reference
-                                        (parse-unknown-type-specifier c)
-                                        :type))))
-                       (unwind-protect
-                            (multiple-value-prog1 (funcall fn) (setf succeeded-p t))
-                         (unless succeeded-p
-                           (incf *aborted-compilation-unit-count*))
-                         (summarize-compilation-unit (not succeeded-p))))))))))
+                   (handler-bind ((parse-unknown-type
+                                    (lambda (c)
+                                      (note-undefined-reference
+                                       (parse-unknown-type-specifier c)
+                                       :type))))
+                     (unwind-protect
+                          (multiple-value-prog1 (funcall fn) (setf succeeded-p t))
+                       (unless succeeded-p
+                         (incf *aborted-compilation-unit-count*))
+                       (summarize-compilation-unit (not succeeded-p)))))))))
     (if policy
         (let ((*policy* (process-optimize-decl policy (unless override *policy*)))
               (*policy-restrictions* (unless override *policy-restrictions*)))
@@ -746,17 +744,6 @@ Examples:
 ;;; actually in use, so that this function could go away.
 (defun clear-stuff (&optional (debug-too t))
 
-  ;; Clear global tables.
-  (when (boundp '*free-funs*)
-    (clrhash *free-funs*)
-    (clrhash *free-vars*)
-    (clrhash *constants*))
-
-  ;; Clear debug counters and tables.
-  (clrhash *seen-blocks*)
-  (clrhash *seen-funs*)
-  (clrhash *list-conflicts-table*)
-
   (when debug-too
     (clrhash *continuation-numbers*)
     (clrhash *number-continuations*)
@@ -904,7 +891,8 @@ Examples:
       (compiler-error 'input-error-in-compile-file
                       ;; We don't need to supply :POSITION here because
                       ;; READER-ERRORs already know their position in the file.
-                      :condition condition))
+                      :condition condition
+                      :stream stream))
     ;; ANSI, in its wisdom, says that READ should return END-OF-FILE
     ;; (and that this is not a READER-ERROR) when it encounters end of
     ;; file in the middle of something it's trying to read.
@@ -1673,31 +1661,29 @@ Examples:
     (handler-case
         (handler-bind (((satisfies handle-condition-p) #'handle-condition-handler))
           (with-compilation-values
-              (sb!xc:with-compilation-unit ()
+            (sb!xc:with-compilation-unit ()
+              (with-world-lock ()
                 (clear-stuff)
-
                 (sub-sub-compile-file info)
-
                 (unless (zerop (hash-table-count *code-coverage-records*))
                   ;; Dump the code coverage records into the fasl.
                   (fopcompile `(record-code-coverage
                                 ',(namestring *compile-file-pathname*)
                                 ',(let (list)
-                                       (maphash (lambda (k v)
-                                                  (declare (ignore k))
-                                                  (push v list))
-                                                *code-coverage-records*)
-                                       list))
+                                    (maphash (lambda (k v)
+                                               (declare (ignore k))
+                                               (push v list))
+                                             *code-coverage-records*)
+                                    list))
                               nil
                               nil))
-
                 (finish-block-compilation)
                 (let ((object *compile-object*))
                   (etypecase object
                     (fasl-output (fasl-dump-source-info info object))
                     (core-object (fix-core-source-info info object))
                     (null)))
-                nil)))
+                nil))))
       ;; Some errors are sufficiently bewildering that we just fail
       ;; immediately, without trying to recover and compile more of
       ;; the input file.