From: Matt Birkholz Date: Fri, 7 Feb 2014 17:55:36 +0000 (-0700) Subject: Fluidize (runtime debugger) internals *dstate* and *port*. X-Git-Tag: mit-scheme-pucked-9.2.12~401^2~13 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=20e6e0b95b70be19d7fbe782d3038df6f0ad8ac4;p=mit-scheme.git Fluidize (runtime debugger) internals *dstate* and *port*. --- diff --git a/src/runtime/debug.scm b/src/runtime/debug.scm index ec28896d3..358698f5f 100644 --- a/src/runtime/debug.scm +++ b/src/runtime/debug.scm @@ -162,6 +162,8 @@ USA. (stack-frame/reductions (dstate/subproblem dstate))) (define (initialize-package!) + (set! *dstate* (make-fluid 'UNBOUND)) + (set! *port* (make-fluid 'UNBOUND)) (set! command-set (make-command-set @@ -232,8 +234,10 @@ USA. (let ((dstate (cadr (cadr form))) (port (caddr (cadr form)))) `(DEFINE (,(car (cadr form)) #!OPTIONAL ,dstate ,port) - (LET ((,dstate (IF (DEFAULT-OBJECT? ,dstate) *DSTATE* ,dstate)) - (,port (IF (DEFAULT-OBJECT? ,port) *PORT* ,port))) + (LET ((,dstate (IF (DEFAULT-OBJECT? ,dstate) + (FLUID *DSTATE*) + ,dstate)) + (,port (IF (DEFAULT-OBJECT? ,port) (FLUID *PORT*) ,port))) ,@(map (let ((free (list dstate port))) (lambda (expression) (make-syntactic-closure environment free @@ -806,11 +810,12 @@ USA. (define *port*) (define (command/internal dstate port) - (fluid-let ((*dstate* dstate) - (*port* port)) - (debug/read-eval-print (->environment '(RUNTIME DEBUGGER)) - "the debugger" - "the debugger environment"))) + (let-fluids *dstate* dstate + *port* port + (lambda () + (debug/read-eval-print (->environment '(RUNTIME DEBUGGER)) + "the debugger" + "the debugger environment")))) (define-command (command/frame dstate port) (debugger-presentation port