aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Contexts.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2014-03-31 21:29:28 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-04-01 14:24:05 +0200
commitf651ca5ed1caf70aabe0d803949f430d08bf3915 (patch)
treeeb98347f653f47d6bb8e6e67f10af54410c65c24 /src/dotty/tools/dotc/core/Contexts.scala
parent2033b5607a41b77590b8d23bf5c40c906a0b42e7 (diff)
downloaddotty-f651ca5ed1caf70aabe0d803949f430d08bf3915.tar.gz
dotty-f651ca5ed1caf70aabe0d803949f430d08bf3915.tar.bz2
dotty-f651ca5ed1caf70aabe0d803949f430d08bf3915.zip
Documentation and a bit of cleanup.
Added documentation for non-trivial logic in Contexts, Phases and TreeTransforms. Removed redundant vars and casts
Diffstat (limited to 'src/dotty/tools/dotc/core/Contexts.scala')
-rw-r--r--src/dotty/tools/dotc/core/Contexts.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala
index b0214a631..ac27b74c7 100644
--- a/src/dotty/tools/dotc/core/Contexts.scala
+++ b/src/dotty/tools/dotc/core/Contexts.scala
@@ -181,6 +181,11 @@ object Contexts {
protected def searchHistory_= (searchHistory: SearchHistory) = _searchHistory = searchHistory
def searchHistory: SearchHistory = _searchHistory
+ /** Those fields are used to cache phases created in withPhase.
+ * phasedCtx is first phase with altered phase ever requested.
+ * phasedCtxs is array that uses phaseId's as indexes,
+ * contexts are created only on request and cached in this array
+ */
private var phasedCtx: Context = _
private var phasedCtxs: Array[Context] = _