Commit Graph

63359 Commits

Author SHA1 Message Date
Denis Zharkov 4a1302e385 FIR: Add problematic test case
^KT-37318 Open
2020-03-09 12:56:02 +03:00
Denis Zharkov b2ff4d7f9a FIR: Support expansion of flexible type-alias-based types in inference 2020-03-09 12:56:02 +03:00
Denis Zharkov afb84b1d2a FIR: Support type aliased declarations in HtmlFirDump 2020-03-09 12:56:02 +03:00
Victor Petukhov 92a0ddfe71 NI: discard def not null types if they appear in return positions, in inv or in variance
^KT-37343 Fixed
2020-03-08 19:00:27 +03:00
Mark Punzalan 368b0d9b0b [JVM IR] Use reference equality when comparing enums. 2020-03-06 23:01:32 +01:00
Mark Punzalan a732e8f5fe [JVM IR] Ensure there is one accessor for each super access from a
subclass when there are multiple subclasses in a file.
2020-03-06 22:59:52 +01:00
Steven Schäfer 34fb636904 JVM: Generate generic signatures for delegate fields 2020-03-06 21:51:30 +01:00
pyos 20ea77d55d JVM_IR: refactor ToArrayLowering and make matching more precise
* If `toArray` is inherited from Java, it may take an argument or
    return a value of a flexible type, which looks nullable in IR;
  * The returned array may also have `out` variance of the type
    argument;
  * `Array<T>` is not the same as `Array<Any?>` if `T` is neither `Any`
    nor `in Something`, so presence of `toArray(): Array<T>` does not
    mean we don't need to generate a new `toArray`.
2020-03-06 18:33:25 +01:00
Alexander Udalov a2b6282d49 Refactor ApiVersion.KOTLIN_1_4 usages in relation to unified null checks 2020-03-06 16:55:55 +01:00
Alexander Udalov 98aecbef6b Optimize runtime representation for callable reference subclasses
Instead of generating overrides for getOwner/getName/getSignature in
each anonymous class representing a callable reference, pass them to the
superclass' constructor and store as fields. This occupies some small
memory but helps to reduce the size of the generated class files, and
will be helpful for adding further runtime information to callable
references, such as information about implicit conversions this
reference has been subject to.

Represent owner as java.lang.Class + boolean instead of
KDeclarationContainer, so that the unnecessary wrapping Class->KClass
wouldn't happen before it's needed, and also to make sure all callable
references remain serializable.

Note that the argument type where the "is declaration container a class"
is passed is int instead of boolean. The plan is to pass the
aforementioned implicit conversion information as bits of this same
integer value.

 #KT-27362 Fixed
2020-03-06 16:55:07 +01:00
Alexander Udalov 8d7c8672ac Generate reference to existing class for builtin function references
Instead of non-existing `kotlin.KotlinPackage`, which led to
NoClassDefFoundError as soon as reflection tried to call getOwner on a
builtin callable reference, use a reference to a new physical class
`kotlin.jvm.internal.Intrinsics$Kotlin`. This will allow to support
KT-17151.

Note that for API version less than 1.4, this will still lead to
NoClassDefFoundError, but this is not worse than the current situation
where it happens anyway.
2020-03-06 16:55:05 +01:00
simon.ogorodnik bfa371ea73 [FIR] Rewrite casts to reduce performance dispersion 2020-03-06 18:13:00 +03:00
simon.ogorodnik 426f498e87 [FIR] Forking runner for modularized test 2020-03-06 18:12:59 +03:00
Dmitriy Novozhilov 63a1e7c6ff [FIR] Add test for #KT-37321 2020-03-06 18:10:52 +03:00
Dmitriy Novozhilov 92449d6d9b [FIR] Organize code for postponed arguments 2020-03-06 18:10:52 +03:00
Dmitriy Novozhilov 1c0fd7342f [FIR] Support completion of lambdas with type variable as expected type
#KT-37310 Fixed
#KT-37304 Fixed
2020-03-06 18:10:52 +03:00
Dmitriy Novozhilov 643d7be12d [FIR] Add base class for PostponedResolvedAtomMarker to FIR 2020-03-06 18:10:51 +03:00
Dmitriy Novozhilov 2a58fc238f [FIR-TEST] Move stdlib tests for delegates to separate directory 2020-03-06 18:10:51 +03:00
Dmitriy Novozhilov 3655f0c499 [FIR-TEST] Move fixed test from problems directory 2020-03-06 18:10:51 +03:00
pyos 037b442e86 JVM_IR: do not explicitly initialize Refs to default values 2020-03-06 17:58:36 +03:00
pyos 13b04e63be JVM_IR: wrap inline class objects in unboxed refs 2020-03-06 17:58:36 +03:00
pyos 68745ec43f JVM_IR: refactor JvmSharedVariablesManager 2020-03-06 17:58:35 +03:00
Dmitriy Dolovov ed96b81a42 [Commonzer] Fix ISE during commonization, improve interner performance
Issue #MMPP-191
2020-03-06 21:44:58 +07:00
Ilya Goncharov 7da220b0a2 [Gradle, JS] Check current chosen js compiler for targets in JS and MPP 2020-03-06 17:26:48 +03:00
Ilya Goncharov a1263e445e [Gradle, JS] Add redundant methods for single js plugin 2020-03-06 17:26:48 +03:00
pyos 8487211ae1 JVM_IR: refine the condition for mangling names of multifile members
Private $$forInline versions of public suspend functions should not
be mangled. (Note that there are no $$forInline versions of private
suspend functions, as those are effectively inline-only.)
2020-03-06 14:33:50 +01:00
Ilya Goncharov 8fbfa8b819 [Gradle, JS] Migrate from singletons to classes 2020-03-06 16:07:11 +03:00
Ilya Goncharov 82de930574 [Gradle, JS] Consider transitivity in cache of npm dependencies 2020-03-06 16:07:11 +03:00
Ilya Goncharov 49814c438c [Gradle, JS] Fix naming 2020-03-06 16:07:10 +03:00
Ilya Goncharov 2eea8b0760 [Gradle, JS] Support transitive mode for npm dependencies
#KT-36196 fixed
2020-03-06 16:07:10 +03:00
Ilya Goncharov d108c8ef51 [Gradle, JS] Move logic of resolving NpmDependency to Npm Api
#KT-36196 fixed
2020-03-06 16:07:10 +03:00
Sergey Igushkin 90f4f5db26 Internal visibility between common source sets in Gradle (KT-37264)
In KotlinCompileCommon, pass the friendPaths and refinesPaths arguments

