mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +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:
parent
19301dc56d
commit
8f6a4b248b
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue