#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/fndvar.scm,v 1.3 1989/10/26 07:38:52 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/fndvar.scm,v 1.4 1990/03/28 06:11:14 jinx Exp $
-Copyright (c) 1988 Massachusetts Institute of Technology
+Copyright (c) 1988, 1990 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
block locative
(error "Closure variable in IC frame" variable))))
+(define (find-stack-overwrite-variable context variable)
+ (find-variable-no-tricks context variable
+ (lambda (variable locative)
+ variable
+ locative)
+ (lambda (variable block locative)
+ block locative
+ (error "Stack overwrite slot in IC frame" variable))))
+\f
(define (find-variable-internal context variable if-compiler if-ic)
(let ((rvalue (lvalue-known-value variable)))
(if (and rvalue
(let ((register (variable/register variable)))
(if register
(if-compiler variable (register-locative register))
- (find-block/variable context variable
- (lambda (offset-locative)
- (lambda (block locative)
- (if-compiler
- variable
- (offset-locative
- locative
- (variable-offset block variable)))))
- (lambda (block locative)
- (if-ic variable block locative)))))))))))
+ (find-variable-no-tricks context variable
+ if-compiler if-ic)))))))))
+
+(define (find-variable-no-tricks context variable if-compiler if-ic)
+ (find-block/variable context variable
+ (lambda (offset-locative)
+ (lambda (block locative)
+ (if-compiler variable
+ (offset-locative locative
+ (variable-offset block variable)))))
+ (lambda (block locative)
+ (if-ic variable block locative))))
\f
(define (find-definition-variable context lvalue)
(find-block/variable context lvalue
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rgstmt.scm,v 4.13 1990/03/21 02:12:01 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rgstmt.scm,v 4.14 1990/03/28 06:11:39 jinx Exp $
Copyright (c) 1988, 1990 Massachusetts Institute of Technology
(define (stack-overwrite-locative context target)
(cond ((variable? target)
- (find-closure-variable context target))
+ (find-stack-overwrite-variable context target))
((block? target)
(block-ancestor-or-self->locative
context