Commit Graph

97251 Commits

Author SHA1 Message Date
Vladimir Dolzhenko f9f0f561d7 Add ability to decompile multifile classes
A side effect of KotlinClassFileDecompiler#KotlinDecompiledFileViewProvider@factory
that multifile java classes like FilesKt__FilePathComponentsKt.class
becomes not visible with Kotlin plugin as file
jar://..../kotlin-stdlib.jar!/kotlin/io/FilesKt__FilePathComponentsKt.class
is considered as Kotlin internal compiled file and therefore no PsiFile
for this virtualFile

#KTIJ-912

Merge-request: KT-MR-8146
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com>
2023-01-02 15:31:19 +00:00
Alexander Udalov 7a9c59aeb5 JVM IR: do not serialize metadata for actualized optional expectations
Optional-expectation annotations which have an actual counterpart should
have never been serialized to the kotlin_module's proto. See for example
the original (correct) implementation in the old JVM backend in
`PackageCodegenImpl.addDescriptorToOptionalAnnotationsIfNeeded`.

 #KT-55611 Fixed
2023-01-02 15:30:27 +00:00
Alexander Udalov 11504fda18 Minor, slightly improve rendering for -Xlist-phases
Remove ':' after phase name, render "(Disabled)" instead of "(Enabled)".
2023-01-02 15:26:07 +00:00
Alexander Udalov 3f2b51151f Remove -Xexclude-from-dumping
Apparently the underlying logic was removed in b07690fccf and no one
noticed.
2023-01-02 15:26:07 +00:00
Dmitrii Gridin 6db0aaef35 [SLC] rename test classes according to new directories 2023-01-02 15:05:45 +00:00
Dmitrii Gridin 251a4363f5 [LC][tests] drop outdated '//RELEASE_COROUTINE_NEEDED' directive 2023-01-02 15:05:44 +00:00
Dmitrii Gridin 7196d0d809 [LC] AbstractSymbolLightClassesLoadingTest: sort classes by name 2023-01-02 15:05:44 +00:00
Dmitrii Gridin 27ffe7c31e [LC] move scripts to lightClassByPsi 2023-01-02 15:05:44 +00:00
Dmitrii Gridin 2e2e633113 [LC] fix PsiClassRenderer 2023-01-02 15:05:43 +00:00
Dmitrii Gridin 86bb9eeebc [LC] fix ULC testData 2023-01-02 15:05:43 +00:00
Dmitrii Gridin 7096fc1416 [LC] drop outdated 'CHECK_BY_JAVA_FILE' directive 2023-01-02 15:05:42 +00:00
Dmitrii Gridin 3e36e51920 [LC] merge ultraLightFacades tests to lightClassByPsi 2023-01-02 15:05:42 +00:00
Dmitrii Gridin 3b739d9a44 [SLC] AbstractSymbolLightClassesLoadingTest: generate light class for all compiled classes 2023-01-02 15:05:42 +00:00
Dmitrii Gridin 60ab3fa38e [SLC] AbstractSymbolLightClassesLoadingTest: generate facade if possible 2023-01-02 15:05:41 +00:00
Dmitrii Gridin 1515075387 [LC] regenerate tests after rename 2023-01-02 15:05:41 +00:00
Dmitrii Gridin 0731780865 [LC] rename ultraLightClasses to lightClassByPsi 2023-01-02 15:05:38 +00:00
Dmitrii Gridin 3447fcdd84 [LC] regenerate tests after rename 2023-01-02 15:05:37 +00:00
Dmitrii Gridin 742c3de112 [LC] rename lightClasses/lightClasses to lightClasses/lightClassByFqName 2023-01-02 15:05:37 +00:00
Dmitrii Gridin 81a939409a [LC] regenerate tests after move 2023-01-02 15:05:36 +00:00
Dmitrii Gridin eb3ad7e6b1 [LC] move light class related tests to one directory 2023-01-02 15:05:36 +00:00
Marco Pennekamp 34a1569375 [LL FIR] KT-55339 Fix supertype collection in LL FIR supertype resolver
- LL FIR didn't report a `RECURSIVE_TYPEALIAS_EXPANSION` error on `F2`
  in `recursive.fir.kt`. While the resolver correctly associates `F2`
  with a cyclic error supertype in the supertype computation session,
  that error supertype was never assigned to `F2`.
- Why? `F2`'s supertype is a function type, so the supertype's
  `classLikeDeclaration` in `collect` is `Function1`, which has no
  containing file. Thus, the `Function1` was simply skipped, without
  adding `F2` to the designators to which supertypes are later applied
  via `apply`.
- The fix takes supertypes without containing files into account by
  crawling their type arguments, which possibly leads the collector to
  further designations, such as `F2`, which is reachable via the
  function type's type arguments.

^KT-55339 fixed
2023-01-02 14:45:01 +00:00
Marco Pennekamp 2cdcdce6ed [LL FIR] KT-55327 Use body resolve return type calculator for locals
- LL FIR uses `ReturnTypeCalculatorWithJump` by default because it
  cannot guarantee that the implicit types of non-local functions
  referenced in a function `f` have been resolved during body resolve
  of `f`.
