Commit Graph

97121 Commits

Author SHA1 Message Date
Dmitriy Novozhilov bab91ce7b2 Advance bootstrap to 1.8.20-dev-4608 2022-12-21 22:30:08 +00:00
Anna Kozlova 15b1e429d7 [compiler] introduce dedicated Fir declaration for dangling modifier lists (KTIJ-23008)
ensure fir annotations are included in FirDanglingModifierList and resolved,
dedicated DanglingTopLevelModifierListStructureElement exists for top
level lists only, class level lists are processed by containing structure
element
2022-12-21 20:58:46 +00:00
Svyatoslav Kuzmich d788adcbb5 [Wasm] Move non-recursive function types out of rec group
This fixes linking with other wasm modules with non-rec types
2022-12-21 20:20:13 +00:00
Dmitrii Gridin 88f1f74aec [ULC] fix descriptor leak from synthetic members
^KT-55604 Fixed
2022-12-21 19:08:56 +00:00
Dmitriy Novozhilov 1b16d651ae [FIR] Disambiguate names of files with helpers in spec tests
Test framework assumes that there won't be any files with same names
  in one test. But there were cases when test declared test file
  with same name as one of files with helpers (e.g. `functions.kt`)
2022-12-21 16:30:58 +00:00
Dmitriy Novozhilov 54a004ef1a [FIR] Fix behavior of FirCompilerLazyDeclarationResolverWithPhaseChecking in tests
1. There was an incorrect filtration of failures if FIR_DISABLE_LAZY_RESOLVE_CHECKS
    directive was present
2. `FirDumpHandler` potentially can call lazy resolution in presence of
    compiler plugins, so we should call `startResolvingPhase`/`finishResolvingPhase`
    in it before traversing the tree
2022-12-21 16:30:58 +00:00
Igor Chevdar c9ba9b995e [K/N] Fixed a dependency tracking bug 2022-12-21 15:59:20 +00:00
Pavel Mikhailovskii 06d3e1d8bd KT-55005 Do not generate CHECKCAST before AASTORE 2022-12-21 15:06:07 +00:00
Aleksei.Cherepanov d26b96afe1 Avoid failure of maven compilation if empty args are passed
#KT-54822 Fixed

Merge-request: KT-MR-8103
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2022-12-21 14:35:07 +00:00
Ilya Chernikov 8c5739739c minor: drop main-kts tests on oldBE
it is not supported anymore
2022-12-21 14:34:22 +00:00
Ilya Chernikov deb2d6d024 K2 Scripting: enable K2 tests in some test projects 2022-12-21 14:34:21 +00:00
Ilya Chernikov 90a4f6002e K2 Scripting: support sam-with-receiver in scripting plugin 2022-12-21 14:34:21 +00:00
Ilya Chernikov baf90178ad K2 Scripting: fix resolution for scripts:
script should not be resolved on annotations args mapping resolve
2022-12-21 14:34:21 +00:00
Ilya Chernikov 00a28f9f49 K2 Scripting: compiler extension for script configuration 2022-12-21 14:34:20 +00:00
Ilya Chernikov a89dfdce03 K2 Scripting: add support for script args to FIR part 2022-12-21 14:34:20 +00:00
Ilya Chernikov 533a5671bc K2 Scripting, IR: add script receiver on conversion to class 2022-12-21 14:34:19 +00:00
Ilya Chernikov 337d11d4c8 K2 Scripting: enable K2 compilation in scripting plugin 2022-12-21 14:34:19 +00:00
Ilya Chernikov bc2aa20b86 Revert unrelated refactoring from "FIR: Fix interface delegation ABI"
the refactoring is questionable at places and breaks FirScript support
2022-12-21 14:34:19 +00:00
Sergey Bogolepov 64319477f0 [K/N] Test for cinterop hints 2022-12-21 13:28:17 +00:00
Sergey Bogolepov 233b01f341 [K/N] CInterop ExceptionPrettifier
Add a wrapper around cinterop invocation that tracks exceptions.
Wrapper has a set of handlers. Each handler checks exception for some
pattern and if it matches, throws another exception with a more
user-friendly message.
The first such case is compilation error due to missing -fmodules flag.
2022-12-21 13:28:17 +00:00
Ilya Goncharov 256764f012 [Gradle, JS] Add test with packaged moduleName
[Gradle, JS] WA for moduleName starting with @

^KT-53288 fixed
2022-12-21 11:34:05 +00:00
Dmitriy Novozhilov c8b6e57c4d [Serialization] Use original name instead of SerialName for parameters of constructor 2022-12-21 11:09:31 +00:00
Dmitriy Novozhilov ce2880614b [FIR2IR] Run constant evaluation before IR extensions
Test `constValInSerialName` in serialization still fails but because of
  different reason

^KT-54994 Fixed
2022-12-21 11:09:30 +00:00
Anna Kozlova b81c210535 [AA] resolve array access expression to corresponding set operator
k1 would suggest `get` as well
 but with current fir structure with fake desugaring
 get is moved to the separate fake psi which doesn't exist
 thus the problem is ignored for now
 ^ KTIJ-24025
