Commit Graph

62171 Commits

Author SHA1 Message Date
Ilya Goncharov 1bebcd398e [Gradle, JS] Move JsCompilerType to Gradle Plugin API 2020-02-20 19:32:31 +03:00
Ilya Goncharov 82d31adb24 [Gradle, JS] Remove js compiler property from MPP plugin 2020-02-20 19:32:31 +03:00
Ilya Goncharov 4af389ba92 [Gradle, JS] Rename target on js in case of single platform 2020-02-20 19:32:31 +03:00
Mikhail Glukhikh 285f613ef7 [FIR TEST] Add test with unresolved member in nested lambdas (KT-36887) 2020-02-20 19:25:50 +03:00
Zalim Bashorov 6f61ea7f67 [JS DCE] Add an ability to define overwriting strategy when copying dependencies in dev-mode
* CLI option "-Xdev-mode-overwriting-strategy"
* System Property "kotlin.js.dce.devmode.overwriting.strategy"

Possible values: "older", "all".

#KT-36349 Fixed
2020-02-20 19:10:29 +03:00
Pavel Kirpichenkov 07ca355af8 [NI] Fix smartcasts for conventional contains in when
Call argument for conventional `contains` after expanding `in` may come from a `when` subject during its branch analysis.
In this case data flow info from a previous when branch was not considered,
because data flow info for subject had been used instead of data flow before argument.
Use of the latter one for the conventional `contains` solves the issue.

The old FE uses `isExternal` property of value arguments to skip smartcast reporting on `when` subject,
if they come from branches. To prevent undesired smartcasts on `when` subject after branch analysis in the new FE,
`isExternal` arguments are skipped in diagnostic reporter and during recorded type update.

Also, the new FE interprets `isExternal` completely differently from the old FE.
In the old FE this property is used exclusively by `when` with subject.
In the new FE it is also used for parially resolved calls, lambda return arguments and receivers.
This may be preventing the use of data flow info before argument in the first place, but this assumption requires additional investigation.

