#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/uenvir.scm,v 14.24 1991/07/21 07:02:17 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/uenvir.scm,v 14.25 1991/10/29 13:31:11 cph Exp $
Copyright (c) 1988-91 Massachusetts Institute of Technology
(find-stack-element environment
dbg-block/normal-closure-index
"closure")))
- (if (not (compiled-closure? closure))
+ (if (not (or (compiled-closure? closure) (vector? closure)))
(error "Frame missing closure" closure environment))
#|
;; Temporarily disable this consistency check until the compiler
(let ((parent (dbg-block/parent stack-block))
(use-simulation
(lambda ()
- (let ((environment
- (compiled-code-block/environment
- (compiled-entry/block closure))))
- (if (ic-environment? environment)
- environment
- system-global-environment)))))
+ (if (compiled-closure? closure)
+ (let ((environment
+ (compiled-code-block/environment
+ (compiled-entry/block closure))))
+ (if (ic-environment? environment)
+ environment
+ system-global-environment))
+ system-global-environment))))
(if parent
(case (dbg-block/type parent)
((STACK)
(let ((index (dbg-block/ic-parent-index closure-block)))
(if index
(closure/get-value closure closure-block index)
- (compiled-code-block/environment
- (compiled-entry/block closure))))))
+ (use-simulation)))))
(else
(error "Illegal parent block" parent)))
(use-simulation)))))
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/uproc.scm,v 1.2 1991/06/10 22:45:37 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/uproc.scm,v 1.3 1991/10/29 13:31:30 cph Exp $
-Copyright (c) 1990 Massachusetts Institute of Technology
+Copyright (c) 1990-91 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(if (not offset)
((ucode-primitive primitive-object-ref 2) closure (+ 2 index))
((ucode-primitive primitive-object-ref 2)
- ((ucode-primitive compiled-code-address->block 1)
- closure)
+ (if (compiled-closure? closure)
+ ((ucode-primitive compiled-code-address->block 1) closure)
+ ;; Closure may also be a vector in this case.
+ closure)
(+ index offset))))
(define-integrable (compiled-closure/set! closure index offset value)
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/uenvir.scm,v 14.24 1991/07/21 07:02:17 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/uenvir.scm,v 14.25 1991/10/29 13:31:11 cph Exp $
Copyright (c) 1988-91 Massachusetts Institute of Technology
(find-stack-element environment
dbg-block/normal-closure-index
"closure")))
- (if (not (compiled-closure? closure))
+ (if (not (or (compiled-closure? closure) (vector? closure)))
(error "Frame missing closure" closure environment))
#|
;; Temporarily disable this consistency check until the compiler
(let ((parent (dbg-block/parent stack-block))
(use-simulation
(lambda ()
- (let ((environment
- (compiled-code-block/environment
- (compiled-entry/block closure))))
- (if (ic-environment? environment)
- environment
- system-global-environment)))))
+ (if (compiled-closure? closure)
+ (let ((environment
+ (compiled-code-block/environment
+ (compiled-entry/block closure))))
+ (if (ic-environment? environment)
+ environment
+ system-global-environment))
+ system-global-environment))))
(if parent
(case (dbg-block/type parent)
((STACK)
(let ((index (dbg-block/ic-parent-index closure-block)))
(if index
(closure/get-value closure closure-block index)
- (compiled-code-block/environment
- (compiled-entry/block closure))))))
+ (use-simulation)))))
(else
(error "Illegal parent block" parent)))
(use-simulation)))))