Commit Graph

7804 Commits

Author SHA1 Message Date
Dmitry Petrov 68c3f30aa7 JVM_IR KT-47510 indy callee parent is a package fragment, not a class 2021-06-29 17:00:31 +03:00
Dmitry Petrov 768afc5ba4 JVM_IR KT-47492 fix 'for' loop generation 2021-06-28 21:07:54 +03:00
Mikhael Bogdanov 5f62b72c82 Properly process big types 2021-06-26 06:10:16 +02:00
Mikhael Bogdanov 0fd1f549a9 Properly process special symbols during indy-with-constants concatenation
#KT-47320 Fixed
2021-06-26 06:10:16 +02:00
Ivan Kochurkin 5741374883 [FIR] Report UPPER_BOUND_VIOLATED only on checkers stage, fix detection of missing cases and testData 2021-06-25 20:57:45 +03:00
Dmitry Petrov 1298ba431b JVM_IR KT-47449 handle star projection arguments in default lambda types 2021-06-25 20:42:22 +03:00
Dmitriy Novozhilov 26b9948e5f [FE 1.0] Make type of safe call always nullable
^KT-46860 In Progress
2021-06-25 16:37:30 +03:00
pyos 26e3237b8c JVM_IR: never rename public/protected fields
And if that causes a platform declaration clash, that's not a problem
that can be solved without breaking the ABI anyway.

 #KT-47412 Fixed
2021-06-24 17:41:06 +03:00
Denis.Zharkov 4892ad42b9 FIR: Do not mark not found classes' based types from Java as error
The same happens in FE1.0
2021-06-24 12:17:45 +03:00
Denis.Zharkov 201dded237 FIR: Fix serialization of delegated members
^KT-47413 Relates
2021-06-24 12:17:43 +03:00
Dmitry Petrov 0104b1275f JVM_IR KT-47398 handle @EnhancedNullability String subject as in 1.0 2021-06-23 20:11:24 +03:00
Dmitry Petrov c26d71c4ef JVM KT-47365 add box test 2021-06-23 20:11:23 +03:00
Ilmir Usmanov 435b522cc5 Minor. Unmute test 2021-06-23 11:18:25 +02:00
pyos 537ce05bc9 JVM_IR: assume function reference adapters are tail-call
Meaning, they never need continuation objects. This shouldn't affect
correctness (if the assumption is valid, the continuation object
should always have been removed in the end), but the phantom
continuation sometimes left behind unused accessors (and in case of
inline function references, those accessors would refer to non-existent
functions) - see the modified test and Kotlin/kotlinx.coroutines#2769.
2021-06-23 11:18:25 +02:00
Dmitry Petrov f30fc4863c JVM add ABI tests for non-approximated SAM types
Note that resulting SAM method
    public final method accept(p0: java.lang.Object): void
has a signature less specific than the resulting bridge method
    public synthetic bridge method accept(p0: X): void
2021-06-22 21:13:57 +03:00
Dmitry Petrov c77884f067 Refactor SAM type handling, replace non-approximated arguments with * 2021-06-22 21:13:56 +03:00
Victor Petukhov 4aeabb6b0f Use upper bound aware type approximator for intersection types inside sam types in contravariant positions to build proper types in terms of subtyping 2021-06-22 21:13:55 +03:00
Victor Petukhov 750f327878 Use receivers from candidate as a fallback during completion of callable references
^KT-45083 Fixed
2021-06-22 21:13:53 +03:00
Georgy Bronnikov 40872dd4ca JVM_IR: fix parallel compilation
Non-static inline functions that return inline
classes need to be tracked when copying files for by-file lowering.

