#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rgretn.scm,v 4.4 1988/08/18 01:37:05 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rgretn.scm,v 4.5 1988/08/18 04:37:21 cph Exp $
Copyright (c) 1988 Massachusetts Institute of Technology
(let ((continuation (rvalue-known-value operator)))
(if continuation
((method-table-lookup simple-methods (continuation/type continuation))
- block
- operator
- not-on-stack?
+ (if not-on-stack?
+ (return-operator/pop-frames block operator offset 0)
+ (scfg*scfg->scfg!
+ (return-operator/pop-frames block operator offset 1)
+ (generate/continuation-entry/pop-extra continuation)))
operand
offset
continuation)
(make-method-table continuation-types false))
(define-method-table-entry 'EFFECT simple-methods
- (lambda (block operator not-on-stack? operand offset continuation)
+ (lambda (prefix operand offset continuation)
(scfg-append!
(effect-prefix operand offset)
- (common-prefix block operator not-on-stack? offset continuation)
+ prefix
(generate/node (continuation/entry-node continuation)))))
(define-method-table-entries '(REGISTER VALUE) simple-methods
- (lambda (block operator not-on-stack? operand offset continuation)
+ (lambda (prefix operand offset continuation)
(scfg-append!
(if (lvalue-integrated? (continuation/parameter continuation))
(effect-prefix operand offset)
(lambda (expression)
(rtl:make-assignment (continuation/register continuation)
expression))))
- (common-prefix block operator not-on-stack? offset continuation)
+ prefix
(generate/node (continuation/entry-node continuation)))))
(define-method-table-entry 'PUSH simple-methods
- (lambda (block operator not-on-stack? operand offset continuation)
+ (lambda (prefix operand offset continuation)
(scfg*scfg->scfg!
- (let ((prefix
- (common-prefix block operator not-on-stack? offset continuation)))
- (if (cfg-null? prefix)
- ((return-operand/value-generator operand) offset rtl:make-push)
- (use-temporary-register operand offset prefix rtl:make-push)))
+ (if (cfg-null? prefix)
+ ((return-operand/value-generator operand) offset rtl:make-push)
+ (use-temporary-register operand offset prefix rtl:make-push))
(generate/node (continuation/entry-node continuation)))))
\f
(define-method-table-entry 'PREDICATE simple-methods
- (lambda (block operator not-on-stack? operand offset continuation)
+ (lambda (prefix operand offset continuation)
(let ((node (continuation/entry-node continuation))
- (value (return-operand/known-value operand))
- (prefix
- (common-prefix block operator not-on-stack? offset continuation)))
+ (value (return-operand/known-value operand)))
(if value
(scfg-append!
(effect-prefix operand offset)
(define-integrable (effect-prefix operand offset)
((return-operand/effect-generator operand) offset))
-(define (common-prefix block operator not-on-stack? offset continuation)
- (if not-on-stack?
- (return-operator/pop-frames block operator offset 0)
- (scfg*scfg->scfg!
- (return-operator/pop-frames block operator offset 1)
- (generate/continuation-entry/pop-extra continuation))))
-
)
\ No newline at end of file