Commit Graph

794 Commits

Author SHA1 Message Date
Nikolay Krasko 4342740195 Refactoring: move common code for ResolveSession init to method 2014-11-28 17:18:46 +03:00
Nikolay Krasko 8cfdcd319b LTDA: Add the temp ability to build with eager resolve
Compiler should be executed with -Dlazy.tda=false parameter

REPL won't work with this option
2014-11-28 17:18:45 +03:00
Nikolay Krasko 0fa001ed01 LTDA, Minor: method rename 2014-11-28 17:18:41 +03:00
Nikolay Krasko df115099a6 LTDA: Rename method for creating shared trace 2014-11-28 17:18:41 +03:00
Nikolay Krasko a42edb9c8f LTDA: Assert context was created for light class generation 2014-11-28 17:18:40 +03:00
Nikolay Krasko 571f3c8524 LTDA: Initialize project components with resolve session after injector construction is finished 2014-11-28 17:18:39 +03:00
Nikolay Krasko 602407cc9c LTDA: Fix REPL and make it work with lazy resolve 2014-11-28 17:18:38 +03:00
Nikolay Krasko 23c6498e1e LTDA: Injector with lazy TDA for JVM target
- REPL is broken
 - Tests for Kotlin - Java - Kotlin hierarchy may fail
2014-11-28 17:18:36 +03:00
Pavel V. Talanov bce399f5fd Rename: AnalyzeExhaust -> AnalysisResult 2014-11-21 15:56:05 +03:00
Michael Nedzelsky 505775218a JS backend: fix KT-6277 kotlinc-js: IllegalArgumentException when -output is a file name without directory prefix
#KT-6277 Fixed
2014-11-19 23:38:15 +03:00
Valentin Kipyatkov 5f5d2de5e0 Moved KindFilter and DescriptorKindExclude out of JetScope, moved constants as well and renamed them 2014-11-12 21:57:49 +03:00
Valentin Kipyatkov 95b3885aa5 Refactored filtering by descriptor kind so that no knowledge about SAM-constructors required in core 2014-11-12 21:25:02 +03:00
Valentin Kipyatkov 6f2da4930a Descriptor kind filter replaced with bit mask 2014-11-12 21:24:59 +03:00
Valentin Kipyatkov 1983a9f3da Replaced usages of JetScope.getAllDescriptors() with JetScope.getDescriptors() (where makes sense) 2014-11-12 21:24:55 +03:00
Zalim Bashorov adab0445de K2JS: introduce "no-stdlb" parameter and use stdlib from compiler by default. 2014-11-07 16:30:52 +03:00
Zalim Bashorov cd20301283 JS frontend: suppress warnings from stdlib. 2014-11-07 16:30:51 +03:00
Zalim Bashorov c8556ec1f7 JS frontend: suppress UNUSED_PARAM for native declarations.
#KT-2141 Fixed
2014-11-07 16:30:51 +03:00
Valentin Kipyatkov c2a3fde969 Converted JetScope to Kotlin 2014-11-05 21:42:12 +03:00
Nikolay Krasko 775fddbf73 Do logging with system dependent paths 2014-10-31 19:52:41 +03:00
Zalim Bashorov 9e11b40fe1 Add the support suppressWarnings, verbose and version in build tools. 2014-10-29 23:09:07 +03:00
Zalim Bashorov d986b0e565 Ant buildtools: added base class for Kotlin compiler ant tasks.
As side effect:
 - used cli compiler in both ant tasks.
 - got the ability to use custom args in JS ant task too.
