[Klib] Split up IR header tables onto three parts
There was one monolith protobuf at irHeader.knd, it was split up onto 4 parts due to performance issues: - a small irHeader with some basic info about a module - symbols table - types table - strings table These 3 tables are then mmapped and accessed by index.
This commit is contained in:
+10
-2
@@ -36,6 +36,15 @@ class JsIrLinker(
|
||||
override val ModuleDescriptor.irHeader: ByteArray?
|
||||
get() = this.kotlinLibrary.irHeader
|
||||
|
||||
override fun readSymbol(moduleDescriptor: ModuleDescriptor, symbolIndex: Int) =
|
||||
moduleDescriptor.kotlinLibrary.symbol(symbolIndex)
|
||||
|
||||
override fun readType(moduleDescriptor: ModuleDescriptor, typeIndex: Int) =
|
||||
moduleDescriptor.kotlinLibrary.type(typeIndex)
|
||||
|
||||
override fun readString(moduleDescriptor: ModuleDescriptor, stringIndex: Int) =
|
||||
moduleDescriptor.kotlinLibrary.string(stringIndex)
|
||||
|
||||
override fun declareForwardDeclarations() {
|
||||
// since for `knownBuiltIns` such as FunctionN it is possible to have unbound symbols after deserialization
|
||||
// reference them through out lazy symbol table
|
||||
@@ -48,5 +57,4 @@ class JsIrLinker(
|
||||
ArrayList(unboundTypeParameters).forEach { lazyWrapper.referenceTypeParameter(it.descriptor) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user