Optimize PropertyMetadataImpl instance creation

Create all property metadatas in <clinit> and save them to a static array
$propertyMetadata. Getter/setter of each delegated property will then just
obtain the corresponding instance from that array

 #KT-4232 Fixed
This commit is contained in:
Alexander Udalov
2014-04-22 22:59:48 +04:00
parent 925b27238c
commit 61675de305
10 changed files with 183 additions and 30 deletions
@@ -38,6 +38,7 @@ public final class JvmAbi {
public static final String CLASS_OBJECT_SUFFIX = "$" + CLASS_OBJECT_CLASS_NAME;
public static final String DELEGATED_PROPERTY_NAME_SUFFIX = "$delegate";
public static final String PROPERTY_METADATA_ARRAY_NAME = "$propertyMetadata";
public static final String ANNOTATED_PROPERTY_METHOD_NAME_SUFFIX = "$annotations";
public static final String INSTANCE_FIELD = "instance$";