Improve performance of $kotlinClass field initializer

Don't load annotations reflectively in each class' <clinit>
This commit is contained in:
Alexander Udalov
2014-07-01 23:51:34 +04:00
parent bc8bce7ca1
commit a84d528325
4 changed files with 13 additions and 8 deletions
@@ -475,7 +475,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
return;
}
generateReflectionObjectField(state, classAsmType, v, method("kClass", K_CLASS_IMPL_TYPE, getType(Class.class)),
generateReflectionObjectField(state, classAsmType, v, method("kClassFromKotlin", K_CLASS_IMPL_TYPE, getType(Class.class)),
JvmAbi.KOTLIN_CLASS_FIELD_NAME, createOrGetClInitCodegen().v);
}