[IC] Refactor IC maps to reuse code and ensure consistency
The key changes include:
- Top interface: `PersistentStorage`
- Implementation:
+ `LazyStorage`
+ `InMemoryStorage`
- Extended functionality:
+ `BasicMap`
+ `PersistentStorageAdapter`
The remaining changes are small cleanups to adapt to the above key
changes.
Test: Existing tests (refactoring change)
Bug: N/A (code cleanup)
This commit is contained in:
@@ -154,7 +154,7 @@ open class IncrementalJsCache(
|
||||
}
|
||||
removeAllFromClassStorage(dirtyOutputClassesMap.getDirtyOutputClasses(), changesCollector)
|
||||
dirtySources.clear()
|
||||
dirtyOutputClassesMap.clean()
|
||||
dirtyOutputClassesMap.clear()
|
||||
}
|
||||
|
||||
fun nonDirtyPackageParts(): Map<File, TranslationResultValue> =
|
||||
@@ -447,13 +447,7 @@ private class PackageMetadataMap(
|
||||
storage[packageName] = newMetadata
|
||||
}
|
||||
|
||||
fun remove(packageName: String) {
|
||||
storage.remove(packageName)
|
||||
}
|
||||
|
||||
fun keys() = storage.keys
|
||||
|
||||
operator fun get(packageName: String) = storage[packageName]
|
||||
|
||||
override fun dumpValue(value: ByteArray): String = "Package metadata: ${value.md5()}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user