From 8f6a4b248b12db2c56ab29e909ba1441aa8f512d Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 8 May 2011 22:55:05 +0200 Subject: [PATCH] fix some duplication in object tables * module/language/glil/compile-assembly.scm (build-object-table): Don't add the same value to an object table twice. --- module/language/glil/compile-assembly.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/language/glil/compile-assembly.scm b/module/language/glil/compile-assembly.scm index d02b9030c..a0818227d 100644 --- a/module/language/glil/compile-assembly.scm +++ b/module/language/glil/compile-assembly.scm @@ -190,7 +190,9 @@ ;; (define (build-object-table x) (define (add store x) - (vhash-cons x (1+ (vlist-length store)) store)) + (if (vhash-assoc x store) + store + (vhash-cons x (1+ (vlist-length store)) store))) (record-case x (( meta body) (fold (lambda (x table)