IrDelegatingConstructorCall.fromSymbolDescriptor
(cherry picked from commit 7c8a598c36165a9f6f15e5dcd87acd44008c1400)
This commit is contained in:
committed by
Vasily Levchenko
parent
3087bdea22
commit
db9e3c9085
+1
-1
@@ -52,7 +52,7 @@ internal class CEnumCompanionGenerator(
|
|||||||
val superConstructorSymbol = symbolTable.referenceConstructor(anyPrimaryConstructor)
|
val superConstructorSymbol = symbolTable.referenceConstructor(anyPrimaryConstructor)
|
||||||
return createConstructor(companionObjectDescriptor.unsubstitutedPrimaryConstructor!!).also {
|
return createConstructor(companionObjectDescriptor.unsubstitutedPrimaryConstructor!!).also {
|
||||||
it.body = irBuilder(irBuiltIns, it.symbol, SYNTHETIC_OFFSET, SYNTHETIC_OFFSET).irBlockBody {
|
it.body = irBuilder(irBuiltIns, it.symbol, SYNTHETIC_OFFSET, SYNTHETIC_OFFSET).irBlockBody {
|
||||||
+IrDelegatingConstructorCallImpl(
|
+IrDelegatingConstructorCallImpl.fromSymbolDescriptor(
|
||||||
startOffset, endOffset, context.irBuiltIns.unitType,
|
startOffset, endOffset, context.irBuiltIns.unitType,
|
||||||
superConstructorSymbol,
|
superConstructorSymbol,
|
||||||
superConstructorSymbol.owner.typeParameters.size,
|
superConstructorSymbol.owner.typeParameters.size,
|
||||||
|
|||||||
+2
-2
@@ -81,7 +81,7 @@ internal class CEnumVarClassGenerator(
|
|||||||
val superConstructorSymbol = symbolTable.referenceConstructor(interopBuiltIns.cPrimitiveVarType.unsubstitutedPrimaryConstructor!!)
|
val superConstructorSymbol = symbolTable.referenceConstructor(interopBuiltIns.cPrimitiveVarType.unsubstitutedPrimaryConstructor!!)
|
||||||
return createConstructor(companionObjectDescriptor.unsubstitutedPrimaryConstructor!!).also {
|
return createConstructor(companionObjectDescriptor.unsubstitutedPrimaryConstructor!!).also {
|
||||||
it.body = irBuilder(irBuiltIns, it.symbol, SYNTHETIC_OFFSET, SYNTHETIC_OFFSET).irBlockBody {
|
it.body = irBuilder(irBuiltIns, it.symbol, SYNTHETIC_OFFSET, SYNTHETIC_OFFSET).irBlockBody {
|
||||||
+IrDelegatingConstructorCallImpl(
|
+IrDelegatingConstructorCallImpl.fromSymbolDescriptor(
|
||||||
startOffset, endOffset, context.irBuiltIns.unitType,
|
startOffset, endOffset, context.irBuiltIns.unitType,
|
||||||
superConstructorSymbol,
|
superConstructorSymbol,
|
||||||
superConstructorSymbol.owner.typeParameters.size,
|
superConstructorSymbol.owner.typeParameters.size,
|
||||||
@@ -93,4 +93,4 @@ internal class CEnumVarClassGenerator(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -62,7 +62,7 @@ internal class CStructVarClassGenerator(
|
|||||||
)
|
)
|
||||||
return createConstructor(irClass.descriptor.unsubstitutedPrimaryConstructor!!).also { irConstructor ->
|
return createConstructor(irClass.descriptor.unsubstitutedPrimaryConstructor!!).also { irConstructor ->
|
||||||
irConstructor.body = irBuilder(irBuiltIns, irConstructor.symbol, SYNTHETIC_OFFSET, SYNTHETIC_OFFSET).irBlockBody {
|
irConstructor.body = irBuilder(irBuiltIns, irConstructor.symbol, SYNTHETIC_OFFSET, SYNTHETIC_OFFSET).irBlockBody {
|
||||||
+IrDelegatingConstructorCallImpl(
|
+IrDelegatingConstructorCallImpl.fromSymbolDescriptor(
|
||||||
startOffset, endOffset,
|
startOffset, endOffset,
|
||||||
context.irBuiltIns.unitType, enumVarConstructorSymbol,
|
context.irBuiltIns.unitType, enumVarConstructorSymbol,
|
||||||
irConstructor.typeParameters.size,
|
irConstructor.typeParameters.size,
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ internal class CStructVarCompanionGenerator(
|
|||||||
val superConstructorSymbol = symbolTable.referenceConstructor(interopBuiltIns.cStructVarType.unsubstitutedPrimaryConstructor!!)
|
val superConstructorSymbol = symbolTable.referenceConstructor(interopBuiltIns.cStructVarType.unsubstitutedPrimaryConstructor!!)
|
||||||
return createConstructor(companionObjectDescriptor.unsubstitutedPrimaryConstructor!!).also { irConstructor ->
|
return createConstructor(companionObjectDescriptor.unsubstitutedPrimaryConstructor!!).also { irConstructor ->
|
||||||
irConstructor.body = irBuilder(irBuiltIns, irConstructor.symbol, SYNTHETIC_OFFSET, SYNTHETIC_OFFSET).irBlockBody {
|
irConstructor.body = irBuilder(irBuiltIns, irConstructor.symbol, SYNTHETIC_OFFSET, SYNTHETIC_OFFSET).irBlockBody {
|
||||||
+IrDelegatingConstructorCallImpl(
|
+IrDelegatingConstructorCallImpl.fromSymbolDescriptor(
|
||||||
startOffset, endOffset, context.irBuiltIns.unitType,
|
startOffset, endOffset, context.irBuiltIns.unitType,
|
||||||
superConstructorSymbol,
|
superConstructorSymbol,
|
||||||
irConstructor.typeParameters.size,
|
irConstructor.typeParameters.size,
|
||||||
|
|||||||
+2
-2
@@ -176,7 +176,7 @@ internal class EnumConstructorsLowering(val context: Context) : ClassLoweringPas
|
|||||||
val endOffset = enumConstructorCall.endOffset
|
val endOffset = enumConstructorCall.endOffset
|
||||||
val origin = enumConstructorCall.origin
|
val origin = enumConstructorCall.origin
|
||||||
|
|
||||||
val result = IrDelegatingConstructorCallImpl(
|
val result = IrDelegatingConstructorCallImpl.fromSymbolDescriptor(
|
||||||
startOffset, endOffset,
|
startOffset, endOffset,
|
||||||
context.irBuiltIns.unitType,
|
context.irBuiltIns.unitType,
|
||||||
enumConstructorCall.symbol,
|
enumConstructorCall.symbol,
|
||||||
@@ -213,7 +213,7 @@ internal class EnumConstructorsLowering(val context: Context) : ClassLoweringPas
|
|||||||
throw AssertionError("Constructor called in enum entry initializer should've been lowered: $delegatingConstructor")
|
throw AssertionError("Constructor called in enum entry initializer should've been lowered: $delegatingConstructor")
|
||||||
}
|
}
|
||||||
|
|
||||||
val result = IrDelegatingConstructorCallImpl(
|
val result = IrDelegatingConstructorCallImpl.fromSymbolDescriptor(
|
||||||
startOffset, endOffset,
|
startOffset, endOffset,
|
||||||
context.irBuiltIns.unitType,
|
context.irBuiltIns.unitType,
|
||||||
loweredDelegatingConstructor.symbol,
|
loweredDelegatingConstructor.symbol,
|
||||||
|
|||||||
+1
-1
@@ -496,7 +496,7 @@ private class InteropLoweringPart1(val context: Context) : BaseInteropIrTransfor
|
|||||||
|
|
||||||
return builder.irBlock(expression) {
|
return builder.irBlock(expression) {
|
||||||
// Required for the IR to be valid, will be ignored in codegen:
|
// Required for the IR to be valid, will be ignored in codegen:
|
||||||
+IrDelegatingConstructorCallImpl(
|
+IrDelegatingConstructorCallImpl.fromSymbolDescriptor(
|
||||||
startOffset,
|
startOffset,
|
||||||
endOffset,
|
endOffset,
|
||||||
context.irBuiltIns.unitType,
|
context.irBuiltIns.unitType,
|
||||||
|
|||||||
Reference in New Issue
Block a user