Commit Graph

4249 Commits

Author SHA1 Message Date
Nikolay Krasko 186a9a13a8 Report unmet trait requirements in IDE
#KT-3006 Fixed
2014-08-26 14:42:29 +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 3418d15590 Avoid redundant wrapping in SyntheticFilesFilteringScope 2014-08-22 14:35:53 +04:00
Evgeny Gerashchenko cda1be3fc7 Minor. Added toString() to CompilerConfiguration. 2014-08-20 13:46:29 +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 df554e7c53 Remove dependency of "descriptors" on Function/Condition/Processor 2014-08-19 12:10:24 +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
Alexander Udalov 125985c91d Minor, add assertion message 2014-08-13 15:13:18 +04:00
Pavel V. Talanov 6588310736 Add missing public modifiers in project code 2014-08-12 21:13:46 +04:00
Nikolay Krasko 508186ed90 Merge pull request #507 from zarechenskiy/injector-generator
Injector generator for Eclipse
2014-08-12 20:22:41 +04:00
zarechenskiy 34bf3d7f0e Supress warnings in injectors using "all" parameter, not "ALL"
This parameter value supports by IDEA and Eclipse
2014-08-12 13:11:21 +04:00
Alexey Sedunov 96dae07276 Extract Function: Allow to choose between function and property extraction 2014-08-12 13:09:53 +04:00
Alexey Sedunov 87de6cff23 Extract Function: Check for INVISIBLE_* errors during validation phase
#KT-4995 Fixed
2014-08-12 13:09: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
Valentin Kipyatkov 83b33bd58b Only named parameters in completion when nothing else can be 2014-08-07 21:55:15 +04:00
Alexey Kudravtsev 894a7162c9 javadoc 2014-08-07 08:51:08 +04:00
Alexey Sedunov 9fee8600cb Pseudocode: Do not generate implicit return instruction inside of
Unit-typed lambdas
 #KT-5549 Fixed
2014-08-05 18:14:40 +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 b3ad725e8d Added 'getParameterForArgument' util function (using resolved call)
Removed similar util methods (using psi):
getParameterCorrespondingToValueArgumentPassedInCall
getParameterCorrespondingToFunctionLiteralPassedOutsideArgumentList
2014-07-30 17:14:01 +04:00
Svetlana Isakova 2ae87cae4a Function literal expression outside the parentheses wrapped into JetFunctionLiteralArgument
Extracted JetFunctionLiteralArgument.moveInsideParenthesesAndReplaceWith util function
2014-07-30 17:14:00 +04:00
Svetlana Isakova 4477a96ca7 Resolve operation (unary, array access) on error element instead of ignoring it
(to record corresponding call for later simplification in control flow)
Generate code for unmapped arguments in control flow
2014-07-30 17:14:00 +04:00
Svetlana Isakova 3cc02c57fc Refactoring: moved methods to call util 2014-07-30 17:07:10 +04:00
Svetlana Isakova eca2c7beea Added tests on resolved calls
for annotation entry, delegator to super call, array access
2014-07-30 17:07:10 +04:00
Svetlana Isakova 22624186f6 Added tests for 'super' resolved calls 2014-07-30 17:07:09 +04:00
Denis Zharkov 76845a76b9 Fixed KT-4814: check type when a += b is a = a+b
In cases when a += b is a = a + b, check that (a+b) can be safely casted to a
2014-07-28 22:00:14 +04:00
Alexey Sedunov 9cbcabffa4 Control-Flow Analysis: Reuse pseudo-value information for unused expression analysis 2014-07-28 13:07:37 +04:00
Alexey Sedunov 85bb4f9b8e Pseudocode: Generate read instructions on call expression (instead of
callee)
2014-07-28 13:07:33 +04:00
Alexey Sedunov 9f3ebe5f3b Pseudocode: Generate merge instruction regardless of number of branches 2014-07-28 13:07:32 +04:00
Alexey Sedunov d008cb8c21 Pseudocode: Do not regenerate receiver values 2014-07-28 13:07:30 +04:00
Alexey Sedunov 77bbf8f73b Pseudocode: Generate fake values for Unit/Nothing-typed expressions 2014-07-28 13:07:29 +04:00
Alexey Sedunov 2d3ac9109b Pseudocode: Generate synthetic VALUE_CONSUMER for both property and class delegates 2014-07-28 13:06:46 +04:00
Alexey Sedunov d07deeb5fb Pseudocode: Generate UNSUPPORTED_ELEMENT for misplaced returns 2014-07-28 13:04:02 +04:00
Alexey Sedunov b0bf11c51e Pseudocode: Consume value of true condition in while-loop 2014-07-28 13:04:01 +04:00
Alexey Sedunov e11ffb8542 Pseudocode: Replace UnsupportedElementInstruction with UNSUPPORTED_ELEMENT magic.
Generate UNSUPPORTED_ELEMENT for assignments with unresolved left-han side
2014-07-28 13:04:00 +04:00
Alexey Sedunov c32d112e67 Pseudocode: Generate magics for cast expressions 2014-07-28 13:03:12 +04:00
Alexey Sedunov 00dd1dbb0b Control-Flow Analysis: Compute STATEMENT slice using control-flow information 2014-07-28 13:03:10 +04:00
Alexey Sedunov ffd4af872c Pseudocode: Track merged values. Compute closure of value usages over merge instructions. Exclude merge instructions from usage lists 2014-07-28 13:03:09 +04:00
Alexey Sedunov 267ea81bbe Pseudocode: Avoid null input values 2014-07-28 13:03:07 +04:00
Alexey Sedunov 8083ffad47 Pseudocode: Add mapping from pseudo-values to PSI elements 2014-07-28 13:03:06 +04:00
Alexey Sedunov 4f54d833d3 Pseudocode: Generate instructions for callable reference expressions 2014-07-28 13:03:05 +04:00
Alexander Udalov de0f751207 Replace object$ -> OBJECT$, instance$ -> INSTANCE$ in the project 2014-07-26 00:21:05 +04:00
Alexander Udalov bea740b478 Use javaClass instead of getClass() 2014-07-25 21:19:37 +04:00
Svetlana Isakova 8c13a76805 KT-5527 Double TYPE_MISMATCH diagnostic when returns object
#KT-5527 Fixed
2014-07-25 21:17:31 +04:00
Zalim Bashorov a811de9bbd Minor: Unit.VALUE -> Unit in Java code. 2014-07-25 21:03:10 +04:00
Svetlana Isakova 16dfdd2f03 Record type resolution scope for unresolved super type qualifier 2014-07-25 19:23:04 +04:00
Zalim Bashorov 4a8519615a Unit.VALUE -> Unit in code. 2014-07-25 17:16:40 +04:00
Valentin Kipyatkov 957ffb0313 J2K: adding type arguments where they are needed and removing them where they are redundant 2014-07-25 16:54:24 +04:00