@@ -76,8 +76,8 @@ class ExtractDependencies extends Phase {
76
76
collector.traverse(unit.tpdTree)
77
77
78
78
if (ctx.settings.YdumpSbtInc .value) {
79
- val deps = rec.foundDeps.map { case (clazz, found) => s " $clazz: ${found.classesString}" }.toArray[Object ]
80
- val names = rec.foundDeps.map { case (clazz, found) => s " $clazz: ${found.namesString}" }.toArray[Object ]
79
+ val deps = rec.foundDeps.iterator. map { case (clazz, found) => s " $clazz: ${found.classesString}" }.toArray[Object ]
80
+ val names = rec.foundDeps.iterator. map { case (clazz, found) => s " $clazz: ${found.namesString}" }.toArray[Object ]
81
81
Arrays .sort(deps)
82
82
Arrays .sort(names)
83
83
@@ -325,7 +325,7 @@ class DependencyRecorder {
325
325
/** A map from a non-local class to the names and classes it uses, this does not include
326
326
* names which are only defined and not referenced.
327
327
*/
328
- def foundDeps : collection. Map [Symbol , FoundDepsInClass ] = _foundDeps
328
+ def foundDeps : util. ReadOnlyMap [Symbol , FoundDepsInClass ] = _foundDeps
329
329
330
330
/** Record a reference to the name of `sym` from the current non-local
331
331
* enclosing class.
@@ -429,13 +429,13 @@ class DependencyRecorder {
429
429
if (fromClass.exists)
430
430
lastFoundCache.addDependency(toClass, context)
431
431
432
- private val _foundDeps = new mutable. HashMap [Symbol , FoundDepsInClass ]
432
+ private val _foundDeps = new util. EqHashMap [Symbol , FoundDepsInClass ]
433
433
434
434
/** Send the collected dependency information to Zinc and clear the local caches. */
435
435
def sendToZinc ()(using Context ): Unit =
436
436
ctx.withIncCallback: cb =>
437
437
val siblingClassfiles = new mutable.HashMap [PlainFile , Path ]
438
- foundDeps .foreach:
438
+ _foundDeps.iterator .foreach:
439
439
case (clazz, foundDeps) =>
440
440
val className = classNameAsString(clazz)
441
441
foundDeps.names.foreach: (usedName, scopes) =>
0 commit comments