Simplify codegen of annotations, get rid of use-site targets

This commit is contained in:
Alexander Udalov
2018-08-14 16:36:15 +02:00
parent fc87043cb3
commit 753191e668
6 changed files with 15 additions and 58 deletions
@@ -48,7 +48,9 @@ open class FunctionCodegen(private val irFunction: IrFunction, private val class
val flags = calculateMethodFlags(irFunction.isStatic)
val methodVisitor = createMethod(flags, signature)
FunctionCodegen.generateMethodAnnotations(descriptor, signature.asmMethod, methodVisitor, classCodegen, state.typeMapper)
AnnotationCodegen.forMethod(methodVisitor, classCodegen, state.typeMapper).genAnnotations(
descriptor, signature.asmMethod.returnType
)
FunctionCodegen.generateParameterAnnotations(descriptor, methodVisitor, signature, classCodegen, state)
if (!state.classBuilderMode.generateBodies || flags.and(Opcodes.ACC_ABSTRACT) != 0 || irFunction.isExternal) {