[IR] support of changes in progression handlers and for loop lowerings in 8a4185202f

This commit is contained in:
Vasily Levchenko
2019-10-30 20:19:55 +01:00
parent 494d5ce1a4
commit f1aca2307f
4 changed files with 16 additions and 1 deletions
@@ -282,6 +282,7 @@ internal val allLoweringsPhase = namedIrModulePhase(
name = "IrLowerByFile", name = "IrLowerByFile",
description = "IR Lowering by file", description = "IR Lowering by file",
lower = lateinitPhase then lower = lateinitPhase then
forLoopsPhase then
stringConcatenationPhase then stringConcatenationPhase then
enumConstructorsPhase then enumConstructorsPhase then
initializersPhase then initializersPhase then
@@ -290,7 +291,6 @@ internal val allLoweringsPhase = namedIrModulePhase(
tailrecPhase then tailrecPhase then
defaultParameterExtentPhase then defaultParameterExtentPhase then
innerClassPhase then innerClassPhase then
forLoopsPhase then
dataClassesPhase then dataClassesPhase then
builtinOperatorPhase then builtinOperatorPhase then
finallyBlocksPhase then finallyBlocksPhase then
@@ -230,6 +230,9 @@ internal class KonanSymbols(
val throwInvalidReceiverTypeException = internalFunction("ThrowInvalidReceiverTypeException") val throwInvalidReceiverTypeException = internalFunction("ThrowInvalidReceiverTypeException")
val throwIllegalStateException = internalFunction("ThrowIllegalStateException") val throwIllegalStateException = internalFunction("ThrowIllegalStateException")
val throwIllegalStateExceptionWithMessage = internalFunction("ThrowIllegalStateExceptionWithMessage") val throwIllegalStateExceptionWithMessage = internalFunction("ThrowIllegalStateExceptionWithMessage")
val throwIllegalArgumentException = internalFunction("ThrowIllegalArgumentException")
val throwIllegalArgumentExceptionWithMessage = internalFunction("ThrowIllegalArgumentExceptionWithMessage")
override val ThrowUninitializedPropertyAccessException = internalFunction("ThrowUninitializedPropertyAccessException") override val ThrowUninitializedPropertyAccessException = internalFunction("ThrowUninitializedPropertyAccessException")
@@ -2195,6 +2195,13 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
else -> icmpLe(args[0], args[1]) else -> icmpLe(args[0], args[1])
} }
} }
functionSymbol == context.irBuiltIns.illegalArgumentExceptionSymbol -> {
callDirect(
context.ir.symbols.throwIllegalArgumentExceptionWithMessage.owner,
args,
Lifetime.GLOBAL
)
}
else -> TODO(function.name.toString()) else -> TODO(function.name.toString())
} }
} }
@@ -61,6 +61,11 @@ internal fun ThrowIllegalArgumentException() : Nothing {
throw IllegalArgumentException() throw IllegalArgumentException()
} }
@ExportForCppRuntime
internal fun ThrowIllegalArgumentExceptionWithMessage(message: String) : Nothing {
throw IllegalArgumentException(message)
}
@ExportForCppRuntime @ExportForCppRuntime
internal fun ThrowIllegalStateException() : Nothing { internal fun ThrowIllegalStateException() : Nothing {
throw IllegalStateException() throw IllegalStateException()