Commit Graph

63064 Commits

Author SHA1 Message Date
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
Denis Zharkov a2e7b6d20e FIR: Do not add "field" to accessor of a property with receiver 2020-03-18 10:22:10 +03:00
Dmitry Petrov ade18d144a KT-36810 Implement javaPrimitiveType intrinsic in JVM_IR 2020-03-17 22:56:45 +03:00
Dmitry Petrov 2851fab281 KT-36809 Implement javaObjectType intrinsic in JVM_IR 2020-03-17 22:56:45 +03:00
Mikhail Bogdanov aecd12fa12 Minor. Regenerate tests 2020-03-17 19:05:12 +01:00
pyos 2e542da91d JVM_IR: fix accesses from crossinline lambdas in other packages again 2020-03-17 16:38:32 +01:00
Denis Zharkov 7a1eb9214d FIR: Fix resolution for lambda returning resolved qualifier 2020-03-17 16:33:48 +03:00
Denis Zharkov e1312a752a FIR: Allow a field override another field with the same name 2020-03-17 16:33:48 +03:00
Denis Zharkov 7203499b7a FIR: Fix visibility check for protected within a companion 2020-03-17 16:33:48 +03:00
Denis Zharkov 170978a4f1 FIR: Move fixed tests from problems directory to common 2020-03-17 16:33:48 +03:00