IR: IrDelegatingConstructorCall.fromSymbolDescriptor

This commit is contained in:
Georgy Bronnikov
2020-10-14 13:16:32 +03:00
parent b28c85f5ea
commit 14b3beefb3
8 changed files with 33 additions and 26 deletions
@@ -210,7 +210,7 @@ interface IrBuilderExtension {
fun IrBuilderWithScope.generateAnySuperConstructorCall(toBuilder: IrBlockBodyBuilder) {
val anyConstructor = compilerContext.irBuiltIns.anyClass.owner.declarations.single { it is IrConstructor } as IrConstructor
with(toBuilder) {
+IrDelegatingConstructorCallImpl(
+IrDelegatingConstructorCallImpl.fromSymbolDescriptor(
startOffset, endOffset,
compilerContext.irBuiltIns.unitType,
anyConstructor.symbol
@@ -121,7 +121,7 @@ class SerializableIrGenerator(
?: error("Non-serializable parent of serializable $serializableDescriptor must have no arg constructor")
val call = IrDelegatingConstructorCallImpl(
val call = IrDelegatingConstructorCallImpl.fromSymbolDescriptor(
startOffset,
endOffset,
compilerContext.irBuiltIns.unitType,
@@ -153,7 +153,7 @@ class SerializableIrGenerator(
val arguments = allValueParameters.subList(0, superSlots) +
allValueParameters.subList(propertiesStart, propertiesStart + superProperties.size) +
allValueParameters.last() // SerializationConstructorMarker
val call = IrDelegatingConstructorCallImpl(
val call = IrDelegatingConstructorCallImpl.fromSymbolDescriptor(
startOffset,
endOffset,
compilerContext.irBuiltIns.unitType,
@@ -165,7 +165,7 @@ open class SerializerIrGenerator(val irClass: IrClass, final override val compil
// generate call to primary ctor to init serialClassDesc and super()
val primaryCtor = irClass.constructors.find { it.isPrimary }
?: throw AssertionError("Serializer class must have primary constructor")
+IrDelegatingConstructorCallImpl(
+IrDelegatingConstructorCallImpl.fromSymbolDescriptor(
startOffset,
endOffset,
compilerContext.irBuiltIns.unitType,