Random editing to clean up code a bit. No change in functionality.
authorChris Hanson <org/chris-hanson/cph>
Thu, 18 Aug 1988 04:37:21 +0000 (04:37 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 18 Aug 1988 04:37:21 +0000 (04:37 +0000)
v7/src/compiler/rtlgen/rgretn.scm

index d2d7706b67d3da3134132a849d886e4d38066070..68111f96ed343db7b0c4a1805fd3ee2c6c556191 100644 (file)
@@ -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)))))
 \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)
@@ -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