[JS IR] IC: support per-module layout
This commit is contained in:
+18
@@ -52,6 +52,8 @@ interface PersistentCacheProvider {
|
||||
|
||||
fun filePaths(): Iterable<String>
|
||||
|
||||
fun moduleName(): String
|
||||
|
||||
companion object {
|
||||
val EMPTY = object : PersistentCacheProvider {
|
||||
override fun fileFingerPrint(path: String): Hash {
|
||||
@@ -87,6 +89,10 @@ interface PersistentCacheProvider {
|
||||
}
|
||||
|
||||
override fun filePaths(): Iterable<String> = emptyList()
|
||||
|
||||
override fun moduleName(): String {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -192,6 +198,10 @@ class PersistentCacheProviderImpl(private val cachePath: String) : PersistentCac
|
||||
} else null
|
||||
}
|
||||
}
|
||||
|
||||
override fun moduleName(): String {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
|
||||
interface PersistentCacheConsumer {
|
||||
@@ -205,6 +215,7 @@ interface PersistentCacheConsumer {
|
||||
fun invalidateForFile(path: String)
|
||||
|
||||
fun commitLibraryPath(libraryPath: String, flatHash: ULong, transHash: ULong)
|
||||
fun commitModuleName(moduleName: String)
|
||||
|
||||
companion object {
|
||||
val EMPTY = object : PersistentCacheConsumer {
|
||||
@@ -246,6 +257,9 @@ interface PersistentCacheConsumer {
|
||||
override fun commitSourceMap(path: String, mapData: ByteArray) {
|
||||
|
||||
}
|
||||
|
||||
override fun commitModuleName(moduleName: String) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -347,4 +361,8 @@ class PersistentCacheConsumerImpl(private val cachePath: String) : PersistentCac
|
||||
it.println(transHash.toString(16))
|
||||
}
|
||||
}
|
||||
|
||||
override fun commitModuleName(moduleName: String) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user