Commit Graph

269 Commits

Author SHA1 Message Date
Alexander Udalov d5d4cff701 Minor, remove dependency of everything on "descriptor.loader.java"
Everything already depends on "frontend.java" which exports
"descriptor.loader.java"
2014-08-25 17:53:18 +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
Alexander Udalov 45a57011d8 Simplify and enable by default inline/optimize/assertions
Inline, optimize, call assertions, param assertions are turned on by default
now almost everywhere; invert their meaning
2014-08-13 11:10:37 +04:00
Pavel V. Talanov 6588310736 Add missing public modifiers in project code 2014-08-12 21:13:46 +04:00
Alexey Sedunov 311166737f Associate synthetic component function descriptors with corresponding
constructor parameters
2014-08-08 18:59:45 +04:00
Denis Zharkov 0e683b0b99 Added "optimize" flag to settings everywhere 2014-07-15 21:34:32 +04:00
Pavel V. Talanov 16aefae602 Move descriptorToDeclaration utilities family to a separate util class DescriptorToSourceUtils 2014-07-09 19:07:26 +04:00
Pavel V. Talanov d988256831 Refactor: Remove context parameter from BindingContextUtils.descriptorToDeclaration utilities family 2014-07-09 18:19:36 +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
Alexey Sedunov c2aa824242 Implement light method equality based on the original declarations
#KT-4350 Fixed
2014-06-25 19:08:00 +04:00
Andrey Breslav e2c5d9edf6 Support reporting errors on class objects and any classes or objects contained anywhere 2014-06-19 22:12:02 +04:00
Andrey Breslav 86e8a1d410 Do not report declaration clashes on MANY_IMPL_MEMBER_NOT_IMPLEMENTED 2014-06-19 22:12:01 +04:00
Andrey Breslav f0da5d570e Do not report "accidental overrides" when "override" modifier is specified 2014-06-19 22:12:01 +04:00
Andrey Breslav 9ecbeeb100 Filter diagnostics in the CLI compiler, as well as in the IDE 2014-06-19 22:12:00 +04:00
Andrey Breslav 61c7c2f1a1 Minor. Extract function 2014-06-19 22:11:59 +04:00
Andrey Breslav 8fd166ea7b Minor. Method renamed 2014-06-19 22:10:57 +04:00
Andrey Breslav 6bbc8ea951 Fix reporting errors on properties declared in constructors 2014-06-19 22:10:55 +04:00
Andrey Breslav 27f76630e6 ACCIDENTAL_OVERRIDE diagnostics supported
#KT-1 In Progress
2014-06-19 22:10:55 +04:00
Andrey Breslav 1343e59eb9 Properly handle accessors of top-level properties 2014-06-19 22:10:53 +04:00
Andrey Breslav 3bc404a80e Do not skip local classes in top-level functions
In this case we need names for such classes:

fun foo() = run {
  class A
  A()
}
2014-06-19 22:10:53 +04:00
Andrey Breslav dd23b02dae Use safe names in codegen, for the case of light classes 2014-06-19 22:10:53 +04:00
Andrey Breslav f3c46341e5 Filtering out duplicate signature diagnostics if CONFLICTING_OVERLOADS or REDECLARATION is present 2014-06-19 22:10:51 +04:00
Andrey Breslav f80619e4e9 Ability to generate light classes for scripts 2014-06-19 22:10:51 +04:00
Andrey Breslav 74deb58734 Filtering duplicate diagnostics for trait implementations 2014-06-19 22:10:50 +04:00
Andrey Breslav 91136ada27 Filtering duplicate diagnostics for package facades and package parts 2014-06-19 22:10:49 +04:00
Andrey Breslav 41d66281ee JvmDeclarationOrigin moved to frontend.java 2014-06-19 22:10:49 +04:00
Andrey Breslav 4fbce3f43e JvmDeclarationOrigin used in newClassBuilder() 2014-06-19 22:10:47 +04:00
Andrey Breslav 4e1ceb62b5 JvmDeclarationOrigin used in newMethod() 2014-06-19 22:10:46 +04:00
Andrey Breslav 87a8f52f70 JvmDeclarationOrigin used in newField() 2014-06-19 22:10:46 +04:00
Andrey Breslav 27e61a75a1 Diagnostic tests for duplicate JVM signatures 2014-06-19 22:10:46 +04:00
Andrey Breslav d25b2459d4 Report clashing signatures in the IDE
Expose extra diagnostics about platform signature clashes from light class data

 #KT-1 In Progress
