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:
Alexander Udalov
2022-11-05 12:12:33 +01:00
parent a79927742c
commit d7a58a7c6c
11 changed files with 105 additions and 20 deletions
@@ -3553,6 +3553,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
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 {