diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/Ir.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/Ir.kt index a90e21449ac..6d8d0c578c8 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/Ir.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/Ir.kt @@ -254,13 +254,13 @@ internal class KonanSymbols( val throwIndexOutOfBoundsException = internalFunction("ThrowIndexOutOfBoundsException") - override val ThrowNullPointerException = internalFunction("ThrowNullPointerException") + override val throwNullPointerException = internalFunction("ThrowNullPointerException") - override val ThrowNoWhenBranchMatchedException = internalFunction("ThrowNoWhenBranchMatchedException") + override val throwNoWhenBranchMatchedException = internalFunction("ThrowNoWhenBranchMatchedException") - override val ThrowTypeCastException = internalFunction("ThrowTypeCastException") + override val throwTypeCastException = internalFunction("ThrowTypeCastException") - override val ThrowKotlinNothingValueException = internalFunction("ThrowKotlinNothingValueException") + override val throwKotlinNothingValueException = internalFunction("ThrowKotlinNothingValueException") val throwClassCastException = internalFunction("ThrowClassCastException") @@ -271,7 +271,7 @@ internal class KonanSymbols( val throwIllegalArgumentExceptionWithMessage = internalFunction("ThrowIllegalArgumentExceptionWithMessage") - override val ThrowUninitializedPropertyAccessException = internalFunction("ThrowUninitializedPropertyAccessException") + override val throwUninitializedPropertyAccessException = internalFunction("ThrowUninitializedPropertyAccessException") override val stringBuilder = symbolTable.referenceClass( builtInsPackage("kotlin", "text").getContributedClassifier( diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/interop/cenum/CEnumByValueFunctionGenerator.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/interop/cenum/CEnumByValueFunctionGenerator.kt index 2559807dde6..c7adb9171e9 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/interop/cenum/CEnumByValueFunctionGenerator.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/interop/cenum/CEnumByValueFunctionGenerator.kt @@ -86,7 +86,7 @@ internal class CEnumByValueFunctionGenerator( ) } } - +irCall(symbols.ThrowNullPointerException, irBuiltIns.nothingType) + +irCall(symbols.throwNullPointerException, irBuiltIns.nothingType) }) } return byValueIrFunction diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt index ce6c04d9708..21954ae2927 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt @@ -1405,7 +1405,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map lowerCheckNotNull(expression) irBuiltins.noWhenBranchMatchedExceptionSymbol -> IrCallImpl(expression.startOffset, expression.endOffset, - context.ir.symbols.ThrowNoWhenBranchMatchedException.owner.returnType, - context.ir.symbols.ThrowNoWhenBranchMatchedException) + context.ir.symbols.throwNoWhenBranchMatchedException.owner.returnType, + context.ir.symbols.throwNoWhenBranchMatchedException) else -> expression } @@ -181,7 +181,7 @@ internal class BuiltinOperatorLowering(val context: Context) : FileLoweringPass, private fun lowerCheckNotNull(expression: IrCall) = builder.at(expression).irBlock(resultType = expression.type) { val temp = irTemporary(expression.getValueArgument(0)!!) - +irIfThen(context.irBuiltIns.unitType, irEqeqNull(irGet(temp)), irCall(symbols.ThrowNullPointerException)) + +irIfThen(context.irBuiltIns.unitType, irEqeqNull(irGet(temp)), irCall(symbols.throwNullPointerException)) +irGet(temp) } diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InteropLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InteropLowering.kt index fc1c6f13f8d..44eb06f7a94 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InteropLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InteropLowering.kt @@ -698,7 +698,7 @@ private class InteropLoweringPart1(val context: Context) : BaseInteropIrTransfor +irIfThen( context.irBuiltIns.unitType, irEqeqeq(irGet(temp), irNull()), - irCall(symbols.ThrowNullPointerException) + irCall(symbols.throwNullPointerException) ) +irGet(temp) } diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/PostInlineLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/PostInlineLowering.kt index 93e3563d79b..6b20dbea54d 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/PostInlineLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/PostInlineLowering.kt @@ -47,7 +47,7 @@ internal class PostInlineLowering(val context: Context) : FileLoweringPass { builder.irKClass(context, symbol) } else { // E.g. for `T::class` in a body of an inline function itself. - builder.irCall(context.ir.symbols.ThrowNullPointerException.owner) + builder.irCall(context.ir.symbols.throwNullPointerException.owner) } } diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TypeOperatorLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TypeOperatorLowering.kt index d9d779c8864..9158df1b601 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TypeOperatorLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TypeOperatorLowering.kt @@ -47,7 +47,7 @@ private class TypeOperatorTransformer(val context: CommonBackendContext, val fun private val builder = context.createIrBuilder(function) - val throwNullPointerException = context.ir.symbols.ThrowNullPointerException + val throwNullPointerException = context.ir.symbols.throwNullPointerException override fun visitFunction(declaration: IrFunction): IrStatement { // ignore inner functions during this pass