1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-29 22:40:34 +02:00

avoid gensym when making labels in psyntax

* module/ice-9/psyntax.scm (gen-label): Avoid gensym, as we don't need
  to make symbols.

* module/ice-9/psyntax-pp.scm: Regenerate.
This commit is contained in:
Andy Wingo 2012-01-19 13:08:19 +01:00
parent 9b0975f1dc
commit 7d02e25661
2 changed files with 11461 additions and 11701 deletions

File diff suppressed because it is too large Load diff

View file

@ -636,7 +636,12 @@
;; labels must be comparable with "eq?", have read-write invariance,
;; and distinct from symbols.
(define gen-label
(lambda () (symbol->string (gensym "i"))))
(let ((i 0))
(lambda ()
(let ((n i))
;; FIXME: Use atomic ops.
(set! i (1+ n))
(number->string n 36)))))
(define gen-labels
(lambda (ls)