[JVM_IR] Optimize properties delegated to const val
We can omit `get` call to delegated property and inline constant value directly. If we are not going to do that, we can get a runtime exception because all usages of const property will be inlined and the property itself will be dropped. #KT-63567 Fixed #KT-63580 Fixed
This commit is contained in:
+12
@@ -15478,12 +15478,24 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegateForExtPropertyInClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegateToConstVal.kt")
|
||||
public void testDelegateToConstVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegateToConstVal.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegateToConstructorParameter.kt")
|
||||
public void testDelegateToConstructorParameter() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegateToConstructorParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegateToJavaFinalStaticField.kt")
|
||||
public void testDelegateToJavaFinalStaticField() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegateToJavaFinalStaticField.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegateWithPrivateSet.kt")
|
||||
public void testDelegateWithPrivateSet() throws Exception {
|
||||
|
||||
+12
@@ -15478,12 +15478,24 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegateForExtPropertyInClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegateToConstVal.kt")
|
||||
public void testDelegateToConstVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegateToConstVal.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegateToConstructorParameter.kt")
|
||||
public void testDelegateToConstructorParameter() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegateToConstructorParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegateToJavaFinalStaticField.kt")
|
||||
public void testDelegateToJavaFinalStaticField() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegateToJavaFinalStaticField.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegateWithPrivateSet.kt")
|
||||
public void testDelegateWithPrivateSet() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user