X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftoplevel.lisp;h=87a47526f89c2e2072cacf7f378066c3caa65ce8;hb=024389e7e3db268f535e36d883b4efc9d7ea0f65;hp=bbebd5b83a12c0b49b042734ae848397589a9d52;hpb=26987375eb9dae6e9b15084e317a04a6509dd05f;p=sbcl.git diff --git a/src/code/toplevel.lisp b/src/code/toplevel.lisp index bbebd5b..87a4752 100644 --- a/src/code/toplevel.lisp +++ b/src/code/toplevel.lisp @@ -208,7 +208,7 @@ command-line.") (initial-offset (logand csp (1- bytes-per-scrub-unit))) (end-of-stack (- (sap-int (sb!di::descriptor-sap sb!vm:*control-stack-end*)) - sb!c:*backend-page-bytes*))) + (* 2 sb!c:*backend-page-bytes*)))) (labels ((scrub (ptr offset count) (declare (type system-area-pointer ptr) @@ -240,8 +240,9 @@ command-line.") #!+stack-grows-downward-not-upward (let* ((csp (sap-int (sb!c::control-stack-pointer-sap))) - (end-of-stack (+ (sap-int (sb!di::descriptor-sap sb!vm:*control-stack-start*)) - sb!c:*backend-page-bytes*)) + (end-of-stack (+ (sap-int + (sb!di::descriptor-sap sb!vm:*control-stack-start*)) + (* 2 sb!c:*backend-page-bytes*))) (initial-offset (logand csp (1- bytes-per-scrub-unit)))) (labels ((scrub (ptr offset count) @@ -290,13 +291,13 @@ command-line.") (defvar +++ nil #!+sb-doc "the previous value of ++") (defvar - nil #!+sb-doc "the form currently being evaluated") -(defun interactive-eval (form) +(defun interactive-eval (form &key (eval #'eval)) #!+sb-doc "Evaluate FORM, returning whatever it returns and adjusting ***, **, *, +++, ++, +, ///, //, /, and -." (setf - form) (unwind-protect - (let ((results (multiple-value-list (eval form)))) + (let ((results (multiple-value-list (funcall eval form)))) (setf /// // // / / results @@ -397,14 +398,12 @@ command-line.") t)) (defun process-script (script) - (let ((pathname (native-pathname script)) - (ok nil)) - (unwind-protect - (with-open-file (f pathname :element-type :default) - (maybe-skip-shebang-line f) - (load f :verbose nil :print nil) - (setf ok t)) - (quit :unix-status (if ok 0 1))))) + (let ((pathname (native-pathname script))) + (handling-end-of-the-world + (with-open-file (f pathname :element-type :default) + (maybe-skip-shebang-line f) + (load f :verbose nil :print nil) + (quit))))) ;; Errors while processing the command line cause the system to QUIT, ;; instead of trying to go into the Lisp debugger, because trying to @@ -620,7 +619,6 @@ that provides the REPL for the system. Assumes that *STANDARD-INPUT* and (with-simple-restart (abort "~@") (catch 'toplevel-catcher - #!-win32 (sb!unix::reset-signal-mask) ;; In the event of a control-stack-exhausted-error, we ;; should have unwound enough stack by the time we get ;; here that this is now possible.