Commit Graph

8267 Commits

Author SHA1 Message Date
Dmitriy Novozhilov ae608ea67f [FE 1.0] Always create return value for CallInstruction
This fixes missing `USED_AS_EXPRESSION` recordings
^KT-47527 Fixed
2021-07-02 17:55:20 +03:00
Igor Laevsky d835b3c164 WASM: Implement spread operator 2021-07-02 15:39:29 +03:00
Dmitry Petrov 584310615c JVM_IR KT-47499 use proper signature for 'clone' intrinsic 2021-07-01 22:10:47 +03:00
Alexander Udalov ae07127f08 JVM IR: support raw types in typeOf 2021-07-01 19:33:56 +02:00
Alexander Udalov 012c7c39af Improve KType.toString for primitive type arguments in stdlib implementation 2021-07-01 19:33:55 +02:00
Alexander Udalov 7306256127 JVM IR: support mutability-flexible types 2021-07-01 19:33:55 +02:00
Alexander Udalov 0cb905a4b1 Support mutable collection types in typeOf
flexibleTypes_1_6.kt is fixed for JVM IR in a subsequent commit.

 #KT-35877 Fixed
2021-07-01 19:33:55 +02:00
Alexander Udalov 6e975b3498 Support flexible types internally in typeOf
#KT-45066 Fixed
2021-07-01 19:33:55 +02:00
Denis.Zharkov a3f64f65f2 FIR: Fix serialization of non-delegated members in FirDelegatedMemberScope 2021-07-01 17:49:39 +03:00
Roman Artemev 09d30c91bf [JS TESTS] Disable mangler checker in tests 2021-07-01 17:40:41 +03:00
Roman Artemev 5a284de2d4 add tests for private signatures
regenerate tests

add test for EnumEntry's argument declarations

add another test

regenerate test

fix test a bit
2021-07-01 17:40:27 +03:00
Dmitry Petrov 37b05cd9c2 JVM_IR KT-47120 treat outer name as case-insensitive for local classes 2021-06-30 14:04:22 +03:00
Dmitriy Novozhilov 4225813d79 [FIR] Update CFG dumps according to changed order of visiting class children 2021-06-29 21:03:29 +03:00
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