summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-05-08 22:55:05 +0200
committerAndy Wingo <wingo@pobox.com>2011-05-08 22:55:05 +0200
commit8f6a4b248b12db2c56ab29e909ba1441aa8f512d (patch)
treee80ce8d64722c0a4c27d24530d2b30815921c784
parent19301dc56d297a24eedc48928bb1b7df40cd4688 (diff)
downloadguile-8f6a4b248b12db2c56ab29e909ba1441aa8f512d.tar.gz
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.
-rw-r--r--module/language/glil/compile-assembly.scm4
1 files changed, 3 insertions, 1 deletions
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
((<glil-program> meta body)
(fold (lambda (x table)