Skip to content

Commit

Permalink
Squash: Move class grouping in to IRLoader in Refiner
Browse files Browse the repository at this point in the history
  • Loading branch information
gzm0 committed Apr 9, 2023
1 parent b892c04 commit 857fd80
Showing 1 changed file with 3 additions and 4 deletions.
Expand Up @@ -42,8 +42,7 @@ final class Refiner(config: CommonPhaseConfig, checkIR: Boolean) {
symbolRequirements: SymbolRequirement, logger: Logger)(
implicit ec: ExecutionContext): Future[LinkingUnit] = {

val linkedClassesByName = classDefs.map(c => c._1.className -> c._1).toMap
irLoader.update(linkedClassesByName)
irLoader.update(classDefs)
infoLoader.update(logger)

val analysis = logger.timeFuture("Refiner: Compute reachability") {
Expand Down Expand Up @@ -105,8 +104,8 @@ private object Refiner {
private final class ClassDefIRLoader extends IRLoader {
private var classesByName: Map[ClassName, ClassDef] = _

def update(classesByName: Map[ClassName, ClassDef]): Unit = {
this.classesByName = classesByName
def update(classDefs: Seq[(ClassDef, Version)]): Unit = {
this.classesByName = classDefs.map(c => c._1.className -> c._1).toMap
}

def classesWithEntryPoints(): Iterable[ClassName] = {
Expand Down

0 comments on commit 857fd80

Please sign in to comment.