Don't write synthetic arguments to LVT
This commit is contained in:
+3
-1
@@ -252,7 +252,9 @@ class ExpressionCodegen(
|
||||
writeValueParameterInLocalVariableTable(extensionReceiverParameter, startLabel, endLabel, true)
|
||||
}
|
||||
for (param in irFunction.valueParameters) {
|
||||
writeValueParameterInLocalVariableTable(param, startLabel, endLabel, false)
|
||||
if (!param.origin.isSynthetic) {
|
||||
writeValueParameterInLocalVariableTable(param, startLabel, endLabel, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// FILE: Foo.kt
|
||||
|
||||
fun foo(param: String = "123") {}
|
||||
|
||||
|
||||
//TODO: align backends
|
||||
|
||||
// JVM_TEMPLATES
|
||||
// 1 LOCALVARIABLE param
|
||||
// 1 LOCALVARIABLE
|
||||
|
||||
// JVM_IR_TEMPLATES
|
||||
// 2 LOCALVARIABLE param
|
||||
// 2 LOCALVARIABLE
|
||||
|
||||
@@ -1584,6 +1584,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
||||
public void testNoEmptyArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/defaultArguments/noEmptyArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noSyntheticParameters.kt")
|
||||
public void testNoSyntheticParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/defaultArguments/noSyntheticParameters.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/directInvoke")
|
||||
|
||||
+5
@@ -1539,6 +1539,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
|
||||
public void testNoEmptyArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/defaultArguments/noEmptyArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noSyntheticParameters.kt")
|
||||
public void testNoSyntheticParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/defaultArguments/noSyntheticParameters.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/directInvoke")
|
||||
|
||||
Reference in New Issue
Block a user