From 67de4da399419a649d61ebd0b4963f61c68f8fb4 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 27 Oct 1989 07:19:51 +0000 Subject: [PATCH] Fix bug finding parent of stack-environment when there is a continuation block between the starting block and the parent block. --- v7/src/runtime/uenvir.scm | 13 +++++++++++-- v8/src/runtime/uenvir.scm | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/v7/src/runtime/uenvir.scm b/v7/src/runtime/uenvir.scm index 47dfcab0f..d7234c8ea 100644 --- a/v7/src/runtime/uenvir.scm +++ b/v7/src/runtime/uenvir.scm @@ -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 diff --git a/v8/src/runtime/uenvir.scm b/v8/src/runtime/uenvir.scm index 6d9b9b4a5..9c5eaa5d8 100644 --- a/v8/src/runtime/uenvir.scm +++ b/v8/src/runtime/uenvir.scm @@ -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 -- 2.25.1