Alexander Udalov
0e9f29fdba
Make ClassDescriptor#classId nullable
...
Local classes or anonymous objects do not have a class id. Use "!!" almost
everywhere to make assertion explicit
2016-10-25 15:42:32 +03:00
Alexander Udalov
6b6ddf5f75
Import classes from kotlin.coroutines by default, add to default imports in JS
2016-10-24 15:30:38 +03:00
Alexander Udalov
4c52ce37d2
Drop TargetPlatform in utilities for module creation
2016-10-21 17:10:40 +03:00
Alexander Udalov
56e2173b3c
Extract platform-independent default imports to TargetPlatform.Default.defaultImports
...
This is needed because SourceNavigationHelper uses default platform and it
needs default imports to be able to resolve references (otherwise
NavigateToLibrarySourceTestGenerated breaks)
2016-10-21 17:10:39 +03:00
Alexander Udalov
7b2a80ffa4
Fix incremental recompilation of JvmMultifileClass with top level function
...
See 53b584f and previous changes where this behavior was broken (this was
untested, however). Fixes EA-90065
2016-10-19 12:50:10 +03:00
Michael Bogdanov
978a4db07b
Introduced IR CodegenFactory, added configuration key to enable it
2016-10-18 09:09:35 +03:00
Zalim Bashorov
c21e1eb857
Report error when try to use unsupported reflection API in Kotlin JS; allow to use kotlin.Any members on reflection classes for both platforms.
2016-10-14 19:44:58 +03:00
Valentin Kipyatkov
0399772ee6
KT-9835 Completion thinks receiver is nullable when it is not
...
#KT-9835 Fixed
2016-10-13 15:11:19 +03:00
Valentin Kipyatkov
7b12dd498f
KT-13780 No completion and assertion error in log
...
#KT-13780 Fixed
2016-10-13 15:10:53 +03:00
Alexander Udalov
321a19a247
Make JvmPlatform.defaultImports a stored property
...
It was incorrectly made a getter-only property in 2f616bdd
2016-10-12 23:30:03 +03:00
Alexander Udalov
2f616bdd33
Drop ModuleParameters, inline defaultImports everywhere
2016-10-12 17:07:09 +03:00
Ilya Chernikov
63c5133167
Remove support for xml-based script configs, other minor refactorings
2016-10-12 15:37:47 +02:00
Alexander Udalov
88af36001c
Introduce DeserializationConfiguration
...
Will be used soon to deliver the language/API-version-related behavior to the
deserialization
2016-10-12 12:19:17 +03:00
Valentin Kipyatkov
147d1da1ed
Supported obtaining function type parameter names from KotlinType
2016-10-11 23:38:48 +03:00
Alexander Udalov
2c66d4e59b
Move LanguageVersionSettings and JvmTarget to module 'util'
...
To be used from cli-common in the subsequent commits
2016-10-11 17:30:14 +03:00
Alexander Udalov
6e0e8c6dc3
Pass LanguageVersionSettings instance to isHiddenInResolution
...
Unused at the moment, will be used later to check if the API version prohibits
the usage of the element
2016-10-11 17:30:12 +03:00
Ilya Gorbunov
4236a4dd07
Farewell, excluded imports from the platform. If anyone ever needs them again, they are buried in this commit.
2016-10-10 20:14:32 +03:00
Ilya Gorbunov
5042158df5
Determine automatically which types from java.lang is aliased in default imported kotlin packages and exclude them from imported java.lang.* scope.
2016-10-10 20:14:32 +03:00
Mikhail Glukhikh
126304c197
Destructure intention applied (compiler)
2016-10-10 14:42:04 +03:00
Dmitry Jemerov
ce0d81f670
to avoid running resolve under ClsTypeElement lock, return empty modifier list if we're currently calculating the return type (the modifier list is requested to apply type annotations, and we don't care about them anyway)
...
#KT-12966 Fixed
2016-10-10 12:48:51 +02:00
Alexander Udalov
8ffe379c92
Use separate module analysis in CliReplAnalyzerEngine
2016-10-06 14:40:21 +03:00
Alexander Udalov
f7b4d7d35b
Move ClassifierUsageChecker and DeclarationChecker to checkers/
2016-10-06 14:40:20 +03:00
Alexander Udalov
0905b361d0
Drop LazyTopDownAnalyzerForTopLevel
...
Replace it everywhere with LazyTopDownAnalyzer
2016-10-06 14:40:20 +03:00
Alexander Udalov
7070b88ea4
Move PlatformToKotlinClassMap out from ModuleParameters
...
Configure it in the same way as other platform-specific components instead,
simplify some code
2016-10-06 14:40:20 +03:00
Alexander Udalov
b77388bd48
Pass PlatformToKotlinClassMap instance to PlatformTypesMappedToKotlinChecker
...
The purpose of this change is to allow PlatformToKotlinClassMap to be removed
from ModuleDescriptor
2016-10-06 14:40:19 +03:00
Alexander Udalov
53b584f48c
Simplify usages of IncrementalPackageFragment and related code
...
Since its scope is now empty, no descriptor now has a container that is an
instance of IncrementalPackageFragment -> a lot of code is not needed anymore
2016-10-05 11:24:30 +03:00
Alexander Udalov
7c6352a9f2
Refactor IncrementalPackageFragmentProvider
2016-10-05 11:24:30 +03:00
Alexander Udalov
8fe57c8e84
Minor, fix apostrophes in diagnostic message
2016-10-03 21:52:18 +03:00
Alexander Udalov
c1f55e8018
Make scope of incremental package fragment empty
...
It's only needed to create IncrementalMultifileClassPackageFragment instances
now
2016-10-03 21:52:10 +03:00
Michael Bogdanov
95a1c254e1
Added error diagnostic on inheriting target 6 interface
2016-10-03 14:13:17 +03:00
Michael Bogdanov
dd4d5e3aa1
Generate 'DefaultImpls' for jvm 8 target only within compiler option
2016-10-03 14:05:59 +03:00
Alexander Udalov
45190d9453
Support separate modules in compiler
...
Unless the compatibility option "-Xsingle-module" is passed, the compiler will
create two modules instead of one now (see TopDownAnalyzerFacadeForJVM): the
main module contains Kotlin and Java sources and binaries from the previous
compilation of the given module chunk, the dependency module contains all other
Kotlin and Java binaries. This fixes some issues where the compiler couldn't
detect that the used symbol was from another module, and did not forbid some
usages which are only possible inside the module (see KT-10001).
The ideal way to deal with modules here would be to exactly recreate the
project structure, for example as it's done in JvmAnalyzerFacade and usages.
This is postponed until later
#KT-10001 Fixed
#KT-11840 In Progress
2016-10-02 21:15:47 +03:00
Alexander Udalov
3314725700
Pass GlobalSearchScope instance to JvmPackagePartProvider
...
Currently behavior is unchanged because the "all project" scope is passed,
however in the future this will allow to implement separate modules in the
compiler properly
2016-10-02 21:03:37 +03:00
Alexander Udalov
97f2051a03
Add debugName to ModuleMapping
2016-10-02 21:03:33 +03:00
Alexander Udalov
74ad6b1410
Drop obsolete logic related to obsolete package parts
...
Filtering out obsolete package parts in incremental compilation was necessary
before the big refactoring of package parts, when package parts had been
compiled together into a package class
2016-10-02 21:03:31 +03:00
Alexander Udalov
9fb9c12f5e
Inline LazyTopDownAnalyzerForTopLevel#analyzeFiles
...
To make module initialization more explicit and configurable (especially in
TopDownAnalyzerFacadeForJVM)
2016-10-02 21:03:27 +03:00
Alexander Udalov
a5a874f23f
Move module creation into TopDownAnalyzerFacadeForJVM#analyzeFilesWithJavaIntegration
...
The only place where the logic has changed is in AbstractDiagnosticsTest, where
modules are already created and sealed before the analysis. Copy-paste the
container creation logic there (it's almost fine because it's also present in a
bunch of other tests), and simplify it: get rid of incremental compilation and
other stuff irrelevant for diagnostic tests.
This is needed to make analyzeFilesWithJavaIntegration configure the module
properly before sealing it
2016-10-02 21:03:27 +03:00
Alexander Udalov
596fdab2f2
Extract container for single-module top-down analysis
2016-10-02 21:03:26 +03:00
Alexander Udalov
2699356ce3
Simplify JavaClassFinderPostConstruct, inline javaAnalysisInit
2016-10-02 21:03:25 +03:00
Alexander Udalov
278941a8a1
Deduplicate code in container creation for JVM analysis
2016-10-02 21:03:24 +03:00
Alexander Udalov
0250ea861c
Simplify return types of createContainer* functions
2016-10-02 21:03:23 +03:00
Alexander Udalov
9cfe0be98e
Prettify TopDownAnalyzerFacadeFor{JVM,JS}
2016-10-02 21:03:22 +03:00
Alexander Udalov
4467e127f0
J2K TopDownAnalyzerFacadeFor{JVM,JS}: convert to Kotlin
2016-10-02 21:03:21 +03:00
Alexander Udalov
b34150e1ce
J2K TopDownAnalyzerFacadeFor{JVM,JS}: rename files
2016-10-02 21:03:21 +03:00
Alexander Udalov
87fe6c41df
Drop ExternalDeclarationsProvider
...
It was added for Android extensions, but now another mechanism is used there
(PackageFragmentProviderExtension), and there were no other implementations of
ExternalDeclarationsProvider in the project
2016-10-02 21:03:19 +03:00
Alexander Udalov
1d6abc32bc
Minor, delete ModuleContext#builtIns
2016-10-02 21:03:18 +03:00
Pavel V. Talanov
32daf048c2
PlatformConfigurator: create container for each platform (it contains static services, mostly checkers) ahead of time
2016-09-26 14:42:57 +03:00
Denis Zharkov
5381c06936
Improve 1.0-compatibility mode for JDK dependent members
...
Just reporting error by call checker may be too restrictive
in case there are some extensions that can be used successfully
Solution is to annotate additional members with
@Deprecated(level=Error) + @kotlin.internal.LowPriorityInOverloadResolution
2016-09-22 15:40:37 +03:00
Denis Zharkov
a7dedfab70
Move JvmBuiltIns initialization after container setup
...
It will be used in the further commits to initilize built-ins instance
with components as arguments
2016-09-22 15:40:37 +03:00
Dmitry Petrov
07198cf86d
SAM constructors for type aliases.
2016-09-22 10:38:34 +03:00