Commit Graph

101619 Commits

Author SHA1 Message Date
Alexander Korepanov 1fb8293968 [JS IR] Change default declaration origin for IC symbols 2023-05-23 10:13:26 +00:00
Alexander Korepanov e4d7897071 [JS IR] Check fir compilation errors after checking IC next round 2023-05-23 10:13:26 +00:00
Alexander Korepanov 28b781f60a [JS IR] Move fir to klib serialization code in separate class 2023-05-23 10:13:26 +00:00
Anton Lakotka effe902c69 [Gradle] fix functional tests after deprecating API
In KotlinDependencyHandler

^KT-58759 Verification Pending
2023-05-23 09:00:30 +00:00
Anton Lakotka c49f08f427 [Gradle] Test type safe project accessors with KotlinDependencyHandler
KT-58759 Verification Pending
2023-05-23 09:00:30 +00:00
Anton Lakotka b3b0f23a50 [Gradle] Deprecate rare api in KotlinDependencyHandler
Recommend users default `project.dependencies` instead.
Gradle's DependencyHanlder has its own evolution thus
we cannot easily maintain API of KotlinDependencyHandler to look like
Gradle's DependencyHandler. We're going to support only our own
factory methods to create dependencies + `project` dependencies.

KT-58759 Verification Pending
2023-05-23 09:00:30 +00:00
Sergej Jaskiewicz 1a29b9efff [FIR, IR] Fix name mangling for functions with context receivers
- Mangled names of property accessors now include context receiver
  types of the corresponding property when computed from FIR.
- Context receivers are now supported when computing mangled names
  from IR
- IrBasedDescriptors now account for context receivers

^KT-57435 Fixed
2023-05-23 08:55:50 +00:00
Artem Daugel-Dauge 5700212119 [Gradle] Fix embedAndSign failire when signing is disable
^KT-50837 Verification Pending
2023-05-23 08:13:25 +00:00
Pavel Kargashinsky 322799f823 [FunctionalTests] Fail tests if androidSDK is not available, not ignore
Tests use kotlin/dependencies/android-sdk, androidSDK should be always available
2023-05-23 07:57:49 +00:00
Pavel Kargashinsky 9449e23538 [FunctionalTests] Fix run ExternalAndroidTargetPropertySmokeTest on Windows 2023-05-23 07:57:49 +00:00
Alexander Udalov 83865782ff FIR: do not generate annotations on properties from delegation
#KT-57228 Fixed
2023-05-22 20:12:29 +00:00
Alexander Udalov 40c628d431 FIR: fix order of property accessor annotations
#KT-57219 Fixed
2023-05-22 20:12:29 +00:00
Alexander Udalov 9c995755f0 Remove obsolete backend test on getter-targeted annotations
`@get:... get` is no longer allowed, see the explanation in KT-15470.
2023-05-22 20:12:29 +00:00
Marco Pennekamp 326b6fa7c2 [AA] Add missing withValidityAssertion calls to scopes
^KT-58653
2023-05-22 19:21:34 +00:00
Egor Kulikov 1d8eb6dc9e [FIR] Only take receiver on lambda if present
^KTIJ-25127 fixed
2023-05-22 17:10:52 +00:00
Brian Norman f149b69df5 Update project icon for Toolbox and IDEA 2023-05-22 17:10:05 +00:00
Karl Wingblade 72e678ad69 KT-52071 Fallback if sys prop read is blocked
If the Java Security Manager blocks reading the system property
`kotlin.ignore.old.metadata`, then continue gracefully with the
default value.
2023-05-22 16:06:56 +02:00
Kirill Rakhman 7a9c516f68 [FIR] Use Throwable as expected type for throw expressions
#KT-58533 Fixed
2023-05-22 14:05:28 +00:00
Igor Chevdar 55632f5df2 [K/N][runtime] Used internal isInstance 2023-05-22 12:49:58 +00:00
Igor Chevdar d1a3752626 [K/N][tests] Fixed lldb tests on arrays 2023-05-22 12:49:58 +00:00
cristiangarcia d32d5346a2 Fix gradle deprecations in Kotlin Native
Merge-request: KT-MR-10267
Merged-by: Cristian Garcia <Cristian.Garcia-Marin@jetbrains.com>
2023-05-22 12:39:57 +00:00
Troels Bjerre Lund 20d8f54ea3 Unlink weakref objects on finalizer-enque ^KT-55364
Co-authored-by: Troels Lund <troels@google.com>

Merge-request: KOTLIN-MR-694
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-05-22 12:16:48 +00:00
Nikolay Lunyak 710a8f4e0f [FIR] KT-58719: Check all imported declarations for visibility
Unfortunately, we have to check
callables even if the class is
inaccessible.

^KT-58719 Fixed
2023-05-22 11:40:30 +00:00
Nikolay Lunyak f446fc4154 [FIR] KT-58719: Ensure the compiler resolves to the class 2023-05-22 11:40:30 +00:00
Denis.Zharkov 67d51eb7ee Add a separate test configurations for JDK 21 dependent test
After it's released, there would be no need in them, but right now
they are unavailable through the toolchain, so we can't require it.
See KT-58765 for tracking

But there should be a dedicated Build configuration with JDK_21_0 env
properly set.

^KT-58716 Fixed
2023-05-22 09:19:52 +00:00
Vladimir Sukharev 4705207263 [K2/N] Fix lost diagnostics
^KT-58065

