Commit Graph

20440 Commits

Author SHA1 Message Date
Dmitry Savvinov 8997fa52df Introduce unspecifiedJvmPlatform for clients without jvmTarget
Previously, a lot of clients used JvmPlatform as platform-marker,
without thinking about jvmTarget.

For the sake of migration, this commits introduced so-called
UnspecifiedJvmPlatform, which can be used for a time being, but
generally, all usages should be removed in  future.
2019-05-28 13:08:09 +03:00
Dmitry Savvinov ef39e2a68f [Compatibility] Restore KotlinFacetSettings.getTargetPlatform() 2019-05-28 13:08:09 +03:00
Dmitry Savvinov 716e55d171 [Compatibility] Restore KotlinProjectConfugirator.getTargetPlatform() 2019-05-28 13:08:09 +03:00
Dmitry Savvinov dfe0493f9a [Compatiblity] Restore IdePlatform as well as some related methods 2019-05-28 13:08:09 +03:00
Dmitry Savvinov 9d0f518d62 Rename PlatformDependentCompilerServices -> PlatformDependentAnalyzerServices 2019-05-28 13:08:09 +03:00
Dmitry Savvinov 3332cdfce8 [Compatibility] Restore ModuleSourceInfo.getPlatform() for compatibility 2019-05-28 13:08:09 +03:00
Dmitry Savvinov 2caa1c3dd6 [Compatibility] Restore old TargetPlatform and subtypes for compatibility 2019-05-28 13:08:08 +03:00
Dmitry Savvinov bbe7a9790e Imitate old comparison behaviour when collecting dependencies
This is needed, because previously such code were not distinguishing
between different flavours of JVM or Common. Now we do, and, for
example, JdkPlatform(1.6) != JdkPlatform(1.8), which causes such
dependencies to be erroneously dropped
2019-05-28 13:08:08 +03:00
Dmitry Savvinov 4116815a8d [Misc] Provide meaningful debugName for StorageManager everywhere 2019-05-28 13:08:08 +03:00
Dmitry Savvinov c97138c0eb [Injection] Pull languageVersionSettings injection to 'configureModule' 2019-05-28 13:08:08 +03:00
Dmitry Savvinov 1606b3bf23 [Platform API] Make 'ModuleInfo.platform' non-nullable 2019-05-28 13:08:07 +03:00
Dmitry Savvinov 2d528c6396 [Platform API] Remove IdePlatform, use TargetPlatform instead 2019-05-28 13:08:07 +03:00
Dmitry Savvinov d5fbe59a3e [Platform API] Introduce fundamental abstraction of Platform
This is a large commit, which introduces general API for working with
abstraction of Platform.

- Add new abstraction to 'core' - SimplePlatform - which represents
exactly one platform
  - Clients are strongly prohibited to create instances of SimplePlatform
  by hand, instead, corresponding *Platforms abstraction should be used
  (e.g. JvmPlatforms, JsPlatforms, KonanPlatforms)

- Move TargetPlatform to 'core', it represents now a collection of
SimplePlatforms
  - Clients are strongly encouraged to use TargetPlatform
    (not SimplePlatform) in API, to enforce checks for multiplatform

- Provide a helper-extensions to work with TargetPlatform
(in particular, for getting a specific component platform)

- Remove MultiTargetPlatform in favour of TargetPlatform
  - Notably, this commit leaves another widely used duplicated abstraction,
    namely, IdePlatform. For the sake sanity, removal of IdePlatform is
    extracted in the separate commit.
2019-05-28 13:08:07 +03:00
Dmitry Savvinov f2a0a809f1 [Platform API] Split TargetPlatform into lightweight TargetPlatform and CompilerServices
This decouples simple data (TargetPlatform) from other subsystem-specific
logic (like default imports, built-ins, etc.).

