Solution to constant folding problem is overly conservative. Earlier
authorChris Hanson <org/chris-hanson/cph>
Tue, 21 Apr 1987 14:23:43 +0000 (14:23 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 21 Apr 1987 14:23:43 +0000 (14:23 +0000)
change (which guaranteed that the combination-value became unknown
when the operator or operands were) is sufficient.

v7/src/compiler/rtlgen/rgcomb.scm

index cb05e5bcae4c109546fd88be5d1c9981a5c88f81..420ef310420e01b348b6215e8955741f94530cf6 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rgcomb.scm,v 1.10 1987/04/18 00:18:35 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rgcomb.scm,v 1.11 1987/04/21 14:23:43 cph Exp $
 
 Copyright (c) 1987 Massachusetts Institute of Technology
 
@@ -63,9 +63,6 @@ MIT in each case. |#
       (combination:subproblem combination offset rest-generator)))
 
 (define (combination:constant combination offset rest-generator)
-  ;; Can't do anything special here without side-effect analysis.
-  (combination:normal combination offset rest-generator)
-#|
   (let ((value (combination-value combination))
        (next (snode-next combination)))
     (cond ((value-temporary? value)
@@ -78,9 +75,7 @@ MIT in each case. |#
                                rvalue->sexpression))
          ((value-ignore? value)
           (generate:next next offset rest-generator))
-         (else (error "Unknown combination value" value))))
-|#
-  )
+         (else (error "Unknown combination value" value)))))
 
 (define (combination:primitive combination offset rest-generator)
   (let ((open-coder