JVM_IR: Generate java 8 parameter names when -java-parameters is passed.
The type mapper does not map enum parameters and outer this parameters to the right parameter signature kinds so around half the tests are still failing. Since a new type mapper is being worked on I will not investigate that further right now.
This commit is contained in:
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature
|
|||||||
import org.jetbrains.org.objectweb.asm.MethodVisitor
|
import org.jetbrains.org.objectweb.asm.MethodVisitor
|
||||||
import org.jetbrains.org.objectweb.asm.Opcodes
|
import org.jetbrains.org.objectweb.asm.Opcodes
|
||||||
|
|
||||||
internal fun generateParameterNames(
|
fun generateParameterNames(
|
||||||
functionDescriptor: FunctionDescriptor,
|
functionDescriptor: FunctionDescriptor,
|
||||||
mv: MethodVisitor,
|
mv: MethodVisitor,
|
||||||
jvmSignature: JvmMethodSignature,
|
jvmSignature: JvmMethodSignature,
|
||||||
|
|||||||
+2
@@ -48,6 +48,8 @@ open class FunctionCodegen(
|
|||||||
val flags = calculateMethodFlags(irFunction.isStatic)
|
val flags = calculateMethodFlags(irFunction.isStatic)
|
||||||
val methodVisitor = createMethod(flags, signature)
|
val methodVisitor = createMethod(flags, signature)
|
||||||
|
|
||||||
|
generateParameterNames(descriptor, methodVisitor, signature, state, flags.and(Opcodes.ACC_SYNTHETIC) != 0)
|
||||||
|
|
||||||
if (irFunction.origin != IrDeclarationOrigin.FUNCTION_FOR_DEFAULT_PARAMETER) {
|
if (irFunction.origin != IrDeclarationOrigin.FUNCTION_FOR_DEFAULT_PARAMETER) {
|
||||||
AnnotationCodegen(classCodegen, state, methodVisitor::visitAnnotation).genAnnotations(irFunction, signature.asmMethod.returnType)
|
AnnotationCodegen(classCodegen, state, methodVisitor::visitAnnotation).genAnnotations(irFunction, signature.asmMethod.returnType)
|
||||||
FunctionCodegen.generateParameterAnnotations(descriptor, methodVisitor, signature, DummyOldInnerClassConsumer(), state)
|
FunctionCodegen.generateParameterAnnotations(descriptor, methodVisitor, signature, DummyOldInnerClassConsumer(), state)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// SKIP_JDK6
|
// SKIP_JDK6
|
||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// SKIP_JDK6
|
// SKIP_JDK6
|
||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// SKIP_JDK6
|
// SKIP_JDK6
|
||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|||||||
Reference in New Issue
Block a user