aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/Compiler.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-07-01 15:28:11 +0200
committerMartin Odersky <odersky@gmail.com>2015-07-06 17:46:44 +0200
commit64f65182f6e4f80b03d45923e02441dafe0755b4 (patch)
tree68301908a5ce6513b43a9778a1f41b8e48bdbadf /src/dotty/tools/dotc/Compiler.scala
parent70f18eb4aa5aff64aa8571c16026c456bc1db5fc (diff)
downloaddotty-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/dotc/Compiler.scala')
-rw-r--r--src/dotty/tools/dotc/Compiler.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/Compiler.scala b/src/dotty/tools/dotc/Compiler.scala
index a14aa3655..827134e84 100644
--- a/src/dotty/tools/dotc/Compiler.scala
+++ b/src/dotty/tools/dotc/Compiler.scala
@@ -40,7 +40,8 @@ class Compiler {
List(new FrontEnd),
List(new PostTyper),
List(new Pickler),
- List(new FirstTransform),
+ List(new FirstTransform,
+ new CheckReentrant),
List(new RefChecks,
new ElimRepeated,
new NormalizeFlags,