Start a new serializer for each class.
The consequence of that would be the type tables started anew for each class. Without that the ever growing common global type table is written to each class. Making the class protobufs bigger and bigger.
This commit is contained in:
committed by
alexander-gorshenev
parent
e2bf81d7d8
commit
c7963a86c1
+3
-2
@@ -160,11 +160,12 @@ internal class KonanSerializationUtil(val context: Context) {
|
||||
|
||||
if (skip(classDescriptor)) return
|
||||
|
||||
val classProto = serializer.classProto(classDescriptor).build()
|
||||
val localSerializer = KonanDescriptorSerializer.create(classDescriptor, serializerExtension)
|
||||
val classProto = localSerializer.classProto(classDescriptor).build()
|
||||
?: error("Class not serialized: $classDescriptor")
|
||||
|
||||
builder.addClasses(classProto)
|
||||
val index = serializer.stringTable.getFqNameIndex(classDescriptor)
|
||||
val index = localSerializer.stringTable.getFqNameIndex(classDescriptor)
|
||||
builder.addClassName(index)
|
||||
|
||||
serializeClasses(packageName, builder,
|
||||
|
||||
Reference in New Issue
Block a user