Aside from purely aesthetic improvements, it also makes it easier
to move 'TargetPlatform' into core (see next commits)
2019-05-28 13:08:06 +03:00
Dmitry Savvinov 83914614b9 [Platform API] Clean-up some usages of Platform
Mostly unused imports. Also, in some places,
TargetPlatform/MultiTargetPlatform were just passed around without
actually using (e.g. in deserialization)
2019-05-28 13:08:06 +03:00
Dmitry Savvinov 520e871280 Rename *AnalyzerFacade to *ResolverForModuleFactory to prevent confusion with other similar names 2019-05-28 13:08:06 +03:00
Dmitriy Novozhilov f20ec3e0a6 [NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI
There is added a new service named `SubstitutingScopeProvider`, that
  provides factory that creates captured types and approximator for them.
  In OI they are the same as before commit, for NI they are empty, because
  that approximation interferes with NI algorithm

That service is injected into function descriptors and property descriptors
  and used for creating `SubstitutingScope` with correct services

Also there is changed time when we approximate captured types in NI
  (after all call checkers)

#KT-25290 Fixed
2019-05-28 11:18:33 +03:00
Mikhail Glukhikh 806d2d628c FIR Java: correctly handle overridden Kotlin properties in use-site scope 2019-05-28 10:20:41 +03:00
Mikhail Glukhikh 56435fa283 FIR Java: add default constructors 2019-05-28 10:20:40 +03:00
Mikhail Glukhikh d0404b2c2a FIR resolve: check number of parameters when handling Java accessors 2019-05-28 10:20:38 +03:00
Kirill Shmakov 362e056b18 Expand acronym for K/N definitions file 2019-05-27 15:58:04 +03:00
Simon Ogorodnik 50a7d3f037 Adjust performanceTest jvm args 2019-05-27 15:00:46 +03:00
Mikhail Zarechenskiy cc29ca02f8 [NI] Don't loose inference session during property resolve
#KT-31620 Fixed
2019-05-26 21:31:54 +03:00
Ilya Chernikov a4c049d26e Replace message collector with reporting lambda
to simplify usages and slightly reduce dependencies
2019-05-25 10:10:28 +02:00
Dmitry Gridin ba390202c8 Remove resolve from isEffectivelyActual && isExpectDeclaration
Relates to #KT-29731
2019-05-24 15:55:01 +07:00
Dmitry Gridin 61a740457d Suggest dialog if all members without actual modifier
Relates to #KT-31476
2019-05-24 15:55:01 +07:00
Dmitry Gridin 8dd1389979 Minor: remove redundant condition 2019-05-24 15:55:01 +07:00
Dmitry Gridin 9c4318a39c Minor: cleanup OverrideMemberChooserObject 2019-05-24 15:55:01 +07:00
Dmitry Gridin 76c2c2a5e9 Allow "Add val/var to primary constructor parameter" for inline & annotation classes
Relates to #KT-29731
2019-05-24 15:55:01 +07:00
Dmitry Gridin f2bd58c030 Expand "Create expected..." also to a members if an expect class doesn't exist
#KT-31272 Fixed
2019-05-24 15:55:01 +07:00
Dmitry Gridin 47e3a26749 Fix "Create expect function" for primary constructor
#KT-31518 Fixed
2019-05-24 15:55:01 +07:00
Dmitry Gridin b575ed390a Add a dialog to select members for export in expect class
#KT-31476 Fixed
#KT-31446 Fixed
#KT-31033 Fixed
2019-05-24 15:55:01 +07:00
Dmitry Gridin 9a910ef144 Fix modifiers for ACTUAL_RENDERER 2019-05-24 15:55:01 +07:00
Dmitry Gridin a9ed042199 Minor: refactoring 2019-05-24 15:55:01 +07:00
Dmitry Gridin 1097bc76af Don't suggest Add val/var to parameter at expect class constructor
#KT-29731 Fixed
2019-05-24 15:55:01 +07:00
Dmitry Gridin af9d9eacb1 Minor: refactoring AddValVarToConstructorParameterAction 2019-05-24 15:55:00 +07:00
Dmitry Gridin 379152303c Minor: refactoring 'refactoring' package 2019-05-24 15:55:00 +07:00
Dmitry Gridin 98a4c4588e Don't suggest might be const on actual member declaration
#KT-27822 Fixed
2019-05-24 15:55:00 +07:00
Nikolay Krasko e38ad3a513 Temporary allow resolve in write action for insert handler 2019-05-23 16:25:09 +03:00
Nikolay Krasko 78569c62c0 Additional test for multiple comments in copyright updater 2019-05-23 16:25:09 +03:00
Nikolay Krasko 136cbd195b Fix copyright updater in scripts (KT-30133)
#KT-30133 Fixed
2019-05-23 16:25:09 +03:00
Nikolay Krasko aa01328d13 Add tests for copyright updater 2019-05-23 16:25:08 +03:00
Nikolay Krasko d32d715cd1 Move copyright extension out of jvm to common idea module 2019-05-23 16:25:08 +03:00
Nikolay Krasko 314b29f223 Fix background for uneditable text panes in Kotlin update (KT-29667)
#KT-29667 Fixed
2019-05-23 16:25:08 +03:00
Toshiaki Kameyama 3bca1a50e3 Move variable declaration into when: fix comment place
#KT-31362 Fixed
2019-05-23 19:01:24 +07:00
Mikhail Glukhikh f4fdc66a34 Introduce experimental FIR compiler #KT-31265 Fixed
This commit also includes several FIR2IR fixes which helps FIR compiler
to produce normal results
2019-05-23 14:02:06 +03:00
Peter Xu a639607821 Revert obsolete code introduced in KT-12402
The classes being filtered have been renamed months ago. The change
committed in KT-12402 is no longer relevant as the underlying issue has
been fixed.
2019-05-23 19:09:28 +09:00
Vladimir Krivosheev 757b4b3910 Do not use constructor injection for app level extension KotlinClassWithDelegatedPropertyRenderer (KT-31266) 2019-05-23 19:09:27 +09:00
Dmitriy Novozhilov f54653eb2b [NI] Fix error type approximation in ILTApproximatorConfiguration
#KT-31441 Fixed
2019-05-23 12:22:42 +03:00
Mikhail Glukhikh 0cf318918c Clean & fix tests in "replace manual range with indices / iteration"
Related to KT-14344
2019-05-21 13:34:29 +03:00