Remove old IC: remove flags from CompilationResult
Original commit: 50091bfac8
This commit is contained in:
@@ -309,7 +309,7 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) {
|
|||||||
return OK
|
return OK
|
||||||
}
|
}
|
||||||
|
|
||||||
processChanges(filesToCompile.values().toSet(), allCompiledFiles, dataManager, incrementalCaches.values, changesInfo, fsOperations)
|
changesInfo.processChangesUsingLookups(filesToCompile.values().toSet(), dataManager, fsOperations, incrementalCaches.values)
|
||||||
incrementalCaches.values.forEach { it.cleanDirtyInlineFunctions() }
|
incrementalCaches.values.forEach { it.cleanDirtyInlineFunctions() }
|
||||||
|
|
||||||
return OK
|
return OK
|
||||||
@@ -814,51 +814,6 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun processChanges(
|
|
||||||
compiledFiles: Set<File>,
|
|
||||||
allCompiledFiles: MutableSet<File>,
|
|
||||||
dataManager: BuildDataManager,
|
|
||||||
caches: Collection<JpsIncrementalCacheImpl>,
|
|
||||||
compilationResult: CompilationResult,
|
|
||||||
fsOperations: FSOperationsHelper
|
|
||||||
) {
|
|
||||||
if (IncrementalCompilation.isExperimental()) {
|
|
||||||
compilationResult.doProcessChangesUsingLookups(compiledFiles, dataManager, fsOperations, caches)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
compilationResult.doProcessChanges(compiledFiles, allCompiledFiles, caches, fsOperations)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun CompilationResult.doProcessChanges(
|
|
||||||
compiledFiles: Set<File>,
|
|
||||||
allCompiledFiles: MutableSet<File>,
|
|
||||||
caches: Collection<JpsIncrementalCacheImpl>,
|
|
||||||
fsOperations: FSOperationsHelper
|
|
||||||
) {
|
|
||||||
KotlinBuilder.LOG.debug("compilationResult = $this")
|
|
||||||
|
|
||||||
when {
|
|
||||||
inlineAdded -> {
|
|
||||||
allCompiledFiles.clear()
|
|
||||||
fsOperations.markChunk(recursively = true, kotlinOnly = true, excludeFiles = compiledFiles)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
constantsChanged -> {
|
|
||||||
fsOperations.markChunk(recursively = true, kotlinOnly = false, excludeFiles = allCompiledFiles)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
protoChanged -> {
|
|
||||||
fsOperations.markChunk(recursively = false, kotlinOnly = true, excludeFiles = allCompiledFiles)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inlineChanged) {
|
|
||||||
val files = caches.flatMap { it.getFilesToReinline() }
|
|
||||||
fsOperations.markFiles(files, excludeFiles = compiledFiles)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class JpsICReporter : ICReporter {
|
private class JpsICReporter : ICReporter {
|
||||||
override fun report(message: ()->String) {
|
override fun report(message: ()->String) {
|
||||||
if (KotlinBuilder.LOG.isDebugEnabled) {
|
if (KotlinBuilder.LOG.isDebugEnabled) {
|
||||||
@@ -867,7 +822,7 @@ private class JpsICReporter : ICReporter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun CompilationResult.doProcessChangesUsingLookups(
|
private fun CompilationResult.processChangesUsingLookups(
|
||||||
compiledFiles: Set<File>,
|
compiledFiles: Set<File>,
|
||||||
dataManager: BuildDataManager,
|
dataManager: BuildDataManager,
|
||||||
fsOperations: FSOperationsHelper,
|
fsOperations: FSOperationsHelper,
|
||||||
|
|||||||
Reference in New Issue
Block a user