Skip to content

Commit da72317

Browse files
committed
Refine code documentation
1 parent ea48d0b commit da72317

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

compiler/src/dotty/tools/dotc/transform/init/Checking.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ object Checking {
3737
fieldsInited: mutable.Set[Symbol],
3838
parentsInited: mutable.Set[ClassSymbol],
3939
safePromoted: mutable.Set[Potential], // Potentials that can be safely promoted
40-
dependencies: mutable.Set[Dependency], // if the current class is a static object, its dependencies
40+
dependencies: mutable.Set[Dependency], // dependencies collected for checking global objects
4141
env: Env,
42-
init: Boolean = false // whether object is initialized, used in CycleChecker
42+
init: Boolean = false // whether the object is initialized, used in CycleChecker
4343
) {
4444
def withOwner[T](sym: Symbol)(op: State ?=> T): T =
4545
val state = this.copy(env = env.withOwner(sym))

compiler/src/dotty/tools/dotc/transform/init/CycleChecker.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ import scala.collection.mutable
2424
* For the check to be simple and fast, the algorithm uses a combination of
2525
* coarse-grained analysis and fine-grained analysis.
2626
*
27-
* Fine-grained abstractions are created from the initialization
27+
* Fine-grained dependencies are collected from the initialization
2828
* check for static objects.
2929
*
30-
* Coarse-grained abstractions are created as follows:
30+
* Coarse-grained dependencies are created as follows:
3131
*
3232
* - if a static object `O` is used in another class/static-object `B`,
3333
* then B -> O
@@ -374,6 +374,7 @@ class CycleChecker(cache: Cache) {
374374

375375
def clean() = {
376376
summaryCache.clear()
377+
proxyCache.clear()
377378
classesInCurrentRun.clear()
378379
objectsInCurrentRun.clear()
379380
}
File renamed without changes.

0 commit comments

Comments
 (0)