2022-12-21 10:45:40 +00:00
Dmitriy Novozhilov c44993e586 [FE] Use FQN instead of KClass in TypeRegistry
TypeRegistry is the static map which contains mapping between type of
  session component and its index in the session array. Originally
  `KClass` of a component was used as a key in this map, which worked
  pretty well for compiler components. But there was a problem with
  components from plugins and Kotlin daemon: in compilation with daemon
  we keep TypeRegistry between compilations. But for each compilation
  we load plugins from jar, which brings to the situation when after N
  compilations there is N entries in TypeRegistry map with different
  KClass'es for same extension component. This not only causes AIOBE
  but also introduces the memory leak, because we keep reference to
  KClass which is not used anymore

So to fix this issue it's enough to just store FQN of component in
  TypeRegistry instead of KClass

There are no tests in this commit, but they will be added in next
  commit relevant to scripting. With those commits we will have gradle
  integration tests which uses Kotlin compiler daemon and registers
  a compiler plugin for scripting

^KT-55023 Fixed
2022-12-21 10:33:03 +00:00
Dmitriy Novozhilov 890418f6b7 [FE] Add detailed report to possible failures in ComponentArrayOwner.registerComponent 2022-12-21 10:33:02 +00:00
Jinseong Jeon 4beb55179b AA: expected type for expression passed to vararg 2022-12-21 17:05:00 +09:00
Pavel Kunyavskiy 4f8dad3e4b [K/N] Fix notification order in finalizers
In before thread waiting for finalizers done could be unsuspended
before statistics about finalization is written.
Probably it doesn't affect real code, but it can lead to test failures.
2022-12-20 21:44:38 +00:00
Mikhail Glukhikh fc95889115 Move isCompilingAgainstJdk8OrLater to JvmBackendContext
This should solve multi-thread synchronization problem
Probably #KT-55483 Fixed
2022-12-20 21:41:43 +00:00
Evgeniy.Zhelenskiy ac28c0a286 [IR] Allow inline modifier for functions returning MFVC without warning
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2022-12-20 21:26:56 +00:00
Pavel Kunyavskiy 4928e284f6 Make LateinitIntrinsicApplicabilityChecker warning for Native and JS
This checker was enabled only on JVM by mistake.
It's now fixed, but we don't want to make it an error in minor release.
So it will be an warning in 1.8.20 and an error in 1.9.0

^KT-27002
2022-12-20 20:06:52 +00:00
Pavel Kunyavskiy 17e9a6a781 [klib] Fix serialization of missing annotations
^KT-42490
^KT-44625
2022-12-20 20:06:51 +00:00
Dmitrii Gridin 90d702ed27 [SLC] symbolAnnotationsUtils: use AnnotationTarget and ElementType to reduce custom strings
^KT-55481
2022-12-20 19:52:15 +00:00
Dmitrii Gridin 3c0f3777c6 [SLC] symbolAnnotationsUtils: reuse DEFAULT_VALUE_PARAMETER
^KT-55481
2022-12-20 19:52:14 +00:00
Dmitrii Gridin 65426f6b40 [LC] KotlinClassInnerStuffCache: drop unused code
^KT-55497
2022-12-20 19:52:14 +00:00
Dmitrii Gridin c77401d823 [SLC] drop redundant 'final' modifier from synthetic enum members
^KT-55502 Fixed
2022-12-20 19:52:14 +00:00
Dmitrii Gridin 8bbe60e96c [AA] add more tests on companion members 2022-12-20 19:52:13 +00:00
Dmitrii Gridin 0f29edec15 [SLC] LazyModifiersBox: fix typo 2022-12-20 19:52:13 +00:00
Dmitrii Gridin bb51d62e0a [SLC] support static properties (e.g. Enum.entries)
^KT-55496
^KTIJ-23530
2022-12-20 19:52:13 +00:00
Dmitrii Gridin 643b74fa28 [AA FIR] support symbol pointers for static properties
^KT-55487
2022-12-20 19:52:12 +00:00
Dmitrii Gridin e39dc9b768 [LC] fix signature of 'Enum.valueOf()'
* drop @NotNull annotation from parameter
* add NullPointerException to throws

^KT-55497 Fixed
2022-12-20 19:52:12 +00:00
Dmitrii Gridin 7d0c093da7 [SLC] generate static enum methods from symbols
^KT-55496 Fixed
2022-12-20 19:52:11 +00:00
Dmitrii Gridin c28e9d5253 [LC] add tests for enum classes
^KT-55496
^KTIJ-23530
2022-12-20 19:52:11 +00:00
Dmitrii Gridin e476150025 [AA FIR] support symbol restoring for static members
^KT-55487 Fixed
2022-12-20 19:52:10 +00:00
Dmitrii Gridin f3c7972d20 [SLC] implement java annotations for annotation classes
^KT-55481 Fixed
2022-12-20 19:52:10 +00:00
Dmitrii Gridin 1e1525bae5 [SLC] implement light class for RepeatableContainer
^KT-55470 Fixed
2022-12-20 19:52:10 +00:00
Artem Kobzar cd0ae20c38 [K/JS] Capture stackTrace before the init function call ^Fixed KT-55315 2022-12-20 18:15:02 +00:00
Alexander Korepanov 48daf0befe [JS IR] Take into account file annotations for calculating symbol hashes
^KT-55367 Fixed
2022-12-20 16:04:14 +00:00
Alexander Korepanov 4136189114 [JS IR] Check all signatures of dependent file in IC graph
It is important to check all signatures, because signatures
 can be simultaneously moved between files and modified.
2022-12-20 16:04:14 +00:00
Igor Chevdar 04fcf25ae0 [K/N] Merged CachedLibraries.Dependency into DependenciesTracker 2022-12-20 14:24:55 +00:00