[JS IR] IC invalidation performance improvements
- Cache signature readers and deserializers - Cache inline function hashes - IC refactoring - [gradle] Use hash of module path for cache dir; Fix KT-51238 ^KT-51238 Fixed
This commit is contained in:
committed by
Space
parent
290a06676d
commit
43a0876c26
@@ -254,29 +254,25 @@ abstract class AbstractInvalidationTest : KotlinTestWithEnvironment() {
|
||||
mainArguments: List<String>?,
|
||||
executor: CacheExecutor
|
||||
): CacheUpdateStatus {
|
||||
val (libraries, dependencyGraph, configMD5) = CacheConfiguration(dependencies, compilerConfiguration)
|
||||
|
||||
val modulePath = moduleName.toCanonicalPath()
|
||||
|
||||
val icCacheMap: Map<ModulePath, CacheInfo> = loadCacheInfo(icCachePaths).also {
|
||||
it[modulePath] = CacheInfo.loadOrCreate(
|
||||
cachePath,
|
||||
moduleName,
|
||||
configHash = configMD5
|
||||
)
|
||||
it[modulePath] = CacheInfo.loadOrCreate(cachePath, modulePath)
|
||||
}
|
||||
|
||||
return actualizeCacheForModule(
|
||||
moduleName = modulePath,
|
||||
cachePath = cachePath,
|
||||
compilerConfiguration = compilerConfiguration,
|
||||
configMD5 = configMD5,
|
||||
libraries = libraries,
|
||||
dependencyGraph = dependencyGraph,
|
||||
icCacheMap = icCacheMap,
|
||||
irFactory = irFactory,
|
||||
mainArguments = mainArguments,
|
||||
executor = executor
|
||||
)
|
||||
val statuses = mutableMapOf<String, CacheUpdateStatus>()
|
||||
actualizeCaches(
|
||||
modulePath,
|
||||
compilerConfiguration,
|
||||
dependencies,
|
||||
icCacheMap.map { it.value.path },
|
||||
{ irFactory },
|
||||
mainArguments,
|
||||
executor
|
||||
) { updateStatus, updatedModule ->
|
||||
statuses[updatedModule] = updateStatus
|
||||
}
|
||||
return statuses[modulePath] ?: error("Status is missed for $modulePath")
|
||||
}
|
||||
|
||||
private fun KotlinCoreEnvironment.createPsiFile(file: File): KtFile {
|
||||
@@ -347,4 +343,4 @@ abstract class AbstractInvalidationTest : KotlinTestWithEnvironment() {
|
||||
const val TEST_DATA_DIR_PATH = "js/js.translator/testData/"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,6 +112,9 @@ class TestModuleCache(val files: MutableMap<String, FileCache>) {
|
||||
files.remove(path)
|
||||
}
|
||||
|
||||
override fun invalidate() {
|
||||
}
|
||||
|
||||
override fun commitLibraryInfo(libraryPath: String, moduleName: String, flatHash: ULong, transHash: ULong, configHash: ULong) {
|
||||
storedModuleName = moduleName
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user