more robust alpha-renaming
authorAndy Wingo <wingo@pobox.com>
Wed, 21 Sep 2011 06:44:19 +0000 (08:44 +0200)
committerAndy Wingo <wingo@pobox.com>
Wed, 21 Sep 2011 06:58:27 +0000 (08:58 +0200)
commit5d5e4f399a38e530a5f0081d6fdec80d3eb4736a
tree1977f7584f6edb45122599906a4527898372171d
parent4f33b47591e823500d800ee4f9d98c8ae98ceab8
more robust alpha-renaming

* module/language/tree-il/optimize.scm (fresh-gensyms): New helper.
  (alpha-rename): Name the new gensyms using the old names as templates,
  not the old gensyms.  This prevents accidental collisions between
  gensyms, if #{x 1}# becomes #{x 12}# instead of #{x 2}#.
module/language/tree-il/optimize.scm