Commit Graph

290 Commits

Author SHA1 Message Date
Natalia Ukhorskaya a2879f229a Add serializer for compile-time constant initializer 2014-03-13 10:07:05 +04:00
Natalia Ukhorskaya 073d345841 Extract BaseDeserializer from AnnotationDeserializer. Move storage to separate class 2014-03-13 10:07:04 +04:00
Alexander Udalov 4937812414 Rewrite KotlinClassHeader to Kotlin 2014-03-07 03:43:41 +04:00
Alexander Udalov 0b2c832343 Write KotlinSyntheticClass to anonymous and local classes 2014-03-07 03:08:19 +04:00
Alexander Udalov cbfb626d50 Write KotlinSyntheticClass to generated classes for functions
That is SAM wrappers, callable reference wrappers, local functions and
anonymous functions
2014-03-07 03:08:18 +04:00
Pavel V. Talanov 796386049b Minor: remove explicit dependency on JavaDescriptorResolver from AnnotationDescriptorDeserializer 2014-03-04 21:19:42 +04:00
Pavel V. Talanov d647d2abbc Move caching of kotlin binaries classes to application level
Fix code in DecompiledUtils
2014-03-04 21:19:41 +04:00
Alexander Udalov af2a28c099 Minor, inline only once-used methods 2014-03-04 19:04:58 +04:00
Alexander Udalov 76cc5b301a Minor, revert unneeded "!!" 2014-03-04 18:19:43 +04:00
Alexander Udalov e017cf76f2 Minor, delete/inline methods 2014-03-04 18:19:42 +04:00
Alexander Udalov 4c49c39f8d Minor, delete unnecessary parameter from util method 2014-03-04 18:19:42 +04:00
Alexander Udalov eb5aba560e Load class kind in KotlinSyntheticClass annotation
Fix some of the usages of KotlinSyntheticClass header where really package
parts were meant (they were committed by mistake).

