diff options
author | Martin Odersky <odersky@gmail.com> | 2015-05-01 18:38:31 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-05-01 18:38:56 +0200 |
commit | d9c215757f49d7984889e8e695828f71f685f163 (patch) | |
tree | 19ccea9593192bcc56ffd61e7d16350e41469f87 /src/dotty/tools/dotc/Compiler.scala | |
parent | a263b5f3aaabe96e7ad238cb18e8f9b98d287ffc (diff) | |
download | dotty-d9c215757f49d7984889e8e695828f71f685f163.tar.gz dotty-d9c215757f49d7984889e8e695828f71f685f163.tar.bz2 dotty-d9c215757f49d7984889e8e695828f71f685f163.zip |
New miniphase: ExpandPrivate
A late miniphase which resets private flag of all
members that are not accessed from within same class.
Replaces logic in RefChecks. Doing this late has two
advantages
- we can use name expansion, because references are
symbolic, so the names of symbols and references
to them do not need to correspond anymore.
- we can automatically correct for symbols moved in earlier
phases (e.g. lifted out by LambdaLift).
Diffstat (limited to 'src/dotty/tools/dotc/Compiler.scala')
-rw-r--r-- | src/dotty/tools/dotc/Compiler.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/Compiler.scala b/src/dotty/tools/dotc/Compiler.scala index 102d99347..046e3861d 100644 --- a/src/dotty/tools/dotc/Compiler.scala +++ b/src/dotty/tools/dotc/Compiler.scala @@ -65,7 +65,12 @@ class Compiler { List(new LambdaLift, // in this mini-phase block scopes are incorrect. No phases that rely on scopes should be here new Flatten, new RestoreScopes), - List(/*new PrivateToStatic,*/ new CollectEntryPoints, new LabelDefs, new ElimWildcardIdents, new TraitConstructors), + List(/*new PrivateToStatic,*/ + new ExpandPrivate, + new CollectEntryPoints, + new LabelDefs, + new ElimWildcardIdents, + new TraitConstructors), List(new GenBCode) ) |