Fix after review KT-CR-4441 of cc5382b3

Simplify API of InlineConstTracker
In ConstLowering: Move transformer logic to another class to avoid mutable state. Avoid marking all files in module as module. Support of inner classes.

#KT-46506 Fixed
This commit is contained in:
Aleksei.Cherepanov
2021-09-16 00:30:16 +03:00
committed by teamcityserver
parent c2715d26f1
commit 47a1dd27dd
6 changed files with 53 additions and 55 deletions
@@ -19,7 +19,6 @@ package org.jetbrains.kotlin.daemon.client
import org.jetbrains.kotlin.daemon.common.*
import org.jetbrains.kotlin.incremental.components.ExpectActualTracker
import org.jetbrains.kotlin.incremental.components.InlineConstTracker
import org.jetbrains.kotlin.incremental.components.ConstantRef
import org.jetbrains.kotlin.incremental.components.LookupInfo
import org.jetbrains.kotlin.incremental.components.LookupTracker
import org.jetbrains.kotlin.incremental.js.IncrementalDataProvider
@@ -121,8 +120,8 @@ open class CompilerCallbackServicesFacadeServer(
expectActualTracker!!.report(File(expectedFilePath), File(actualFilePath))
}
override fun inlineConstTracker_report(className: String, cRefs: Collection<ConstantRef>) {
inlineConstTracker?.report(className, cRefs) ?: throw NullPointerException("inlineConstTracker was not initialized")
override fun inlineConstTracker_report(filePath: String, owner: String, name: String, constType: String) {
inlineConstTracker?.report(filePath, owner, name, constType) ?: throw NullPointerException("inlineConstTracker was not initialized")
}
override fun incrementalResultsConsumer_processHeader(headerMetadata: ByteArray) {