Commit Graph

824 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 0cf3cdb01d Introduce SubpackagesIndexService
In memory cache which provides faster response to getSubpackages() queries
2014-08-22 14:35:58 +04:00
Alexander Udalov 6913869b9c Make "descriptors" not depend on intellij-core
Remove dependency on ProcessCanceledException with a hacky solution not to
break anything at the moment
2014-08-19 12:10:31 +04:00
Alexander Udalov eab0342d39 Remove TestOnly annotation from JetScope#printScopeStructure
Because this method is located in core/ which will be present at runtime, and
this annotation is not needed at runtime
2014-08-19 12:10:30 +04:00
Alexander Udalov df2c8889d4 Remove dependency of "descriptors" on ContainerUtil 2014-08-19 12:10:30 +04:00
Alexander Udalov 7229044a62 Remove dependency of "descriptors" on ImmutableSet 2014-08-19 12:10:29 +04:00
Alexander Udalov 2055d4d72c Remove dependency of "descriptors" on Maps/Sets 2014-08-19 12:10:28 +04:00
Alexander Udalov 9bc7d27fe1 Remove dependency of "descriptors" on Lists
Also insert a sensible starting capacity almost everywhere
2014-08-19 12:10:27 +04:00
Alexander Udalov aff7619206 Remove dependency of "descriptors" on StringUtil 2014-08-19 12:10:25 +04:00
Alexander Udalov df554e7c53 Remove dependency of "descriptors" on Function/Condition/Processor 2014-08-19 12:10:24 +04:00
Pavel V. Talanov 92b29a8fe7 Rewrite KotlinClassFinder to Kotlin 2014-08-15 15:22:15 +04:00
Alexander Udalov 2284e3de5a Decompose Intrinsics#checkParameterIsNotNull to make it JIT-able
#KT-5635 Fixed
2014-08-14 12:48:16 +04:00
Alexander Udalov 47d5f83d04 Report unmet trait requirements
#KT-3006 Fixed
2014-08-13 17:19:55 +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
Alexander Udalov 415fe7a5e6 Initial support for classes in scripts and REPL 2014-08-13 15:13:22 +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 d226a11c8e Find Usages: Add support of naming conventions
#KT-1356 Fixed
2014-08-08 18:59:47 +04:00
Alexey Sedunov 311166737f Associate synthetic component function descriptors with corresponding
constructor parameters
2014-08-08 18:59:45 +04:00
Pavel V. Talanov 8496c535aa Replace ModuleDescriptorImpl implementation
Change the way modules are configured:
Add dependencies on other modules instead of adding additional package fragment providers
Refactor related code
Drop DependencyKind
Hide common new module creation in CliLightClassGenerationSupport
2014-07-31 21:25:49 +04:00
Svetlana Isakova 11ea241efb Render candidate and resulting descriptors in resolved call tests 2014-07-30 17:07:09 +04:00
Pavel V. Talanov af616e731b Fix DescriptorUtils#getContainingModule 2014-07-29 21:01:11 +04:00
Alexander Udalov de0f751207 Replace object$ -> OBJECT$, instance$ -> INSTANCE$ in the project 2014-07-26 00:21:05 +04:00
Alexander Udalov 133b2918e1 Drop a hack which allowed to make Unit an object 2014-07-25 21:45:15 +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 a5321ba9f0 Drop deprecated Intrinsics#stupidSync 2014-07-25 21:19:39 +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
Pavel V. Talanov 3f7050635c Builtins: check for function and extension function types by fq names
As opposed to checking by descriptor
2014-07-25 21:15:03 +04:00
Zalim Bashorov a811de9bbd Minor: Unit.VALUE -> Unit in Java code. 2014-07-25 21:03:10 +04:00
Zalim Bashorov 4514792104 Unit as object 2014-07-25 17:16:40 +04:00
Alexander Udalov 70adb0f4e2 Temporarily prohibit non-local returns for some stdlib functions
Make InlineUtil work with FQ names, not descriptors

 #KT-5496 Fixed
 #KT-5497 Fixed
2014-07-19 02:13:27 +04:00
Alexander Udalov 540b87a1dc Support object array annotation arguments in deserialization 2014-07-19 02:13:26 +04:00
Alexander Udalov a07909bb52 Don't generate unnecessary accessors for private class properties 2014-07-17 19:18:05 +04:00
Denis Zharkov d604b5de79 Added wrappers classes names to JvmPrimitiveType 2014-07-15 21:23:51 +04:00
Zalim Bashorov 9b36327046 Builtins: make Unit class to avoid binary compatibility problems. 2014-07-11 20:25:23 +04:00
Evgeny Gerashchenko 708816f09c Fixed generating method calls from same module when inlining. 2014-07-11 14:54:12 +04:00
Alexander Udalov 0e758b97f7 Minor, delete outdated comments and refine type 2014-07-10 20:30:47 +04:00
Zalim Bashorov 3ef624f121 Builtins: made Unit object. 2014-07-10 17:25:42 +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