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