Commit Graph

59440 Commits

Author SHA1 Message Date
Ilya Goncharov ad09492eb0 [Gradle, JS] Migrate on only name-version npm dependencies
#KT-32179 fixed
2019-11-26 16:05:17 +03:00
Ilya Goncharov 95b56e10b4 [Gradle, JS] Activate root npm dependency declaration for multiplatform 2019-11-26 16:04:37 +03:00
Ilya Goncharov 5397023f71 [Gradle, JS] Add Groovy Closure support 2019-11-26 16:04:37 +03:00
Ilya Goncharov 028c73d959 [Gradle, JS] Add compatible operators for npm dependencies 2019-11-26 16:04:37 +03:00
Ilya Goncharov 26cd392a9a [Gradle, JS] First steps for npm dependencies in root 2019-11-26 16:04:37 +03:00
Ilya Goncharov f73fc5199b [Gradle, JS] Mute testWeb false positive test 2019-11-26 16:03:26 +03:00
Ilya Goncharov be5b8c1bdb [Gradle, JS] Mute false positive test for MPP JS-JVM 2019-11-26 16:03:26 +03:00
Dmitry Gridin b40a888f1d Formatter: fix line break between declarations with annotations
#KT-35093 Fixed
#KT-35106 Fixed
2019-11-26 19:40:51 +07:00
Dmitry Gridin bfd539d5d1 Formatter: fix line break between declarations with comment
#KT-12490 Fixed
#KT-35088 Fixed
2019-11-26 19:40:51 +07:00
Dmitry Gridin b6b755506c Formatter: support Chop down if long for Chained method calls
#KT-23929 Fixed
#KT-33553 Fixed
2019-11-26 19:40:51 +07:00
Dmitry Gridin 351fef5628 DoubleBangToIfIntention: fix invalid psi tree 2019-11-26 19:40:50 +07:00
Svyatoslav Kuzmich f48ad25626 Advance bootstrap to 1.3.70-dev-1806
Due to updated K/JS klib ABI

(cherry picked from commit bffbe89f53)
2019-11-26 15:39:28 +03:00
Nikolay Krasko 8185c452fe Ignore jarRepositories.xml 2019-11-26 15:39:28 +03:00
Nikolay Krasko 13b0054e0a Fix compilation for service messages tests in 193 branch 2019-11-26 15:39:28 +03:00
Nikolay Krasko 89f26cc89d Minor: Make diff function for AbstractKotlinFoldingTest
~true~ and ~false~ cases left unresolved
2019-11-26 15:39:27 +03:00
Nikolay Krasko 5d6333f0f4 193: Better services registration for parser tests 2019-11-26 15:39:27 +03:00
Leonid Startsev 3d2800f99b Move out symbols that do not depend on a BackendContext to a separate BuiltinSymbolsBase class.
The goal was to be able to use such symbols before BackendContext is even created – in psi2ir postprocessing step (i.e., IR compiler plugins).

Remove old code from serialization ir plugin.
2019-11-26 15:26:35 +03:00
Leonid Startsev 3e18350a1f Rewrite IR plugin infrastructure (and serialization plugin) so it won't emit LazyIR.
LazyIR was emitted because plugin was not able to declare symbols, only to reference them.
Moreover, declarations added by frontend plugin were also unbound symbols produced by psi2ir,
and declaration stub generator was stubbing them with LazyIR – therefore access to global symbol table is not enough for plugins. IrProvider won't help here, because some functions produced by plugin have circular dependencies.

By moving compiler plugins step between psi2ir and declaration stub generator, both problems are resolved
– unbound symbols produced by psi2ir and compiler plugins are declared where they would be declared if this was a user code,
and only unbound symbols left are external dependencies, which is a correct input for lazy ir.
2019-11-26 15:26:28 +03:00
Nicolay Mitropolsky e4d0d450ab Uast: keeping annotations from sources in non-light-methods backed UMethods (KT-27806) 2019-11-26 15:13:40 +03:00
Nicolay Mitropolsky 833571d8b2 Uast: tests for suspend and DeprecationLevel.HIDDEN functions appears in Uast tree (KT-27806, KT-32031) 2019-11-26 15:13:40 +03:00
Nicolay Mitropolsky 2772659ed2 Uast: Uast produces reified methods on his own because light-classes doesn't (KT-34316) 2019-11-26 15:13:40 +03:00
Nicolay Mitropolsky 9c18df61ca Uast: KotlinUMethod and KotlinUAnnotationMethod are separated (KT-30489) 2019-11-26 15:13:40 +03:00
Anton Bannykh 9fec2c78d1 JS IR: apply forLoopsLowering
Replaced createTemporaryVariable usages with createTmpVariables.
The latter doesn't rely on KotlinType's. Using KotlinType with
JS_IR backend causes runtime excpetions, as some expected descriptor
API is not implemented, because it avoids descriptors as much as
possible.
2019-11-26 15:08:10 +03:00
Jiaxiang Chen 0ea407fef9 debug information test: handle vm resume correctly. 2019-11-26 14:52:58 +03:00
Toshiaki Kameyama 251899c31a Fix bad indentation when copy-paste to trimIndent()
#KT-33888 Fixed
2019-11-26 18:00:38 +07:00
Mikhail Glukhikh 178dbd3c5d Remove hacky re-initialization of PsiSubstitutor.KEY (branch 193)
After IDEA commit
https://github.com/JetBrains/intellij-community/commit/8b0af117241a074f5681fa93be74c6f1812497ba#diff-9b39aafa0a7b8d4f089100f3968931d0
this re-initialization is no more necessary. Moreover, it's harmful,
because this KEY is used as a map key in IDEA code,
and we cannot find information stored by this key.
This was a hidden reason of FIR / IR test failures in branch 193.

