If a combination's value is constant, do not replace it by the
authorChris Hanson <org/chris-hanson/cph>
Sat, 18 Apr 1987 00:18:35 +0000 (00:18 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sat, 18 Apr 1987 00:18:35 +0000 (00:18 +0000)
constant value, because we have no side-effect analyzer to determine
whether that is safe.

v7/src/compiler/rtlgen/rgcomb.scm

index c9e3aa870906aea5aa93618bbf78db1ed620ae5d..cb05e5bcae4c109546fd88be5d1c9981a5c88f81 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rgcomb.scm,v 1.9 1987/04/17 07:46:08 cph Exp $
+$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 $
 
 Copyright (c) 1987 Massachusetts Institute of Technology
 
@@ -63,6 +63,9 @@ 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)
@@ -75,7 +78,9 @@ 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