1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

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.
This commit is contained in:
Andy Wingo 2011-05-08 22:55:05 +02:00
parent 19301dc56d
commit 8f6a4b248b

View file

@ -190,7 +190,9 @@
;; ;;
(define (build-object-table x) (define (build-object-table x)
(define (add store 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 (record-case x
((<glil-program> meta body) ((<glil-program> meta body)
(fold (lambda (x table) (fold (lambda (x table)