JVM_IR KT-48433 don't generate null check on 'this$0' parameter
This commit is contained in:
+6
@@ -1594,6 +1594,12 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeText/constructors/inlinePrimaryDefaults.kt");
|
runTest("compiler/testData/codegen/bytecodeText/constructors/inlinePrimaryDefaults.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerClassConstructor.kt")
|
||||||
|
public void testInnerClassConstructor() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeText/constructors/innerClassConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("innerPrimaryDefaults.kt")
|
@TestMetadata("innerPrimaryDefaults.kt")
|
||||||
public void testInnerPrimaryDefaults() throws Exception {
|
public void testInnerPrimaryDefaults() throws Exception {
|
||||||
|
|||||||
+1
@@ -328,6 +328,7 @@ class ExpressionCodegen(
|
|||||||
irFunction.origin == IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA
|
irFunction.origin == IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA
|
||||||
|
|
||||||
private fun generateNonNullAssertion(param: IrValueParameter) {
|
private fun generateNonNullAssertion(param: IrValueParameter) {
|
||||||
|
if (param.origin == JvmLoweredDeclarationOrigin.FIELD_FOR_OUTER_THIS) return
|
||||||
val asmType = param.type.asmType
|
val asmType = param.type.asmType
|
||||||
if (!param.type.unboxInlineClass().isNullable() && !isPrimitive(asmType)) {
|
if (!param.type.unboxInlineClass().isNullable() && !isPrimitive(asmType)) {
|
||||||
mv.load(findLocalIndex(param.symbol), asmType)
|
mv.load(findLocalIndex(param.symbol), asmType)
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
class Outer {
|
||||||
|
inner class Inner1
|
||||||
|
inner class Inner2(v: String)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 1 checkNotNullParameter
|
||||||
|
// 0 checkParameterIsNotNull
|
||||||
|
// 1 INVOKESTATIC
|
||||||
+6
@@ -1570,6 +1570,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeText/constructors/inlinePrimaryDefaults.kt");
|
runTest("compiler/testData/codegen/bytecodeText/constructors/inlinePrimaryDefaults.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerClassConstructor.kt")
|
||||||
|
public void testInnerClassConstructor() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeText/constructors/innerClassConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("innerPrimaryDefaults.kt")
|
@TestMetadata("innerPrimaryDefaults.kt")
|
||||||
public void testInnerPrimaryDefaults() throws Exception {
|
public void testInnerPrimaryDefaults() throws Exception {
|
||||||
|
|||||||
+6
@@ -1594,6 +1594,12 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeText/constructors/inlinePrimaryDefaults.kt");
|
runTest("compiler/testData/codegen/bytecodeText/constructors/inlinePrimaryDefaults.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerClassConstructor.kt")
|
||||||
|
public void testInnerClassConstructor() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeText/constructors/innerClassConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("innerPrimaryDefaults.kt")
|
@TestMetadata("innerPrimaryDefaults.kt")
|
||||||
public void testInnerPrimaryDefaults() throws Exception {
|
public void testInnerPrimaryDefaults() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user