Alexander Udalov
548a2853aa
Create an extension point to DescriptorSerializer
...
Extract the existing predicate logic into it
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
77aa190eb1
Minor
2013-08-23 17:39:17 +04:00
Pavel V. Talanov
71060e0086
Use JetScope as the base interface in JavaNamespaceResolver
2013-08-23 17:39:17 +04:00
Alexander Udalov
011f733aad
Serialize properties for objects
...
A new special CallableKind for properties created for objects --
OBJECT_PROPERTY.
Also fix PropertyPsiData.isFinal() in case of properties backed by fields
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
c08f067df2
Straightforward logic for deserialization descriptors in DeserializedDescriptorResolver
2013-08-23 17:39:15 +04:00
Pavel V. Talanov
0aa4ba3fe6
Minor
...
Remove unused 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
Alexander Udalov
5db2ecd1fc
Regenerate built-ins serialized data
...
After changes to protobuf binary format
2013-08-23 17:39:14 +04:00
Alexander Udalov
034a13350d
Create enum entries for deserialized enum classes
2013-08-23 17:39:13 +04:00
Pavel V. Talanov
934be3bef5
Fix serialization of root namespace
2013-08-23 17:39:13 +04:00
Alexander Udalov
c69a5aba25
Serialize/deserialize enum entries in enum classes
2013-08-23 17:39:13 +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
007f3325fb
Serialize property setter parameter names
2013-08-23 17:39:12 +04:00
Alexander Udalov
b4ac02b175
Adapt to protobuf style guide
...
Identifiers consisting of multiple words should be separated by an underscore,
repeated field names should be singular
2013-08-23 17:39:11 +04:00
Alexander Udalov
bdb7c1eb45
Fix property setters serialization, hasGetter->hasSetter
2013-08-23 17:39:11 +04:00
Alexander Udalov
cc02ba7ab4
Don't load KotlinInfo annotation in resolve.java
2013-08-23 17:39:11 +04:00
Alexander Udalov
2841238567
Don't serialize non-serializable types
...
If there's a private property in a class which has a type of some local
class/object, write its type as jet.Any (otherwise there's no obvious way to
construct a FQ name of such type)
2013-08-23 17:39:11 +04:00
Alexander Udalov
1acc1564d9
Add KotlinInfo annotation, serialize classes to bytecode
2013-08-23 17:39:11 +04:00
Alexander Udalov
fed14f4fbf
Move getBuiltInsDirUrl() out of KotlinBuiltIns
2013-08-23 17:39:10 +04:00
Pavel V. Talanov
1161685fee
Move builtin class sources(*.jet) under IDEA module (should be removed completely later)
...
Change marker filename which is used to find those sources via getResource
2013-08-23 17:39:10 +04:00
Alexander Udalov
06496ea3ed
Deserialized type's hashCode() should compute everything
2013-08-23 17:39:10 +04:00
Andrey Breslav
6f466b70b0
Built-ins rely on storage manager
2013-08-23 17:39:10 +04:00
Andrey Breslav
113c5994e8
Deserialized types rely on storage manager
2013-08-23 17:39:09 +04:00
Andrey Breslav
d8e2034c71
Deserializers use storage manager
2013-08-23 17:39:09 +04:00
Andrey Breslav
48435531ea
Deserialized scopes rely on 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
f527fe251c
Replace a mutable map with a memoized function
...
(Premature optimization removed: trove's map replaced by something that will be boxing primitives)
2013-08-23 17:39:08 +04:00
Andrey Breslav
867adcc167
Getting rid of mutable state in TypeDeserializer
2013-08-23 17:39:08 +04:00
Andrey Breslav
e960247936
Useless class IndexedSymbolTable removed
2013-08-23 17:39:08 +04:00
Andrey Breslav
fd3f2d93be
Using lazy type parameter descriptors
2013-08-23 17:39:08 +04:00
Andrey Breslav
37707e51a2
Refactoring: type parameters are explicitly built on the call site, not in the constructor
2013-08-23 17:39:08 +04:00
Andrey Breslav
077cd62e1b
Base class extracted
2013-08-23 17:39:07 +04:00
Andrey Breslav
962092cfae
Rename Namer -> DescriptorNamer & Move it to the top level
2013-08-23 17:39:07 +04:00
Andrey Breslav
c0707628e8
DeserializedType uses lazy values
2013-08-23 17:39:07 +04:00
Andrey Breslav
d219b72e40
DeserializedType is a named class now
2013-08-23 17:39:07 +04:00
Andrey Breslav
c4052e1286
@ThreadSafe annotation to mark classes that must be thread-safe
2013-08-23 17:39:07 +04:00
Andrey Breslav
25a5025c58
Built-ins can now be initialized on demand
2013-08-23 17:39:06 +04:00
Andrey Breslav
30daf0aded
Support property accessors
2013-08-23 17:39:06 +04:00