Commit Graph

100147 Commits

Author SHA1 Message Date
Abduqodiri Qurbonzoda b65a68ca0d [K/N and WASM] Internalize NoWhenBranchMatchedException and UninitializedPropertyAccessException
As a part of efforts to stabilize Native stdlib.

Merge-request: KT-MR-9531
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-04-10 21:10:51 +00:00
Vladimir Sukharev 85450c93a6 [K2/N] Add FirInfrastructureTestGenerated
Merge-request: KT-MR-8774
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-04-10 13:40:06 +00:00
Jaebaek Seo 820d027676 [K2] Avoid shortening duplicated PSI elements
The existing K2 reference shortener collects all the PSI elements to
shorten. As a result, it possibly shortens duplicated PSI elements. For
example,
```
// FILE: main.kt
package a.b.c

fun test(n: Int) {
    return if (<expr>x.y.z.Outer.Inner.VALUE0 > x.y.z.Outer.Inner.VALUE1</expr>) 1
    else n
}
// FILE: values.kt
package x.y.z

class Outer {
    object Inner {
        val VALUE0 = 13
        val VALUE1 = 17
    }
}
```
for the above code, the existing K2 reference shortener tried to shorten
- x.y.z.Outer.Inner -> Inner
- x.y.z.Outer.Inner.VALUE0 -> VALUE0
- x.y.z.Outer.Inner -> Inner
- x.y.z.Outer.Inner.VALUE1 -> VALUE1

`x.y.z.Outer.Inner` is included in the list to shorten twice.
When it actually shortens the PSI elements, it shortens only
- x.y.z.Outer.Inner.VALUE0 -> VALUE0
- x.y.z.Outer.Inner.VALUE1 -> VALUE1

but it imports all of
- x.y.z.Outer.Inner
- x.y.z.Outer.Inner.VALUE0
- x.y.z.Outer.Inner.VALUE1

As a result, it has unnecessary additional import directives.
This commit fixes the issue by avoiding duplicated shortening for a
single PSI element.
2023-04-10 11:00:11 +00:00
Sergey Bogolepov fb5b143c1d [K/N] Fix KT-57848 2023-04-10 09:59:29 +00:00
Dmitriy Dolovov 468d524a74 [PL][tests] Run K/N tests (old infra) with PL enabled 2023-04-08 20:46:38 +00:00
Abduqodiri Qurbonzoda 9f50f8ff2a [K/N] Internalize print/println(String) functions
As a part of efforts to stabilize Native stdlib.
2023-04-08 21:50:36 +03:00
Abduqodiri Qurbonzoda 709d6c38d2 [K/N] Internalize IntrinsicConstEvaluation annotation
As a part of efforts to stabilize Native stdlib.
2023-04-08 21:50:35 +03:00
Abduqodiri Qurbonzoda 54bbeae273 [K/N] Internalize TypeCastException
As a part of efforts to stabilize Native stdlib.
2023-04-08 21:50:34 +03:00
Abduqodiri Qurbonzoda df642dd3fb [K/N] Internalize valueOfForEnum and valuesForEnum functions
As a part of efforts to stabilize Native stdlib.
2023-04-08 21:50:33 +03:00
Abduqodiri Qurbonzoda 72f87ba55f [K/N] Internalize functions for throwing specific exception from C++ code
As a part of efforts to stabilize Native stdlib.
2023-04-08 21:50:33 +03:00
Abduqodiri Qurbonzoda 95f1d0b6ae [K/N] Internalize getNativeNullPtr() functions
As a part of efforts to stabilize Native stdlib.
2023-04-08 21:50:32 +03:00
Abduqodiri Qurbonzoda dbfdda2ba1 [K/N] Internalize Ref
As a part of efforts to stabilize Native stdlib.
2023-04-08 21:37:39 +03:00
Abduqodiri Qurbonzoda d51763c240 [K/N] Internalize IntrinsicType
As a part of efforts to stabilize Native stdlib.
2023-04-08 21:37:38 +03:00
Abduqodiri Qurbonzoda bd3f528da4 [K/N] Internalize NumberConverter
As a part of efforts to stabilize K/N stdlib.
2023-04-08 21:36:59 +03:00
Abduqodiri Qurbonzoda 2328cf5fcf [K/N] Internalize FloatingPointParser
As a part of efforts to stabilize K/N stdlib.
2023-04-08 21:36:59 +03:00
Ilya Gorbunov f8d001c21f KT-57298 createParentDirectories: handle already existing directory symlink 2023-04-08 15:21:12 +00:00
Ilya Gorbunov 912b65060e KT-55610 Deprecate k.j.Volatile annotation in Common and JS
Use k.c.Volatile in common AbstractMap instead
2023-04-08 15:07:56 +00:00
Ilya Gorbunov b8da3e69ce KT-55268 Make k.c.Volatile stable 2023-04-08 15:07:56 +00:00
Ilya Gorbunov 2dbff89098 Split tests for MutableList.shuffle and Iterable.shuffled 2023-04-08 14:47:30 +00:00
Ilya Gorbunov f13e127b0f KT-57607 Add test for MutableList.addAll at index
Also improve other operations test coverage
2023-04-08 14:47:30 +00:00
Ivan Kylchik 99d47da014 Drop a part of compileTimeConstants.kt that is not serializable in K2
Basically `val a = 10; val b = a + 20` will not be serialized for
`b` property because `a` is not constant
2023-04-07 18:07:12 +00:00
Ivan Kylchik 6909d9a2f9 [K2] Support proper serialization of string concatenation expressions 2023-04-07 18:07:11 +00:00
Ivan Kylchik 1e3e04173b [K2] Properly handle serialization of repeatable annotations 2023-04-07 18:07:11 +00:00
Ivan Kylchik 2d0acecbd2 [K2] Allow to evaluate constant property in FIR constant transformer 2023-04-07 18:07:10 +00:00
Ivan Kylchik 0354cf3ed7 [K2] Drop excess method from ConstValueProvider 2023-04-07 18:07:10 +00:00
Ivan Kylchik 8499891756 [K2] Properly serialize constant values
#KT-56190 Fixed
2023-04-07 18:07:10 +00:00
Ivan Kylchik ac480e2285 [K2] Support serialization of complex annotations
#KT-57611 Fixed
2023-04-07 18:07:09 +00:00
Ivan Kylchik 4a50bd9b16 [K2] Fix annotation serialization for simple cases
#KT-57611
2023-04-07 18:07:09 +00:00
Abduqodiri Qurbonzoda 5cc6338fb9 [K/N] Deprecate Retain and RetainForTarget annotations
As a part of efforts to stabilize Native stdlib #KT-55765.
2023-04-07 17:03:36 +00:00
Vladimir Sukharev 273dcf1665 [K2/N] Mute IR verification error
^KT-57716

