diff options
author | Andy Wingo <wingo@pobox.com> | 2011-05-08 22:55:05 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-05-08 22:55:05 +0200 |
commit | 8f6a4b248b12db2c56ab29e909ba1441aa8f512d (patch) | |
tree | e80ce8d64722c0a4c27d24530d2b30815921c784 | |
parent | 19301dc56d297a24eedc48928bb1b7df40cd4688 (diff) | |
download | guile-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.scm | 4 |
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) |