- However, if `ReturnTypeCalculatorWithJump` encountered a local
  function, it tried to resolve its return type even during body
  resolve of that same local function. The fix delegates to
  `ReturnTypeCalculatorForFullBodyResolve`, which should be used for
  local declarations.

^KT-55327 fixed
^KT-55324 fixed
2023-01-02 14:03:42 +01:00
Alexander Udalov 28759a3ac3 Optimize rangeUntil operator in for-loops and contains
Newly added tests are basically copies of the existing tests on `until`.
Note that this operator is optimized for all backends, but the fact that
it's optimized is only checked for the JVM backend in bytecode text
tests.

 #KT-53330 Fixed
2023-01-02 12:55:48 +00:00
Mikhail Glukhikh bc5acb5e9d Regenerate built-ins copyright comments (year 2023) 2023-01-02 13:44:21 +01:00
Mikhail Glukhikh 217f473bdc K2: don't report PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED on externals
Related to KT-55656
2023-01-02 12:37:04 +00:00
Mikhail Glukhikh e18315007c K2: promote PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED to an error
#KT-55656 Fixed
2023-01-02 12:37:04 +00:00
Alexander Likhachev 09bce1e472 [Gradle] Add check for warnings in test for KT-54634
This check was disabled due to KT-52490
2023-01-02 12:33:11 +00:00
Alexander Likhachev 2530dd836a [Gradle] Get rid of deprecated properties usage in KotlinTestReport
#KT-52490 Fixed
2023-01-02 12:33:11 +00:00
Alexander Likhachev b5482b3812 [Gradle] Add Gradle 7.4 variant
#KT-52490 In Progress
2023-01-02 12:33:10 +00:00
Svyatoslav Kuzmich 4a7e3c7596 [JS][Gradle] Add an option to configure nodeJs arguments
Merge-request: KT-MR-8135
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
2023-01-02 11:21:56 +00:00
Dmitriy Dolovov 4428971401 [LazyIR] Exclude INVISIBLE_FAKE callable members from class declarations
Fixes KT-55509
2023-01-02 07:38:53 +00:00
Nikolay Krasko 4c925d0588 Instructions for building 1.8.0 2022-12-30 11:13:40 +00:00
Svyatoslav Kuzmich 9bc6b420a9 [Wasm][Stdlib] Add public APIs for linear memory access
Needed for interop with APIs that use linear memory.
2022-12-29 19:25:23 +00:00
Artem Kobzar fbf06b5495 [K/JS] Add a secret system property to enable the old Kotlin/JS compiler only for tests until it will be removed from the sources 2022-12-29 13:32:01 +00:00
Anna Kozlova 47f32b715f [AA] register KtDefaultAnnotationArgumentReference 2022-12-29 12:05:03 +00:00
Igor Yakovlev 71afbb36f5 [Wasm] Introduce Xwasm-generate-wat compiler flag (disabled by default) 2022-12-29 11:57:48 +00:00
Igor Yakovlev fc80104d55 [Wasm] Fix external functions import clashing 2022-12-29 11:57:47 +00:00
Igor Yakovlev 35340f2f04 [Wasm] Fix stdlib String to Float parse 2022-12-29 11:57:47 +00:00
Igor Yakovlev 8b14f4b15c [Wasm] Mocha test framework support 2022-12-29 11:57:47 +00:00
Igor Yakovlev 4e24a9caa5 [Wasm] Cache down-casted dispatcher receiver in virtual functions 2022-12-29 11:57:46 +00:00
Igor Yakovlev 3be3ae4895 [Wasm] Fix invalid boxing for non-primitive typed vararg 2022-12-29 11:57:46 +00:00
Igor Yakovlev dc2dcfffee [Wasm] Enable passing test 2022-12-29 11:57:45 +00:00
Igor Yakovlev 1b2b7ce34c [Wasm] Support Number type for external functions 2022-12-29 11:57:45 +00:00
Igor Yakovlev 4dedd47172 [Wasm] Fix JsName external declarations 2022-12-29 11:57:45 +00:00
Igor Yakovlev 4bd187ccea [Wasm] Move ItemArrayLike w3c declarations into the right package 2022-12-29 11:57:44 +00:00
Pavel Punegov 950082e7f4 [K/N][test] Improve XcodeSimulatorExecutor
Make it be able to recognise incorrect installation when
preferred runtimes are not set but present in the system.
2022-12-29 11:32:50 +00:00
Pavel Mikhailovskii 0b38ab4f01 KT-51277 Fix matching of context receivers and parameter desriptors 2022-12-29 11:28:11 +00:00
Svyatoslav Scherbina 399ea1092e Remove kotlinc K/N scripts because they clash with real (K/JVM) kotlinc
These scripts were deprecated in 1.5.0.
2022-12-29 10:48:03 +00:00
Denis.Zharkov d3549c2c5b Optimize CoreJrtFileSystem
Do not recompute children on each file request
At the same time, we should clear the roots after each compilation
just the same way as we do for common jars
2022-12-29 09:59:16 +00:00
Svyatoslav Kuzmich add5fa6e0d [Wasm] Minor: remove unused stdlib stub
Merge-request: KT-MR-8140
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
2022-12-29 05:29:32 +00:00