X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fmain.lisp;h=b4c90eb5c8e85191b25d0438d79b4272901b7646;hb=91392754bf1d241cd6913c728268caf18eae1485;hp=e297258a8f135a863baac207ec34ff7a4d91d5ab;hpb=b062a0cffdc3e1706a67c487d2bc5e406c104893;p=sbcl.git diff --git a/src/compiler/main.lisp b/src/compiler/main.lisp index e297258..b4c90eb 100644 --- a/src/compiler/main.lisp +++ b/src/compiler/main.lisp @@ -799,11 +799,11 @@ ;;; Process a top level use of LOCALLY, or anything else (e.g. ;;; MACROLET) at top level which has declarations and ordinary forms. ;;; We parse declarations and then recursively process the body. -(defun process-toplevel-locally (body path compile-time-too) +(defun process-toplevel-locally (body path compile-time-too &key vars funs) (declare (list path)) (multiple-value-bind (forms decls) (parse-body body nil) (let* ((*lexenv* - (process-decls decls nil nil (make-continuation))) + (process-decls decls vars funs (make-continuation))) ;; Binding *POLICY* is pretty much of a hack, since it ;; causes LOCALLY to "capture" enclosed proclamations. It ;; is necessary because CONVERT-AND-MAYBE-COMPILE uses the @@ -871,13 +871,15 @@ (debug-namify "~S initial component" name)) (setf (component-kind component) :initial) (let* ((locall-fun (ir1-convert-lambda - definition - :debug-name (debug-namify "top level local call ~S" - name))) + definition + :debug-name (debug-namify "top level local call ~S" + name))) (fun (ir1-convert-lambda (make-xep-lambda-expression locall-fun) :source-name (or name '.anonymous.) :debug-name (unless name "top level form")))) + (when name + (assert-global-function-definition-type name locall-fun)) (setf (functional-entry-fun fun) locall-fun (functional-kind fun) :external (functional-has-external-references-p fun) t) @@ -1113,17 +1115,19 @@ ((macrolet) (funcall-in-macrolet-lexenv magic - (lambda () + (lambda (&key funs) + (declare (ignore funs)) (process-toplevel-locally body path compile-time-too)))) ((symbol-macrolet) (funcall-in-symbol-macrolet-lexenv magic - (lambda () + (lambda (&key vars) (process-toplevel-locally body path - compile-time-too))))))) + compile-time-too + :vars vars))))))) ((locally) (process-toplevel-locally (rest form) path compile-time-too)) ((progn)