[JS IR] IC: support per-module in K2JsIrCompiler
This commit is contained in:
+6
-12
@@ -200,7 +200,8 @@ class PersistentCacheProviderImpl(private val cachePath: String) : PersistentCac
|
||||
}
|
||||
|
||||
override fun moduleName(): String {
|
||||
TODO("Not yet implemented")
|
||||
val infoFile = File(File(cachePath), "info")
|
||||
return infoFile.readLines()[3]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,8 +215,7 @@ interface PersistentCacheConsumer {
|
||||
fun commitSourceMap(path: String, mapData: ByteArray)
|
||||
fun invalidateForFile(path: String)
|
||||
|
||||
fun commitLibraryPath(libraryPath: String, flatHash: ULong, transHash: ULong)
|
||||
fun commitModuleName(moduleName: String)
|
||||
fun commitLibraryInfo(libraryPath: String, flatHash: ULong, transHash: ULong, moduleName: String)
|
||||
|
||||
companion object {
|
||||
val EMPTY = object : PersistentCacheConsumer {
|
||||
@@ -246,7 +246,7 @@ interface PersistentCacheConsumer {
|
||||
|
||||
}
|
||||
|
||||
override fun commitLibraryPath(libraryPath: String, flatHash: ULong, transHash: ULong) {
|
||||
override fun commitLibraryInfo(libraryPath: String, flatHash: ULong, transHash: ULong, moduleName: String) {
|
||||
|
||||
}
|
||||
|
||||
@@ -257,9 +257,6 @@ interface PersistentCacheConsumer {
|
||||
override fun commitSourceMap(path: String, mapData: ByteArray) {
|
||||
|
||||
}
|
||||
|
||||
override fun commitModuleName(moduleName: String) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -348,7 +345,7 @@ class PersistentCacheConsumerImpl(private val cachePath: String) : PersistentCac
|
||||
commitByteArrayToCacheFile(path, fileSourceMap, mapData)
|
||||
}
|
||||
|
||||
override fun commitLibraryPath(libraryPath: String, flatHash: ULong, transHash: ULong) {
|
||||
override fun commitLibraryInfo(libraryPath: String, flatHash: ULong, transHash: ULong, moduleName: String) {
|
||||
val infoFile = File(File(cachePath), "info")
|
||||
if (infoFile.exists()) {
|
||||
infoFile.delete()
|
||||
@@ -359,10 +356,7 @@ class PersistentCacheConsumerImpl(private val cachePath: String) : PersistentCac
|
||||
it.println(libraryPath)
|
||||
it.println(flatHash.toString(16))
|
||||
it.println(transHash.toString(16))
|
||||
it.println(moduleName)
|
||||
}
|
||||
}
|
||||
|
||||
override fun commitModuleName(moduleName: String) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user