From 13f5f1975aa551433bd8d2074c297ee9306bc116 Mon Sep 17 00:00:00 2001 From: Anton Bannykh Date: Mon, 3 Feb 2020 13:53:30 +0300 Subject: [PATCH] Support suspend functions lowering changes (cherry picked from commit f4ac79e39cf9ca8685552ffd28a9595efd0df963) --- .../jetbrains/kotlin/backend/konan/KonanLoweringPhases.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanLoweringPhases.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanLoweringPhases.kt index 3ebc0afa6db..d42f9edd404 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanLoweringPhases.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanLoweringPhases.kt @@ -275,8 +275,11 @@ internal val compileTimeEvaluatePhase = makeKonanFileLoweringPhase( prerequisite = setOf(varargPhase) ) -internal val coroutinesPhase = makeKonanFileLoweringPhase( - ::NativeSuspendFunctionsLowering, +internal val coroutinesPhase = makeKonanFileOpPhase( + { context, irFile -> + NativeSuspendFunctionsLowering(context).lower(irFile) + RemoveSuspendLambdas().lower(irFile) + }, name = "Coroutines", description = "Coroutines lowering", prerequisite = setOf(localFunctionsPhase, finallyBlocksPhase)