diff options
author | Martin Odersky <odersky@gmail.com> | 2015-07-01 15:28:11 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-07-06 17:46:44 +0200 |
commit | 64f65182f6e4f80b03d45923e02441dafe0755b4 (patch) | |
tree | 68301908a5ce6513b43a9778a1f41b8e48bdbadf /src/dotty/tools/package.scala | |
parent | 70f18eb4aa5aff64aa8571c16026c456bc1db5fc (diff) | |
download | dotty-64f65182f6e4f80b03d45923e02441dafe0755b4.tar.gz dotty-64f65182f6e4f80b03d45923e02441dafe0755b4.tar.bz2 dotty-64f65182f6e4f80b03d45923e02441dafe0755b4.zip |
Add reentrancy checking
New miniphase CheckRentrant verifies that compiled program is
without vars accessible through global roots if -Ycheck-reentrant
option is set.
Known shortcoming: Array elements are currently not considered as vars. This
is because in many programs arrays are used as an efficient container
for immutable fields.
Diffstat (limited to 'src/dotty/tools/package.scala')
-rw-r--r-- | src/dotty/tools/package.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dotty/tools/package.scala b/src/dotty/tools/package.scala index f23b62862..5dae82b71 100644 --- a/src/dotty/tools/package.scala +++ b/src/dotty/tools/package.scala @@ -1,9 +1,13 @@ package dotty +import scala.annotation.Annotation package object tools { type FatalError = scala.reflect.internal.FatalError val FatalError = scala.reflect.internal.FatalError + class sharable extends Annotation + class unshared extends Annotation + val ListOfNil = Nil :: Nil /** True if two lists have the same length. Since calling length on linear sequences |