Small type-fold cleanup
authorAndy Wingo <wingo@pobox.com>
Fri, 4 Jul 2014 07:18:36 +0000 (09:18 +0200)
committerAndy Wingo <wingo@pobox.com>
Fri, 4 Jul 2014 07:18:36 +0000 (09:18 +0200)
* module/language/cps/type-fold.scm (fold-constants*): Remove stale
  branches that were there when we only type folded on limited-size
  branches.

module/language/cps/type-fold.scm

index 6fc48c4..0c7d1d5 100644 (file)
              (($ $continue k src (and fun ($ $fun)))
               ($continue k src ,(visit-fun fun)))
              (($ $continue k src (and primcall ($ $primcall)))
-              ,(if (and folded?
-                        (bitvector-ref folded? (label->idx label)))
+              ,(if (bitvector-ref folded? (label->idx label))
                    (let ((val (vector-ref folded-values (label->idx label))))
                      ;; Uncomment for debugging.
                      ;; (pk 'folded src primcall val)
                            ($continue k* src ,primcall)))))
                    term))
              (($ $continue kf src ($ $branch kt ($ $primcall)))
-              ,(if (and folded?
-                        (bitvector-ref folded? (label->idx label)))
+              ,(if (bitvector-ref folded? (label->idx label))
                    ;; Folded branch.
                    (let ((val (vector-ref folded-values (label->idx label))))
                      (build-cps-term