Introduce infrastructure to separate string table from metadata on JVM
Nothing especially helpful happens here, this is only a big refactoring introducing a separate string array for the string table, which is currently always empty, but will contain actual strings soon
This commit is contained in:
+10
-7
@@ -117,17 +117,20 @@ public class IncrementalPackageFragmentProvider(
|
||||
allParts.filterNot { it in obsoletePackageParts }
|
||||
} ?: emptyList<String>()
|
||||
|
||||
val dataOfPackageParts = actualPackagePartFiles.map { incrementalCache.getPackagePartData(it) }.filterNotNull()
|
||||
val scopes = actualPackagePartFiles
|
||||
.map {
|
||||
incrementalCache.getPackagePartData(it)
|
||||
}
|
||||
.filterNotNull()
|
||||
.map {
|
||||
IncrementalPackageScope(JvmProtoBufUtil.readPackageDataFrom(it.data, it.strings))
|
||||
}
|
||||
|
||||
if (dataOfPackageParts.isEmpty()) {
|
||||
if (scopes.isEmpty()) {
|
||||
JetScope.Empty
|
||||
}
|
||||
else {
|
||||
val scopes = dataOfPackageParts.map { IncrementalPackageScope(JvmProtoBufUtil.readPackageDataFrom(it)) }
|
||||
ChainedScope(this,
|
||||
"Member scope for incremental compilation: union of package parts data",
|
||||
*scopes.toTypedArray<JetScope>()
|
||||
)
|
||||
ChainedScope(this, "Member scope for incremental compilation: union of package parts data", *scopes.toTypedArray())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -16,10 +16,14 @@
|
||||
|
||||
package org.jetbrains.kotlin.load.kotlin.incremental.components
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
data class JvmPackagePartProto(val data: ByteArray, val strings: Array<String>) : Serializable
|
||||
|
||||
public interface IncrementalCache {
|
||||
public fun getObsoletePackageParts(): Collection<String>
|
||||
|
||||
public fun getPackagePartData(fqName: String): ByteArray?
|
||||
public fun getPackagePartData(fqName: String): JvmPackagePartProto?
|
||||
|
||||
public fun getModuleMappingData(): ByteArray?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user