From: Guillermo J. Rozas <edu/mit/csail/zurich/gjr>
Date: Tue, 27 Aug 1991 01:22:21 +0000 (+0000)
Subject: Fix bootstrap unassigned variable problem in without-stepping.
X-Git-Tag: 20090517-FFI~10292
X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=8f19b73090b37ae2c006d103e04f2f675560a6d2;p=mit-scheme.git

Fix bootstrap unassigned variable problem in without-stepping.
---

diff --git a/v7/src/runtime/global.scm b/v7/src/runtime/global.scm
index 631e3fd3c..15c5075e5 100644
--- a/v7/src/runtime/global.scm
+++ b/v7/src/runtime/global.scm
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/global.scm,v 14.25 1991/08/26 20:28:01 markf Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/global.scm,v 14.26 1991/08/27 01:22:21 jinx Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -258,25 +258,27 @@ MIT in each case. |#
 		 (cdr bucket)
 		 (cons (car bucket) accumulator))))))))
 
-;;; without-stepping restores the stepper hooks to the state
-;;; encountered on each entry to the thunk. It might be better to
-;;; restore the hooks to the initial state. I flipped a coin.
-(define without-stepping
-  (let ((microcode-vector-stepper-slot
-	 (fixed-objects-vector-slot 'stepper-state)))
+;; WITHOUT-STEPPING restores the stepper hooks to the state
+;; encountered on each entry to the thunk. It might be better to
+;; restore the hooks to the initial state. I flipped a coin.
 
+(let-syntax ((ufixed-objects-slot
+	      (macro (name)
+		(fixed-objects-vector-slot name))))
+
+  (define (without-stepping thunk)
     (define (get-stepper-hooks)
-      (vector-ref (get-fixed-objects-vector) microcode-vector-stepper-slot))
-
-    (lambda (thunk)
-      (let ((old-stepper-hooks)
-	    (null-hooks (hunk3-cons #f #f #f)))
-	(dynamic-wind
-	 (lambda ()
-	   (set! old-stepper-hooks (get-stepper-hooks))
-	   ((ucode-primitive primitive-return-step 2) unspecific null-hooks))
-	 thunk
-	 (lambda ()
-	   ((ucode-primitive primitive-return-step 2)
-	    unspecific
-	    old-stepper-hooks)))))))
\ No newline at end of file
+      (vector-ref (get-fixed-objects-vector)
+		  (ufixed-objects-slot stepper-state)))
+
+    (let ((old-stepper-hooks)
+	  (null-hooks (hunk3-cons #f #f #f)))
+      (dynamic-wind
+       (lambda ()
+	 (set! old-stepper-hooks (get-stepper-hooks))
+	 ((ucode-primitive primitive-return-step 2) unspecific null-hooks))
+       thunk
+       (lambda ()
+	 ((ucode-primitive primitive-return-step 2)
+	  unspecific
+	  old-stepper-hooks))))))
\ No newline at end of file
diff --git a/v8/src/runtime/global.scm b/v8/src/runtime/global.scm
index ceebe7342..88ed91dff 100644
--- a/v8/src/runtime/global.scm
+++ b/v8/src/runtime/global.scm
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/global.scm,v 14.25 1991/08/26 20:28:01 markf Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/global.scm,v 14.26 1991/08/27 01:22:21 jinx Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -258,25 +258,27 @@ MIT in each case. |#
 		 (cdr bucket)
 		 (cons (car bucket) accumulator))))))))
 
-;;; without-stepping restores the stepper hooks to the state
-;;; encountered on each entry to the thunk. It might be better to
-;;; restore the hooks to the initial state. I flipped a coin.
-(define without-stepping
-  (let ((microcode-vector-stepper-slot
-	 (fixed-objects-vector-slot 'stepper-state)))
+;; WITHOUT-STEPPING restores the stepper hooks to the state
+;; encountered on each entry to the thunk. It might be better to
+;; restore the hooks to the initial state. I flipped a coin.
 
+(let-syntax ((ufixed-objects-slot
+	      (macro (name)
+		(fixed-objects-vector-slot name))))
+
+  (define (without-stepping thunk)
     (define (get-stepper-hooks)
-      (vector-ref (get-fixed-objects-vector) microcode-vector-stepper-slot))
-
-    (lambda (thunk)
-      (let ((old-stepper-hooks)
-	    (null-hooks (hunk3-cons #f #f #f)))
-	(dynamic-wind
-	 (lambda ()
-	   (set! old-stepper-hooks (get-stepper-hooks))
-	   ((ucode-primitive primitive-return-step 2) unspecific null-hooks))
-	 thunk
-	 (lambda ()
-	   ((ucode-primitive primitive-return-step 2)
-	    unspecific
-	    old-stepper-hooks)))))))
\ No newline at end of file
+      (vector-ref (get-fixed-objects-vector)
+		  (ufixed-objects-slot stepper-state)))
+
+    (let ((old-stepper-hooks)
+	  (null-hooks (hunk3-cons #f #f #f)))
+      (dynamic-wind
+       (lambda ()
+	 (set! old-stepper-hooks (get-stepper-hooks))
+	 ((ucode-primitive primitive-return-step 2) unspecific null-hooks))
+       thunk
+       (lambda ()
+	 ((ucode-primitive primitive-return-step 2)
+	  unspecific
+	  old-stepper-hooks))))))
\ No newline at end of file