diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SourceCompilerForInline.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SourceCompilerForInline.kt index 8b48cf82d49..997d853cca2 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SourceCompilerForInline.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SourceCompilerForInline.kt @@ -9,6 +9,7 @@ import com.intellij.psi.PsiFile import org.jetbrains.kotlin.backend.common.CodegenUtil import org.jetbrains.kotlin.codegen.* import org.jetbrains.kotlin.codegen.context.* +import org.jetbrains.kotlin.codegen.coroutines.getOrCreateJvmSuspendFunctionView import org.jetbrains.kotlin.codegen.state.GenerationState import org.jetbrains.kotlin.config.isReleaseCoroutines import org.jetbrains.kotlin.descriptors.* @@ -134,11 +135,15 @@ class PsiSourceCompilerForInline(private val codegen: ExpressionCodegen, overrid ): SMAP { lambdaInfo as? PsiExpressionLambda ?: error("TODO") val invokeMethodDescriptor = lambdaInfo.invokeMethodDescriptor - val closureContext = - if (lambdaInfo.isPropertyReference) + val closureContext = when { + lambdaInfo.isPropertyReference -> codegen.getContext().intoAnonymousClass(lambdaInfo.classDescriptor, codegen, OwnerKind.IMPLEMENTATION) - else - codegen.getContext().intoClosure(invokeMethodDescriptor, codegen, state.typeMapper) + invokeMethodDescriptor.isSuspend -> + codegen.getContext().intoCoroutineClosure( + getOrCreateJvmSuspendFunctionView(invokeMethodDescriptor, state), invokeMethodDescriptor, codegen, state.typeMapper + ) + else -> codegen.getContext().intoClosure(invokeMethodDescriptor, codegen, state.typeMapper) + } val context = closureContext.intoInlinedLambda(invokeMethodDescriptor, lambdaInfo.isCrossInline, lambdaInfo.isPropertyReference) return generateMethodBody( diff --git a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt new file mode 100644 index 00000000000..44c4522f53d --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt @@ -0,0 +1,62 @@ +// IGNORE_BACKEND: JVM_IR +// COMMON_COROUTINES_TEST +// WITH_RUNTIME +// WITH_COROUTINES +// CHECK_BYTECODE_LISTING + +// In this test the following transformation are occuring: +// flow$1 -> flowWith$$inlined$flow$1 +// flow$1 -> check$$inlined$flow$1 +// flow$1 -> flowWith$$inlined$flow$2 +// flowWith$$inlined$flow$2 -> check$$inlined$flowWith$1 + +// All thansformations, except the third, shall generate state-machine. +// The third shall not generate state-machine, since it is retransformed. + +package flow + +import COROUTINES_PACKAGE.* +import helpers.* + +interface FlowCollector { + suspend fun emit(value: T) +} + +interface Flow { + suspend fun collect(collector: FlowCollector) +} + +public inline fun flow(crossinline block: suspend FlowCollector.() -> Unit) = object : Flow { + override suspend fun collect(collector: FlowCollector) = collector.block() +} + +suspend inline fun Flow.collect(crossinline action: suspend (T) -> Unit): Unit = + collect(object : FlowCollector { + override suspend fun emit(value: T) = action(value) + }) + +inline fun Flow.flowWith(crossinline builderBlock: suspend Flow.() -> Flow): Flow = + flow { + builderBlock() + } + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +suspend fun check() { + val f: Unit = flow { + emit(1) + }.flowWith { + this + }.collect { + // In this test collect is just terminating operation, which just runs the lazy computations + } +} + +fun box(): String { + builder { + check() + } + return "OK" +} diff --git a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.txt b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.txt new file mode 100644 index 00000000000..c8cb5a60470 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.txt @@ -0,0 +1,179 @@ +@kotlin.Metadata +public interface flow/Flow { + public abstract @org.jetbrains.annotations.Nullable method collect(@org.jetbrains.annotations.NotNull p0: flow.FlowCollector, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object +} + +@kotlin.Metadata +public interface flow/FlowCollector { + public abstract @org.jetbrains.annotations.Nullable method emit(p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object +} + +@kotlin.coroutines.jvm.internal.DebugMetadata +@kotlin.Metadata +final class flow/InnerObjectRetransformationKt$box$1 { + field label: int + inner class flow/InnerObjectRetransformationKt$box$1 + method (p0: kotlin.coroutines.Continuation): void + public final @org.jetbrains.annotations.NotNull method create(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): kotlin.coroutines.Continuation + public final method invoke(p0: java.lang.Object): java.lang.Object + public final @org.jetbrains.annotations.Nullable method invokeSuspend(@org.jetbrains.annotations.NotNull p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$check$$inlined$collect$1$1 { + field label: int + synthetic field result: java.lang.Object + synthetic final field this$0: flow.InnerObjectRetransformationKt$check$$inlined$collect$1 + inner class flow/InnerObjectRetransformationKt$check$$inlined$collect$1 + inner class flow/InnerObjectRetransformationKt$check$$inlined$collect$1$1 + public method (p0: flow.InnerObjectRetransformationKt$check$$inlined$collect$1, p1: kotlin.coroutines.Continuation): void + public final @org.jetbrains.annotations.Nullable method invokeSuspend(@org.jetbrains.annotations.NotNull p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$check$$inlined$collect$1 { + inner class flow/InnerObjectRetransformationKt$check$$inlined$collect$1 + inner class flow/InnerObjectRetransformationKt$check$$inlined$collect$1$1 + public method (): void + public @org.jetbrains.annotations.Nullable method emit(@org.jetbrains.annotations.NotNull p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object +} + +@kotlin.Metadata +@kotlin.coroutines.jvm.internal.DebugMetadata +public final class flow/InnerObjectRetransformationKt$check$$inlined$flow$1$1 { + field L$0: java.lang.Object + field L$1: java.lang.Object + field L$2: java.lang.Object + field L$3: java.lang.Object + field label: int + synthetic field result: java.lang.Object + synthetic final field this$0: flow.InnerObjectRetransformationKt$check$$inlined$flow$1 + inner class flow/InnerObjectRetransformationKt$check$$inlined$flow$1 + inner class flow/InnerObjectRetransformationKt$check$$inlined$flow$1$1 + public method (p0: flow.InnerObjectRetransformationKt$check$$inlined$flow$1, p1: kotlin.coroutines.Continuation): void + public final @org.jetbrains.annotations.Nullable method invokeSuspend(@org.jetbrains.annotations.NotNull p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$check$$inlined$flow$1 { + inner class flow/InnerObjectRetransformationKt$check$$inlined$flow$1 + inner class flow/InnerObjectRetransformationKt$check$$inlined$flow$1$1 + public method (): void + public @org.jetbrains.annotations.Nullable method collect(@org.jetbrains.annotations.NotNull p0: flow.FlowCollector, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$check$$inlined$flowWith$1 { + synthetic final field $this_flowWith$inlined: flow.Flow + inner class flow/InnerObjectRetransformationKt$check$$inlined$flowWith$1 + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$2$1 + public method (p0: flow.Flow): void + public @org.jetbrains.annotations.Nullable method collect(@org.jetbrains.annotations.NotNull p0: flow.FlowCollector, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object +} + +@kotlin.Metadata +@kotlin.coroutines.jvm.internal.DebugMetadata +final class flow/InnerObjectRetransformationKt$check$1 { + field L$0: java.lang.Object + field label: int + synthetic field result: java.lang.Object + inner class flow/InnerObjectRetransformationKt$check$1 + method (p0: kotlin.coroutines.Continuation): void + public final @org.jetbrains.annotations.Nullable method invokeSuspend(@org.jetbrains.annotations.NotNull p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$collect$2$emit$1 { + field label: int + synthetic field result: java.lang.Object + synthetic final field this$0: flow.InnerObjectRetransformationKt$collect$2 + inner class flow/InnerObjectRetransformationKt$collect$2 + inner class flow/InnerObjectRetransformationKt$collect$2$emit$1 + public method (p0: flow.InnerObjectRetransformationKt$collect$2, p1: kotlin.coroutines.Continuation): void + public final @org.jetbrains.annotations.Nullable method invokeSuspend(@org.jetbrains.annotations.NotNull p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$collect$2 { + synthetic final field $action: kotlin.jvm.functions.Function2 + inner class flow/InnerObjectRetransformationKt$collect$2 + inner class flow/InnerObjectRetransformationKt$collect$2$emit$1 + public method (p0: kotlin.jvm.functions.Function2): void + public @org.jetbrains.annotations.Nullable method emit(@org.jetbrains.annotations.NotNull p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$flow$1$collect$1 { + field label: int + synthetic field result: java.lang.Object + synthetic final field this$0: flow.InnerObjectRetransformationKt$flow$1 + inner class flow/InnerObjectRetransformationKt$flow$1 + inner class flow/InnerObjectRetransformationKt$flow$1$collect$1 + public method (p0: flow.InnerObjectRetransformationKt$flow$1, p1: kotlin.coroutines.Continuation): void + public final @org.jetbrains.annotations.Nullable method invokeSuspend(@org.jetbrains.annotations.NotNull p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$flow$1 { + synthetic final field $block: kotlin.jvm.functions.Function2 + inner class flow/InnerObjectRetransformationKt$flow$1 + inner class flow/InnerObjectRetransformationKt$flow$1$collect$1 + public method (p0: kotlin.jvm.functions.Function2): void + public @org.jetbrains.annotations.Nullable method collect(@org.jetbrains.annotations.NotNull p0: flow.FlowCollector, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$1$1 { + field label: int + synthetic field result: java.lang.Object + synthetic final field this$0: flow.InnerObjectRetransformationKt$flowWith$$inlined$flow$1 + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$1 + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$1$1 + public method (p0: flow.InnerObjectRetransformationKt$flowWith$$inlined$flow$1, p1: kotlin.coroutines.Continuation): void + public final @org.jetbrains.annotations.Nullable method invokeSuspend(@org.jetbrains.annotations.NotNull p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$1 { + synthetic final field $builderBlock$inlined: kotlin.jvm.functions.Function2 + synthetic final field $this_flowWith$inlined: flow.Flow + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$1 + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$1$1 + public method (p0: flow.Flow, p1: kotlin.jvm.functions.Function2): void + public @org.jetbrains.annotations.Nullable method collect(@org.jetbrains.annotations.NotNull p0: flow.FlowCollector, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$2$1 { + field label: int + synthetic field result: java.lang.Object + synthetic final field this$0: flow.InnerObjectRetransformationKt$flowWith$$inlined$flow$2 + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$2 + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$2$1 + public method (p0: flow.InnerObjectRetransformationKt$flowWith$$inlined$flow$2, p1: kotlin.coroutines.Continuation): void + public final @org.jetbrains.annotations.Nullable method invokeSuspend(@org.jetbrains.annotations.NotNull p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$2 { + synthetic final field $builderBlock$inlined: kotlin.jvm.functions.Function2 + synthetic final field $this_flowWith$inlined: flow.Flow + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$2 + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$2$1 + public method (p0: flow.Flow, p1: kotlin.jvm.functions.Function2): void + public @org.jetbrains.annotations.Nullable method collect(@org.jetbrains.annotations.NotNull p0: flow.FlowCollector, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt { + inner class flow/InnerObjectRetransformationKt$box$1 + inner class flow/InnerObjectRetransformationKt$check$1 + inner class flow/InnerObjectRetransformationKt$collect$2 + inner class flow/InnerObjectRetransformationKt$flow$1 + public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String + public final static method builder(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function1): void + public final static @org.jetbrains.annotations.Nullable method check(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object + private final static method collect(@org.jetbrains.annotations.NotNull p0: flow.Flow, p1: kotlin.jvm.functions.Function2, p2: kotlin.coroutines.Continuation): java.lang.Object + public final static @org.jetbrains.annotations.NotNull method flow(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function2): flow.Flow + public final static @org.jetbrains.annotations.NotNull method flowWith(@org.jetbrains.annotations.NotNull p0: flow.Flow, @org.jetbrains.annotations.NotNull p1: kotlin.jvm.functions.Function2): flow.Flow +} diff --git a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation_1_2.txt b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation_1_2.txt new file mode 100644 index 00000000000..801ea53b2ac --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation_1_2.txt @@ -0,0 +1,189 @@ +@kotlin.Metadata +public interface flow/Flow { + public abstract @org.jetbrains.annotations.Nullable method collect(@org.jetbrains.annotations.NotNull p0: flow.FlowCollector, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.experimental.Continuation): java.lang.Object +} + +@kotlin.Metadata +public interface flow/FlowCollector { + public abstract @org.jetbrains.annotations.Nullable method emit(p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.experimental.Continuation): java.lang.Object +} + +@kotlin.Metadata +final class flow/InnerObjectRetransformationKt$box$1 { + inner class flow/InnerObjectRetransformationKt$box$1 + method (p0: kotlin.coroutines.experimental.Continuation): void + public final @org.jetbrains.annotations.NotNull method create(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.experimental.Continuation): kotlin.coroutines.experimental.Continuation + public final @org.jetbrains.annotations.Nullable method doResume(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.Nullable p1: java.lang.Throwable): java.lang.Object + public final method invoke(p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$check$$inlined$collect$1$1 { + synthetic field data: java.lang.Object + synthetic field exception: java.lang.Throwable + synthetic final field this$0: flow.InnerObjectRetransformationKt$check$$inlined$collect$1 + inner class flow/InnerObjectRetransformationKt$check$$inlined$collect$1 + inner class flow/InnerObjectRetransformationKt$check$$inlined$collect$1$1 + public method (p0: flow.InnerObjectRetransformationKt$check$$inlined$collect$1, p1: kotlin.coroutines.experimental.Continuation): void + public final @org.jetbrains.annotations.Nullable method doResume(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.Nullable p1: java.lang.Throwable): java.lang.Object + synthetic final method getLabel(): int + synthetic final method setLabel(p0: int): void +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$check$$inlined$collect$1 { + inner class flow/InnerObjectRetransformationKt$check$$inlined$collect$1 + inner class flow/InnerObjectRetransformationKt$check$$inlined$collect$1$1 + public method (): void + public @org.jetbrains.annotations.Nullable method emit(@org.jetbrains.annotations.NotNull p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.experimental.Continuation): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$check$$inlined$flow$1$1 { + field L$0: java.lang.Object + field L$1: java.lang.Object + field L$2: java.lang.Object + field L$3: java.lang.Object + synthetic field data: java.lang.Object + synthetic field exception: java.lang.Throwable + synthetic final field this$0: flow.InnerObjectRetransformationKt$check$$inlined$flow$1 + inner class flow/InnerObjectRetransformationKt$check$$inlined$flow$1 + inner class flow/InnerObjectRetransformationKt$check$$inlined$flow$1$1 + public method (p0: flow.InnerObjectRetransformationKt$check$$inlined$flow$1, p1: kotlin.coroutines.experimental.Continuation): void + public final @org.jetbrains.annotations.Nullable method doResume(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.Nullable p1: java.lang.Throwable): java.lang.Object + synthetic final method getLabel(): int + synthetic final method setLabel(p0: int): void +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$check$$inlined$flow$1 { + inner class flow/InnerObjectRetransformationKt$check$$inlined$flow$1 + inner class flow/InnerObjectRetransformationKt$check$$inlined$flow$1$1 + public method (): void + public @org.jetbrains.annotations.Nullable method collect(@org.jetbrains.annotations.NotNull p0: flow.FlowCollector, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.experimental.Continuation): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$check$$inlined$flowWith$1 { + synthetic final field $this_flowWith$inlined: flow.Flow + inner class flow/InnerObjectRetransformationKt$check$$inlined$flowWith$1 + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$2$1 + public method (p0: flow.Flow): void + public @org.jetbrains.annotations.Nullable method collect(@org.jetbrains.annotations.NotNull p0: flow.FlowCollector, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.experimental.Continuation): java.lang.Object +} + +@kotlin.Metadata +final class flow/InnerObjectRetransformationKt$check$1 { + field L$0: java.lang.Object + synthetic field data: java.lang.Object + synthetic field exception: java.lang.Throwable + inner class flow/InnerObjectRetransformationKt$check$1 + method (p0: kotlin.coroutines.experimental.Continuation): void + public final @org.jetbrains.annotations.Nullable method doResume(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.Nullable p1: java.lang.Throwable): java.lang.Object + synthetic final method getLabel(): int + synthetic final method setLabel(p0: int): void +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$collect$2$emit$1 { + synthetic field data: java.lang.Object + synthetic field exception: java.lang.Throwable + synthetic final field this$0: flow.InnerObjectRetransformationKt$collect$2 + inner class flow/InnerObjectRetransformationKt$collect$2 + inner class flow/InnerObjectRetransformationKt$collect$2$emit$1 + public method (p0: flow.InnerObjectRetransformationKt$collect$2, p1: kotlin.coroutines.experimental.Continuation): void + public final @org.jetbrains.annotations.Nullable method doResume(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.Nullable p1: java.lang.Throwable): java.lang.Object + synthetic final method getLabel(): int + synthetic final method setLabel(p0: int): void +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$collect$2 { + synthetic final field $action: kotlin.jvm.functions.Function2 + inner class flow/InnerObjectRetransformationKt$collect$2 + inner class flow/InnerObjectRetransformationKt$collect$2$emit$1 + public method (p0: kotlin.jvm.functions.Function2): void + public @org.jetbrains.annotations.Nullable method emit(@org.jetbrains.annotations.NotNull p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.experimental.Continuation): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$flow$1$collect$1 { + synthetic field data: java.lang.Object + synthetic field exception: java.lang.Throwable + synthetic final field this$0: flow.InnerObjectRetransformationKt$flow$1 + inner class flow/InnerObjectRetransformationKt$flow$1 + inner class flow/InnerObjectRetransformationKt$flow$1$collect$1 + public method (p0: flow.InnerObjectRetransformationKt$flow$1, p1: kotlin.coroutines.experimental.Continuation): void + public final @org.jetbrains.annotations.Nullable method doResume(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.Nullable p1: java.lang.Throwable): java.lang.Object + synthetic final method getLabel(): int + synthetic final method setLabel(p0: int): void +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$flow$1 { + synthetic final field $block: kotlin.jvm.functions.Function2 + inner class flow/InnerObjectRetransformationKt$flow$1 + inner class flow/InnerObjectRetransformationKt$flow$1$collect$1 + public method (p0: kotlin.jvm.functions.Function2): void + public @org.jetbrains.annotations.Nullable method collect(@org.jetbrains.annotations.NotNull p0: flow.FlowCollector, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.experimental.Continuation): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$1$1 { + synthetic field data: java.lang.Object + synthetic field exception: java.lang.Throwable + synthetic final field this$0: flow.InnerObjectRetransformationKt$flowWith$$inlined$flow$1 + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$1 + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$1$1 + public method (p0: flow.InnerObjectRetransformationKt$flowWith$$inlined$flow$1, p1: kotlin.coroutines.experimental.Continuation): void + public final @org.jetbrains.annotations.Nullable method doResume(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.Nullable p1: java.lang.Throwable): java.lang.Object + synthetic final method getLabel(): int + synthetic final method setLabel(p0: int): void +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$1 { + synthetic final field $builderBlock$inlined: kotlin.jvm.functions.Function2 + synthetic final field $this_flowWith$inlined: flow.Flow + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$1 + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$1$1 + public method (p0: flow.Flow, p1: kotlin.jvm.functions.Function2): void + public @org.jetbrains.annotations.Nullable method collect(@org.jetbrains.annotations.NotNull p0: flow.FlowCollector, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.experimental.Continuation): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$2$1 { + synthetic field data: java.lang.Object + synthetic field exception: java.lang.Throwable + synthetic final field this$0: flow.InnerObjectRetransformationKt$flowWith$$inlined$flow$2 + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$2 + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$2$1 + public method (p0: flow.InnerObjectRetransformationKt$flowWith$$inlined$flow$2, p1: kotlin.coroutines.experimental.Continuation): void + public final @org.jetbrains.annotations.Nullable method doResume(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.Nullable p1: java.lang.Throwable): java.lang.Object + synthetic final method getLabel(): int + synthetic final method setLabel(p0: int): void +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$2 { + synthetic final field $builderBlock$inlined: kotlin.jvm.functions.Function2 + synthetic final field $this_flowWith$inlined: flow.Flow + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$2 + inner class flow/InnerObjectRetransformationKt$flowWith$$inlined$flow$2$1 + public method (p0: flow.Flow, p1: kotlin.jvm.functions.Function2): void + public @org.jetbrains.annotations.Nullable method collect(@org.jetbrains.annotations.NotNull p0: flow.FlowCollector, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.experimental.Continuation): java.lang.Object +} + +@kotlin.Metadata +public final class flow/InnerObjectRetransformationKt { + inner class flow/InnerObjectRetransformationKt$box$1 + inner class flow/InnerObjectRetransformationKt$check$1 + inner class flow/InnerObjectRetransformationKt$collect$2 + inner class flow/InnerObjectRetransformationKt$flow$1 + public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String + public final static method builder(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function1): void + public final static @org.jetbrains.annotations.Nullable method check(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.experimental.Continuation): java.lang.Object + private final static method collect(@org.jetbrains.annotations.NotNull p0: flow.Flow, p1: kotlin.jvm.functions.Function2, p2: kotlin.coroutines.experimental.Continuation): java.lang.Object + public final static @org.jetbrains.annotations.NotNull method flow(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function2): flow.Flow + public final static @org.jetbrains.annotations.NotNull method flowWith(@org.jetbrains.annotations.NotNull p0: flow.Flow, @org.jetbrains.annotations.NotNull p1: kotlin.jvm.functions.Function2): flow.Flow +} diff --git a/compiler/testData/codegen/bytecodeListing/oomInReturnUnit.txt b/compiler/testData/codegen/bytecodeListing/oomInReturnUnit.txt index a0f92cb2830..32ff025f890 100644 --- a/compiler/testData/codegen/bytecodeListing/oomInReturnUnit.txt +++ b/compiler/testData/codegen/bytecodeListing/oomInReturnUnit.txt @@ -4,7 +4,7 @@ final class OomInReturnUnitKt$test$1 { synthetic field data: java.lang.Object synthetic field exception: java.lang.Throwable inner class OomInReturnUnitKt$test$1 - method (p0: COROUTINES_PACKAGE.Continuation): void + method (p0: kotlin.coroutines.experimental.Continuation): void public final @org.jetbrains.annotations.Nullable method doResume(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.Nullable p1: java.lang.Throwable): java.lang.Object synthetic final method getLabel(): int synthetic final method setLabel(p0: int): void @@ -13,25 +13,47 @@ final class OomInReturnUnitKt$test$1 { @kotlin.Metadata public final class OomInReturnUnitKt { inner class OomInReturnUnitKt$test$1 - public final static @org.jetbrains.annotations.Nullable method some(@org.jetbrains.annotations.NotNull p0: COROUTINES_PACKAGE.Continuation): java.lang.Object - public final static @org.jetbrains.annotations.Nullable method test(@org.jetbrains.annotations.NotNull p0: COROUTINES_PACKAGE.Continuation): java.lang.Object + public final static @org.jetbrains.annotations.Nullable method some(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.experimental.Continuation): java.lang.Object + public final static @org.jetbrains.annotations.Nullable method test(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.experimental.Continuation): java.lang.Object +} + +@kotlin.Metadata +final class helpers/CheckStateMachineContinuation$resume$1 { + public final static field INSTANCE: helpers.CheckStateMachineContinuation$resume$1 + inner class helpers/CheckStateMachineContinuation$resume$1 + static method (): void + method (): void + public synthetic method invoke(): java.lang.Object + public final method invoke(): void +} + +@kotlin.Metadata +public final class helpers/CheckStateMachineContinuation { + public final static field INSTANCE: helpers.CheckStateMachineContinuation + inner class helpers/CheckStateMachineContinuation$resume$1 + static method (): void + private method (): void + public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.experimental.CoroutineContext + public method resume(@org.jetbrains.annotations.NotNull p0: kotlin.Unit): void + public synthetic method resume(p0: java.lang.Object): void + public method resumeWithException(@org.jetbrains.annotations.NotNull p0: java.lang.Throwable): void } @kotlin.Metadata public abstract class helpers/ContinuationAdapter { - private final @org.jetbrains.annotations.NotNull field context: COROUTINES_PACKAGE.CoroutineContext + private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.experimental.CoroutineContext public method (): void - public @org.jetbrains.annotations.NotNull method getContext(): COROUTINES_PACKAGE.CoroutineContext + public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.experimental.CoroutineContext } @kotlin.Metadata public final class helpers/CoroutineUtilKt$handleExceptionContinuation$1 { synthetic final field $x: kotlin.jvm.functions.Function1 - private final @org.jetbrains.annotations.NotNull field context: COROUTINES_PACKAGE.EmptyCoroutineContext + private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.experimental.EmptyCoroutineContext inner class helpers/CoroutineUtilKt$handleExceptionContinuation$1 method (p0: kotlin.jvm.functions.Function1): void - public synthetic method getContext(): COROUTINES_PACKAGE.CoroutineContext - public @org.jetbrains.annotations.NotNull method getContext(): COROUTINES_PACKAGE.EmptyCoroutineContext + public synthetic method getContext(): kotlin.coroutines.experimental.CoroutineContext + public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.experimental.EmptyCoroutineContext public method resume(@org.jetbrains.annotations.Nullable p0: java.lang.Object): void public method resumeWithException(@org.jetbrains.annotations.NotNull p0: java.lang.Throwable): void } @@ -39,11 +61,11 @@ public final class helpers/CoroutineUtilKt$handleExceptionContinuation$1 { @kotlin.Metadata public final class helpers/CoroutineUtilKt$handleResultContinuation$1 { synthetic final field $x: kotlin.jvm.functions.Function1 - private final @org.jetbrains.annotations.NotNull field context: COROUTINES_PACKAGE.EmptyCoroutineContext + private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.experimental.EmptyCoroutineContext inner class helpers/CoroutineUtilKt$handleResultContinuation$1 method (p0: kotlin.jvm.functions.Function1): void - public synthetic method getContext(): COROUTINES_PACKAGE.CoroutineContext - public @org.jetbrains.annotations.NotNull method getContext(): COROUTINES_PACKAGE.EmptyCoroutineContext + public synthetic method getContext(): kotlin.coroutines.experimental.CoroutineContext + public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.experimental.EmptyCoroutineContext public method resume(p0: java.lang.Object): void public method resumeWithException(@org.jetbrains.annotations.NotNull p0: java.lang.Throwable): void } @@ -52,8 +74,8 @@ public final class helpers/CoroutineUtilKt$handleResultContinuation$1 { public final class helpers/CoroutineUtilKt { inner class helpers/CoroutineUtilKt$handleExceptionContinuation$1 inner class helpers/CoroutineUtilKt$handleResultContinuation$1 - public final static @org.jetbrains.annotations.NotNull method handleExceptionContinuation(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function1): COROUTINES_PACKAGE.Continuation - public final static @org.jetbrains.annotations.NotNull method handleResultContinuation(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function1): COROUTINES_PACKAGE.Continuation + public final static @org.jetbrains.annotations.NotNull method handleExceptionContinuation(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function1): kotlin.coroutines.experimental.Continuation + public final static @org.jetbrains.annotations.NotNull method handleResultContinuation(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function1): kotlin.coroutines.experimental.Continuation } @kotlin.Metadata @@ -66,13 +88,51 @@ public final class helpers/EmptyContinuation$Companion { @kotlin.Metadata public class helpers/EmptyContinuation { public final static field Companion: helpers.EmptyContinuation$Companion - private final @org.jetbrains.annotations.NotNull field context: COROUTINES_PACKAGE.CoroutineContext + private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.experimental.CoroutineContext inner class helpers/EmptyContinuation$Companion static method (): void public method (): void - public method (@org.jetbrains.annotations.NotNull p0: COROUTINES_PACKAGE.CoroutineContext): void - public synthetic method (p0: COROUTINES_PACKAGE.CoroutineContext, p1: int, p2: kotlin.jvm.internal.DefaultConstructorMarker): void - public @org.jetbrains.annotations.NotNull method getContext(): COROUTINES_PACKAGE.CoroutineContext + public method (@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.experimental.CoroutineContext): void + public synthetic method (p0: kotlin.coroutines.experimental.CoroutineContext, p1: int, p2: kotlin.jvm.internal.DefaultConstructorMarker): void + public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.experimental.CoroutineContext public method resume(@org.jetbrains.annotations.Nullable p0: java.lang.Object): void public method resumeWithException(@org.jetbrains.annotations.NotNull p0: java.lang.Throwable): void } + +@kotlin.Metadata +final class helpers/StateMachineChecker$proceed$1 { + public final static field INSTANCE: helpers.StateMachineChecker$proceed$1 + inner class helpers/StateMachineChecker$proceed$1 + static method (): void + method (): void + public synthetic method invoke(): java.lang.Object + public final method invoke(): void +} + +@kotlin.Metadata +final class helpers/StateMachineChecker$suspendHere$2$1 { + synthetic final field $c: kotlin.coroutines.experimental.Continuation + inner class helpers/StateMachineChecker$suspendHere$2$1 + method (p0: kotlin.coroutines.experimental.Continuation): void + public synthetic method invoke(): java.lang.Object + public final method invoke(): void +} + +@kotlin.Metadata +public final class helpers/StateMachineChecker { + public final static field INSTANCE: helpers.StateMachineChecker + private static field counter: int + private static field finished: boolean + private static @org.jetbrains.annotations.NotNull field proceed: kotlin.jvm.functions.Function0 + inner class helpers/StateMachineChecker$proceed$1 + static method (): void + private method (): void + public synthetic final static method access$getCounter$p(p0: helpers.StateMachineChecker): int + public synthetic final static method access$setCounter$p(p0: helpers.StateMachineChecker, p1: int): void + public final method check(p0: int): void + public final method getFinished(): boolean + public final @org.jetbrains.annotations.NotNull method getProceed(): kotlin.jvm.functions.Function0 + public final method setFinished(p0: boolean): void + public final method setProceed(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void + public final @org.jetbrains.annotations.Nullable method suspendHere(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.experimental.Continuation): java.lang.Object +} diff --git a/compiler/testData/codegen/bytecodeListing/oomInReturnUnit_1_3.txt b/compiler/testData/codegen/bytecodeListing/oomInReturnUnit_1_3.txt index 36e035a3926..f656c02e5a1 100644 --- a/compiler/testData/codegen/bytecodeListing/oomInReturnUnit_1_3.txt +++ b/compiler/testData/codegen/bytecodeListing/oomInReturnUnit_1_3.txt @@ -16,6 +16,28 @@ public final class OomInReturnUnitKt { public final static @org.jetbrains.annotations.Nullable method test(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object } +@kotlin.Metadata +final class helpers/CheckStateMachineContinuation$resume$1 { + public final static field INSTANCE: helpers.CheckStateMachineContinuation$resume$1 + inner class helpers/CheckStateMachineContinuation$resume$1 + static method (): void + method (): void + public synthetic method invoke(): java.lang.Object + public final method invoke(): void +} + +@kotlin.Metadata +public final class helpers/CheckStateMachineContinuation { + public final static field INSTANCE: helpers.CheckStateMachineContinuation + inner class helpers/CheckStateMachineContinuation$resume$1 + static method (): void + private method (): void + public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.CoroutineContext + public method resume(@org.jetbrains.annotations.NotNull p0: kotlin.Unit): void + public synthetic method resume(p0: java.lang.Object): void + public method resumeWithException(@org.jetbrains.annotations.NotNull p0: java.lang.Throwable): void +} + @kotlin.Metadata public abstract class helpers/ContinuationAdapter { private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.CoroutineContext @@ -75,3 +97,41 @@ public class helpers/EmptyContinuation { public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.CoroutineContext public method resumeWith(@org.jetbrains.annotations.NotNull p0: java.lang.Object): void } + +@kotlin.Metadata +final class helpers/StateMachineChecker$proceed$1 { + public final static field INSTANCE: helpers.StateMachineChecker$proceed$1 + inner class helpers/StateMachineChecker$proceed$1 + static method (): void + method (): void + public synthetic method invoke(): java.lang.Object + public final method invoke(): void +} + +@kotlin.Metadata +final class helpers/StateMachineChecker$suspendHere$2$1 { + synthetic final field $c: kotlin.coroutines.Continuation + inner class helpers/StateMachineChecker$suspendHere$2$1 + method (p0: kotlin.coroutines.Continuation): void + public synthetic method invoke(): java.lang.Object + public final method invoke(): void +} + +@kotlin.Metadata +public final class helpers/StateMachineChecker { + public final static field INSTANCE: helpers.StateMachineChecker + private static field counter: int + private static field finished: boolean + private static @org.jetbrains.annotations.NotNull field proceed: kotlin.jvm.functions.Function0 + inner class helpers/StateMachineChecker$proceed$1 + static method (): void + private method (): void + public synthetic final static method access$getCounter$p(p0: helpers.StateMachineChecker): int + public synthetic final static method access$setCounter$p(p0: helpers.StateMachineChecker, p1: int): void + public final method check(p0: int): void + public final method getFinished(): boolean + public final @org.jetbrains.annotations.NotNull method getProceed(): kotlin.jvm.functions.Function0 + public final method setFinished(p0: boolean): void + public final method setProceed(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void + public final @org.jetbrains.annotations.Nullable method suspendHere(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object +} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 8bd9836c084..d6c93d8d553 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -8092,6 +8092,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt", "kotlin.coroutines"); } + @TestMetadata("innerObjectRetransformation.kt") + public void testInnerObjectRetransformation_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("innerObjectRetransformation.kt") + public void testInnerObjectRetransformation_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt", "kotlin.coroutines"); + } + @TestMetadata("simple.kt") public void testSimple_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/simple.kt", "kotlin.coroutines.experimental"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index f7b5df0ba2c..4ed6b61cedc 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -8092,6 +8092,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt", "kotlin.coroutines"); } + @TestMetadata("innerObjectRetransformation.kt") + public void testInnerObjectRetransformation_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("innerObjectRetransformation.kt") + public void testInnerObjectRetransformation_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt", "kotlin.coroutines"); + } + @TestMetadata("simple.kt") public void testSimple_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/simple.kt", "kotlin.coroutines.experimental"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 94ff090ad69..a7ea79b69c4 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -8092,6 +8092,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt", "kotlin.coroutines"); } + @TestMetadata("innerObjectRetransformation.kt") + public void testInnerObjectRetransformation_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("innerObjectRetransformation.kt") + public void testInnerObjectRetransformation_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt", "kotlin.coroutines"); + } + @TestMetadata("simple.kt") public void testSimple_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/simple.kt", "kotlin.coroutines.experimental"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index 5e7f0739982..5eff8898162 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -6097,6 +6097,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt", "kotlin.coroutines"); } + @TestMetadata("innerObjectRetransformation.kt") + public void testInnerObjectRetransformation_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt", "kotlin.coroutines"); + } + @TestMetadata("simple.kt") public void testSimple_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/simple.kt", "kotlin.coroutines"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 9ce562dd739..847da919c26 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -7117,6 +7117,16 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt", "kotlin.coroutines"); } + @TestMetadata("innerObjectRetransformation.kt") + public void testInnerObjectRetransformation_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("innerObjectRetransformation.kt") + public void testInnerObjectRetransformation_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt", "kotlin.coroutines"); + } + @TestMetadata("simple.kt") public void testSimple_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/simple.kt", "kotlin.coroutines.experimental");