In KotlinNativeCompilation, add both friend and refined dependencies as
friends for now.

In getVisibleSourceSetsFromAssociateCompilations, exclude the metadata
compilations to avoid incorrect results (those compilations don't have
proper kotlin

Issue #KT-37264 Fixed
2020-03-06 15:56:41 +03:00
Sergey Igushkin 3858c8e1f8 Support friend internal visibility in K2Metadata compiler (KT-37264)
Add and handle the friend paths and refines paths compiler arguments;
Reuse klib dependency module descriptors in the resolver for project;

Issue #KT-37264
2020-03-06 15:56:40 +03:00
Natalia Selezneva 04c924a119 Remove idea-gradle-tooling-api.jar from IDEA 2020
Because gradle-6.1.jar is now bundled into idea-gradle plugin
2020-03-06 14:59:20 +03:00
Natalia Selezneva 33368590e4 KotlinDslScriptsModelResolver: return back requireTaskRunning override
It is required for collecting KotlinDslScriptsModels because we need to run `prepareKotlinBuildScriptModel` task before
2020-03-06 14:59:20 +03:00
Natalia Selezneva d063dbef10 Drop modification stamps for gradle scripts after project import
^KT-36763 Fixed
2020-03-06 14:59:19 +03:00
LepilkinaElena 61f5523805 Added Native-specific checker for properties of top level singletons (#3172) 2020-03-06 14:58:09 +03:00
Dmitry Petrov eba45d4f89 KT-36963 Deparenthesize !! argument when generating expression 2020-03-06 14:55:41 +03:00
Dmitry Petrov 71e4b0c9ad KT-31649 Use 'Any#hashCode' in generated hashCode if class has none 2020-03-06 14:55:40 +03:00
Vladimir Dolzhenko dc6be68a41 Handle properly lambda change in incremental analysis
Fixed #KT-37273
2020-03-06 11:12:33 +01:00
Igor Chevdar 93394656a3 [IR] Supported fake overrides in SAM lowering + enabled test 2020-03-06 12:47:00 +03:00
Georgy Bronnikov 56b983e625 Typo fix 2020-03-06 11:56:15 +03:00
Georgy Bronnikov 18d95bb670 JVM_IR: move BridgeLowering lower, remove special case for default arg stubs 2020-03-06 11:53:53 +03:00
Dmitriy Novozhilov af67aff303 [FIR] Support Clonable
#KT-36762 Fixed
2020-03-06 10:44:14 +03:00
Dmitriy Novozhilov 83d01fbaaa [FIR-TEST] Move fixed test from problems directory 2020-03-06 10:44:14 +03:00
Alexander Podkhalyuzin b6b0819f40 Revert "Since build updated for 193 branch due incompatibility"
This reverts commit 135ae32f
2020-03-06 10:30:49 +03:00
Alexander Podkhalyuzin 135ae32f75 Since build updated for 193 branch due incompatibility 2020-03-06 10:19:04 +03:00
Dmitriy Dolovov 17152899ac IDE perf tests for K/N: Produce duplicated *.kt files on demand 2020-03-06 10:14:54 +07:00
Dmitriy Dolovov 44c8a85241 IDE perf tests for K/N: Don't run tests on inapplicable host OSes 2020-03-06 10:14:47 +07:00
Dmitriy Dolovov 8635045a53 IDE perf tests for K/N: add more tests (Linux, AndroidNative) 2020-03-06 10:14:41 +07:00