From ea5b4874201a339db91c828522b987e29e367477 Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Thu, 20 Apr 1995 03:23:02 +0000 Subject: [PATCH] Fixed thinko with previous change. --- v8/src/compiler/midend/cleanup.scm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/v8/src/compiler/midend/cleanup.scm b/v8/src/compiler/midend/cleanup.scm index 0e6df788a..5708ad782 100644 --- a/v8/src/compiler/midend/cleanup.scm +++ b/v8/src/compiler/midend/cleanup.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: cleanup.scm,v 1.14 1995/04/17 18:48:35 adams Exp $ +$Id: cleanup.scm,v 1.15 1995/04/20 03:23:02 adams Exp $ Copyright (c) 1994-1995 Massachusetts Institute of Technology @@ -580,10 +580,13 @@ MIT in each case. |# (default)))) (define (cleanup/rename renames token) - (let ((place (cleanup/env/lookup renames token))) - (if (not place) - token - (lookup/name place)))) + (let loop ((bindings renames)) + (cond ((not (pair? bindings)) + token) + ((eq? token (cleanup/binding/name (car bindings))) + (lookup/name (cleanup/binding/value (car bindings)))) + (else + (loop (cdr bindings)))))) (define (cleanup/renamings env names) (map (lambda (name) -- 2.25.1