diff options
author | Martin Odersky <odersky@gmail.com> | 2017-04-11 08:55:17 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-11 09:33:13 +0200 |
commit | bec4f9d2cbf7fe000efb849abd5d86a34a0a084a (patch) | |
tree | f9c50589892507c2cbce0dac6b8ed79aaa81d8fc /compiler/src/dotty/tools/dotc/core/NameKinds.scala | |
parent | a5b6bd6ac30b3ef618314ee8eff7b1d71b0fe131 (diff) | |
download | dotty-bec4f9d2cbf7fe000efb849abd5d86a34a0a084a.tar.gz dotty-bec4f9d2cbf7fe000efb849abd5d86a34a0a084a.tar.bz2 dotty-bec4f9d2cbf7fe000efb849abd5d86a34a0a084a.zip |
Better documentation of sharable structures in Names, NameKinds
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/NameKinds.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/NameKinds.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/NameKinds.scala b/compiler/src/dotty/tools/dotc/core/NameKinds.scala index bee39adaa..0f08e4701 100644 --- a/compiler/src/dotty/tools/dotc/core/NameKinds.scala +++ b/compiler/src/dotty/tools/dotc/core/NameKinds.scala @@ -13,6 +13,9 @@ import collection.mutable object NameKinds { + // These are sharable since all NameKinds are created eagerly at the start of the program + // before any concurrent threads are forked. for this to work, NameKinds should never + // be created lazily or in modules that start running after compilers are forked. @sharable private val simpleNameKinds = new mutable.HashMap[Int, ClassifiedNameKind] @sharable private val qualifiedNameKinds = new mutable.HashMap[Int, QualifiedNameKind] @sharable private val uniqueNameKinds = new mutable.HashMap[String, UniqueNameKind] |