From 7f9ded79fac1378f24b8268a5dfe82b203dd8236 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 3 Jun 1988 14:58:15 +0000 Subject: [PATCH] (hash-table-insert!) If `hash' is false, do not link the resulting element into a hash bucket -- just save it in the value chain. --- v7/src/compiler/rtlopt/rcseht.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/v7/src/compiler/rtlopt/rcseht.scm b/v7/src/compiler/rtlopt/rcseht.scm index 6dec14e3b..c8c5b420b 100644 --- a/v7/src/compiler/rtlopt/rcseht.scm +++ b/v7/src/compiler/rtlopt/rcseht.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlopt/rcseht.scm,v 4.2 1987/12/30 07:13:28 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlopt/rcseht.scm,v 4.3 1988/06/03 14:58:15 cph Exp $ Copyright (c) 1987 Massachusetts Institute of Technology @@ -92,10 +92,12 @@ MIT in each case. |# (let ((element (make-element expression)) (cost (rtl:expression-cost expression))) (set-element-cost! element cost) - (let ((next (hash-table-ref hash))) - (set-element-next-hash! element next) - (if next (set-element-previous-hash! next element))) - (hash-table-set! hash element) + (if hash + (begin + (let ((next (hash-table-ref hash))) + (set-element-next-hash! element next) + (if next (set-element-previous-hash! next element))) + (hash-table-set! hash element))) (cond ((not class) (set-element-first-value! element element)) ((< cost (element-cost class)) -- 2.25.1