Simplify generated code for rangeTo/concat intrinsics

The main reason is avoiding complicated operations like
dup + dup_x2 + pop2 for instances obtained by NEW instruction.

Otherwise it leads to problems in performRefinedTypeAnalysis
because code there has a sensible assumption that NEW instances
can be only dupped or stored into a local (rare cases)

 #KT-17457 Fixed
This commit is contained in:
Denis Zharkov
2017-05-19 16:16:08 +03:00
parent 419f12f1b7
commit 52b2e632df
12 changed files with 134 additions and 25 deletions
@@ -5876,6 +5876,18 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
doTest(fileName);
}
@TestMetadata("longRangeInSuspendCall.kt")
public void testLongRangeInSuspendCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/longRangeInSuspendCall.kt");
doTest(fileName);
}
@TestMetadata("longRangeInSuspendFun.kt")
public void testLongRangeInSuspendFun() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/longRangeInSuspendFun.kt");
doTest(fileName);
}
@TestMetadata("mergeNullAndString.kt")
public void testMergeNullAndString() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/mergeNullAndString.kt");