Always generate local variable table to preserve parameter names

This commit is contained in:
Andrey Breslav
2013-11-08 19:03:48 +04:00
committed by Nikolay Krasko
parent 4348678cea
commit 0c1c0e0099
9 changed files with 32 additions and 20 deletions
@@ -124,9 +124,21 @@ public class FunctionCodegen extends ParentCodegenAwareImpl {
generateJetValueParameterAnnotations(mv, functionDescriptor, jvmSignature);
if (state.getClassBuilderMode() == ClassBuilderMode.LIGHT_CLASSES) return;
if (isAbstractMethod(functionDescriptor, methodContext.getContextKind())) return;
if (state.getClassBuilderMode() == ClassBuilderMode.LIGHT_CLASSES ||
isAbstractMethod(functionDescriptor, methodContext.getContextKind())) {
generateLocalVariableTable(
mv,
jvmSignature,
functionDescriptor,
getThisTypeForFunction(functionDescriptor, methodContext),
new Label(),
new Label(),
new HashSet<String>(getParameterNamesAsStrings(functionDescriptor)),
Collections.<Name, Label>emptyMap(),
methodContext.getContextKind()
);
return;
}
generateMethodBody(mv, functionDescriptor, methodContext, jvmSignature, strategy);