projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.8.3.25:
[sbcl.git]
/
src
/
code
/
toplevel.lisp
diff --git
a/src/code/toplevel.lisp
b/src/code/toplevel.lisp
index
f245850
..
2f17bcf
100644
(file)
--- a/
src/code/toplevel.lisp
+++ b/
src/code/toplevel.lisp
@@
-25,9
+25,7
@@
;;; specials initialized by !COLD-INIT
;;; FIXME: These could be converted to DEFVARs.
;;; specials initialized by !COLD-INIT
;;; FIXME: These could be converted to DEFVARs.
-(declaim (special *gc-inhibit* *already-maybe-gcing*
- *need-to-collect-garbage*
- *gc-notify-stream*
+(declaim (special *gc-inhibit* *need-to-collect-garbage*
*before-gc-hooks* *after-gc-hooks*
#!+x86 *pseudo-atomic-atomic*
#!+x86 *pseudo-atomic-interrupted*
*before-gc-hooks* *after-gc-hooks*
#!+x86 *pseudo-atomic-atomic*
#!+x86 *pseudo-atomic-interrupted*
@@
-47,7
+45,7
@@
;;; by QUIT) is caught and any final processing and return codes are
;;; handled appropriately.
(defmacro handling-end-of-the-world (&body body)
;;; by QUIT) is caught and any final processing and return codes are
;;; handled appropriately.
(defmacro handling-end-of-the-world (&body body)
- (let ((caught (gensym "CAUGHT")))
+ (with-unique-names (caught)
`(let ((,caught (catch '%end-of-the-world
(/show0 "inside CATCH '%END-OF-THE-WORLD")
,@body)))
`(let ((,caught (catch '%end-of-the-world
(/show0 "inside CATCH '%END-OF-THE-WORLD")
,@body)))
@@
-89,7
+87,7
@@
(error-error "Help! "
*current-error-depth*
" nested errors. "
(error-error "Help! "
*current-error-depth*
" nested errors. "
- "KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded.")
+ "SB-KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded.")
t)
(t
(/show0 "returning normally from INFINITE-ERROR-PROTECTOR")
t)
(t
(/show0 "returning normally from INFINITE-ERROR-PROTECTOR")
@@
-116,7
+114,7
@@
(error-error "Help! "
*current-error-depth*
" nested errors. "
(error-error "Help! "
*current-error-depth*
" nested errors. "
- "KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded.")
+ "SB-KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded.")
(progn ,@forms)
t)
(t
(progn ,@forms)
t)
(t
@@
-174,7
+172,8
@@
(let* ((csp (sap-int (sb!c::control-stack-pointer-sap)))
(initial-offset (logand csp (1- bytes-per-scrub-unit)))
(end-of-stack
(let* ((csp (sap-int (sb!c::control-stack-pointer-sap)))
(initial-offset (logand csp (1- bytes-per-scrub-unit)))
(end-of-stack
- (- sb!vm::*control-stack-end* sb!c:*backend-page-size*)))
+ (- (sb!vm:fixnumize sb!vm:*control-stack-end*)
+ sb!c:*backend-page-size*)))
(labels
((scrub (ptr offset count)
(declare (type system-area-pointer ptr)
(labels
((scrub (ptr offset count)
(declare (type system-area-pointer ptr)
@@
-206,7
+205,8
@@
#!+stack-grows-downward-not-upward
(let* ((csp (sap-int (sb!c::control-stack-pointer-sap)))
#!+stack-grows-downward-not-upward
(let* ((csp (sap-int (sb!c::control-stack-pointer-sap)))
- (end-of-stack (+ sb!vm::*control-stack-start* sb!c:*backend-page-size*))
+ (end-of-stack (+ (sb!vm:fixnumize sb!vm:*control-stack-start*)
+ sb!c:*backend-page-size*))
(initial-offset (logand csp (1- bytes-per-scrub-unit))))
(labels
((scrub (ptr offset count)
(initial-offset (logand csp (1- bytes-per-scrub-unit))))
(labels
((scrub (ptr offset count)
@@
-522,7
+522,7
@@
;; have unwound enough stack by the time we get here that this
;; is now possible
(sb!kernel::protect-control-stack-guard-page 1)
;; have unwound enough stack by the time we get here that this
;; is now possible
(sb!kernel::protect-control-stack-guard-page 1)
- (repl noprint)
+ (funcall *repl-fun* noprint)
(critically-unreachable "after REPL")))))))
;;; Our default REPL prompt is the minimal traditional one.
(critically-unreachable "after REPL")))))))
;;; Our default REPL prompt is the minimal traditional one.
@@
-551,8
+551,11
@@
(defvar *repl-prompt-fun* #'repl-prompt-fun
"a function of one argument STREAM for the toplevel REPL to call: Prompt
the user for input.")
(defvar *repl-prompt-fun* #'repl-prompt-fun
"a function of one argument STREAM for the toplevel REPL to call: Prompt
the user for input.")
+(defvar *repl-fun* #'repl-fun
+ "a function of one argument NOPRINT that provides the REPL for the system.
+ Assumes that *standard-input* and *standard-output* are setup.")
-(defun repl (noprint)
+(defun repl-fun (noprint)
(/show0 "entering REPL")
(loop
;; (See comment preceding the definition of SCRUB-CONTROL-STACK.)
(/show0 "entering REPL")
(loop
;; (See comment preceding the definition of SCRUB-CONTROL-STACK.)