X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffull-eval.lisp;h=5079abca017ea5c598f54c554f0f3250d56b7f55;hb=a801d5d3ac5e5bf1732c292cadffe84097cd894b;hp=c93a320e0194b6db18509ced3102ab617682b21c;hpb=5d04a95274c9ddaebbcd6ddffc5d646e2c25598c;p=sbcl.git diff --git a/src/code/full-eval.lisp b/src/code/full-eval.lisp index c93a320..5079abc 100644 --- a/src/code/full-eval.lisp +++ b/src/code/full-eval.lisp @@ -104,7 +104,8 @@ nil nil nil nil nil (sb!c::lexenv-handled-conditions old-lexenv) (sb!c::lexenv-disabled-package-locks old-lexenv) - (sb!c::lexenv-policy old-lexenv)))) + (sb!c::lexenv-policy old-lexenv) + (sb!c::lexenv-user-data old-lexenv)))) (dolist (declaration declarations) (unless (consp declaration) (ip-error "malformed declaration specifier ~S in ~S" @@ -175,7 +176,8 @@ (sb!c::internal-make-lexenv nil nil nil nil nil nil nil nil nil - sb!c::*policy*))) + sb!c::*policy* + nil))) ;;; Augment ENV with a special or lexical variable binding (declaim (inline push-var)) @@ -185,13 +187,13 @@ ;;; Augment ENV with a local function binding (declaim (inline push-fun)) -(defun push-fun (name value env) +(defun push-fun (name value calling-env body-env) (when (fboundp name) - (let ((sb!c:*lexenv* (env-native-lexenv env))) + (let ((sb!c:*lexenv* (env-native-lexenv calling-env))) (program-assert-symbol-home-package-unlocked :eval name "binding ~A as a local function"))) - (push (cons name value) (env-funs env)) - (push (cons name :bogus) (sb!c::lexenv-funs (env-native-lexenv env)))) + (push (cons name value) (env-funs body-env)) + (push (cons name :bogus) (sb!c::lexenv-funs (env-native-lexenv body-env)))) (sb!int:def!method print-object ((env env) stream) (print-unreadable-object (env stream :type t :identity t))) @@ -236,7 +238,10 @@ (cond ((eq type :constant) ;; Horrible place for this, but it works. - (ip-error "Can't bind constant symbol ~S" symbol)) + (ip-error "Can't bind constant symbol: ~S" symbol)) + ((eq type :global) + ;; Ditto... + (ip-error "Can't bind a global variable: ~S" symbol)) ((eq type :special) t) ((member symbol declared-specials :test #'eq) t) @@ -279,7 +284,8 @@ (defun parse-arguments (arguments lambda-list) (multiple-value-bind (required optional rest-p rest keyword-p keyword allow-other-keys-p aux-p aux) - (sb!int:parse-lambda-list lambda-list) + (handler-bind ((style-warning #'muffle-warning)) + (sb!int:parse-lambda-list lambda-list)) (let* ((original-arguments arguments) (arguments-present (length arguments)) (required-length (length required)) @@ -681,6 +687,8 @@ (push-fun (car function-def) ;; Evaluate the function definitions in ENV. (eval-local-function-def function-def env) + ;; Do package-lock checks in ENV. + env ;; But add the bindings to the child environment. new-env)) (eval-progn body new-env))))) @@ -697,6 +705,7 @@ (dolist (function-def local-functions) (push-fun (car function-def) (eval-local-function-def function-def env) + old-env env)) ;; And then add an environment for the body of the LABELS. A ;; separate environment from the one where we added the