From c8e6f93ea0a4774dd1cd9aaa2a8af9e1b320add1 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 18 Aug 1988 04:37:21 +0000 Subject: [PATCH] Random editing to clean up code a bit. No change in functionality. --- v7/src/compiler/rtlgen/rgretn.scm | 41 ++++++++++++------------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/v7/src/compiler/rtlgen/rgretn.scm b/v7/src/compiler/rtlgen/rgretn.scm index d2d7706b6..68111f96e 100644 --- a/v7/src/compiler/rtlgen/rgretn.scm +++ b/v7/src/compiler/rtlgen/rgretn.scm @@ -1,6 +1,6 @@ #| -*-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 @@ -72,9 +72,11 @@ MIT in each case. |# (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) @@ -95,14 +97,14 @@ MIT in each case. |# (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) @@ -111,25 +113,21 @@ MIT in each case. |# (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))))) (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) @@ -184,11 +182,4 @@ MIT in each case. |# (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 -- 2.25.1