Commit Graph

52172 Commits

Author SHA1 Message Date
Yan Zhulanow 5c419fc629 Evaluator: New implementation for variable finder
Support both old and new receiver variable conventions in variable finder.
2019-02-25 14:43:53 +03:00
Yan Zhulanow df7bbf707b Refactoring: Rename a function to 'getArgumentsForEvaluation()' 2019-02-25 14:43:53 +03:00
Yan Zhulanow ea462091c4 Support new convention for local variables name mangling: '$receiver' -> '$this$<label>' (KT-26913) 2019-02-25 14:43:53 +03:00
Yan Zhulanow b5f9149702 Minor: Get rid of some magic constants 2019-02-25 14:43:53 +03:00
Ilya Chernikov b1ab2ead61 Restore find script definition behaviour (mostly) and relevant comments broken with refactoring 2019-02-25 11:57:13 +01:00
Nicolay Mitropolsky 6b792c36f0 KotlinUastApiTest: using kfail alias 2019-02-25 12:26:22 +03:00
Nicolay Mitropolsky 712c897472 Uast: fix for UVariables missing typeReferences 2019-02-25 12:26:21 +03:00
Nicolay Mitropolsky 98740138f3 Uast: yet another check for invalid context before resolve (EA-137191, EA-137193) 2019-02-25 12:26:21 +03:00
Nicolay Mitropolsky bd0c6736ce Uast: implementing specific javaPsi for UVariables 2019-02-25 12:26:21 +03:00
Nicolay Mitropolsky 7dc818d42b 191: KotlinUastApiTest.kt missed bunch aligning fix 2019-02-25 12:26:21 +03:00
Andrey Uskov 63a1bba6d9 Fix importing compiler arguments if worker api is used #KT-29564 Fixed 2019-02-25 12:20:27 +03:00
Natalia Selezneva 8453c1ff4d Scratch: hide 'make module' checkbox when no module is selected
^KT-23985
2019-02-25 11:20:49 +03:00
Natalia Selezneva e2b5134048 Allow to run scratch without module selected
^KT-23985 Fixed
2019-02-25 11:20:49 +03:00
Natalia Selezneva 8d4ca4d1c5 Scratch: Fix "Read access is allowed from event dispatch thread or inside read-action only"
^KT-28958 Fixed
2019-02-25 11:19:36 +03:00
Dmitry Savvinov ba36fafb84 Create JsAnalyzerFacade with allowSliceRewrite=true
Other facades (JVM, Common, Native) are already created with such flag.
This should stop some known 'rewrite at slice'-exceptions from being
thrown (KT-21405, KT-29705).

For a more thorough investivation and details, refer to KT-30031.

Also, see KT-30030: even though it was fixed by the different commit,
the same scenario probably can be used to investigate other rewrites
(even though they will reproduce much less frequently than original
issue)

^KT-21405 Fixed
^KT-29705 Fixed
2019-02-25 11:10:16 +03:00
Dmitry Savvinov 50d1c013fc Force-resolve body in contract computation under lock
Even though acquire/release pattern guarantees memory visibility across
threads, it doesn't prevents concurrent access to critical section (i.e.
to force-resolve of the corresponding body).

This can lead to multiple resolution passes over one and the same PSI in
IDE, which, in turn, leads to 'rewrite at slice'-exceptions. See
KT-30030 for case description and details.

