[IR SERIALIZATION] Get rid of UniqId proto message

- encode locality flag in major bit of uniqid (1 - global, 0 - local)
This commit is contained in:
Roman Artemev
2019-09-12 15:18:30 +03:00
committed by romanart
parent fcae5873d0
commit d5176cbf5d
19 changed files with 274 additions and 857 deletions
@@ -29,7 +29,7 @@ class JsIrLinker(
JsDescriptorReferenceDeserializer(currentModule, mangler, builtIns)
override fun reader(moduleDescriptor: ModuleDescriptor, fileIndex: Int, uniqId: UniqId) =
moduleDescriptor.kotlinLibrary.irDeclaration(uniqId.index, uniqId.isLocal, fileIndex)
moduleDescriptor.kotlinLibrary.irDeclaration(uniqId.index, fileIndex)
override fun readSymbol(moduleDescriptor: ModuleDescriptor, fileIndex: Int, symbolIndex: Int) =
moduleDescriptor.kotlinLibrary.symbol(symbolIndex, fileIndex)
@@ -11,10 +11,6 @@ import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.ir.util.isInlined
object JsMangler : KotlinManglerImpl() {
private const val MOD_VALUE = PUBLIC_LOCAL_UNIQ_ID_EDGE
override val String.hashMangle: Long get() = cityHash64() % MOD_VALUE
override val IrType.isInlined: Boolean
get() = this.isInlined()
}