From: Guillermo J. Rozas Date: Sun, 6 Nov 1988 13:55:39 +0000 (+0000) Subject: An lvalue whose only backward link is itself may be known. X-Git-Tag: 20090517-FFI~12431 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=75902f99fbe3998096784e869357c6f3215914de;p=mit-scheme.git An lvalue whose only backward link is itself may be known. This is a patch. General loops should work as well. --- diff --git a/v7/src/compiler/fgopt/folcon.scm b/v7/src/compiler/fgopt/folcon.scm index 813c924b7..e86bb5487 100644 --- a/v7/src/compiler/fgopt/folcon.scm +++ b/v7/src/compiler/fgopt/folcon.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/fgopt/folcon.scm,v 4.2 1987/12/30 06:44:31 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/fgopt/folcon.scm,v 4.3 1988/11/06 13:55:39 jinx Exp $ Copyright (c) 1987 Massachusetts Institute of Technology @@ -75,7 +75,11 @@ MIT in each case. |# (define (delete-if-known! lvalue) (if (and (not (lvalue-known-value lvalue)) - (for-all? (lvalue-backward-links lvalue) lvalue-known-value)) + (for-all? (lvalue-backward-links lvalue) + (lambda (lvalue*) + (if (eq? lvalue lvalue*) + true + (lvalue-known-value lvalue*))))) (let ((value (car (lvalue-values lvalue)))) (for-each (lambda (lvalue*) (if (lvalue-mark-set? lvalue* 'KNOWABLE)