After this commit, FIR / IR tests in branch 193 should be fixed
2019-11-26 13:13:48 +03:00
Anton Bannykh 81699299f5 JS_IR: DCE
Could be enabled by toggling `-Xir-dce`

Box test output in js/js.translator/testData/out-min
2019-11-26 12:20:39 +03:00
Roman Golyshev faf4c05fc8 KT-34644 Give return keyword more priority in completion where appropriate
- See `returnExpressionItems::returnIsProbableInPosition` to get an idea where return is supposed to be more appropriate
  - End of the block (except for top level block of unit function or cycle) or as single expression in if or when
  - Right side of the elvis operator (which is not already in return)
- Add additional `probable_keyword` weigher to signalize about probable keyword (for now it is only for `return`)
- ^KT-34644 Fixed
2019-11-26 11:56:32 +03:00
Roman Golyshev de11b4cb64 KT-34644 Refactor CompletionUtils::returnExpressionItems
- Collecting `return` lookups to `blockBodyReturns` will later allow to modify them to increase priority in the completion
2019-11-26 11:56:19 +03:00
Pavel Kirpichenkov cf82efb49f [NI] Add missing diagnostic on callable references in fake calls
Unresolved reference diagnositc was not reported on callable references
returned from if or when expression because of additional block wrapper.

^KT-30953 Fixed
2019-11-26 11:02:25 +03:00
Mikhail Zarechenskiy eb73650209 Fix race in IDE: inject proper storage manager for type parameters
With NO_LOCKS strategy we can easily end up in a situation when
 constraint system for a generic call is built incorrectly,
 producing flaky errors (or don't produce errors at all)

 Now proper storage manager is injected for all cases except:
 - IR
 - Codegen
 - Serialization plugin
 - Fake local objects

 Most likely, NO_LOCKS strategy for these cases is fine as at that point
 the compiler works in one thread

 #KT-34786 Fixed
2019-11-26 10:52:45 +03:00
Mads Ager 399667a434 JVM_IR: Implement data class array member intrinsics. 2019-11-25 19:00:31 +01:00
Svyatoslav Kuzmich ea8ade0852 [JS] Refactor and comment for typeOf fix 2019-11-25 20:25:03 +03:00
Svyatoslav Kuzmich dc336c3c8a [JS] Add marker function getReifiedTypeParameterKType to runtime
So compiler bugs would produce a nicer error message instead of:
"TypeError: getReifiedTypeParameterKType is not a function"
2019-11-25 20:25:03 +03:00
Svyatoslav Kuzmich 600fb723f4 [JS] Fix typeOf for some reified type parameters
Fix getting kType metadata in cases when corresponding jsClass value
is passed through temporary variable.
This can happen when jsClass expression is not consided trivial by
local variable optimizer. This happens for object declarations from
different modules, for example kotlin.Unit
2019-11-25 20:25:02 +03:00
Roman Artemev c4d993d14c [KLIB] Fix top level property index. Include const properties as well. 2019-11-25 20:22:04 +03:00
Roman Artemev 1e4f8b2946 [JS IR] Do not forbid typeOf inlining if it is not required 2019-11-25 20:22:03 +03:00
Roman Artemev 2e22ddba39 [JS IR] Fix annotation constructor body generation 2019-11-25 20:22:03 +03:00
Roman Artemev c5e25a0382 [JS IR] Make PrivateMembersLowering global to handle inlined private references correctly
- Fixes [KT-33334]
2019-11-25 20:22:03 +03:00
Roman Artemev 9946feb66c [JS IR] Fix name clash between class members defined on prototype
- Fixes [KT-33327]
2019-11-25 20:22:03 +03:00
Roman Artemev 987c6ab3ee [JS IR] Roll making Char inline class back
- un/mute falling tests
2019-11-25 20:22:03 +03:00
Leonid Startsev b9ac1341ff Export generic serializer constructor from JS module
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/609
2019-11-25 20:06:15 +03:00
Leonid Startsev 73b9d2466a Do not report 'Missing @Serializable on enum with @SerialInfo' if enum
has custom serializer

#KT-34991 Fixed
2019-11-25 20:06:14 +03:00
Mads Ager 98ceee784a JVM_IR: More special bridge rewriting.
If there is an existing method that will have its argument types
remapped to boxed types, make sure to reflect that in the IR so
that code will be generated for a boxed value instead of a
primitive value.
2019-11-25 17:37:57 +03:00
Ilya Kirillov f368d9761a Fix for loop conversion when multiple initializers are present
#KT-35074 fixed
2019-11-25 17:01:46 +03:00
Ilya Chernikov b73625ad9e Switch main-kts to the updated resolvers infrastructure 2019-11-25 14:46:32 +01:00
Ilya Chernikov baec10fb40 Update apache ivy version to 2.5.0
#KT-34893 fixed
2019-11-25 14:46:32 +01:00
Ilya Chernikov 4234c5ec31 Fix ivy resolver: deps config and maven repos:
Transitive dependencies weren't fetched properly in some cases, because of the two problems:
- missing dependency configuration for the root dependency
- using URLResolver for the maven-based (IBiblio) resolvers

Also adding resolver name for easier debugging.
2019-11-25 14:46:32 +01:00
Dmitriy Novozhilov 5e5038416e Revert "tmp"
This reverts commit 3e336913
2019-11-25 16:20:06 +03:00
Dmitriy Novozhilov 3e336913b6 tmp 2019-11-25 14:44:46 +03:00