Commit Graph

410 Commits

Author SHA1 Message Date
Pavel V. Talanov 5dc5862134 Add missing public to ModuleClassResolver 2014-08-23 12:52:27 +04:00
Pavel V. Talanov 46f1873dc8 JDR: drop various code that is marked as temporary
Remove additional logic for comparing files in JavaClassFinderImpl
Drop redundant check for builtins in findClassInJava(FqName)
Drop resolve cache query in LazyJavaClassMemberScope and LazyJavaPackageFragmentScope
2014-08-22 22:59:07 +04:00
Pavel V. Talanov db5303c019 Implement modules in IDE
IDE:
Rewrite AnalyzerFacade and implementations for JS and JVM to support creating separate analyzers for each module
Introduce ModuleInfo which is an intermediate entity between configuration (tests or idea modules) and ModuleDescriptor
Implement IdeaModuleInfos which represent IDEA modules, sdks and libraries
Add (somewhat thin) test checking their behaviour
Implement getModuleInfo() - utility to obtain IdeaModuleInfo for PsiElement
Drop Project.getLazyResolveSession() - not possible to obtain resolve session for the whole project any more
Adjust JavaResolveExtension accordingly
KotlinSignature Intention/Marker - make sure that analyzed element is cls element (he's not in resolve scope otherwise)

LightClasses:
Create separate package light classes for each module
Java code can only reference light class from the first module among it's dependencies
Duplicate jvm signature is only reported on package declarations inside one module

Injectors:
Receive GlobalSearchScope as paramer for VirtualFileFinder and JavaClassFinder
which allows to narrow analyzer scope

JDR:
Introduce ModuleClassResolver resolves java classes in correct java descriptor resolver (corresponding ModuleDescriptor)
Add test checking that java classes belong to correct module

Debugger:
Provide context to analyze files created by debugger in

Converter:
Postprocessor now needs a context to analyze resulting code in

JetPsiFactory:
Add verification that files created by psi factory are not analyzed without context (that is almost never a good idea)

Other:
Use new API in various tests, utilities, run configuration producers and builtin serializers
Various "TODO: (module refactoring)" which mark the unfinished parts
2014-08-22 22:58:54 +04:00
Pavel V. Talanov 92b29a8fe7 Rewrite KotlinClassFinder to Kotlin 2014-08-15 15:22:15 +04:00
Alexander Udalov 4ff6a627d0 Get rid of isConstructorOfStaticNestedClass()
This value can always be computed in ConstructorDescriptorImpl#initialize
2014-08-13 15:13:23 +04:00
Pavel V. Talanov 6588310736 Add missing public modifiers in project code 2014-08-12 21:13:46 +04:00
Pavel V. Talanov a5a493d145 Minor: remove obsolete JAVA_ROOT 2014-08-08 19:50:58 +04:00
Pavel V. Talanov b02d4b0669 Utilities to resolve Java methods and fields 2014-08-08 19:50:56 +04:00
Pavel V. Talanov 1488584acf Rewrite JavaDescriptorResolver to Kotlin 2014-08-08 19:50:55 +04:00
Andrey Breslav 1de3ba9265 Minor. JavaDescriptorResolver renamed to .kt to preserve history 2014-08-08 19:50:53 +04:00
Alexey Sedunov 311166737f Associate synthetic component function descriptors with corresponding
constructor parameters
2014-08-08 18:59:45 +04:00
Alexander Udalov de0f751207 Replace object$ -> OBJECT$, instance$ -> INSTANCE$ in the project 2014-07-26 00:21:05 +04:00
Alexander Udalov 93fa7cb330 Increase ABI version
Related changes include:
- kotlin.Unit is now a named object
- "instance$" was renamed to "INSTANCE$"
- "object$" was renamed to "OBJECT$"
- Intrinsics#stupidSync() was dropped
2014-07-25 21:34:12 +04:00
Alexander Udalov fb958897a9 Introduce kotlin.Cloneable
- Cloneable is a trait with a single protected member 'clone', which is mapped
  to java.lang.Cloneable on JVM
- 'clone' is non-abstract to be able to call 'super.clone()' in the
  implementations. Also if you need your class to be Cloneable, most of the
  time inheriting from Cloneable and calling 'super.clone()' will work
- hack 'super.clone()' in JVM intrinsics and TImpl delegation generation
- make arrays Cloneable, handle 'clone()' calls in the intrinsic

 #KT-4890 Fixed
2014-07-25 21:19:39 +04:00
Alexander Udalov a79398fa00 Don't load Object as a supertype for Java classes
#KT-4890 In Progress
 #KT-5002 Fixed
2014-07-25 21:19:37 +04:00
Alexander Udalov 485f63e1cd Rename object$ -> OBJECT$, instance$ -> INSTANCE$
According to Java code conventions, public static final constants should be
named with all capital letters
2014-07-25 21:15:13 +04:00
Zalim Bashorov a811de9bbd Minor: Unit.VALUE -> Unit in Java code. 2014-07-25 21:03:10 +04:00
Alexander Udalov 540b87a1dc Support object array annotation arguments in deserialization 2014-07-19 02:13:26 +04:00
Denis Zharkov d604b5de79 Added wrappers classes names to JvmPrimitiveType 2014-07-15 21:23:51 +04:00
Pavel V. Talanov 8523e18afc Set source elements for java annotation parameters 2014-07-09 18:19:40 +04:00
Pavel V. Talanov 930ea88e25 Set source elements for java enum entries
#KT-4277 Fixed
2014-07-09 18:19:39 +04:00
Pavel V. Talanov 4188bbe53c Set source elements for java parameters 2014-07-09 18:19:38 +04:00
Pavel V. Talanov 8b91855fac Drop SynthesizedCallableMemberDescriptor 2014-07-09 18:19:37 +04:00
Pavel V. Talanov 59e43020c3 Initial version of storing SourceElements in descriptors
Introduce SourceElement, JavaSourceElementFactory, DeclarationDescriptorWithSource
Implement getSource() for eager, lazy and java descriptors
2014-07-09 18:19:34 +04:00
Andrey Breslav e3b1639edf KT-5425 Kotlin plugin crashes when project uses RxJava 17.0 or older
#KT-5425 Fixed
2014-07-09 16:10:41 +04:00
Alexander Udalov b9fd52739f Move around some descriptor implementations
- mutable class, mutable package fragment and their dependencies go to module
  'frontend'
- ModuleDescriptorImpl and PackageFragmentDescriptorImpl are moved to the
  package "impl" in their module
2014-07-07 18:15:31 +04:00
Alexander Udalov de21f76e10 Introduce EnumClassObjectDescriptor
Extract the duplicate logic in deserialization and descriptor.loader.java
2014-07-07 18:15:27 +04:00
Evgeny Gerashchenko 6501066274 Added hacky checks for accessing compiled functions from our module via package part instead of facade.
#KT-4590 fixed
2014-07-07 17:41:34 +04:00
Pavel V. Talanov b2c3a7d501 Rename: DescriptorDeserializersStorage -> DescriptorLoadersStorage 2014-07-03 20:46:45 +04:00
Pavel V. Talanov b08cda8dd6 Avoid recomputing ClassData in DeserializedDescriptorResolver 2014-07-03 20:46:44 +04:00
Pavel V. Talanov e7d6ea6be5 Remove hack in JavaClassDataFinder 2014-07-03 20:46:43 +04:00
Pavel V. Talanov 123523d1dc Drop ClassDataFinder#getClassNames() 2014-07-03 20:46:42 +04:00
Pavel V. Talanov 0c8956a36e Refactor: DescriptorFinder -> ClassDataFinder
Deserialization subsystem only need to know about the way to obtain class data, it can construct descriptors itself (no need to call DeserializedClassDescriptor constructor from other modules)
2014-07-03 20:46:41 +04:00
Pavel V. Talanov 53337f793b Move caching of deserialized classes to new component ClassDeserializer
Drop AbstractDescriptorFinder
2014-07-03 20:46:40 +04:00
Pavel V. Talanov 55ae3cab19 Drop DependencyClassByQualifiedNameResolver and implementation 2014-07-03 20:46:37 +04:00
Pavel V. Talanov 245919d691 Use module to resolve annotation classes in AnnotationDescriptorLoader 2014-07-03 20:46:36 +04:00
Pavel V. Talanov 6c153a9ce2 Resolve classes in Deserialization locally
Temporary hacky solution
2014-07-03 20:46:34 +04:00
Pavel V. Talanov 7ee7047753 Deserializer: use module to search for dependencies in TypeDeserializer 2014-07-03 20:46:33 +04:00
Pavel V. Talanov a66353dbc4 JavaDescriptorFinder#getClassNames() returns empty list
All classes are included in JavaPackageFragmentScopeForJavaPackageFragment  anyway
2014-07-03 20:46:32 +04:00
Alexander Udalov c0fc5cfb53 Disallow named arguments for SAM adapters
SAM adapters are Java functions, and named arguments are not allowed for Java
functions

 #KT-5022 Fixed
2014-07-02 20:35:31 +04:00
Alexander Udalov 59777e7df6 Generate "$kotlinClass"/"$kotlinPackage" reflection fields to every class
Some seemingly irrelevant tests were changed because now there's <clinit> in
almost every class and class initialization begins with executing it
2014-07-02 01:26:18 +04:00
Alexander Udalov ac8eb0f5e8 Add PackageClassUtils.getPackageClassInternalName() 2014-06-26 20:57:39 +04:00
Alexander Udalov e31f2cfa23 Make protected static visibility reach members in the same package 2014-06-26 20:57:39 +04:00
Evgeny Gerashchenko bf442a9700 Fixed loading integral constants from compiled classes. 2014-06-24 22:18:13 +04:00
zarechenskiy 0355b1bd53 Implement JavaTypeSubstitutor without PSI 2014-06-24 20:06:13 +04:00
Andrey Breslav cd28b216c1 Rename. INSTANCE -> DEFAULT in JetTypeChecker 2014-06-24 19:13:01 +04:00
Andrey Breslav d2ce6f5787 Safe identifier for the case of no name in PSI moved to 'descriptors' module, to be used in 'descriptor.loader.java' 2014-06-19 22:10:52 +04:00
Evgeny Gerashchenko aa41ae09ed Merge remote-tracking branch 'origin/master' into incremental 2014-06-19 11:43:59 +04:00
Evgeny Gerashchenko 06cafe7f12 Replaced passing MemberFilter to constructor with method overriding. 2014-06-19 01:03:58 +04:00
Evgeny Gerashchenko a82849f289 Removed member filter from injectors. 2014-06-18 22:56:33 +04:00