From: Nikodemus Siivola Date: Wed, 9 Mar 2005 18:49:40 +0000 (+0000) Subject: 0.8.20.12: policy control, the uncontroversial parts X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=62b0a9c5190806368487d46d8773734cb1ee3a25;p=sbcl.git 0.8.20.12: policy control, the uncontroversial parts * get rid of MAKE-NULL-INTERACTIVE-LEXENV * use READ & EVAL to process initialization files * more restarts available during initialization file and --eval option processing (CONTINUE is "skip to next form / option, ABORT is "skip this initialization file / all --eval options".) --- diff --git a/BUGS b/BUGS index 60cf564..e6de843 100644 --- a/BUGS +++ b/BUGS @@ -1523,6 +1523,10 @@ WORKAROUND: (used on non-x86 platforms) being a more complete solution then what is done on x86. + On x86/linux large portions of tests/debug.impure.lisp have been commented + out as failures. The probable culprit for these problems is in x86-call-context + (things work fine on x86/freebsd). + More generally, the debugger internals suffer from excessive x86/non-x86 conditionalization and OAOOMization: refactoring the common parts would be good. @@ -1536,7 +1540,11 @@ WORKAROUND: (sparc and x86 at least) Since SBCL 0.8.20.1 this is hidden unless *SHOW-ENTRY-POINT-DETAILS* - is true. + is true (instead there appear two TEST frames at least on ppc). The + underlying cause seems to be that SB-C::TAIL-ANNOTATE will not merge + the tail-call for the XEP, since Python has by that time proved that + the function can never return; same happens if the function holds an + unconditional call to ERROR. 355: change-class of generic-function (reported by Bruno Haible) diff --git a/NEWS b/NEWS index f4be342..386f306 100644 --- a/NEWS +++ b/NEWS @@ -1,15 +1,21 @@ changes in sbcl-0.8.21 (0.9alpha.1?) relative to sbcl-0.8.20: + * incompatible change: forms evaluated in the REPL now use the + global optimization policy. + * incompatible change: user- and system-initialization files are + no longer processed with LOAD, but by READ and EVAL; hence the + global optimization policy, startup package, readtable, etc, + can be set by them. * internal entry point details and argument counts no longer appear - in backtraces unless explicitly requested by setting - SB-DEBUG:*SHOW-ENTRY-POINT-DETAILS*. + in backtraces unless explicitly requested by setting + SB-DEBUG:*SHOW-ENTRY-POINT-DETAILS*. * built-in and standard functions no longer have names like "top - level local call to FOO". + level local call to FOO". * fixed bug 32: functions defined in non-null lexical environments - now have more legible printed representation + now have more legible printed representation * fixed bug 33: functions defined in non-null lexical environemnts - are now more amenable to inspection by INSPECT. + are now more amenable to inspection by INSPECT. * workaround for bug 354: XEPs no longer appear in backtraces unless - explicitly requested. + explicitly requested. * fixed bug: COUNT and EQUAL no longer issue compiler efficiency notes when operating on objects known to be SIMPLE-BIT-VECTORs. (reported by Lutz Euler) diff --git a/package-data-list.lisp-expr b/package-data-list.lisp-expr index 8d5c316..cf36c77 100644 --- a/package-data-list.lisp-expr +++ b/package-data-list.lisp-expr @@ -1233,7 +1233,7 @@ is a good idea, but see SB-SYS re. blurring of boundaries." "MAKE-LISP-OBJ" #!+long-float "MAKE-LONG-FLOAT" "MAKE-MEMBER-TYPE" "MAKE-NAMED-TYPE" "MAKE-NULL-LEXENV" - "MAKE-NULL-INTERACTIVE-LEXENV" "MAKE-NUMERIC-TYPE" + "MAKE-NUMERIC-TYPE" "MAKE-SINGLE-FLOAT" "MAKE-SPECIALIZABLE-ARRAY" "MAKE-UNPORTABLE-FLOAT" "%MAKE-INSTANCE" "MAKE-SHORT-VALUES-TYPE" "MAKE-SINGLE-VALUE-TYPE" diff --git a/src/code/toplevel.lisp b/src/code/toplevel.lisp index 7cf0921..c02f06d 100644 --- a/src/code/toplevel.lisp +++ b/src/code/toplevel.lisp @@ -271,10 +271,7 @@ steppers to maintain contextual information.") "Evaluate FORM, returning whatever it returns and adjusting ***, **, *, +++, ++, +, ///, //, /, and -." (setf - form) - (let ((results - (multiple-value-list - (eval-in-lexenv form - (make-null-interactive-lexenv))))) + (let ((results (multiple-value-list (eval form)))) (setf /// // // / / results @@ -304,6 +301,50 @@ steppers to maintain contextual information.") (finish-output (symbol-value name))) (values)) +(defun process-init-file (truename) + (when truename + (restart-case + (with-open-file (s truename :if-does-not-exist nil) + (flet ((next () + (let ((form (read s nil s))) + (if (eq s form) + (return-from process-init-file nil) + (eval form))))) + (loop + (restart-case + (handler-bind ((error (lambda (e) + (error + "Error during processing of ~ + initialization file ~A:~%~% ~A" + truename e)))) + (next)) + (continue () + :report "Ignore and continue processing."))))) + (abort () + :report "Skip rest of initialization file.")))) + +(defun process-eval-options (eval-strings) + (/show0 "handling --eval options") + (flet ((process-1 (string) + (multiple-value-bind (expr pos) (read-from-string string) + (unless (eq string (read-from-string string nil string :start pos)) + (error "More the one expression in ~S" string)) + (eval expr) + (flush-standard-output-streams)))) + (restart-case + (dolist (expr-as-string eval-strings) + (/show0 "handling one --eval option") + (restart-case + (handler-bind ((error (lambda (e) + (error "Error during processing of --eval ~ + option ~S:~%~% ~A" + expr-as-string e)))) + (process-1 expr-as-string)) + (continue () + :report "Ignore and continue with next --eval option."))) + (abort () + :report "Skip rest of --eval options.")))) + ;;; the default system top level function (defun toplevel-init () (/show0 "entering TOPLEVEL-INIT") @@ -454,40 +495,11 @@ steppers to maintain contextual information.") ;; on.) (restart-case (progn - (flet ((process-init-file (truename) - (when truename - (unless (load truename) - (error "~S was not successfully loaded." - truename)) - (flush-standard-output-streams)))) - (process-init-file sysinit-truename) - (process-init-file userinit-truename)) - - ;; Process --eval options. - (/show0 "handling --eval options in TOPLEVEL-INIT") - (dolist (expr-as-string (reverse reversed-evals)) - (/show0 "handling one --eval option in TOPLEVEL-INIT") - (let ((expr (with-input-from-string (eval-stream - expr-as-string) - (let* ((eof-marker (cons :eof :eof)) - (result (read eval-stream - nil - eof-marker)) - (eof (read eval-stream nil eof-marker))) - (cond ((eq result eof-marker) - (error "unable to parse ~S" - expr-as-string)) - ((not (eq eof eof-marker)) - (error - "more than one expression in ~S" - expr-as-string)) - (t - result)))))) - (eval expr) - (flush-standard-output-streams)))) - (continue () - :report - "Continue anyway (skipping to toplevel read/eval/print loop)." + (process-init-file sysinit-truename) + (process-init-file userinit-truename) + (process-eval-options (reverse reversed-evals))) + (toplevel () + :report "Skip to toplevel READ/EVAL/PRINT loop." (/show0 "CONTINUEing from pre-REPL RESTART-CASE") (values)) ; (no-op, just fall through) (quit () diff --git a/src/compiler/lexenv.lisp b/src/compiler/lexenv.lisp index d9d57f2..34b4a59 100644 --- a/src/compiler/lexenv.lisp +++ b/src/compiler/lexenv.lisp @@ -16,13 +16,6 @@ #!-sb-fluid (declaim (inline internal-make-lexenv)) ; only called in one place (def!struct (lexenv (:constructor make-null-lexenv ()) - (:constructor make-null-interactive-lexenv - (&aux (policy (list '(safety . 3) - '(compilation-speed . 2) - '(debug . 2) - '(speed . 1) - '(space . 1) - '(inhibit-warnings . 1))))) (:constructor internal-make-lexenv (funs vars blocks tags type-restrictions diff --git a/version.lisp-expr b/version.lisp-expr index 1d1ec06..c694d3c 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.20.11" +"0.8.20.12"