Skip to content

Commit 57fad7a

Browse files
committed
Drop lateUnits
After having implemented the interface between IDE and SymbolLoaders it turns out lateUnits is not needed, and lateFiles is used only internally.
1 parent b1bba12 commit 57fad7a

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

compiler/src/dotty/tools/dotc/Run.scala

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
7272
private[this] var myUnits: List[CompilationUnit] = _
7373
private[this] var myUnitsCached: List[CompilationUnit] = _
7474
private[this] var myFiles: Set[AbstractFile] = _
75-
private[this] val myLateUnits = mutable.ListBuffer[CompilationUnit]()
76-
private[this] var myLateFiles = mutable.Set[AbstractFile]()
7775

7876
/** The compilation units currently being compiled, this may return different
7977
* results over time.
@@ -95,11 +93,8 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
9593
myFiles
9694
}
9795

98-
/** Units that are added from source completers but that are not compiled in current run. */
99-
def lateUnits: List[CompilationUnit] = myLateUnits.toList
100-
101-
/** The source files of all late units, as a set */
102-
def lateFiles: collection.Set[AbstractFile] = myLateFiles
96+
/** The source files of all late entered symbols, as a set */
97+
private[this] var lateFiles = mutable.Set[AbstractFile]()
10398

10499
def getSource(fileName: String): SourceFile = {
105100
val f = new PlainFile(io.Path(fileName))
@@ -196,9 +191,8 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
196191
*/
197192
def enterRoots(file: AbstractFile)(implicit ctx: Context): Unit =
198193
if (!files.contains(file) && !lateFiles.contains(file)) {
194+
lateFiles += file
199195
val unit = new CompilationUnit(getSource(file.path))
200-
myLateUnits += unit
201-
myLateFiles += file
202196
enterRoots(unit)(runContext.fresh.setCompilationUnit(unit))
203197
}
204198

0 commit comments

Comments
 (0)