diff options
author | Den Shabalin <den.shabalin@gmail.com> | 2013-12-08 20:18:56 +0100 |
---|---|---|
committer | Den Shabalin <den.shabalin@gmail.com> | 2013-12-16 14:07:40 +0100 |
commit | b97d44b2d813c1bf482b23efb353e4550818700c (patch) | |
tree | de432783867f16d86a016296156a793fa46b110c /pull-binary-libs.sh | |
parent | 75cc6cf256df9e152eaec771121ce0db9f7039f8 (diff) | |
download | scala-b97d44b2d813c1bf482b23efb353e4550818700c.tar.gz scala-b97d44b2d813c1bf482b23efb353e4550818700c.tar.bz2 scala-b97d44b2d813c1bf482b23efb353e4550818700c.zip |
SI-8047 change fresh name encoding to avoid owner corruption
Previously a following encoding was used to represent fresh
names that should be created at runtime of the quasiquote:
build.withFreshTermName(prefix1) { name$1 =>
...
build.withFreshTermName(prefixN) { name$N =>
tree
}
...
}
It turned out that this encoding causes symbol corruption when
tree defines symbols of its own. After being spliced into anonymous
functions, the owner chain of those symbols will become corrupted.
Now a simpler and probably better performing alternative is
used instead:
{
val name$1 = universe.build.freshTermName(prefix1)
...
val name$N = universe.build.freshTermName(prefixN)
tree
}
Here owner stays the same and doesn’t need any adjustment.
Diffstat (limited to 'pull-binary-libs.sh')
0 files changed, 0 insertions, 0 deletions