From 75902f99fbe3998096784e869357c6f3215914de Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Sun, 6 Nov 1988 13:55:39 +0000 Subject: [PATCH] An lvalue whose only backward link is itself may be known. This is a patch. General loops should work as well. --- v7/src/compiler/fgopt/folcon.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) -- 2.25.1