Commit Graph

1180 Commits

Author SHA1 Message Date
Pavel V. Talanov 7a1d5d63dc Rename: AnalyzerFacadeForJvm(Js) -> TopDownAnalyzerFacadeForJvm(Js) 2014-08-22 23:16:55 +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
Michael Nedzelsky d3bf58d761 JS backend: extract inline calls during translation 2014-08-22 02:17:16 +04:00
Michael Nedzelsky 76757b14e2 JS backend: new tests for use break, continue and return in &&, ||, ?: 2014-08-22 02:17:11 +04:00
Michael Nedzelsky d969e58b88 JS backend: support for while/do while with complex conditions 2014-08-22 02:17:08 +04:00
Michael Nedzelsky 53f0e6dcd2 JS backend: remove dangerous package, correct translation for call, assignments, binary operations, support try...catch as expression
#KT-5576 Fixed
 #KT-5594 Fixed
 #KT-3166 Fixed
 #KT-5545 Fixed
 #KT-5594 Fixed
 #KT-5258 Fixed

JS backend: fix KT-4879: extra side effect when use when in default arguments

 #KT-4879 Fixed

JS backend: improve and fix WhenTranslator, fix order of evaluation for condtitions, fix KT-5263 (JS: extra tmp when initialize val in when by expression with if)

 #KT-5263 Fixed
2014-08-22 02:17:00 +04:00
Michael Nedzelsky 629d9a275b JS backend: fix dangling else issue in generated code for JsToStringGenerationVisitor
JS backend: fix KT-5253: when with if inside

 #KT-5253 Fixed
2014-08-22 02:16:56 +04:00
Michael Nedzelsky bfa8fea5b8 JS backend: move patternMatching tests to expression/when 2014-08-22 02:16:53 +04:00
Alexander Udalov 850fc25ee0 CLI: drop "-tags" argument
It was only used for the compiler inside the IDE, and there we already invoke a
special method which outputs HTML only
2014-08-13 11:10:41 +04:00
Alexander Udalov 4a7dc25406 CLI: add an extra MessageRenderer parameter to compiler exec
Is supposed to be used instead of the "-tags" CLI argument
2014-08-13 11:10:41 +04:00
Alexander Udalov cf431ffab0 CLI: change argument naming convention
As in all other Unix/POSIX tools and JVM language compilers, multiple words
comprising the argument name should be lowercase, separated by dashes
2014-08-13 11:10:40 +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
Michael Nedzelsky 12db8f1551 JS backend: support for explicit delegation
#KT-4479 Fixed
2014-08-09 10:24:02 +04:00
Michael Nedzelsky 82af542747 JS backend: convert PropertyTranslator to Kotlin 2014-08-09 10:23:59 +04:00
Michael Nedzelsky b20e413883 JS backend: add NotNull annotations 2014-08-09 10:23:55 +04:00
Zalim Bashorov fe4a4e712a JS backend: native trait exists only at compile time. 2014-08-08 21:26:43 +04:00
Zalim Bashorov ac4ffd7d2c JS backend: fixed accessing to nested native "elements".
#KT-4298 fixed
2014-08-08 21:26:43 +04:00
Alexey Kudravtsev 8f388c49c2 js.frontend new module 2014-08-07 08:51:10 +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
Michael Nedzelsky 145aa5a276 JS backend: tests for reflection support 2014-07-30 17:50:16 +04:00
Michael Nedzelsky cc98664832 JS backend: support for reflection 2014-07-30 17:50:13 +04:00
Michael Nedzelsky c42a9840de JS backend: add support for reflection types 2014-07-30 17:50:11 +04:00
Svetlana Isakova 3cc02c57fc Refactoring: moved methods to call util 2014-07-30 17:07:10 +04:00
Evgeny Gerashchenko 90b065e82b += tests fix 2014-07-29 12:06:36 +04:00
Alexey Sedunov 00dd1dbb0b Control-Flow Analysis: Compute STATEMENT slice using control-flow information 2014-07-28 13:03:10 +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
Alexander Udalov 917938e57b Update copyrights 2014-07-23 21:24:39 +04:00
Alexander Udalov 87439b8e0b Drop "-sourceFiles" in kotlinc-js
Use free arguments instead, as is done in kotlinc-jvm and all sensible
compilers everywhere

