Commit Graph

63073 Commits

Author SHA1 Message Date
Victor Petukhov ea59ea8aa2 NI: avoid creating useless captured types during incorporation
^KT-37546 Fixed
2020-03-19 12:47:03 +03:00
Victor Turansky e34dd27a34 KT-37240 Use extension "extension" 2020-03-19 11:55:24 +03:00
Victor Turansky 90c993334f KT-37240 Deterministic order for webpack config patches
Additional fix - only files with `js` extension processed (directories excluded)

`listFiles()` already contains 'is directory' check. Duplicated check removed
2020-03-19 11:55:24 +03:00
Pavel Punegov 8ffb63ca6b Ignore test that relies on hashCode implementation 2020-03-19 11:14:58 +03:00
Jinseong Jeon 2352b1fec5 JVM_IR: use fresh source map when generating lambda body for inline. 2020-03-19 08:28:38 +01:00
pyos 72b80ef158 Detect inline cycles faster
E.g. in the following code

    fun x() {}
    inline fun f() { x(); g() }
    inline fun g() { x(); f() }

the old implementation of inline cycle detection bailed out after
generating 3 calls of x() in each function, while the new one stops
after 2. In other words, code generation for a single function is no
longer reentered.
2020-03-19 08:13:19 +01:00
Dmitriy Novozhilov 39372c06cf [FIR] Move all checkers and theirs infrastructure to separate module 2020-03-19 09:51:01 +03:00
Dmitriy Novozhilov cc07ae96b3 [FIR-TEST] Move analysis tests to separate module 2020-03-19 09:51:01 +03:00
Dmitriy Novozhilov 3a479d5d16 [FIR-TEST] Move FIR ide tests to separate module 2020-03-19 09:51:00 +03:00
Vyacheslav Gerasimov bcefa68df0 Always checkout/checkin text files with lf endings
Different line endings on linux/windows prevents gradle from reusing
build cache since endings make task inputs completely different between
systems
2020-03-18 22:33:15 +03:00
Vyacheslav Gerasimov 7dc24a13e4 Build: Make ProGuard task cacheable
Exclude jdk files form libraries input. Instead add jdk major version
to inputs. JavaCompile task acts same to ignore fluctuations in JDK
implementations since api should remain same
2020-03-18 22:32:07 +03:00
Jiaxiang Chen 03613d4708 JVM_IR: preserve old backend's logic for special mutable collection class stub methods 2020-03-18 19:28:04 +01:00
Ilya Chernikov da1009eb2c Avoid type approximation on generating equality constraints
#KT-37389 fixed
2020-03-18 18:34:09 +01:00
Ilya Chernikov 950ab01596 Avoid substitution and type approximation for simple calls
#KT-37392 fixed
2020-03-18 18:34:09 +01:00
Vladimir Dolzhenko e1ae81e0a1 Run inspections after completion of general highlight pass in 201
#KT-37553 Fixed
2020-03-18 18:08:54 +01:00
Vladimir Dolzhenko 3cdcdbf6a8 Register Kotlin specific highlight passes via highlightingPassFactory in 193+ 2020-03-18 18:08:54 +01:00
Vladimir Dolzhenko 2e20cdf2e6 Update to 201.6487-EAP-CANDIDATE-SNAPSHOT 2020-03-18 18:08:54 +01:00
Mikhail Glukhikh d0319d6b31 [FIR2IR] Use FirSourceElement.elementType instead of PSI 2020-03-18 17:09:37 +03:00
Mikhail Glukhikh 26a63a45ee Introduce FirSourceElement.elementType 2020-03-18 17:09:37 +03:00
Mikhail Glukhikh 25ab863af7 Add FlyweightCapableTreeStructure to FirLightSourceElement & use it 2020-03-18 17:09:37 +03:00
Mikhail Glukhikh 59fb96503c Introduce FirModifierList 2020-03-18 17:09:37 +03:00
Mikhail Glukhikh 6739135d17 [FIR2IR] Add pre-caching of built-in classes to avoid their duplications 2020-03-18 17:09:37 +03:00
Mikhail Glukhikh 0bf4cac601 [FIR2IR] Unmute additional black box test after rebase 2020-03-18 17:09:37 +03:00
Mikhail Glukhikh 95108a1bce [FIR2IR] Enable type parameter index >= 0 requirement 2020-03-18 17:09:36 +03:00
Mikhail Glukhikh 0f0e5e603d [FIR2IR] Use IR built-in types, their symbols & constructors directly 2020-03-18 17:09:36 +03:00
Mikhail Glukhikh 90f6af24f4 [FIR2IR] Remove unnecessary isBound checks in call generator 2020-03-18 17:09:36 +03:00
Mikhail Glukhikh 1036d8a35a [FIR] Provide dispatch receiver for 'field' synthetic variable 2020-03-18 17:09:36 +03:00
Mikhail Glukhikh 049bc6a431 [FIR2IR] Minor: extract variable 2020-03-18 17:09:36 +03:00
Mikhail Glukhikh 51c83e5f62 [FIR2IR] Move delegating constructor call to body start 2020-03-18 17:09:36 +03:00
Mikhail Glukhikh 10c2aa1657 [FIR2IR] Set origin properly for set field / variable 2020-03-18 17:09:35 +03:00
Mikhail Glukhikh c0f8be5d4e [FIR2IR] Generate setter call for assignments, if any 2020-03-18 17:09:35 +03:00
Mikhail Glukhikh 53cb9035b6 [FIR2IR] Use backing field to read property if no getter 2020-03-18 17:09:35 +03:00
Mikhail Glukhikh b6fdd6197a [FIR2IR] Extract CallGenerator from the main visitor 2020-03-18 17:09:35 +03:00
Mikhail Glukhikh 5357e7b3ab [FIR2IR] Extract ClassMemberGenerator from the main visitor 2020-03-18 17:09:35 +03:00
Mikhail Glukhikh 63aa5191da Move Fir2IrFakeOverrideGenerator to 'backend.generators' package 2020-03-18 17:09:35 +03:00
Mikhail Glukhikh 8f27129c36 [FIR2IR] Introduce & use components storage 2020-03-18 17:09:35 +03:00
Mikhail Glukhikh 175145ce4e [FIR2IR] Extract separate classifier storage from declaration storage 2020-03-18 17:09:34 +03:00
Dmitry Gridin 95b77f6386 AddJvmOverloadsIntention: disable for annotation classes
#KT-36482 Fixed
2020-03-18 13:51:56 +00:00
Valentin Kipyatkov 084276ef1f Suppress suggested refactoring for unused private and local declarations 2020-03-18 15:16:04 +02:00
Valentin Kipyatkov e95d1c1224 Do not suggest to update usages on renaming duplicated method or property 2020-03-18 15:16:04 +02:00
Valentin Kipyatkov 395ba7d008 Using new API 2020-03-18 15:16:04 +02:00
Dmitry Gridin 7a3f6f5312 Formatter: fix continuation indent in call chain
#KT-37545 Fixed
2020-03-18 12:37:28 +00:00
pyos 2c06503311 JVM_IR: partially fix inline methods using captured crossinline lambdas
The fields containing crossinline lambdas should be package-private to
avoid generating synthetic accessors, which break object regeneration.