2014-06-19 22:10:45 +04:00
Andrey Breslav 9b3f9fb70d Cache KotlinLightClassForPackage instances per project 2014-06-19 22:10:45 +04:00
Andrey Breslav eb31be2871 DiagnosticHolder added to GenerationState 2014-06-19 22:10:44 +04:00
Andrey Breslav 8135391ba4 Recording psi element and descriptor for which a class is being emitted 2014-06-19 22:10:44 +04:00
Andrey Breslav a115d6a789 Descriptors added to newMethod() signature 2014-06-19 22:10:43 +04:00
Andrey Breslav f1196a8c59 Descriptors added to newField() signature 2014-06-19 22:10:43 +04:00
Evgeny Gerashchenko cea272fb39 Moved getPackageFilesWithCallables to frontend.java and reused it. 2014-06-19 17:54:33 +04:00
Evgeny Gerashchenko 92849dda3b Serializing incremental package fragment from our module instead of random one. 2014-06-19 13:41:27 +04:00
Evgeny Gerashchenko 820bd911fb Supported cases of removing source files from package fragment. 2014-06-18 22:56:43 +04:00
Valentin Kipyatkov 1e39021bd3 Java to Kotlin convertor: making code more "Kolin-like" + numerous micro refactorings 2014-06-03 17:29:00 +04:00
Pavel V. Talanov 7973c9bfca Do not load Icon in LightVariableBuilder constructor 2014-05-30 14:58:50 +04:00
Alexey Sedunov 4678a5866a Light Classes: Track original declaration for Kotlin light fields
#KT-4902 Fixed
2014-05-28 21:06:01 +04:00
Alexander Udalov 9e325b3ebe Remove heuristic from PackageCodegen
Implement the logic in a more straightforward way, move the heuristic to
JavaElementFinder where it was also used
2014-05-26 16:48:19 +04:00
Pavel V. Talanov 7046168868 Add isLocal() to JetClassOrObject, use it where appropriate 2014-05-21 15:39:14 +04:00
Pavel V. Talanov b5374584bb Add and use JetClassOrObject#isTopLevel() 2014-05-21 15:38:59 +04:00
Alexander Udalov 357fe5cb17 Pass module to GenerationState
- get rid of a hack there which was used to obtain any module, to be used in
  ReflectionTypes
- delete unused getError() in LightClassConstructionContext which was always
  null
- fix some minor warnings
2014-05-19 19:50:56 +04:00
Alexander Udalov 16daeb9544 Misc refactorings in KotlinBuiltIns
- delete fields which were supposed to be used for caching, but mistakenly were
  never used
- delete/inline unused methods and constants
- delete useless logic related to root package fragment: package fragment
  providers are only supposed to find packages they're aware of
2014-05-05 20:42:35 +04:00
Andrey Breslav 19719f9747 Deprecated _tmp functions replaced by library ones 2014-04-29 19:11:47 +04:00
Andrey Breslav 767eb04930 JetElement.getContainingJetFile() introduced 2014-04-21 21:55:00 +04:00
Pavel V. Talanov 3fdb548a9d Introduce JetModifierKeywordToken to mark keywords which can be used as modifiers
Change JetModifierList and JetModifierListOwner api to accept only those tokens
2014-04-02 13:37:15 +04:00