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
Alexander Udalov
4aeeafdff0
Deserialize annotations on classes
...
First version, not all kinds of value arguments of annotations are supported
2013-08-23 17:39:18 +04:00
Pavel V. Talanov
9a33567287
Read KotlinInfo annotations for packages
...
JavaNamespaceDescriptor creates DeserializedPackageMemberScope in case there is *Package class present for a particular package (other cases work as before)
2013-08-23 17:39:17 +04:00
Pavel V. Talanov
a57f74c278
Introduce VariableDescriptorForObject interface
...
Add implementations
Use this interface instead of CLASS_OBJECT_DECLARATION key in BindingContext
2013-08-23 17:39:16 +04:00
Alexander Udalov
dc5bc1488c
Serialize package members and class names
...
Write KotlinInfo annotation to the facade package class
2013-08-23 17:39:16 +04:00
Alexander Udalov
4655e41603
Minor, use existing utility method
2013-08-23 17:39:15 +04:00
Pavel V. Talanov
d6d83e9bc2
Change signature of AbstractDescriptorFinder#getPackage method
2013-08-23 17:39:15 +04:00
Pavel V. Talanov
c3b1716e29
Rename ClassResolver -> DescriptorFinder
...
Avoid clash with JavaDescriptorResolver naming conventions
2013-08-23 17:39:15 +04:00
Pavel V. Talanov
c3a44e37ba
Remove various getClassId methods
2013-08-23 17:39:14 +04:00
Pavel V. Talanov
fa93ee7ff2
Remove NestedClassResolver class
2013-08-23 17:39:14 +04:00
Alexander Udalov
f9ad6827d4
Simplify class object naming madness
...
- get rid of DescriptorNamer, always use descriptor.getName() instead
- delete AbstractClassResolver.getClassObjectName(), always use
"<class-object-for-...>", except for the case of built-ins serialization
(class object names should be replaced by "object" when writing files with
serialized data for built-ins)
- delete NestedClassResolver.resolveClassObject(), always use the other method
of this class instead
2013-08-23 17:39:14 +04:00
Pavel V. Talanov
7522250d51
Check that descriptors loaded from compiled kotlin are indeed deserialized descriptors
2013-08-23 17:39:13 +04:00
Pavel V. Talanov
04e9e953c3
Initial version of deserialization of compiled kotlin classes
...
Annotations are not supported
2013-08-23 17:39:12 +04:00
Alexander Udalov
83501c3722
KotlinInfo now has only one parameter data
...
Name table is now also stored in data, before the serialized class.
ClassData is now public, since it's used in plenty of places as a holder of
deserialized protobuf classes.
2013-08-23 17:39:12 +04:00
Alexander Udalov
4e0516472d
Minor, reuse existing namer for built-ins
2013-08-23 17:39:12 +04:00
Alexander Udalov
1acc1564d9
Add KotlinInfo annotation, serialize classes to bytecode
2013-08-23 17:39:11 +04:00
Andrey Breslav
d8e2034c71
Deserializers use storage manager
2013-08-23 17:39:09 +04:00
Andrey Breslav
8ff99b9fe7
Class descriptors rely on StorageManager
2013-08-23 17:39:09 +04:00
Andrey Breslav
962092cfae
Rename Namer -> DescriptorNamer & Move it to the top level
2013-08-23 17:39:07 +04:00
Andrey Breslav
30daf0aded
Support property accessors
2013-08-23 17:39:06 +04:00
Andrey Breslav
8d110e4a30
Properly memoize classes in tests
2013-08-23 17:39:05 +04:00
Andrey Breslav
5492c8875e
Proper names for class objects upon serialization of built-ins
2013-08-23 17:39:05 +04:00
Alexander Udalov
defbf705fc
Revert "Don't memoize exceptions in built-ins resolve session"
...
This reverts commit 450d6cad3b . It's no longer
needed since there's no resolve session in built-ins anymore
2013-08-23 17:39:03 +04:00
Andrey Breslav
d1d52086d7
Do not add pre-loaded built-ins when serializing
2013-08-23 17:39:02 +04:00
Andrey Breslav
df57ce5a7f
Allow names to be loaded individually for each class
2013-08-23 17:39:00 +04:00
Andrey Breslav
47d1633252
Support creating a new serializer for each class
2013-08-23 17:39:00 +04:00
Andrey Breslav
4f12a3d86e
Stub support for annotations
2013-08-23 17:38:59 +04:00
Andrey Breslav
557fdfcd56
Testing builtins' serialization
2013-08-23 17:38:59 +04:00
Andrey Breslav
af415d160f
Allow rendering Any in all positions and using Function0 etc instead of "() -> ..."
2013-08-23 17:38:59 +04:00
Andrey Breslav
0c49940356
Dependency on ClassResolver moved to TypeDeserializer
2013-08-23 17:38:58 +04:00
Andrey Breslav
b38c5b9d08
Outer classes are properly computed
2013-08-23 17:38:58 +04:00
Andrey Breslav
b536b3961e
getName()/getFqName() -> asString()
2013-08-23 17:38:58 +04:00
Andrey Breslav
1026a63778
Using "object" for fqNames of class objects
2013-08-23 17:38:58 +04:00
Andrey Breslav
b90522b223
Namer added to abstract over naming conventions on different platforms
2013-08-23 17:38:57 +04:00
Andrey Breslav
347e2c27aa
Using FqNameUnsafe for relative class names
2013-08-23 17:38:57 +04:00
Andrey Breslav
7f2f3a60a7
Object descriptors added
2013-08-23 17:38:57 +04:00
Andrey Breslav
d04865cea3
Using ClassId instead of FqName
2013-08-23 17:38:56 +04:00
Andrey Breslav
99d1a9b7d7
Serialization tests reuse test data from loadKotlin
2013-08-23 17:38:55 +04:00
Andrey Breslav
5eb33372ae
Initial version of (de)serialization test
2013-08-23 17:38:53 +04:00
Andrey Breslav
e85871861a
New module for descriptor serialization code
2013-08-23 17:38:50 +04:00
Andrey Breslav
1472499874
Utility methods moved to JetTestUtil
2013-08-23 17:38:49 +04:00
Nikolay Krasko
450d6cad3b
Don't memoize exceptions in built-ins resolve session
2013-08-22 21:16:57 +04:00
Andrey Breslav
6cee65d74e
A test for nesting implicitly labeled calls
...
The actual error message should be "return not allowed", but due to a bug in label resolution it is "unresolved reference"
2013-08-22 17:13:08 +04:00
Andrey Breslav
55eb994502
KT-3919 Automatic labeling of lambdas by receiving functions
...
#KT-3919 Fixed
2013-08-22 14:27:01 +04:00
Andrey Breslav
3f3ee378f3
Test that local return has type Nothing
2013-08-21 20:12:05 +04:00
Andrey Breslav
aa99c29d8d
JVM backend test for local returns
2013-08-21 20:12:05 +04:00
Andrey Breslav
08625a6b2f
Local returns are only allowed with explicitly specified return types
...
This is a temporary limitation: otherwise type inference is having trouble to account for all the returned expressions.
We will fix the inference and remove the limitation
2013-08-21 20:12:04 +04:00
Andrey Breslav
4138ac4e36
Support local returns in lambdas
2013-08-21 20:12:04 +04:00