Fix generation of checkcast instructions for inline classes

Normalize LHS and RHS types to use only boxed ones and then let bytecode
 optmizer reduce redundant boxing
This commit is contained in:
Mikhail Zarechenskiy
2018-07-04 15:31:23 +03:00
parent 8eb7eab535
commit 4f490ac264
9 changed files with 117 additions and 1 deletions
@@ -2060,6 +2060,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/noAssertionsForInlineClassesBasedOnNullableTypes.kt");
}
@TestMetadata("noBoxingOnCastOperations.kt")
public void testNoBoxingOnCastOperations() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/noBoxingOnCastOperations.kt");
}
@TestMetadata("noBoxingOperationsOnNonTrivialSpread.kt")
public void testNoBoxingOperationsOnNonTrivialSpread() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/noBoxingOperationsOnNonTrivialSpread.kt");