^KT-30030 Fixed
2019-02-25 11:10:16 +03:00
Dmitry Savvinov 705ec503cf Minor optimization: don't put 'null' for ContractProvider in user data 2019-02-25 11:10:16 +03:00
Dmitry Savvinov 2359944fa7 Minor: add debugName to JS-slices 2019-02-25 11:10:16 +03:00
Mikhail Glukhikh c084eefb65 Fix a bunch of IDE quick-fix tests (related to "convert to run/...")
These actions became available more often some days ago
2019-02-25 10:37:46 +03:00
Dmitriy Dolovov 4ef12b1ed7 CIDR: New way of building CLion and AppCode plugins v2 2019-02-25 14:06:51 +07:00
Mikhail Glukhikh de93aad8aa FIR total resolve in IDE test: fix accidentally wrong project path :( 2019-02-25 09:53:21 +03:00
Mikhail Zarechenskiy 617bed1bf1 Fix nested typealiases expansion and as a result fix serialization
Consider the following situation:
 ```
 class Inv<T>
 typealias A<K> = Inv<K>
 typealias B<V> = Inv<A<K>>

 fun <U> materialize(): B<U> = TODO()
 ```

 Type `B<U>` is expanding to `Inv<Inv<U>>` and for this type `B<U>` and
 `Inv<A<U>>` are abbreviated types, but due to a bug we forgot to make
 substitution for `Inv<A<U>>` and were getting abbreviated type
 `Inv<A<K>>` where `K` is a type parameter from the typealias declaration.

 This bug didn't affect subtyping anyhow but the incorrect type was
 serialized and caused problems during deserialization as there wasn't
 `K` in deserialization context.

 #KT-24964 Fixed
 #KT-20780 Fixed
 #KT-20065 Fixed
 #KT-28236 Fixed
 #KT-21775 Fixed
2019-02-25 00:28:45 +03:00
Stanislav Erokhin f1d5912f05 Update Kotlin/Native: 1.2-rc1-7773 2019-02-23 11:39:10 +03:00
Georgy Bronnikov 67656a447a Add a test 2019-02-23 00:42:16 +03:00
Georgy Bronnikov 3531f47bfb Remove descriptors from ToArrayLowering 2019-02-23 00:42:16 +03:00
Georgy Bronnikov c3652a47c6 Remove descriptors from JvmStaticAnnotationLowering 2019-02-23 00:42:16 +03:00
Georgy Bronnikov 28bab6510e Remove descriptors from JvmOverloadsAnnotationLowering 2019-02-23 00:42:16 +03:00
Georgy Bronnikov f61072873f remove descriptors from createInnerClassConstructorWithOuterThisParameter 2019-02-23 00:42:16 +03:00
Georgy Bronnikov 72ea4cc3d7 Remove descriptors from BridgeLowering 2019-02-23 00:42:16 +03:00
Georgy Bronnikov c9b8f58a10 Restore overriddenSymbols consistency in InterfaceDelegationLowering 2019-02-23 00:42:16 +03:00
Georgy Bronnikov 68f9f4b3b5 Add a test 2019-02-23 00:42:16 +03:00
Georgy Bronnikov cb757f1cbc Remove descriptors from SyntheticAccessorLowering 2019-02-23 00:42:16 +03:00
Georgy Bronnikov 9078cb87e8 Remove descriptors from InitializersLowering 2019-02-23 00:42:16 +03:00
Georgy Bronnikov 5d7a736cb1 Remove desriptors from ObjectClassLowering 2019-02-23 00:42:16 +03:00
Georgy Bronnikov 5f4b8dd0aa Remove descriptors from EnumClassLowering 2019-02-23 00:42:16 +03:00
Ilya Gorbunov 8f6d73fd32 Use JS stdlib merger from bootstrap compiler 2019-02-22 21:22:19 +03:00
Ilya Gorbunov 0a0f81486f Advance bootstrap to 1.3.30-dev-1945 2019-02-22 21:22:07 +03:00
Dmitry Petrov b792f3f12f KT-30020 expressions without resolved calls in augmented assignment LHS
Augmented assignment operator (e.g., '+=') can be resolved to simple
function call ('plusAssign'). In that case, augmented assignment LHS
can be an arbitrary expression, and may have no associated ResolvedCall.

For example:
    (a as MutableList<Int>) += 42

Note that it can happen only in case of augmented assignment operator
convention resolution, because all other forms of assignment-like
operator desugaring require some kind of 'store' operation
(property setter, 'set' operator for array element expression, etc),
and should resolve to some combination of calls.

In that case we simply generate LHS on 'load', and throw assertion on
'store'.
2019-02-22 17:45:27 +03:00
Ilmir Usmanov 1777849ff3 Generate correct linenumber for the debugger to see the return value
of suspend function.

 #KT-20322 Fixed
2019-02-22 17:37:32 +03:00
Nicolay Mitropolsky 9bf55d81ca Making kts-compiler able to dig out the ClassPath from the intellij PluginClassLoader 2019-02-22 13:51:47 +03:00
Ilmir Usmanov ec7315e6da Add $completion entry to suspend functions' LVT
#KT-28810 Fixed
2019-02-22 13:50:35 +03:00
Dmitriy Novozhilov 677987c85f Add diagnostics on annotations on super types. KT-23992 fixed 2019-02-22 10:28:21 +03:00
Dmitriy Novozhilov 1fc6f30c50 Add test for KT-23992 2019-02-22 10:22:19 +03:00
Dmitriy Novozhilov 92bd907983 Fix checking repeatablilty of use-site target annotations. KT-26638 fixed 2019-02-22 10:15:37 +03:00
Dmitriy Novozhilov cfda468f13 Add test for KT-26638 2019-02-22 10:15:37 +03:00
Dmitriy Novozhilov 3e147af3c0 KT-27565 fix 2019-02-22 10:15:16 +03:00
Dmitriy Novozhilov cd2b8839b4 Add test for KT-27565 2019-02-22 10:15:16 +03:00
Ilya Gorbunov eca1af4091 Temporary restore kotlin-stdlib-js-merger for bootstrapping 2019-02-22 02:37:31 +03:00
Ilya Gorbunov 98c6c925fc Move JS stdlib merger into cli compiler module
Refactor: use stdlib function to relativize paths.
2019-02-22 02:37:24 +03:00
Dmitry Gridin b58bfff843 Fix paramTypeLambdaMismatch test 2019-02-21 19:08:02 +03:00