DescriptorResolverUtils.isCompiledKotlinPackageClass no longer checks for class
being a compiled package part, because PSI classes are not built for package
parts (according to EmptyPackageFragmentClsStubBuilderFactory)
2014-03-04 18:19:42 +04:00
Mikhael Bogdanov 16fbe1d5dd Abi version increased: inline calls in runtime (otherwise client inlining wouldn't work) 2014-03-03 15:52:25 +04:00
Mikhael Bogdanov 6d1effe981 Inline trait support 2014-03-03 15:43:48 +04:00
Alexander Udalov d04ee09636 Rename "import jet" to "import kotlin" in Java sources 2014-03-02 21:33:22 +04:00
Alexander Udalov 6eae950812 Increase ABI version after renaming "jet"->"kotlin" 2014-03-02 19:55:29 +04:00
Alexander Udalov cfe3619db7 Introduce KotlinSyntheticClass annotation
Will be used instead of KotlinPackagePart, KotlinTraitImpl and other
hypothetical annotations we were planning to write on our synthesized classes
(lambdas, local functions, etc.)
2014-03-02 19:55:29 +04:00
Alexander Udalov 787b4753c7 Copy KotlinSignature to package "kotlin.jvm"
Support both KotlinSignature classes in the compiler and in the IDEA plugin.
The old one will be deprecated later and dropped eventually
2014-03-02 19:55:28 +04:00
Alexander Udalov 33a9f3abd1 Move all annotation FQ names to JvmAnnotationNames
Delete reflected usages of annotation classes (JetValueParameter.class,
KotlinSignature.class, etc.). It's wrong: this is a dependency on the old
runtime, whereas the compiler should work with the new one
2014-03-02 19:55:28 +04:00
Alexander Udalov ac71911720 Get rid of "jet" in comments, assertions, READMEs, etc.
Replace with "kotlin"

 #KT-2896 Fixed
2014-03-02 19:55:11 +04:00
Alexander Udalov aef0fabd53 Move jet.Kotlin* annotations to package "kotlin.jvm.internal"
Also rename poorly named KotlinPackageFragment -> KotlinPackagePart
2014-03-02 19:54:58 +04:00
Alexander Udalov 0da92e22a2 Move jet.JetObject -> kotlin.jvm.internal.KObject
Don't use JetObject as a marker class in KotlinRuntimeLibraryUtil anymore,
since there are other classes for this purpose (KotlinPackage, Unit)
2014-03-02 19:54:58 +04:00
Alexander Udalov 3dcd85bdb4 Add toString() to Any, fix all tests
#KT-4517 Fixed
2014-03-02 19:54:49 +04:00
Alexander Udalov ec30d52978 Delete Hashable, pull up its members to Any
Extensions on nullable types remain in Library.kt

 #KT-1741 Obsolete
 #KT-2805 Obsolete
 #KT-1365 Fixed
 #KT-4517 In Progress
2014-03-02 19:54:08 +04:00
Alexander Udalov 9537b68724 Load 'equals' parameter from Java code with the name 'other'
This fixes a lot of warnings on mixed Kotlin+Java code about different names
for the same parameter because we always loaded 'equals' parameter with the
name 'p0', whereas in Kotlin we usually name it 'other'
2014-02-28 21:48:29 +04:00
Nikolay Krasko 0448736a4c Refactoring: remove unused methods 2014-02-20 16:27:49 +04:00
Pavel V. Talanov 4a3ccc4eac JDR: do not create package fragment for class statics if class cannot be resolved
This keeps behaviour consistent in rare cases when JavaClass can be found but not resolved
As of now this can happen in IDE if we take PsiClass from index but file structure is wrong so we can't resolve the class
Add test which documents this case
2014-02-11 17:17:34 +04:00
Pavel V. Talanov e4a0221abc Remove PackageFragmentDescriptor#getProvider method
PackageFragmentProvider should be hidden from the client of PackageFramentDescriptor
2014-02-11 17:17:05 +04:00
Pavel V. Talanov cd6a71ef81 Refactor JDR: add explicit binding between java classes and packages for their statics
Get rid of Kind in JavaPackageFragmentDescriptor and create subclass which exposes additional function
Add method in JavaClassDescriptor to get correponding package fragment
Remove JavaDescriptorResolver from context
2014-02-11 17:17:04 +04:00
Pavel V. Talanov 00a5e7ab15 Refactor JDR: remove some of the usages of JavaDescriptorResolver class 2014-02-11 17:17:03 +04:00
Pavel V. Talanov 16a2a5cd62 Refactor JDR: minor extract function in LazyJavaPackageFragmentProvider 2014-02-11 17:17:02 +04:00
Pavel V. Talanov 2fe2a50b14 Refactor JDR: use JavaResolverCache in LazyJavaPackageFragmentProvider directly
Remove LazyJavaClassResolverWithCache
This actually can affect behaviour because JavaResolverCache has slightly different logic (uses CLASS key in BindingContext as opposed to FQNAME_TO_CLASS_DESCRIPTOR)
2014-02-11 17:17:01 +04:00
Pavel V. Talanov 18d088cb71 Refactor JDR: create LazyJavaPackageFragmentProvider in injector 2014-02-11 17:17:00 +04:00
Pavel V. Talanov 737f538ea7 Minor: use orEmpty() instead of ?: listOf() in LazyJavaPackageFragmentProvider 2014-02-11 17:16:59 +04:00
Pavel V. Talanov 4153182fd2 Refactor JDR: minor, extract class 2014-02-11 17:16:58 +04:00
Evgeny Gerashchenko ce7e0a7457 Fixed problem with overriding method with non-trivial raw type (when erased type parameter has upper bound)
Also added cases for the code which was changed.
2014-02-06 13:52:59 +04:00
Andrey Breslav 8dc9aecbf8 DescriptorSearchRule removed 2014-02-05 18:12:01 +04:00
Andrey Breslav aa0dde3a78 Old implementation of JavaDescriptorResolver deleted 2014-02-05 18:12:01 +04:00
Andrey Breslav 9f918d48b5 JavaDescriptorResolver always uses lazy mode 2014-02-05 18:12:01 +04:00
Andrey Breslav 76c722b81c Utilities moved closer to their usages and rewritten to Kotlin 2014-02-05 18:12:00 +04:00
Andrey Breslav e119ca27ca AnnotationLoadingUtil created. Relevant code/constants moved there 2014-02-05 18:11:51 +04:00
Andrey Breslav aed1ccf771 getKotlinBuiltinClassDescriptor() moved to DescriptorResolverUtils 2014-02-05 18:07:35 +04:00
Andrey Breslav 3d1f2c25e2 resolveCompileTimeConstantValue() rewritten to Kotlin 2014-02-05 18:07:35 +04:00
Andrey Breslav 6aca05023a OBJECT_FQ_NAME moved to DescriptorResolverUtils 2014-02-05 18:07:35 +04:00
Natalia Ukhorskaya 36810c5bbb Move IS_PURE for constant inside CompileTimeConstant 2014-01-28 18:21:45 +04:00
Natalia Ukhorskaya 3f429116e5 Add constructor parameter for compileTimeConstant (can be used in annotation) 2014-01-28 18:21:44 +04:00
Alexander Udalov c1777f28f9 Fix NPE in annotation deserializer 2014-01-23 22:02:59 +04:00
Andrey Breslav ca7d5a2988 Java annotation resolution made lazy 2014-01-22 19:04:43 +04:00
Andrey Breslav 6ce0b9b919 Annotations used instead of List<AnnotationDescriptor> 2014-01-20 16:17:54 +04:00
Andrey Breslav 1af71c4dbe Using common storage manager for all lazy services 2014-01-20 16:17:53 +04:00