JVM_IR: isExpect
This commit is contained in:
+1
-1
@@ -127,7 +127,7 @@ private fun IrFunction.suspendFunctionView(context: JvmBackendContext): IrFuncti
|
|||||||
return IrFunctionImpl(
|
return IrFunctionImpl(
|
||||||
startOffset, endOffset, SUSPEND_FUNCTION_VIEW, IrSimpleFunctionSymbolImpl(descriptor),
|
startOffset, endOffset, SUSPEND_FUNCTION_VIEW, IrSimpleFunctionSymbolImpl(descriptor),
|
||||||
name, visibility, modality, context.irBuiltIns.anyNType,
|
name, visibility, modality, context.irBuiltIns.anyNType,
|
||||||
isInline, isExternal, isTailrec, isSuspend
|
isInline = isInline, isExternal = isExternal, isTailrec = isTailrec, isSuspend = isSuspend, isExpect = isExpect
|
||||||
).also {
|
).also {
|
||||||
descriptor.bind(it)
|
descriptor.bind(it)
|
||||||
it.parent = parent
|
it.parent = parent
|
||||||
|
|||||||
+12
-4
@@ -81,10 +81,17 @@ class JvmDeclarationFactory(
|
|||||||
private fun createInnerClassConstructorWithOuterThisParameter(oldConstructor: IrConstructor): IrConstructor {
|
private fun createInnerClassConstructorWithOuterThisParameter(oldConstructor: IrConstructor): IrConstructor {
|
||||||
val newDescriptor = WrappedClassConstructorDescriptor(oldConstructor.descriptor.annotations)
|
val newDescriptor = WrappedClassConstructorDescriptor(oldConstructor.descriptor.annotations)
|
||||||
return IrConstructorImpl(
|
return IrConstructorImpl(
|
||||||
oldConstructor.startOffset, oldConstructor.endOffset, oldConstructor.origin,
|
oldConstructor.startOffset,
|
||||||
|
oldConstructor.endOffset,
|
||||||
|
oldConstructor.origin,
|
||||||
IrConstructorSymbolImpl(newDescriptor),
|
IrConstructorSymbolImpl(newDescriptor),
|
||||||
oldConstructor.name, oldConstructor.visibility, oldConstructor.returnType,
|
oldConstructor.name,
|
||||||
oldConstructor.isInline, oldConstructor.isExternal, oldConstructor.isPrimary
|
oldConstructor.visibility,
|
||||||
|
oldConstructor.returnType,
|
||||||
|
isInline = oldConstructor.isInline,
|
||||||
|
isExternal = oldConstructor.isExternal,
|
||||||
|
isPrimary = oldConstructor.isPrimary,
|
||||||
|
isExpect = oldConstructor.isExpect
|
||||||
).apply {
|
).apply {
|
||||||
newDescriptor.bind(this)
|
newDescriptor.bind(this)
|
||||||
annotations.addAll(oldConstructor.annotations.map { it.deepCopyWithSymbols(this) })
|
annotations.addAll(oldConstructor.annotations.map { it.deepCopyWithSymbols(this) })
|
||||||
@@ -172,7 +179,8 @@ class JvmDeclarationFactory(
|
|||||||
isInner = false,
|
isInner = false,
|
||||||
isData = false,
|
isData = false,
|
||||||
isExternal = false,
|
isExternal = false,
|
||||||
isInline = false
|
isInline = false,
|
||||||
|
isExpect = false
|
||||||
).apply {
|
).apply {
|
||||||
descriptor.bind(this)
|
descriptor.bind(this)
|
||||||
parent = interfaceClass
|
parent = interfaceClass
|
||||||
|
|||||||
+4
-3
@@ -205,7 +205,7 @@ private class BridgeLowering(val context: JvmBackendContext) : ClassLoweringPass
|
|||||||
IrSimpleFunctionSymbolImpl(newDescriptor),
|
IrSimpleFunctionSymbolImpl(newDescriptor),
|
||||||
newName,
|
newName,
|
||||||
visibility, modality, returnType,
|
visibility, modality, returnType,
|
||||||
isInline, isExternal, isTailrec, isSuspend
|
isInline = isInline, isExternal = isExternal, isTailrec = isTailrec, isSuspend = isSuspend, isExpect = isExpect
|
||||||
).apply {
|
).apply {
|
||||||
newDescriptor.bind(this)
|
newDescriptor.bind(this)
|
||||||
parent = this@copyRenamingTo.parent
|
parent = this@copyRenamingTo.parent
|
||||||
@@ -238,7 +238,8 @@ private class BridgeLowering(val context: JvmBackendContext) : ClassLoweringPass
|
|||||||
isInline = false,
|
isInline = false,
|
||||||
isExternal = false,
|
isExternal = false,
|
||||||
isTailrec = false,
|
isTailrec = false,
|
||||||
isSuspend = signatureFunction.isSuspend
|
isSuspend = signatureFunction.isSuspend,
|
||||||
|
isExpect = false
|
||||||
).apply {
|
).apply {
|
||||||
descriptor.bind(this)
|
descriptor.bind(this)
|
||||||
parent = irClass
|
parent = irClass
|
||||||
@@ -313,7 +314,7 @@ private class BridgeLowering(val context: JvmBackendContext) : ClassLoweringPass
|
|||||||
IrSimpleFunctionSymbolImpl(wrappedDescriptor),
|
IrSimpleFunctionSymbolImpl(wrappedDescriptor),
|
||||||
Name.identifier(getJvmName()),
|
Name.identifier(getJvmName()),
|
||||||
visibility, modality, returnType,
|
visibility, modality, returnType,
|
||||||
isInline, isExternal, isTailrec, isSuspend
|
isInline = isInline, isExternal = isExternal, isTailrec = isTailrec, isSuspend = isSuspend, isExpect = isExpect
|
||||||
).apply {
|
).apply {
|
||||||
wrappedDescriptor.bind(this)
|
wrappedDescriptor.bind(this)
|
||||||
parent = this@orphanedCopy.parent
|
parent = this@orphanedCopy.parent
|
||||||
|
|||||||
+2
-1
@@ -113,7 +113,8 @@ private class EnumClassLowering(val context: JvmBackendContext) : ClassLoweringP
|
|||||||
returnType = enumConstructor.returnType,
|
returnType = enumConstructor.returnType,
|
||||||
isInline = enumConstructor.isInline,
|
isInline = enumConstructor.isInline,
|
||||||
isExternal = enumConstructor.isExternal,
|
isExternal = enumConstructor.isExternal,
|
||||||
isPrimary = enumConstructor.isPrimary
|
isPrimary = enumConstructor.isPrimary,
|
||||||
|
isExpect = enumConstructor.isExpect
|
||||||
).apply {
|
).apply {
|
||||||
val newConstructor = this
|
val newConstructor = this
|
||||||
descriptor.bind(this)
|
descriptor.bind(this)
|
||||||
|
|||||||
+2
-1
@@ -86,7 +86,8 @@ private class FileClassLowering(val context: JvmBackendContext) : FileLoweringPa
|
|||||||
isInner = false,
|
isInner = false,
|
||||||
isData = false,
|
isData = false,
|
||||||
isExternal = false,
|
isExternal = false,
|
||||||
isInline = false
|
isInline = false,
|
||||||
|
isExpect = false
|
||||||
).apply {
|
).apply {
|
||||||
descriptor.bind(this)
|
descriptor.bind(this)
|
||||||
superTypes.add(context.irBuiltIns.anyType)
|
superTypes.add(context.irBuiltIns.anyType)
|
||||||
|
|||||||
+7
-2
@@ -117,7 +117,8 @@ private class InterfaceDelegationLowering(val context: JvmBackendContext) : IrEl
|
|||||||
isInline = classOverride.isInline,
|
isInline = classOverride.isInline,
|
||||||
isExternal = false,
|
isExternal = false,
|
||||||
isTailrec = false,
|
isTailrec = false,
|
||||||
isSuspend = classOverride.isSuspend
|
isSuspend = classOverride.isSuspend,
|
||||||
|
isExpect = false
|
||||||
).apply {
|
).apply {
|
||||||
descriptor.bind(this)
|
descriptor.bind(this)
|
||||||
parent = irClass
|
parent = irClass
|
||||||
@@ -130,7 +131,11 @@ private class InterfaceDelegationLowering(val context: JvmBackendContext) : IrEl
|
|||||||
IrPropertyImpl(
|
IrPropertyImpl(
|
||||||
UNDEFINED_OFFSET, UNDEFINED_OFFSET, IrDeclarationOrigin.DEFINED, IrPropertySymbolImpl(propertyDescriptor),
|
UNDEFINED_OFFSET, UNDEFINED_OFFSET, IrDeclarationOrigin.DEFINED, IrPropertySymbolImpl(propertyDescriptor),
|
||||||
inheritedProperty.name, Visibilities.PUBLIC, inheritedProperty.modality, inheritedProperty.isVar,
|
inheritedProperty.name, Visibilities.PUBLIC, inheritedProperty.modality, inheritedProperty.isVar,
|
||||||
inheritedProperty.isConst, inheritedProperty.isLateinit, inheritedProperty.isDelegated, isExternal = false
|
isConst = inheritedProperty.isConst,
|
||||||
|
isLateinit = inheritedProperty.isLateinit,
|
||||||
|
isDelegated = inheritedProperty.isDelegated,
|
||||||
|
isExpect = inheritedProperty.isExpect,
|
||||||
|
isExternal = false
|
||||||
).apply {
|
).apply {
|
||||||
propertyDescriptor.bind(this)
|
propertyDescriptor.bind(this)
|
||||||
parent = irClass
|
parent = irClass
|
||||||
|
|||||||
+4
-2
@@ -129,7 +129,8 @@ private class JvmOverloadsAnnotationLowering(val context: JvmBackendContext) : C
|
|||||||
returnType = oldFunction.returnType,
|
returnType = oldFunction.returnType,
|
||||||
isInline = oldFunction.isInline,
|
isInline = oldFunction.isInline,
|
||||||
isExternal = false,
|
isExternal = false,
|
||||||
isPrimary = false
|
isPrimary = false,
|
||||||
|
isExpect = false
|
||||||
).apply {
|
).apply {
|
||||||
descriptor.bind(this)
|
descriptor.bind(this)
|
||||||
}
|
}
|
||||||
@@ -147,7 +148,8 @@ private class JvmOverloadsAnnotationLowering(val context: JvmBackendContext) : C
|
|||||||
isInline = oldFunction.isInline,
|
isInline = oldFunction.isInline,
|
||||||
isExternal = false,
|
isExternal = false,
|
||||||
isTailrec = false,
|
isTailrec = false,
|
||||||
isSuspend = oldFunction.isSuspend
|
isSuspend = oldFunction.isSuspend,
|
||||||
|
isExpect = false
|
||||||
).apply {
|
).apply {
|
||||||
descriptor.bind(this)
|
descriptor.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -111,7 +111,8 @@ private class CompanionObjectJvmStaticLowering(val context: JvmBackendContext) :
|
|||||||
isInline = false,
|
isInline = false,
|
||||||
isExternal = false,
|
isExternal = false,
|
||||||
isTailrec = false,
|
isTailrec = false,
|
||||||
isSuspend = target.isSuspend
|
isSuspend = target.isSuspend,
|
||||||
|
isExpect = false
|
||||||
).apply {
|
).apply {
|
||||||
descriptor.bind(this)
|
descriptor.bind(this)
|
||||||
parent = irClass
|
parent = irClass
|
||||||
@@ -230,7 +231,8 @@ private class MakeCallsStatic(
|
|||||||
startOffset, endOffset, origin,
|
startOffset, endOffset, origin,
|
||||||
IrSimpleFunctionSymbolImpl(newDescriptor),
|
IrSimpleFunctionSymbolImpl(newDescriptor),
|
||||||
name,
|
name,
|
||||||
visibility, modality, returnType, isInline, isExternal, isTailrec, isSuspend
|
visibility, modality, returnType,
|
||||||
|
isInline = isInline, isExternal = isExternal, isTailrec = isTailrec, isSuspend = isSuspend, isExpect = isExpect
|
||||||
).also {
|
).also {
|
||||||
newDescriptor.bind(it)
|
newDescriptor.bind(it)
|
||||||
it.parent = parent
|
it.parent = parent
|
||||||
|
|||||||
+4
-2
@@ -83,7 +83,8 @@ private class ToArrayLowering(private val context: JvmBackendContext) : ClassLow
|
|||||||
isInline = false,
|
isInline = false,
|
||||||
isExternal = false,
|
isExternal = false,
|
||||||
isTailrec = false,
|
isTailrec = false,
|
||||||
isSuspend = false
|
isSuspend = false,
|
||||||
|
isExpect = false
|
||||||
)
|
)
|
||||||
functionDescriptor.bind(irFunction)
|
functionDescriptor.bind(irFunction)
|
||||||
irFunction.parent = irClass
|
irFunction.parent = irClass
|
||||||
@@ -152,7 +153,8 @@ private class ToArrayLowering(private val context: JvmBackendContext) : ClassLow
|
|||||||
isInline = false,
|
isInline = false,
|
||||||
isExternal = false,
|
isExternal = false,
|
||||||
isTailrec = false,
|
isTailrec = false,
|
||||||
isSuspend = false
|
isSuspend = false,
|
||||||
|
isExpect = false
|
||||||
)
|
)
|
||||||
functionDescriptor.bind(irFunction)
|
functionDescriptor.bind(irFunction)
|
||||||
irFunction.parent = irClass
|
irFunction.parent = irClass
|
||||||
|
|||||||
Reference in New Issue
Block a user