Commit Graph

66577 Commits

Author SHA1 Message Date
Alexander Udalov d70271b6aa Move RequireKotlinNames to 'descriptors'
Also move version string regex there and rename the class to
RequireKotlinConstants. This allows to get rid of dependency of
'serialization' on 'frontend'.
2020-03-28 21:30:07 +01:00
Alexander Udalov 844b0078ba Minor, remove unneeded dependency of 'js.parser' on 'util' 2020-03-28 21:30:06 +01:00
Alexander Udalov 9dd8b1821a Move CoroutineLanguageVersionSettingsUtil to 'config'
This allows to get rid of dependency of 'util' on 'descriptors'.
2020-03-28 21:30:06 +01:00
Alexander Udalov db9347cb56 Move JVM-specific analysis flags to 'config.jvm' 2020-03-28 21:30:06 +01:00
Alexander Udalov 7bb77e5672 Move JS binary version utilities to 'js.config'
This allows to replace dependency of 'util' on 'deserialization' with
dependency on 'descriptors'.
2020-03-28 21:30:06 +01:00
Alexander Udalov fe5104b865 Move package org.jetbrains.kotlin.incremental.js to 'js.config'
This allows to replace dependency on 'js.frontend' with 'js.config', in
'kotlin-build-common' and 'daemon-common'. Also simplify some other
dependencies.
2020-03-28 21:30:05 +01:00
Alexander Udalov 4dcd0d1cb6 Extract module 'config' out of 'frontend'
Also move deprecated TargetPlatform there. This allows to get rid of the
dependency cli.common -> frontend, and even on frontend.common.
2020-03-28 21:30:05 +01:00
Alexander Udalov 143aef938b Extract module 'js.config' out of 'js.frontend'
This allows to get rid of dependency cli.common -> js.frontend.
2020-03-28 21:30:05 +01:00
Alexander Udalov 15d2a06132 Extract module 'config.jvm' out of 'frontend.java'
This allows to get rid of dependency cli.common -> frontend.java.
2020-03-28 21:30:04 +01:00
Alexander Udalov 90ae416b72 Minor, move KotlinTypeRefinerImpl out of 'config' package 2020-03-28 21:30:04 +01:00
Alexander Udalov 4aa47be202 Move CommonResolverForModuleFactory to 'frontend'
This will allow to get rid of dependency of 'cli-common' on 'frontend'.
2020-03-28 21:30:04 +01:00
Alexander Udalov 9e014e462b Do not use CommonPlatforms directly in CommonResolverForModuleFactory
This allows to get rid of dependency of this code on CommonPlatforms,
which depends on all platforms (JVM, JS, Native), and eventually move it
to 'frontend'.
2020-03-28 21:30:03 +01:00
Alexander Udalov 8dd04789ad Remove obsolete InlineStrategy
Replace corresponding metadata property in js.ast with Boolean. This
allows to get rid of dependency of 'js.ast' on 'frontend'.
2020-03-28 21:30:03 +01:00
Alexander Udalov 4156a9c80b Extract javac-wrapper into a separate module
It was actually a separate module before the grand build refactoring in
61dfb75e0e.
2020-03-28 21:30:03 +01:00
Alexander Udalov aad7354a3b Minor, remove obsolete jvmTarget modifications in compiler modules
Default JVM target (as well as JDK home) is set to 1.8 for all Gradle
projects in build.gradle.kts:352.
2020-03-28 21:30:03 +01:00
Victor Turansky f403a0da82 README Update IDEA plugin dist path 2020-03-28 18:52:41 +03:00
Igor Chevdar d808ef10b2 Added some tests on local classes in inline bodies 2020-03-28 15:26:19 +03:00
Igor Chevdar e2a378bed7 [JS_IR] More subtle local classes copying in inliner 2020-03-28 15:26:19 +03:00
Igor Chevdar 90abf1fda0 [JS_IR] Don't capture the bound receiver of a CR 2020-03-28 15:26:19 +03:00
Igor Chevdar 643e581448 [IR] Supported extraction of local classes from inline bodies
The mental model for inline functions/lambdas is as following:
inline functions have the `inline` keyword before them so it makes sense
for their bodies to be copied at call sites although the compiler might optimize
that if there is no usage of reified type parameters or crossinline value parameters.
But since there is no `inline` keyword around an inline lambda, then
it is logical to think that there will be no copy of it and that it will be just embedded
at the corresponding call site as is.
2020-03-28 15:26:19 +03:00
Igor Chevdar 7a48c3a945 [IR] Made currentDeclarationParent nullable 2020-03-28 15:26:19 +03:00
Toshiaki Kameyama 09304bbd54 ConvertToAnonymousObjectFix: do not suggest when there is no lambda
#KT-31912 Fixed
2020-03-28 14:13:19 +03:00
Ilya Kirillov d3c54f664b Wizard: fix 191 tests 2020-03-28 01:14:58 +03:00
Ilya Gorbunov 8447701d74 Use stable order and constant timestamps in merged sources jar
To avoid up-to-date fights between several kotlin working copies.
2020-03-27 19:45:11 +03:00
Dmitry Petrov 042424d599 KT-27524 Don't box (some) inline classes in suspend fun return
If an inline class is mapped to a reference type (or an array), it's Ok
to treat JVM view on a suspend function as returning a value of
corresponding inline class (although in reality it returns 'Any?'
because of COROUTINE_SUSPENDED).
2020-03-27 18:29:36 +03:00
Mikhail Glukhikh d8bc29e6c6 [FIR] Eliminate obsolete NO_SUPERTYPE diagnostic from builder 2020-03-27 18:24:50 +03:00
Nick b38d30bab0 [FIR] Support several super-related diagnostics 2020-03-27 18:24:50 +03:00
Mads Ager 5570a5fe74 [JVM_IR] Use iinc for incrementing Int variables.
Fix line number generation for assignments where the right-hand
side of the assignment is not on the same line.