^KT-36818 Fixed
2020-02-20 19:07:54 +03:00
Abduqodiri Qurbonzoda afceec71a4 Create an interface with provideDelegate() method #KT-26494 2020-02-20 18:57:52 +03:00
Abduqodiri Qurbonzoda 2566fbea87 toMutableList documentation is vague #KT-35231 2020-02-20 18:52:10 +03:00
Abduqodiri Qurbonzoda f9ee1dc22d Specify which element Iterable.distinctBy(selector) retains #KT-36356 2020-02-20 18:50:13 +03:00
Mikhail Glukhikh fb49a586ef FIR2IR: add comment about type parameter indexes 2020-02-20 18:34:52 +03:00
Mikhail Glukhikh 984a11995a FIR2IR: pre-cache type parameters before property creation
Type parameters can be referred from e.g. property accessors,
so we should determine them earlier to be able to set their indexes
2020-02-20 18:34:52 +03:00
Mikhail Glukhikh a3f676317f FIR2IR: pre-cache type parameters before function creation
Type parameters can be referred from e.g. function return type,
so we should determine them earlier to be able to set their indexes
2020-02-20 18:34:51 +03:00
Mikhail Glukhikh 899d471646 FIR2IR: determine type parameters before class super types
Type parameters can be referred from type arguments of super types,
so we should determine them earlier to be able to set their indexes
2020-02-20 18:34:51 +03:00
Mikhail Glukhikh 8c21f04bf4 FIR2IR: determine type parameters before value parameters
Type parameters can be referred from value parameters,
so we should determine them earlier to be able to set their indexes
2020-02-20 18:34:51 +03:00
Mikhail Glukhikh 334cab7357 [FIR] Don't build redundant fake overrides for private members
The only case we may need fake override for private members is
a situation when class refers itself with different type arguments.
So in this commit we forbid such fake overrides when we can prove
that class does not refers itself here.
2020-02-20 18:34:51 +03:00
Mikhail Glukhikh b4d026f5bf [FIR] Add fast return from substitution scope when substitutor is empty 2020-02-20 18:34:50 +03:00
Mikhail Glukhikh a6d11b0207 [FIR] Don't create redundant substitution scopes 2020-02-20 18:34:50 +03:00
Mikhail Glukhikh 01053c938a Generate IGNORE_BACKEND_FIR in black box tests properly 2020-02-20 18:11:43 +03:00
Mikhail Zarechenskiy d921dd0eed Provide candidate interceptor for NI infrastructure 2020-02-20 18:07:12 +03:00
Igor Yakovlev 4693d595b7 Fix UL classes tests
Fixed #KT-36717
2020-02-20 18:03:10 +03:00
Sergey Igushkin f47e602118 Use Kotlin/Native version 1.4-dev-14579, as it has the newest klib ABI 2020-02-20 17:48:24 +03:00
Mikhail Glukhikh ace5d0357c [FIR TEST] Add problematic test describing KT-36881 2020-02-20 17:38:31 +03:00
Konstantin Tskhovrebov 018cfc7df6 Fix class name for test suite descriptor.
Issue #KT-36725 Fixed
Issue #KT-36716 Fixed
Issue #KT-36726 Fixed
2020-02-20 17:37:06 +03:00
Roman Golyshev 1dbb3d7c0f Revert "New J2K: fix testdata"
This reverts commit 285aa123
2020-02-20 17:33:39 +03:00
Roman Golyshev 4042214bb2 Fix tests broken by enhanced RedundantSamConstructor inspection
- The inspection now works in more cases, so the test data had to be
updated accordingly
2020-02-20 17:27:41 +03:00
Dmitriy Novozhilov 22a5bc4144 [FIR-TEST] Add build tasks for running all fir tests
- `:firCompilerTest` run all compiler fir tests
- `:idea:firTest` run all IDE fir tests
- `:firAllTest` run all fir tests
2020-02-20 16:56:34 +03:00
Dmitriy Novozhilov 82c960d40d [FIR-TEST] Run fir test in diagnostic test if fir testdata is missing 2020-02-20 16:56:34 +03:00
Dmitriy Novozhilov d4d4697202 [FIR-TEST] Fix creating dirs in FirLoadCompiledKotlin test 2020-02-20 16:56:34 +03:00
Dmitriy Novozhilov 3edbf7f541 [FIR-TEST] Move abstract diagnostics tests to tests-common module 2020-02-20 16:56:34 +03:00
Dmitriy Novozhilov 102d5c7d5a [NI] Fix detecting expected type variable for postponed atoms
#KT-36819 Fixed
2020-02-20 16:56:33 +03:00
Vladimir Dolzhenko 7e832e50ac Move copy/paste resource bundles to Kotlin
#KT-36877 #EA-224686 Fixed
2020-02-20 14:06:11 +01:00
Dmitry Petrov bc7c8e4819 Update bytecode text tests for JVM_IR 2020-02-20 14:59:29 +03:00
Yan Zhulanow 7581e0bd8e Unmute noParametersArgumentCallInExpression test in JVM IR backend 2020-02-20 20:56:36 +09:00
Juan Chen 9dd8eda1c9 [FIR]: fix library methods in packages
Library methods such as 'listOf' are resolved
to have the package fragments as their parents,
but JVM expects their containing file classes as parents.
This fix generates those file classes and
uses them as parent replacements for such library methods.
2020-02-20 14:24:02 +03:00
Dmitry Petrov 81b30b7399 Update bytecode text tests for JVM_IR 2020-02-20 14:20:21 +03:00
Denis Zharkov 071149e0fb Fix exception when Java class has different methods with same erasure
^KT-36856 Fixed
2020-02-20 14:06:13 +03:00
Vladimir Ilmov 7efb32628e [Highlight] Fix for coloring annotation attributes in Kotlin
#KT-36156 Fixed
2020-02-20 11:51:42 +01:00
Vladimir Ilmov 8d4dac398d [COROUTINE] Information message added if breakpoint policy doesn't suspended all
threads.
2020-02-20 11:51:42 +01:00
pyos eff02b6e72 JVM_IR: improve suspend tail call detection.
* TailCallOptimizationLowering should go into local classes in order to
   transform their suspend methods;
 * the check for invokes of noinline lambda arguments in codegen was
   incorrect, as it also returned true for calls of lambdas stored in
   local variables;
 * IrInlineCodegen should mark non-inlinable arguments used as inline
   suspend parameters;
 * detection of suspend/inline call sites was incorrect (or maybe it's
   the `compilationContextDescriptor` that was incorrect?..)
2020-02-20 11:10:26 +01:00
Steven Schäfer 3cf71c1d2b JVM IR: Move $assertionsDisabled field to interface DefaultImpls 2020-02-20 11:07:46 +01:00
Steven Schäfer 0ed719f792 JVM IR: Use package visibility for $assertionsDisabled field 2020-02-20 11:07:46 +01:00
Mikhail Zarechenskiy d169435300 Fix construction of Mock classes in case of generic inner types
This fixes testMissingDependencyConflictingLibraries for NI and also
 fixes changed test for OI as well
2020-02-20 12:34:35 +03:00
Mikhail Zarechenskiy 83824d0ba6 [NI] Don't stop on a candidate with unstable smartcast error
#KT-36847 Fixed
2020-02-20 12:34:34 +03:00
Mikhail Zarechenskiy 162a2d5851 [NI] Add test to check how behavior will be changed after few commits 2020-02-20 12:34:34 +03:00
Sergey Igushkin 0e970407a4 Fixup for 9b861739 (the fix for KT-35942)
* Don't include the JS friend paths into the classpath
* Fix binary compatibility with Gradle < 5.1

Issue #KT-35942
2020-02-19 23:10:53 +03:00
Mikhail Glukhikh 3921613956 [FIR] Code cleanup: DeclarationsConverter 2020-02-19 22:47:59 +03:00
Mikhail Glukhikh 5d7999a808 [FIR] Handle explicitly private sealed class constructors properly
#KT-36850 Fixed
2020-02-19 22:41:24 +03:00
Mikhail Glukhikh 17b473fcb6 FirTowerResolver: code cleanup 2020-02-19 22:41:24 +03:00
Mikhail Glukhikh f1a418373c RawFirBuilder: code cleanup 2020-02-19 22:41:24 +03:00
Mikhail Glukhikh e66d6a8954 [FIR] ClassWrapper: code cleanup 2020-02-19 22:41:24 +03:00