Merge-request: KT-MR-9522
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-04-07 06:11:13 +00:00
Ivan Kochurkin 9a5cc39588 [FIR] Use FirDefaultOverridesBackwardCompatibilityHelper with common metadata compilation
Also, use it with JS compilation

^KT-57735 Fixed
2023-04-06 22:27:24 +02:00
Abduqodiri Qurbonzoda 4969a0e4f6 [K/N] Deprecate kotlin.native.ThreadLocal typealias
As a part of efforts to stabilize Native stdlib #KT-55765.
2023-04-06 17:34:48 +00:00
Sebastian Sellmair 9442009d91 [Gradle][Minor] Add comments for IdeCompilerArgumentsResolverImpl
KTIJ-24976
2023-04-06 16:03:13 +00:00
Sebastian Sellmair 1573f0250a [Gradle][Minor] Add documentation on 'runSafe' to provide guidance on when to use it
KTIJ-24976
2023-04-06 16:03:12 +00:00
Sebastian Sellmair 777955b4e2 [Gradle] Ensure pluginClasspath is imported into the IDE
See
`[KTIJ-24976] Implement initial KotlinMppCompilerPluginImportingTests`
in intellij.git

KTIJ-24976
2023-04-06 16:03:12 +00:00
Sebastian Sellmair 6c2087983c [Gradle] Kotlin2JsCompile: Remove old createCompilerArgs
KTIJ-24976
2023-04-06 16:03:11 +00:00
Sebastian Sellmair ca84505376 [Gradle] KotlinJsIrLink: Handle KotlinBuildStatsService invocation outside of creating compiler args
KTIJ-24976
2023-04-06 16:03:11 +00:00
Sebastian Sellmair fc05d001c6 [Gradle] Implement additional IdeCompilerArgumentsResolverTest
KTIJ-24976
2023-04-06 16:03:11 +00:00
Sebastian Sellmair 446c6793a4 [Gradle] Kotlin2JsCompile: Remove redundant processArgs
KTIJ-24976
2023-04-06 16:03:10 +00:00
Sebastian Sellmair 014bb0214f [Gradle][Minor] Kotlin2JsCompile: Make contributeAdditionalCompilerArguments protected
KTIJ-24976
2023-04-06 16:03:10 +00:00
Sebastian Sellmair 1cebf24bed [Gradle] GenerateGradleOptions: Remove fillDefaultValues
KTIJ-24976
2023-04-06 16:03:09 +00:00
Sebastian Sellmair d6cc9e2476 [Gradle] KotlinCompile: Prevent iterating calling FileCollection.getFiles multiple times for sources
KTIJ-24976
2023-04-06 16:03:09 +00:00
Sebastian Sellmair b8f8b9b344 [Gradle][Minor] Remove redundant args.moduleName = compilerOptions.moduleName.orNull
KTIJ-24976
2023-04-06 16:03:09 +00:00
Sebastian Sellmair 1844aab35d [Gradle] KotlinCompile: Move allowNoSourceFiles = true to KotlinJvmCompilerOptionsHelper
KTIJ-24976
2023-04-06 16:03:08 +00:00
Sebastian Sellmair e5fbb253c5 [Gradle][Minor] createCompilerArguments(default) -> createCompilerArguments()
KTIJ-24976
2023-04-06 16:03:08 +00:00
Sebastian Sellmair d85d6fc0bb [Gradle][Minor] IdeCompilerArgumentsResolver: Replace if with when
KTIJ-24976
2023-04-06 16:03:07 +00:00
Sebastian Sellmair 133f2260e0 [Gradle] KotlinCompilerArgumentsProducer: Replace contribute(Type) with semantic methods
KTIJ-24976
2023-04-06 16:03:07 +00:00
Sebastian Sellmair 8156717e31 [Gradle][Minor] KotlinCompilerArgumentsProducer: Use .default in createCompilerArguments
KTIJ-24976
2023-04-06 16:03:06 +00:00
Sebastian Sellmair 86c33ec97c [Gradle] KotlinCompilerArgumentsProducer: Merge PluginClasspath & DependencyClasspath
KTIJ-24976
2023-04-06 16:03:06 +00:00
Sebastian Sellmair 1bbd135de8 [Gradle] Remove DefaultValues.prettyDefaultValue in favor of stripping OPTIONS_PACKAGE_PREFIX
KTIJ-24976
2023-04-06 16:03:05 +00:00