generateMethodBody() is now responsible for generating the local variable
table, therefore the data class MethodInfo is not needed anymore to return
multiple values from it
Always map descriptor to the callable method and take the signature from there,
since this way the signature appears to be more accurate. The whole
"mapSignature vs mapToCallableMethod.getSignature" story needs some
investigation though.
Also make the method non-static, remove useless checks, etc
Use FunctionCodegen and the newly created FunctionGenerationStrategy to
generate the needed instructions. Make some methods in FunctionCodegen private
since they're not used anymore outside of the class
Create a new class FunctionGenerationStrategy, which is used to specify exactly
how the body of a function will be generated. This is made primarily to factor
out the hard dependency on PSI in FunctionCodegen.generateMethod(). The PSI
element is now optional and is only used for debug information (as an argument
to newMethod() and endVisit()). This also helps to refactor the confusing logic
about generating default property accessors.
Assert for whether we generate code now for the declared member is now useless,
since generateMethod() will be used also for generating any possible members.
Also surround with "if ( != null)" some method call in genJetAnnotations(), as
null is possible here
Check if we need to generate code before calling generateMethod()
There were 4 such checks, 2 of them in PropertyCodegen, one in
FunctionCodegen.gen() and one in ClosureCodegen. Every usage except the last
was prepended with the check
Never using parameter names when serializing methods. They were added to external name if JDK sources were present and not added if JDK sources were absent.
#KT-3468 fixed
The problem was that KotlinJavaFileStubProvider instances remembered information that changed between their invocation:
e.g. when a package gets renamed the qualified name in a java file stub does not get updated
When i18n plugin is enabled, it looks for classes like "java.lang.Object...)" while highlighting annotations.xml
EA-43709 - IAE: NameUtils.requireIdentifier