Commit Graph

95869 Commits

Author SHA1 Message Date
Dmitriy Novozhilov 20045ac0dc [FIR] Replace uninferred type variables and stub types during builder inference 2022-11-03 08:30:08 +00:00
Dmitriy Novozhilov 22c21ca4df [FIR] Replace uninferred type variables and stub types during delegate inference 2022-11-03 08:30:07 +00:00
Svyatoslav Scherbina 94387da867 Bump Kotlin/Native version to 1.8.20-dev-1815 2022-11-02 19:23:27 +00:00
Jaebaek Seo bb15a6425c Add KDoc for KtWhenExpression.getMissingCases()
KtWhenExpression.getMissingCases() reports the same missing cases even
when the KtWhenExpression has an else branch. Without a description, it
is difficult to be aware of it.
2022-11-02 17:51:06 +00:00
Jinseong Jeon 7f6cad6fb3 FIR: ensure STATUS resolve phase before reading valueClassRepresentation 2022-11-02 18:04:38 +01:00
Jinseong Jeon 542ca68aba AA: add test about PsiType for @JvmInline value class 2022-11-02 18:04:38 +01:00
Jinseong Jeon c9a2e10dd7 AA: merge single/multi modules tests for PsiTypeProvider
...because single-module test is also multi-module test
2022-11-02 17:38:16 +01:00
Jinseong Jeon d98081dce2 AA: introduce MPP tests for PsiTypeProvider 2022-11-02 17:38:16 +01:00
Jinseong Jeon dc7506c40a AA: utilize logic in PsiTypeProvider test
...to reuse them in upcoming multi-module tests
2022-11-02 17:38:15 +01:00
Jinseong Jeon 5bca3c6841 AA: rename test api for better clarification
Many sub tests are implementing the same name, doTestByFileStructure,
which indeed are based on the list of KtFile in a single module.
Rather, this one should be named after "ModuleStructure".
2022-11-02 17:38:15 +01:00
Joshua Schwartz 96e789098f Close parenthesis
Also replace semicolon with comma to fix grammar.
2022-11-02 16:42:41 +02:00
Roman Golyshev c3031ccff5 [Analysis API] Use smart pointer to hold onto KtFile in ShortenCommand
It's a better approach, considering that we already
keep all the PSI element via smart pointers
2022-11-02 14:23:21 +00:00
Yahor Berdnikau c7363adf10 Align kotlin stdlib jvm variants versions
Instead of doing substitution for stdlib, plugin now just aligns jvm
variants version in all dependencies to one. This eliminates issue when
JPMS module requires kotlin.stdlib.jdk8 (or jdk7) and fails to find it
in compilation classpath. Kotlin-stdlib-jdk8(,jdk7) variants in 1.8.0 is
 empty one, so new approach will not cause duplicate classes in
 classpath issue.

 Gradle property to disable alignment was renamed from "kotlin
 .stdlib.jdk.variants.substitution" to "kotlin.stdlib.jdk.variants
 .version.alignment" to better reflect new approach.

^KT-54703 Fixed
2022-11-02 13:37:52 +00:00
Yahor Berdnikau 0122b73bae Align stdlib version also on kotlin-stdlib-jdk7:1.8+ in dependencies
To avoid having transitive kotlin-stdlib-jdk8 with older version leading
 to classpath conflicts.

^KT-54703 In Progress
2022-11-02 13:37:51 +00:00
Yahor Berdnikau 5f40ba5bd9 Move stdlib version alignment tests into separate test suite
^KT-54703 In Progress
2022-11-02 13:37:51 +00:00
Sergej Jaskiewicz ba7f5afebe [JS IR] Generate debug info for catch parameters
We will need it to generate original names for catch parameters in
sourcemaps.

Also, don't generate redundant debug info for compiler-generated
exception handling control flow operators.

See the doc comment to the MultipleCatchesLowering class

#KT-46276
2022-11-02 13:14:01 +00:00
Sergej Jaskiewicz 871d445b4e [JS IR] Generate debug info for global property initializers 2022-11-02 13:14:01 +00:00
Sergej Jaskiewicz 4ae03ea74a [JS IR] Improve debug info for if and when statements
#KT-46276
2022-11-02 13:14:01 +00:00
Sergej Jaskiewicz ccbb2a08a0 [JS IR] Improve debug info for functions with default parameters
Don't generate unnecessary mappings so that the user doesn't need to
step in many times to get where they want

#KT-46276
2022-11-02 13:14:00 +00:00
Sergej Jaskiewicz 43c5c8b44f [JS IR] Fix debug info for Char, Long, and unsigned integer literals
Map class constructor calls to the literals they were generated
from.

#KT-46276
2022-11-02 13:13:59 +00:00
Sergej Jaskiewicz 512a2bfd7a [JS IR] Improve debug info for callable references and lambdas
#KT-46276
2022-11-02 13:13:59 +00:00
Sergej Jaskiewicz fe0e9db3aa [JS IR] Generate debug info for JS switch statements
#KT-46276
2022-11-02 13:13:59 +00:00
Sergej Jaskiewicz b2b7958b62 [JS IR] Generate debug info for secondary constructors
#KT-46276
2022-11-02 13:13:58 +00:00
Sergej Jaskiewicz ec18dce7cb [JS IR] Improve debug info for suspend functions
- Map generated explicit Unit returns to the closing brace of
  the original body