Fix line number generation for intrinsics functions where the
function is not on the same line as the last argument.

Be careful to not break stepping behavior with the iinc
optimizations.
2020-03-27 18:17:53 +03:00
Steven Schäfer 58685be4e2 IR: Don't use IrStringConcatenation for ordinary toString calls
We can only use IrStrinConcatentation to represent calls to Any?.toString
and toString calls on primitive types. Otherwise, x.toString() and "$x"
are observably different when x is a non-null type with null value
(e.g., an @NotNull value coming from Java).
2020-03-27 17:31:48 +03:00
Mikhail Glukhikh c1b9fdd2f3 Fix diagnostic test data to be consistent with FIR test data 2020-03-27 16:46:59 +03:00
Mikhail Glukhikh c518868c03 Disable UnusedMainParameterInspection by default 2020-03-27 16:46:59 +03:00
Mikhail Glukhikh 7bfd354a77 Don't report UNUSED_PARAMETER in main from object #KT-37718 Fixed 2020-03-27 16:46:59 +03:00
Mikhail Glukhikh cec0f58544 [FIR] Introduce & use toFirLightSourceElement 2020-03-27 16:46:59 +03:00
Mikhail Glukhikh 6a5acc024a [FIR] Rename PSI version of toFirSourceElement 2020-03-27 16:46:59 +03:00
Mikhail Glukhikh b27152f903 Replace some FIR syntax errors with more proper diagnostics 2020-03-27 16:46:59 +03:00
Mikhail Glukhikh 2f63c8a46a [FIR] Enhance diagnostic DSL to be able to use concrete factories
Before this commit, things like DiagnosticFactory0<KtDeclaration>
were effectively unusable.
2020-03-27 16:46:58 +03:00
Dmitriy Novozhilov a1d81aa15f [FIR-TEST] Fix diff between FIR and old FE testdata 2020-03-27 16:39:02 +03:00
Georgy Bronnikov b0d96eb140 Revert "Workaround for KT-37302"
This reverts commit ae208f58a4.
Issue fixed, workaround no longer needed.
2020-03-27 14:19:45 +03:00
Dmitry Savvinov cd440841a5 Fix regex in KotlinPluginCompatibilityVerifier to support release and milestones 2020-03-27 13:30:36 +03:00
Dmitry Savvinov dfaebf3cdb Minor: make KotlinPluginVersion public 2020-03-27 13:30:36 +03:00
FenstonSingel b7d8e879a6 [FIR] Support 4 diagnostics for pairs of modifiers
In particular, this commit includes:
* Attempt to abstract access to FirSourceElement via FirModifier
* Add more visit functions to DeclarationCheckersDiagnosticComponent
* Add messages+factories for 4 modifier-related errors and warnings
* Introduce FirModifierChecker
2020-03-27 12:34:29 +03:00
Yaroslav Chernyshev 311a91af79 Fix: forgot to write services for 191 2020-03-27 11:54:10 +03:00
Vladimir Dolzhenko 674f1d129f Clean up of plugin-common.xml and convert components to services 2020-03-27 07:54:14 +00:00
Roman Artemev 87006036be [IR] Forbid unbound type parameters 2020-03-27 10:52:33 +03:00
Roman Artemev 6e01ec8dd3 [IR] Fix translation of synthetic generic java properties
- Compute substituted accessor descriptor to avoid unbound type parameters
2020-03-27 10:52:33 +03:00
Roman Artemev 4bebfd33b9 [IR] Fix unbound type parameter symbol for jvm corner cases 2020-03-27 10:52:33 +03:00
Dmitriy Novozhilov 48fb279721 [FIR] Add constraint to flexible type for declared argument for java parameter 2020-03-27 10:17:12 +03:00
Dmitriy Novozhilov 3acb64c536 [FIR] Add flexible default upper bound for java type parameters 2020-03-27 10:17:12 +03:00
Dmitriy Dolovov c23a11a6fc Refactoring: Clean-up usage of KlibMetadataFactories 2020-03-27 13:12:01 +07:00
Dmitriy Dolovov 36988cf15c Refactoring: Keep predefined K/N targets inside of KonanTarget.Companion 2020-03-27 13:11:46 +07:00