Also fix some cases of AntTaskTest to be able to run them locally
2014-07-23 21:24:38 +04:00
Zalim Bashorov ae4bac06b2 Merge pull request #500 from MichaelNedzelsky/kt5320
JS Backend: fixed associativity of JsCondition(ternary operator).

Fixed wrong code generation when use JsCondition(ternary operator) as condition of simple `if`(JsCondition).

#KT-5320 fixed
2014-07-22 15:17:43 +04:00
Michael Nedzelsky 9456833a35 JS Backend: #KT-5320 Fixed (generated code for ternary operator) 2014-07-22 13:08:31 +04:00
Michael Nedzelsky ee67546f8f JS backend: fix kt-5345 (Type mismatch on Int / Float division) 2014-07-22 12:43:03 +04:00
Zalim Bashorov 14ab3c4de1 JS stdlib: allowed use null as key and value in Map implementations. Added tests for using null in Set and Map implementations. 2014-07-16 21:35:11 +04:00
Zalim Bashorov 223a14a855 Moved MutableMap.set from Maps.kt to MapsJVM.kt to avoid ambiguity when compile MapTest.kt by JS backend. 2014-07-16 21:35:10 +04:00
Ilya Ryzhenkov 8cfbaf4749 Add StdLibMapTest, fix naming to convention StdLib* tests. 2014-07-16 21:35:09 +04:00
Pavel V. Talanov 7269e383cf Rewrite JetPsiFactory to kotlin, make project a property
Instead of passing to every function
All static methods are now member functions
2014-07-15 16:41:12 +04:00
Alexey Tsvetkov dd3dbe5b10 JS backend: _commonFiles/ for common kotlin files in testData/ and every test dir 2014-07-11 22:36:20 +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
Svetlana Isakova 72e9822d99 All RESOLVED_CALL getters replaced with util methods
JetElement.getResolvedCall(BindingContext)
  JetElement.getResolvedCallForSure(BindingContext)
2014-07-08 14:57:37 +04:00
Svetlana Isakova 02f5293b3d Added CallCompleter component
Regenerated injectors
2014-07-08 14:48:15 +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
Pavel V. Talanov 0a43c38bae Change AnalyzerFacade#createSetup to accept a list of synthetic files and a scope for physical source files
Make DeclarationProviderFactory a project service
2014-07-03 20:46:50 +04:00
Alexander Udalov a38a396a43 Remove default import "kotlin.reflect"
Basic reflection is usable without any imports (with :: literals)

This reverts commit 9503056dd5.
2014-07-02 01:55:53 +04:00
Zalim Bashorov 28228d23b1 JS stdlib: added missed constructors for HashSet, LinkedHashSet, HashMap and LinkedHashMap. 2014-06-26 16:33:14 +04:00
Zalim Bashorov 444932d4c1 JS backend: fixed wrong NPE when casting to generic type. 2014-06-26 14:55:56 +04:00
Ilya Ryzhenkov 1842d30567 Implement equals for NumberRange in JavaScript. 2014-06-24 23:49:16 +04:00
Ilya Ryzhenkov 516bae17d7 StringBuilder builder and appendln 2014-06-24 23:49:15 +04:00
Zalim Bashorov 79b7b1c447 JS stdlib: added test for using special names(i.e. Object.prototype members) in Maps and Sets. Fixed the support special names in PrimitiveHashMap. 2014-06-20 16:42:43 +04:00
Zalim Bashorov 6f5c88c21f JS stdlib: added LinkedHashMap abd LinkedHashSet. 2014-06-20 16:42:43 +04:00