- Name the continuation parameter as `$completion` to match the JVM BE,
  and generate debug info for it (so that it appears in the 'names'
  array in sourcemaps)
- Don't generate debug info for coroutine instantiation ceremony
  (so that the user doesn't need to step in many times to get where they
  want)

#KT-46276
2022-11-02 13:13:58 +00:00
Xin Wang 4d9c2d3d14 Don't treat java constructor as 'hidden' one
Fix KT-54656
2022-11-02 12:56:38 +01:00
Simon Ogorodnik 928c6badd1 FIR Tests. Setup defineJDKEnvVariables for JDK_1_8, JDK_11_0, JDK_17_0 2022-11-02 11:26:38 +00:00
Sergej Jaskiewicz 37b32907ab Fix a compatibility issue with AnnotationDescriptor
The `getSourceForArgument` method should be in the interface,
but adding it is a breaking change for Java usages,
since the module is not built with -Xjvm-default (KT-54749).

Move the method to an extension. This doesn't change the behavior,
since it was only ever called on LazyAnnotationDescriptor.
2022-11-02 11:07:07 +00:00
Dmitriy Novozhilov af8b9e6700 [Build] Remove K/Native modules from projectsWithDisabledFirBootstrap list
^KT-54123 Fixed
2022-11-02 10:11:27 +02:00
Dmitriy Novozhilov 567ef1d905 Advance bootstrap to 1.8.20-dev-1815 2022-11-02 10:10:30 +02:00
Ivan Kochurkin 952274e046 [Lexer] Restore KtToken constructors without tokenId parameter
Mark them as @Deprecated, ^KT-54745 Fixed
2022-11-01 18:35:08 +00:00
Pavel Punegov 8483f0a227 [K/N][build] Fix kotlin-native.jar compiler dependencies
Merge-request: KT-MR-7553
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2022-11-01 16:46:23 +00:00
pyos 7787638737 FIR: fix substitution of anonymous type's supertype again
^KT-51418 Fixed
2022-11-01 15:28:41 +00:00
Vladimir Sukharev f099c190f7 Parallelize platformLibs build on macos_arm64 2022-11-01 15:07:07 +00:00
Ilya Goncharov 54a166b2a3 [Gradle, JS] Deprecate for users to not use on their scripts 2022-11-01 14:08:55 +00:00
Ilya Goncharov 8e088af337 [Gradle, JS] Fix gradle plugin api 2022-11-01 14:08:54 +00:00
Ilya Goncharov 8dbdfb4591 [Gradle, JS] Generate externals inside top level dependencies with deprecation 2022-11-01 14:08:54 +00:00
Alexander Korepanov dbf31b206c [Common IR] Move local class from function to avoid a leak 2022-11-01 13:46:39 +00:00
Pavel Punegov 00e9544670 [K/N][perf] Set project properties for benchmarksAnalyzer build
Merge-request: KT-MR-7520
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2022-11-01 13:44:29 +00:00
Igor Yakovlev 97123e9959 [WASM] Emit when expression in more canonical way (subject first for equals expression) 2022-11-01 13:15:12 +00:00
Igor Yakovlev 5d44766752 [WASM] Table switch optimisation for reversed arguments 2022-11-01 13:15:12 +00:00
Igor Yakovlev 0e54e00e48 [WASM] Make object creation inside constructors 2022-11-01 13:15:11 +00:00
Igor Yakovlev 346b2f162c [WASM] Optimize varargs without spreads 2022-11-01 13:15:11 +00:00
Igor Yakovlev 913ce9d817 [WASM] Remove redundant code 2022-11-01 13:15:10 +00:00
Igor Yakovlev 8d8430cde7 [WASM] Remove unnecessary boxing/unboxing 2022-11-01 13:15:10 +00:00
Igor Yakovlev 0e16889f45 [WASM] Fast load string literals from data section 2022-11-01 13:15:09 +00:00
Igor Yakovlev 033e2c45f1 [WASM] Caching string literals in global pool 2022-11-01 13:15:09 +00:00
Denis.Zharkov f95bfccf59 K1: Prolong deprecation for KT-46727
The language committee ticket has not yet been prepared
2022-11-01 12:03:26 +00:00
Vladimir Dolzhenko 2ff97271e0 Fix addDeclaration in case of neigbour PsiErrorElement
Relates to #KTIJ-20214
2022-11-01 12:00:34 +00:00
Alexander Udalov 3d00c173f3 Fix binary compatibility for inlined local delegated properies
#KT-54650 Fixed
2022-11-01 12:34:33 +01:00
Alexander Shabalin 5ef9a5a240 [K/N] Crash with OOM on large array allocations ^KT-54659
Merge-request: KT-MR-7507
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-11-01 11:00:23 +00:00