Keep track of array types in OptimizationBasicInterpreter
Merging array types with different element types, for example `[Lj/l/String;` and `[Lj/l/Object;`, now produces `[Lj/l/Object;` (instead of `Lj/l/Object;`), which allows for more precise tracking of null values because we assume that AALOAD on a non-array typed value is possible only if that value is null. #KT-54802 Fixed
This commit is contained in:
+6
@@ -3419,6 +3419,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/casts/kt54707.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt54802.kt")
|
||||
public void testKt54802() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/kt54802.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lambdaToUnitCast.kt")
|
||||
public void testLambdaToUnitCast() throws Exception {
|
||||
|
||||
+6
@@ -3479,6 +3479,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/casts/kt54707.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt54802.kt")
|
||||
public void testKt54802() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/kt54802.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lambdaToUnitCast.kt")
|
||||
public void testLambdaToUnitCast() throws Exception {
|
||||
|
||||
+5
@@ -3071,6 +3071,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
runTest("compiler/testData/codegen/box/casts/kt54707.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt54802.kt")
|
||||
public void testKt54802() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/kt54802.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaToUnitCast.kt")
|
||||
public void testLambdaToUnitCast() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/lambdaToUnitCast.kt");
|
||||
|
||||
Reference in New Issue
Block a user