FIXED: KT-45680
2021-06-22 02:22:36 +03:00
Dmitry Petrov c19792e7c5 JVM_IR KT-47326 downcast field receiver on JvmField lowering 2021-06-21 19:17:54 +03:00
pyos cf660cf24a JVM_IR: expect unboxed return value from suspend default stubs
#KT-47206 Fixed
2021-06-21 18:53:31 +03:00
pyos ee4d9a89ea JVM_IR: read inline fun bytecode to detect unused property references
I.e. optimize `$$delegatedProperties` in the same way as the old
backend. This is more reliable than trying to match bytecode.
2021-06-21 16:19:23 +03:00
Dmitry Petrov ce107d06d4 JVM_IR add test for KT-47300 2021-06-17 21:40:30 +03:00
Andrey Zinovyev d360932ebc [FIR] Fill overriddenSymbols for fake overridden IrProperty 2021-06-17 13:24:12 +03:00
Igor Chevdar caa852061a [box-tests] Ignored a test for K/N
More info in https://youtrack.jetbrains.com/issue/KT-44571
2021-06-16 17:25:07 +05:00
pyos 6c1a5e1211 JVM: make inline function argument processing a bit shorter 2021-06-16 12:13:32 +02:00
pyos 392e4fba42 JVM: fix inlining of default lambdas of signature (Result) -> Any
They have no `invoke` bridge, and the overridden invoke expectes a boxed
`Result` as an argument.
2021-06-16 12:13:32 +02:00
Igor Chevdar a1e5bef3ad [box-tests] Ignored some tests for K/N
A file included twice in a source set is not supported for now
2021-06-16 14:27:14 +05:00
Mads Ager 6b6ba77869 [JVM_IR] Trim the expression test string for null assertions.
^KT-47166 Fixed.
2021-06-11 21:54:04 +03:00
Dmitry Petrov bf077b893c PSI2IR KT-47245 handle declaration statements in control structures 2021-06-11 16:42:31 +03:00
pyos 3be348f910 JVM_IR: fix parentClassId for property accessors 2021-06-11 15:03:13 +02:00
pyos 1f9db7cf25 FE: properly clear the deferred generator stack
Before this commit the stack wasn't cleared for read variable case.
#KT-47168 Fixed
2021-06-11 15:56:20 +03:00
Mikhail Glukhikh 3127fad23d FIR: more precise annotation argument serialization 2021-06-09 15:42:39 +03:00
Mikhail Glukhikh 77dd0ad396 FIR: handle custom attributes more precise 2021-06-09 15:42:37 +03:00
Andrey Zinovyev ddc9c1bd1b [FIR] Fix extension property reference resolution
On type with star projection
#KT-44372 Fixed
2021-06-09 15:15:28 +03:00
pyos ade8b0a7d3 JVM_IR: box bound receiver before calling the reference constructor
This is needed for the inliner: since the information about Kotlin type
of the bound receiver is nowhere in the output binary, the inliner will
have no clue how to box inline class values. Moving the boxing outside
the object means the inliner doesn't need to know about it; from its
point of view, the captured value has type `Any`.
2021-06-09 14:36:07 +03:00
Andrey Zinovyev 3572a96bb9 [FIR] Lookup in local sources in default imports based on the flag
Reuse ALLOW_KOTLIN_PACKAGE for that
2021-06-08 08:23:25 +00:00
Dmitry Petrov 81b09ca09f KT-46267 JVM_IR don't generate unnecessary ATHROW in lateinit var read 2021-06-07 20:02:24 +03:00
Denis.Zharkov 592256976e FIR: Fix inference of builder-inference function from expect type
Previously, such calls were being completed with FULL mode and incorrect
INFERENCE_NO_INFORMATION_FOR_PARAMETER has been reported
2021-06-07 15:25:57 +03:00
Denis.Zharkov 5ade831665 FIR: Fix INFERENCE_NO_INFORMATION_FOR_PARAMETER on type alias with generic expansion
^KT-46996 Fixed
2021-06-07 15:25:55 +03:00
Denis.Zharkov d76db0e011 FIR: Mute backend tests relevant to new INFERENCE_NO_INFORMATION_FOR_PARAMETER
See KT-46967 and KT-46996
2021-06-07 15:25:53 +03:00
Denis.Zharkov d932d5b0a5 FIR: Support adding expect type to calls in foo() as R position
See https://kotlinlang.org/docs/whatsnew12.html#support-for-foo-as-a-shorthand-for-this-foo
2021-06-07 15:25:51 +03:00
pyos 0bd8d16fe2 JVM_IR: fix Result types in continuations & remove more codegen hacks
#KT-47129 Fixed
2021-06-07 09:57:42 +02:00
Dmitry Petrov 7fd033adae JVM_IR KT-47073 use type parameter upper bound for default value 2021-06-04 20:54:01 +03:00
Victor Petukhov 1e5998e0ba Add constraints between two different stub variables instead of creating constraint error due to T1 isn't subtype of T2
^KT-44241 Fixed
2021-06-03 19:18:09 +03:00
Victor Petukhov 19c07e048a Don't check suitability of a builder inference call if unrestricted builder inference is enabled
^KT-42139 Fixed
2021-06-03 17:28:40 +03:00
Mikhail Glukhikh 1294c8de53 FIR: don't get class symbol if it's unnecessary (Java type conversion) 2021-06-03 16:14:41 +03:00
Dmitry Petrov 107e71acb0 Minor: fix Android tests 2021-06-03 13:05:23 +03:00
pyos 4128d27510 JVM_IR: do not use invokedynamic for inline fun references 2021-06-03 13:05:23 +03:00
Mads Ager 5d53d34d85 Fix regression test for KT-46962. 2021-06-03 13:05:23 +03:00