Fix bug finding parent of stack-environment when there is a
authorChris Hanson <org/chris-hanson/cph>
Fri, 27 Oct 1989 07:19:51 +0000 (07:19 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 27 Oct 1989 07:19:51 +0000 (07:19 +0000)
continuation block between the starting block and the parent block.

v7/src/runtime/uenvir.scm
v8/src/runtime/uenvir.scm

index 47dfcab0fa6450e638c7bb0b4af36d60b9d78565..d7234c8ea480135aa0ab8c542934b1bf462aa448 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/uenvir.scm,v 14.14 1989/10/10 11:37:35 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/uenvir.scm,v 14.15 1989/10/27 07:19:51 cph Exp $
 
 Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
@@ -347,7 +347,16 @@ MIT in each case. |#
                   (else
                    (loop stack-link
                          frame
-                         (+ (vector-length (dbg-block/layout stack-link))                           index)))))))
+                         (+ (vector-length (dbg-block/layout stack-link))
+                            (case (dbg-block/type stack-link)
+                              ((STACK)
+                               0)
+                              ((CONTINUATION)
+                               (dbg-continuation/offset
+                                (dbg-block/procedure stack-link)))
+                              (else
+                               (error "illegal stack-link type" stack-link)))
+                            index)))))))
        ((CLOSURE)
         (make-closure-ccenv (dbg-block/original-parent block)
                             parent
index 6d9b9b4a5b86a63047eea345eef07aaaa9bee394..9c5eaa5d833bdde19a7df8c43661b6c92b43b6b2 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/uenvir.scm,v 14.14 1989/10/10 11:37:35 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/uenvir.scm,v 14.15 1989/10/27 07:19:51 cph Exp $
 
 Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
@@ -347,7 +347,16 @@ MIT in each case. |#
                   (else
                    (loop stack-link
                          frame
-                         (+ (vector-length (dbg-block/layout stack-link))                           index)))))))
+                         (+ (vector-length (dbg-block/layout stack-link))
+                            (case (dbg-block/type stack-link)
+                              ((STACK)
+                               0)
+                              ((CONTINUATION)
+                               (dbg-continuation/offset
+                                (dbg-block/procedure stack-link)))
+                              (else
+                               (error "illegal stack-link type" stack-link)))
+                            index)))))))
        ((CLOSURE)
         (make-closure-ccenv (dbg-block/original-parent block)
                             parent