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
Igor Chevdar
c1bc6682fa
[K/N] Merged two ways of overriding llvm globals
2022-12-20 14:24:55 +00:00
Igor Chevdar
9732100764
[K/N][IR][codegen] Introduced DependenciesTracker
2022-12-20 14:24:54 +00:00
Igor Chevdar
c88ac7cc86
[K/N][IR][codegen] Build per-file dependencies for caches
2022-12-20 14:24:54 +00:00
Igor Chevdar
a058fcb628
[K/N][runtime] Do not export ImmutableBlob type info
...
It's not used by the native runtime
2022-12-20 14:24:54 +00:00
Gleb Lukianets
454e9a6379
[K/N] Fix infinite loop in ObjCExportScope
...
Merge-request: KT-MR-8024
Merged-by: Gleb Lukianets <Gleb.Lukianets@jetbrains.com >
2022-12-20 12:53:54 +00:00
Mikhail Glukhikh
7a7d93828e
Fix MutableOrEmptyList implementation details
2022-12-20 11:04:28 +00:00
Mikhail Glukhikh
761a0f8248
K2: introduce & use (for annotation creation) smartPlus for lists
2022-12-20 11:04:27 +00:00
Mikhail Glukhikh
f33f87e3d4
K2: drop unused qualifier in FirJavaTypeRef
2022-12-20 11:04:27 +00:00
Mikhail Glukhikh
e9fbeb9be2
K2: use MutableOrEmptyList for context receivers on declaration site
2022-12-20 11:04:27 +00:00
Mikhail Glukhikh
d20d63786b
K2: use MutableOrEmptyList for type arguments
2022-12-20 11:04:26 +00:00
Mikhail Glukhikh
a48610000d
K2: introduce & use MutableOrEmptyList.EMPTY singleton
2022-12-20 11:04:26 +00:00
Mikhail Glukhikh
ddc786364f
K2: use MutableOrEmptyList for context receivers
2022-12-20 11:04:26 +00:00
Mikhail Glukhikh
dff71a9602
K2: use MutableOrEmptyList for nonFatalDiagnostics
2022-12-20 11:04:25 +00:00