Merge-request: KT-MR-10264
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-22 09:18:04 +00:00
Denis.Zharkov 6b2da2069d K2: Use Any? expected type only for the right argument of == operator
^KT-47409 Fixed
2023-05-22 08:41:55 +00:00
Dmitrii Gridin 447e1711da [LL FIR] do not update phase if exception occurred
Exception (even PCE) can lead to inconsistent situations, for example,
where a function can be marked as resolved, but arguments – not.
Also, in this case, it is possible that the function will be
marked as resolved to TYPES, but not all its type really resolved

^KTIJ-25582 Fixed
2023-05-19 22:59:32 +00:00
Igor Yakovlev 1749bafc30 [Wasm] Rename dateref to structref 2023-05-19 15:50:07 +00:00
Igor Yakovlev 1e0be4e0af [Wasm] Fix null constant typed with external class upperbound 2023-05-19 15:50:06 +00:00
Igor Yakovlev 1c716cee9c [Wasm] Update versions of nodejs, d8 and binaryen 2023-05-19 15:50:06 +00:00
Igor Yakovlev ed1c15b64b [Wasm] Remove redundant code 2023-05-19 15:50:06 +00:00
Igor Yakovlev 6adfd91169 Revert "[Wasm] Revert a7ed496a and few fixes to make Kotlin/Wasm compatible with Firefox"
This reverts commit 1d793f7bec.
2023-05-19 15:50:06 +00:00
Igor Yakovlev 6437d0919c [Wasm] Replace deprecated cast instructions 2023-05-19 15:50:06 +00:00
Igor Yakovlev 45897cf045 [Wasm] Update SpiderMonkey and D8 2023-05-19 15:50:06 +00:00
Kirill Rakhman df03f0df0a [FIR] Implement deprecation for implementing var by inherited val
#KT-56779 Fixed
2023-05-19 15:04:46 +00:00
Mikhail Glukhikh 941446ea39 FE: rework tests around changed progression resolve
Related to KT-54261, KT-36932, KT-49276
2023-05-19 14:57:26 +00:00
Mikhail Glukhikh 5fda57fa55 FE: delay DisableCheckingChangedProgressionsResolve to 2.*
This commit removes the relevant feature from 1.9 and
makes this feature experimental.
We plan to enable it in some 2.* version (not earlier than 2.1)

Related to KT-54261, KT-36932, KT-49276
#KT-58791 Fixed
2023-05-19 14:57:26 +00:00
Dmitrii Gridin 500016df87 [LL FIR] do not drop resolvePhase for recreated class
Because now all phases below DECLARATIONS do not depend on the class
declarations

^KT-56551
2023-05-19 14:33:37 +00:00
Anastasia.Nekrasova 58fca659a2 [IR] Fix private methods with default parameters
It is required for methods with default parameters to pass a dispatchReceiver (if the IrCall has one) as an argument, because the method generated bytecode expects it. In the case where the function has both receivers (dispatchReceiver and extensionReceiver), only the extensionReceiver should be added.

Related to KTIJ-24564
2023-05-19 13:56:21 +00:00
Dmitrii Gridin 579df97a7c [FIR] errorInLazyResolve: fix typo 2023-05-19 15:30:32 +02:00
Alexander Udalov fb900d2e2a JVM: remove most usages of JvmTarget.JVM_1_6 2023-05-19 13:24:00 +00:00
Alexander Udalov 75197d1b86 JVM: remove diagnostics related to JVM target 1.6 2023-05-19 13:24:00 +00:00
Alexander Udalov e4e1bcefbd JVM: remove tests on JVM target 1.6 2023-05-19 13:23:59 +00:00
Dmitrii Gridin b713dfd7ea [AA FIR] KtFirOverrideInfoProvider: resolve to status only if needed
^KT-56551
2023-05-19 12:43:45 +00:00
Dmitrii Gridin b88cde11b1 [LL FIR] mark super types phase as non-jumping
It is supposed that this phase can't be called from itself
because now it is impossible to jump under a lock

^KT-56551
2023-05-19 12:43:45 +00:00
Dmitrii Gridin 0d7ddd65c2 [LL FIR] drop global phase lock from status phase
^KT-56551
2023-05-19 12:43:45 +00:00
Dmitrii Gridin 2885df14ee [LL FIR] rewrite status phase transformer
Now we will try to avoid redundant calculation:
* Class-like declarations can be calculated without super types
* Overridden search logic not is out of lock

Unfortunately, right now it is not safe to use
StatusResolveMode.FunctionWithSpecificName and
StatusResolveMode.PropertyWithSpecificName
because lazyResolveToPhaseWithCallableMembers can lead to an incorrect
state of scope. Example:
```
open class A {
  open fun a() {}
  open fun b() {}
}
class C : A()
```
Steps:
1. Resolve constructor of C to STATUS
2. Now we want to call lazyResolveToPhaseWithCallableMembers on
C, and this call will do nothing because this class and all
its declarations (only constructor) are already in STATUS phase,
so class A won't be resolved as expected

^KT-56551
2023-05-19 12:43:45 +00:00
Dmitrii Gridin e464af00db [LL FIR] do not calculate constructors with classes during types phase
^KT-56551
2023-05-19 12:43:45 +00:00
Dmitrii Gridin 5b3f617378 [FIR] add memberRequiredPhase to declaredMemberScope
^KT-56551
2023-05-19 12:43:45 +00:00