Note that the inline methods cannot actually be called, as call sites
will attempt to read the captured lambda from a field through a *copy*
of the local containing the object, so these reads will not be inlined,
causing an exception at runtime:

    inline fun f(crossinline g: () -> Unit) = object : I {
        inline fun h() = g()
        // effectively `val tmp = this; return tmp.$g()`:
        override fun run() = h()
    }

    f {}.run() // NoSuchFieldError: $g

This particular example can be fixed by reusing locals for receiver
parameters in IrInlineCodegen, but explicitly assigning `this` to
another variable and calling an inline method on it will break it again.
(This is only applicable to the JVM_IR backend, as the non-IR one fails
to generate `f` at all for some other reason.)
2020-03-18 13:13:54 +01:00
Dmitry Petrov dd27b3d4f1 KT-36973 Keep private default interface members private 2020-03-18 14:18:47 +03:00
Dmitry Petrov 1c24a97b9e KT-36972 Don't create proxies for companion @JvmStatic $default in host
When creating proxy functions in a host class for @JvmStatic members of
companion object, skip functions for default parameters handling.
2020-03-18 13:33:56 +03:00
Yan Zhulanow 897c48f97e Add more robust check for plugin application order (KT-37245)
Cause build to fail if the 'kotlin-kapt' plugin is applied before the
  main Kotlin plugin ('kotlin' or 'kotlin-android').
  The 'logger.error()' prints an error message, however the build
  continues.
2020-03-18 18:26:17 +09:00
Alexander Podkhalyuzin 0247a300d1 Experimental features EP + completion.stats optional dependency
Fixed tests for Spring
2020-03-18 12:21:11 +03:00
Dmitriy Novozhilov f85022532d [FIR] Rename FirArraySetCall to FirAugmentedArraySetCall 2020-03-18 11:31:54 +03:00
Dmitriy Novozhilov 2b986194fb [FIR] Add desugaring of array assignments and resolve of it
#KT-37516 Fixed
2020-03-18 11:31:53 +03:00
Mikhail Glukhikh 26f919df03 Fix some nullable usages of not-null type parameters (KT-36770) 2020-03-18 10:24:26 +03:00