Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove world-lock from WITH-COMPILATION-UNIT

   Add it to SUB-COMPILE-FILE and ACTUALLY-COMPILE instead.
  • Loading branch information...
commit 1fd7c4a202a8d22c681110e49c0d396b89afc428 1 parent 614ca4e
@nikodemus nikodemus authored
Showing with 32 additions and 34 deletions.
  1. +18 −21 src/compiler/main.lisp
  2. +14 −13 src/compiler/target-main.lisp
View
39 src/compiler/main.lisp
@@ -236,17 +236,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*)))
@@ -1674,31 +1673,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.
View
27 src/compiler/target-main.lisp
@@ -93,19 +93,20 @@
(*compile-verbose* nil)
(*compile-print* nil)
(oops nil))
- (handler-bind (((satisfies handle-condition-p) #'handle-condition-handler))
- (clear-stuff)
- (unless source-paths
- (find-source-paths form tlf))
- (let ((*compiler-error-bailout*
- (lambda (e)
- (setf oops e)
- ;; Unwind the compiler frames: users want the know where
- ;; the error came from, not how the compiler got there.
- (go :error))))
- (return (%compile form (make-core-object)
- :name name
- :path `(original-source-start 0 ,tlf)))))
+ (with-world-lock ()
+ (handler-bind (((satisfies handle-condition-p) #'handle-condition-handler))
+ (clear-stuff)
+ (unless source-paths
+ (find-source-paths form tlf))
+ (let ((*compiler-error-bailout*
+ (lambda (e)
+ (setf oops e)
+ ;; Unwind the compiler frames: users want the know where
+ ;; the error came from, not how the compiler got there.
+ (go :error))))
+ (return (%compile form (make-core-object)
+ :name name
+ :path `(original-source-start 0 ,tlf))))))
:error
;; Either signal the error right away, or return a function that
;; will signal the corresponding COMPILED-PROGRAM-ERROR. This is so
Please sign in to comment.
Something went wrong with that request. Please try again.