[JS IR BE] Fix warnings
This commit is contained in:
+1
-1
@@ -80,7 +80,7 @@ class BridgesConstruction(val context: JsIrBackendContext) : ClassLoweringPass {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if (from.function.correspondingProperty != null && from.function.isEffectivelyExternal()) {
|
if (from.function.correspondingPropertySymbol != null && from.function.isEffectivelyExternal()) {
|
||||||
// TODO: Revisit bridges from external properties
|
// TODO: Revisit bridges from external properties
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -201,7 +201,7 @@ class CallableReferenceLowering(val context: JsIrBackendContext) : FileLoweringP
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
val arity = propertyReference.type.arity
|
val arity = propertyReference.type.arity
|
||||||
val factoryName = createPropertyFactoryName(getterDeclaration.correspondingProperty!!)
|
val factoryName = createPropertyFactoryName(getterDeclaration.correspondingPropertySymbol!!.owner)
|
||||||
val factoryFunction = buildFactoryFunction(propertyReference.getter!!.owner, propertyReference, factoryName)
|
val factoryFunction = buildFactoryFunction(propertyReference.getter!!.owner, propertyReference, factoryName)
|
||||||
|
|
||||||
val getterFunction = propertyReference.getter?.let { buildClosureFunction(it.owner, factoryFunction, propertyReference, arity) }!!
|
val getterFunction = propertyReference.getter?.let { buildClosureFunction(it.owner, factoryFunction, propertyReference, arity) }!!
|
||||||
@@ -243,7 +243,7 @@ class CallableReferenceLowering(val context: JsIrBackendContext) : FileLoweringP
|
|||||||
putValueArgument(
|
putValueArgument(
|
||||||
2, JsIrBuilder.buildString(
|
2, JsIrBuilder.buildString(
|
||||||
context.irBuiltIns.stringType,
|
context.irBuiltIns.stringType,
|
||||||
getReferenceName(getterDeclaration.correspondingProperty!!)
|
getReferenceName(getterDeclaration.correspondingPropertySymbol!!.owner)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -150,7 +150,7 @@ class PrivateMembersLowering(val context: JsIrBackendContext) : ClassLoweringPas
|
|||||||
).also {
|
).also {
|
||||||
descriptor.bind(it)
|
descriptor.bind(it)
|
||||||
it.parent = parent
|
it.parent = parent
|
||||||
it.correspondingProperty = correspondingProperty
|
it.correspondingPropertySymbol = correspondingPropertySymbol
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -199,7 +199,7 @@ class ThrowableSuccessorsLowering(val context: JsIrBackendContext) : FileLowerin
|
|||||||
val name = fakeAccessor.name
|
val name = fakeAccessor.name
|
||||||
val function = JsIrBuilder.buildFunction(name, fakeAccessor.returnType, fakeAccessor.parent).apply {
|
val function = JsIrBuilder.buildFunction(name, fakeAccessor.returnType, fakeAccessor.parent).apply {
|
||||||
overriddenSymbols += fakeAccessor.overriddenSymbols
|
overriddenSymbols += fakeAccessor.overriddenSymbols
|
||||||
correspondingProperty = fakeAccessor.correspondingProperty
|
correspondingPropertySymbol = fakeAccessor.correspondingPropertySymbol
|
||||||
dispatchReceiverParameter = fakeAccessor.dispatchReceiverParameter?.copyTo(this)
|
dispatchReceiverParameter = fakeAccessor.dispatchReceiverParameter?.copyTo(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-6
@@ -77,10 +77,10 @@ internal class FunctionInlining(val context: Context): IrElementTransformerVoidW
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getFunctionDeclaration(symbol: IrFunctionSymbol): IrFunction {
|
private fun getFunctionDeclaration(symbol: IrFunctionSymbol): IrFunction {
|
||||||
val descriptor = symbol.descriptor.original
|
// val descriptor = symbol.descriptor.original
|
||||||
val languageVersionSettings = context.configuration.languageVersionSettings
|
// val languageVersionSettings = context.configuration.languageVersionSettings
|
||||||
// TODO: Remove these hacks when coroutine intrinsics are fixed.
|
// // TODO: Remove these hacks when coroutine intrinsics are fixed.
|
||||||
return when {
|
// return when {
|
||||||
// descriptor.isBuiltInIntercepted(languageVersionSettings) ->
|
// descriptor.isBuiltInIntercepted(languageVersionSettings) ->
|
||||||
// error("Continuation.intercepted is not available with release coroutines")
|
// error("Continuation.intercepted is not available with release coroutines")
|
||||||
//
|
//
|
||||||
@@ -89,9 +89,11 @@ internal class FunctionInlining(val context: Context): IrElementTransformerVoidW
|
|||||||
//
|
//
|
||||||
// descriptor == context.ir.symbols.coroutineContextGetter ->
|
// descriptor == context.ir.symbols.coroutineContextGetter ->
|
||||||
// context.ir.symbols.konanCoroutineContextGetter.owner
|
// context.ir.symbols.konanCoroutineContextGetter.owner
|
||||||
|
//
|
||||||
|
// else -> (symbol.owner as? IrSimpleFunction)?.resolveFakeOverride() ?: symbol.owner
|
||||||
|
// }
|
||||||
|
|
||||||
else -> (symbol.owner as? IrSimpleFunction)?.resolveFakeOverride() ?: symbol.owner
|
return (symbol.owner as? IrSimpleFunction)?.resolveFakeOverride() ?: symbol.owner
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private val inlineConstructor = FqName("kotlin.native.internal.InlineConstructor")
|
private val inlineConstructor = FqName("kotlin.native.internal.InlineConstructor")
|
||||||
|
|||||||
+1
-1
@@ -54,7 +54,7 @@ class JsClassGenerator(private val irClass: IrClass, val context: JsGenerationCo
|
|||||||
classModel.preDeclarationBlock.statements += generateInheritanceCode()
|
classModel.preDeclarationBlock.statements += generateInheritanceCode()
|
||||||
}
|
}
|
||||||
is IrSimpleFunction -> {
|
is IrSimpleFunction -> {
|
||||||
properties.addIfNotNull(declaration.correspondingProperty)
|
properties.addIfNotNull(declaration.correspondingPropertySymbol?.owner)
|
||||||
generateMemberFunction(declaration)?.let { classBlock.statements += it }
|
generateMemberFunction(declaration)?.let { classBlock.statements += it }
|
||||||
}
|
}
|
||||||
is IrClass -> {
|
is IrClass -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user