Introduce IncrementalCompilerRunner#markDirty

This commit is contained in:
Alexey Tsvetkov
2017-08-29 00:03:24 +03:00
parent 53d911ab99
commit 65529fa866
4 changed files with 9 additions and 7 deletions
@@ -28,7 +28,7 @@ import java.io.File
/**
* Incremental cache common for JVM and JS
*/
open class IncrementalCacheCommon(workingDir: File) : BasicMapsOwner(workingDir) {
abstract class IncrementalCacheCommon(workingDir: File) : BasicMapsOwner(workingDir) {
companion object {
private val SUBTYPES = "subtypes"
private val SUPERTYPES = "supertypes"
@@ -55,6 +55,8 @@ open class IncrementalCacheCommon(workingDir: File) : BasicMapsOwner(workingDir)
fun getSourceFileIfClass(fqName: FqName): File? =
classFqNameToSourceMap[fqName]
abstract fun markDirty(removedAndCompiledSources: List<File>)
protected fun addToClassStorage(proto: ProtoBuf.Class, nameResolver: NameResolver, srcFile: File) {
val supertypes = proto.supertypes(TypeTable(proto.typeTable))
val parents = supertypes.map { nameResolver.getClassId(it.className).asSingleFqName() }
@@ -80,7 +80,7 @@ open class IncrementalCacheImpl(
protected open fun debugLog(message: String) {}
fun markOutputClassesDirty(removedAndCompiledSources: List<File>) {
override fun markDirty(removedAndCompiledSources: List<File>) {
for (sourceFile in removedAndCompiledSources) {
val classes = sourceToClassesMap[sourceFile]
classes.forEach {