X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fmain.lisp;h=c3afdc717d064dcfb0dbf3e57d5f4721865bb1fc;hb=fdf46e7bd7aba9b5c8af629fdb2692d9b33b9207;hp=d750adf820521db394bfcff050c9379a34596908;hpb=89723dab1eff0dcc17c79c5675cb18c7c4e62b80;p=sbcl.git diff --git a/src/compiler/main.lisp b/src/compiler/main.lisp index d750adf..c3afdc7 100644 --- a/src/compiler/main.lisp +++ b/src/compiler/main.lisp @@ -115,6 +115,8 @@ (defvar *compile-object* nil) (declaim (type object *compile-object*)) + +(defvar *fopcompile-label-counter*) ;;;; WITH-COMPILATION-UNIT and WITH-COMPILATION-VALUES @@ -743,7 +745,7 @@ ;;; Given a pathname, return a SOURCE-INFO structure. (defun make-file-source-info (file external-format) (let ((file-info (make-file-info :name (truename file) - :untruename file + :untruename (merge-pathnames file) :external-format external-format :write-date (file-write-date file)))) @@ -852,16 +854,19 @@ ;;; *TOPLEVEL-LAMBDAS* instead. (defun convert-and-maybe-compile (form path) (declare (list path)) - (let* ((*top-level-form-noted* (note-top-level-form form t)) - (*lexenv* (make-lexenv - :policy *policy* - :handled-conditions *handled-conditions* - :disabled-package-locks *disabled-package-locks*)) - (tll (ir1-toplevel form path nil))) - (if (eq *block-compile* t) - (push tll *toplevel-lambdas*) - (compile-toplevel (list tll) nil)) - nil)) + (if (fopcompilable-p form) + (let ((*fopcompile-label-counter* 0)) + (fopcompile form path nil)) + (let* ((*top-level-form-noted* (note-top-level-form form t)) + (*lexenv* (make-lexenv + :policy *policy* + :handled-conditions *handled-conditions* + :disabled-package-locks *disabled-package-locks*)) + (tll (ir1-toplevel form path nil))) + (if (eq *block-compile* t) + (push tll *toplevel-lambdas*) + (compile-toplevel (list tll) nil)) + nil))) ;;; Macroexpand FORM in the current environment with an error handler. ;;; We only expand one level, so that we retain all the intervening @@ -1185,7 +1190,9 @@ ;; sequence of steps in ANSI's "3.2.3.1 Processing of ;; Top Level Forms". #-sb-xc-host - (let ((expanded (preprocessor-macroexpand-1 form))) + (let ((expanded + (let ((*current-path* path)) + (preprocessor-macroexpand-1 form)))) (cond ((eq expanded form) (when compile-time-too (eval-in-lexenv form *lexenv*))