2014-10-07 16:32:07 +04:00
Zalim Bashorov 0e075c7d5f JS backend: added the ability to turn off the inline optimization. 2014-10-03 14:23:53 +04:00
Alexey Tsvetkov 987708680f JS test: JS AST access from tests 2014-10-03 14:23:47 +04:00
Alexander Udalov 7d6da551d1 Minor, inline one of CodegenBinding#registerClassNameForScript 2014-09-26 10:22:24 +04:00
Nikolay Krasko de61456725 Compare constructed descriptors in diagnostics tests 2014-09-18 17:58:20 +04:00
Alexander Udalov 7595e32bb6 Use ClassId instead of JvmClassName in KotlinJvmBinaryClass
ClassId contains exact information about origin of the class (e.g. if '$' in
the class name denotes nested classes separator or just a character in the
name)
2014-09-15 19:30:51 +04:00
Evgeny Gerashchenko 4e41673b75 Added check for duplicate source paths in all compiler workflows. 2014-08-29 17:49:10 +04:00
Evgeny Gerashchenko 3226093fa6 Fixed redeclaration from incremental compilation. Added workaround for JPS bug. 2014-08-29 16:31:29 +04:00
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 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
Alexander Udalov 3ada0ce0a9 Fix kotlinc scripts on Cygwin 2014-08-20 15:25:45 +04:00
Evgeny Gerashchenko 487f381287 Minor. Renamed and cleaned CompilerServices -> Services. 2014-08-20 13:46:31 +04:00
Evgeny Gerashchenko f3b7ae379f Passing services via type-safe container instead of map. 2014-08-20 13:46:30 +04:00
Evgeny Gerashchenko 184ddbc9e1 Removed passing incremental cache base dir via module script. 2014-08-20 13:46:29 +04:00
Evgeny Gerashchenko 6dd56a08bd Removed storing module ids in incremental caches. 2014-08-20 13:46:28 +04:00
Evgeny Gerashchenko e419c1a604 Moved incremental cache API to separate package. 2014-08-20 13:46:27 +04:00
Evgeny Gerashchenko 5fade9a5a6 Made incremental cache per-module.
Reused IDEA framework which manages per-module storage.
2014-08-20 13:46:26 +04:00
Alexey Kudravtsev 44084de3be removed code already contained in JavaCoreApplicationEnvironment 2014-08-20 11:38:05 +04:00
Alexey Kudravtsev 945209567e moved some components registration from registerProjectServices() to registerProjectServicesForCLI() since they don't work in Upsource 2014-08-19 17:12:07 +04:00
Pavel V. Talanov 09d3ddfcae Introduce VirtualFileFinderFactory
Allow creation of VirtualFileFinder with restricted scope
2014-08-15 15:22:19 +04:00
Alexander Udalov 844845c6e3 REPL: sanitize stack traces
Don't include our compiler's and preloader's internal code, reflection, native
methods etc. Also delete "substring" matching logic from tests
2014-08-13 15:42:10 +04:00
Alexander Udalov 5beefac5bc REPL: display the original cause of InvocationTargetException 2014-08-13 15:13:25 +04:00
Alexander Udalov 6eb5567895 REPL: fix open parenthesis not triggering "incomplete"
Check if all of the syntax errors are at EOF, not that there's a single one.
In case of open parenthesis two syntax errors are reported for some reason
2014-08-13 15:13:25 +04:00
Alexander Udalov 4213ce318e REPL: don't fail on a callable reference
There should probably be a special kind of property, but at least it won't
throw an exception for now
2014-08-13 15:13:24 +04:00
Alexander Udalov 8d2ab0fd52 REPL: disable event expansion
Fixes problems with exclamation marks inside string literals. No tests added
because it's tedious to test REPL as it is (via ConsoleReader)

 #KT-3940 Fixed
2014-08-13 15:13:24 +04:00
Alexander Udalov d54871746e REPL: minor refactoring & reformat, fix warnings 2014-08-13 15:13:23 +04:00
Alexander Udalov a83d9a7dce CLI: introduce alias "-cp" for "-classpath" 2014-08-13 11:10:42 +04:00
Alexander Udalov b54d2ac0c5 CLI: don't fail on a wrong "-script" usage 2014-08-13 11:10:42 +04:00
Alexander Udalov d3f201dd45 CLI: drop "-pp" flag for preloader profiling
It was never documented and was never supposed to be used. In the rare case
when someone must profile preloader, he can temporarily change "notime" to
"time" in the kotlinc-jvm bash/batch script
2014-08-13 11:10:41 +04:00