Commit Graph

11 Commits

Author SHA1 Message Date
Alexander Udalov 19299daacd Deserialize annotations on class object properties
Class object properties' backing fields are generated into static fields of the
containing class, not into fields of class object. For fields we now store the
flag which, if set, tells that this field should be looked for in the
containing class
2013-08-26 15:59:45 +04:00
Alexander Udalov 32c5624531 Convert between byte[] and String[] efficiently 2013-08-26 15:59:44 +04:00
Alexander Udalov cfe9d78015 Deserialize annotations from package$src files if needed
For top-level members, we now write a FQ name of the package$src class which
has the member's annotations, and read the correct file in deserialization
2013-08-23 17:39:23 +04:00
Alexander Udalov 6035d89c33 Extract field signature out of Java property signature 2013-08-23 17:39:22 +04:00
Alexander Udalov 87d4e35388 Deserialize annotations on class properties w/o fields
Annotations on properties without backing fields are stored on a special
synthesized method inside the class
2013-08-23 17:39:21 +04:00
Alexander Udalov 23378f0054 Deserialize annotations on property accessors 2013-08-23 17:39:21 +04:00
Alexander Udalov 453b0e8f10 Write java signature of serialized descriptors efficiently
Instead of storing a string with the signature, write the name, return type and
parameter types separately, reusing the name table. Refactor the name table to
allow it to store not only names of Kotlin entities, but also arbitrary names
and fq-names
2013-08-23 17:39:21 +04:00
Alexander Udalov eee9bb5a12 Refactor AbstractDescriptorSerializationTest
Use existing utility functions, replace ClassMetadata -> ClassData, add
annotations, etc.
2013-08-23 17:39:20 +04:00
Alexander Udalov d0b84416b5 KotlinInfo data parameter is now String[]
This is done because byte arrays in annotation arguments cannot be longer than
65535 bytes, and serialized data's length for kotlin.KotlinPackage class from
stdlib is already close to this number
2013-08-23 17:39:19 +04:00
Alexander Udalov e63cef0848 Deserialize annotations on package members 2013-08-23 17:39:19 +04:00
Alexander Udalov 67ca7b78c4 Deserialize annotations on class members
Make 'Callable' message of descriptors.proto extensible, extend it in
java_descriptors.proto with a JVM signature of the member. This is needed in
order for annotation deserializer to find out which member in the compiled
bytecode corresponds to which descriptor in the hierarchy.

Create a new module 'serialization.java' containing everything related to
Java-specific serialization of descriptors.

Add an extension point to DescriptorSerializer, allowing to perform
platform-specific serialization on a callable
2013-08-23 17:39:18 +04:00