Commit Graph

199 Commits

Author SHA1 Message Date
Alexander Udalov 83ef095093 Change enum entry resolution strategy in JDR
Enum entry is now resolved into a class with a class object, which inherits
from the former class, as in the other parts of the compiler. Create a special
class EnumEntrySyntheticClassDescriptor which will be reused in deserialization
later
2013-12-02 19:56:06 +04:00
Alexander Udalov bf1ea5fb01 Drop NamespaceLikeBuilder.addObjectDescriptor 2013-12-02 19:56:05 +04:00
Alexander Udalov dd6cfcdc78 Resolve enum entries similar to objects in TypeHierarchyResolver 2013-12-02 19:56:04 +04:00
Alexander Udalov c04f63e157 Change object deserialization strategy
Objects now have synthetic class objects in deserialization as well. "Class"
proto message now can have a synthetic class object proto within, if it's not
contained in any external class file, which is the case with objects. Drop
"class_object_present" field from binary format, since its value is equivalent
to the presence of "class_object" field
2013-12-02 19:55:21 +04:00
Alexander Udalov 26bd1ff189 Change object resolution strategy in lazy resolve 2013-12-02 19:55:20 +04:00
Alexander Udalov 6c74b10f6c Change object resolution strategy in TypeHierarchyResolver
Instead of creating a synthetic property descriptor for objects, create a
synthetic class object in it and make it inherit from the object. This way all
of object's members will be accessible via its class object
2013-12-02 19:55:20 +04:00
Alexander Udalov 18c59d5495 Treat anonymous objects as classes (ClassKind.CLASS)
They're not objects per se, i.e. they're not singletons
2013-12-02 19:55:19 +04:00
Alexander Udalov 008e5f0b13 Don't serialize default primary constructors
Drop "Callable primary_constructor" field, because it requires serializer to
serialize the fact that a class has a primary constructor. Default primary
constructors for objects etc. may not be serialized, because they can be
re-created trivially when they're loaded. There are three options: a class
doesn't have a primary constructor, a class has a default primary constructor,
a class has a custom primary constructor. This explains the change in
descriptors.proto
2013-12-02 19:52:44 +04:00
Mikhael Bogdanov ceda72e0ca Deserialization of function descriptors via DesirializedSimpleFunctionDescriptor 2013-12-02 18:30:42 +04:00
Mikhael Bogdanov 8533fd64ff Compiler inline on/off flag 2013-12-02 18:30:42 +04:00
Mikhael Bogdanov c89c465fec Diagnostics for wrong inlinable usage 2013-12-02 18:28:24 +04:00
Mikhael Bogdanov e7cc7d92c2 Make ReceiverParameterDescriptorImpl extends CallableDescriptor 2013-11-29 16:27:30 +04:00
Mikhael Bogdanov 9037449313 Inline flag calculation through inline annotation 2013-11-26 12:53:07 +04:00
Mikhael Bogdanov 868f4841be Inline keyword removal 2013-11-26 12:53:06 +04:00
svtk 1a34dffb1f Fixed inference in a simple case.
Try number lower bounds before upper bounds when computing a value.
2013-11-22 18:58:01 +04:00
Andrey Breslav 4ac7afbb9f Module annotations-ext removed. Annotations are moved to runtime 2013-11-21 20:47:48 +04:00
Alexander Udalov c7d5819ef2 Pull up getThisAsReceiverParameter() 2013-11-21 19:34:51 +04:00
Alexander Udalov a77d6a006d Cleanup ClassDescriptorImpl & ErrorClassDescriptor
ClassDescriptorImpl now extends ClassDescriptorBase and reuses most of its
functionality. ErrorClassDescriptor now is initialized in its own constructor.
Inline trivial arguments everywhere
2013-11-21 19:34:51 +04:00
Alexander Udalov 62068bf741 Pull up getUnsubstitutedInnerClassesScope() 2013-11-21 19:34:50 +04:00
Alexander Udalov e9f102f3e6 Pull up getClassObjectType() 2013-11-21 19:34:50 +04:00
Alexander Udalov 97f2d568a3 Use StorageManager in AbstractClassDescriptor to create a lazy value 2013-11-21 19:34:50 +04:00
Alexander Udalov 223bf11de6 Minor, NamedMembers.toString() 2013-11-21 19:34:50 +04:00
Alexander Udalov 2c6bf6171f Rename ClassKind.isObject -> isSingleton
"isObject" gives a false impression that this is a check if the kind is OBJECT
2013-11-21 19:34:50 +04:00
Andrey Breslav 345ecbf4c0 Never import object descriptors, for they may overwrite corresponding vals 2013-11-21 13:07:39 +04:00
Andrey Breslav 0fa70b7e47 Move utility method to DescriptorUtils and make it more general 2013-11-21 13:07:38 +04:00
Andrey Breslav d9444fea09 printScopeStructure() introduced for debugging 2013-11-21 13:07:38 +04:00
Andrey Breslav 083644ea43 Support parameter annotations. Fix class path and test data 2013-11-21 13:07:36 +04:00
Andrey Breslav ef2ae0f398 Consider packages equal if their fqNames are equal 2013-11-21 13:07:36 +04:00
Andrey Breslav 9e446373e3 Old JDR and test data fixed 2013-11-21 13:07:35 +04:00
Andrey Breslav 11c8d0785b Extra information in assertion message 2013-11-21 13:07:35 +04:00
Andrey Breslav 814311075d Assertion message 2013-11-21 13:07:35 +04:00
Andrey Breslav ba8bcb2e9a Better diagnostics + basic recursion detection in memoized functions 2013-11-21 13:07:34 +04:00
Andrey Breslav 4aadf6e802 Storage manager framework uses Kotlin iterfaces 2013-11-21 13:07:34 +04:00
Andrey Breslav 0c2e1fb806 @NotNull annotations on descriptor classes 2013-11-21 13:07:34 +04:00
Andrey Breslav 6dde064791 Collections in interfaces marked @ReadOnly 2013-11-21 13:07:34 +04:00
Andrey Breslav bfbb200ba8 Only render exact function types in special syntax 2013-11-21 13:05:39 +04:00
Mikhael Bogdanov 1e4397a83d Added isExactFunctionOrExtensionFunctionType method 2013-11-20 16:32:08 +04:00
Alexander Udalov e2622b5dbb Resolve extension calls on class objects
#KT-3470 Fixed
2013-11-18 19:51:29 +04:00
Alexander Udalov e8089cc461 Synthetic class object of enum should always be public
#KT-2834 Fixed
2013-11-18 19:46:01 +04:00
Andrey Breslav 38b38e7b6d KT-4198 On covariant projection, do not throw whole var's away
#KT-4198 Fixed
2013-11-18 18:30:41 +04:00
Alexander Udalov 76e347e530 Minor, rename method 2013-11-14 19:11:20 +04:00
Alexander Udalov 8b5aa94484 Extract SpecialNames.isClassObjectName 2013-11-14 19:11:20 +04:00
Alexander Udalov 69ed375ce1 Extract SpecialNames utility class 2013-11-14 19:11:19 +04:00
Alexander Udalov ef0af47972 Minor, add error message & Override 2013-11-14 19:11:19 +04:00
Pavel V. Talanov 959ab2b20c Enum class objects values and valueOf functions have kind SYNTHESIZED 2013-11-12 14:15:51 +04:00
Pavel Talanov 97532f68c6 Add filterOutOverriding to OverridingUtil 2013-11-12 14:15:44 +04:00
Pavel Talanov 82feef23c3 Rename: OverridingUtil#filterOverrides -> filterOutOverridden to be more precise 2013-11-12 14:15:43 +04:00
Pavel Talanov 700d26917b Minor: Remove commented out code 2013-11-12 14:15:42 +04:00
Andrey Breslav 4fa691f4b4 Ignore @Nullable/@NotNull annotations when deserializing Kotiln descriptors
This is needed because we write these annotations to class files on all API callables automatically. Seeing all these annotations on descriptors is no good
2013-11-11 17:20:16 +04:00
Andrey Breslav 641ed568f2 Extract method 2013-11-11 17:20:15 +04:00