Ilya Chernikov
b3d0a0a1c8
FIR LT: support labelled destructured declarations
...
add missing conversion in the LT to FIR converter
#KT-56759 fixed
2023-03-08 07:28:35 +00:00
Igor Chevdar
315d9089b0
[box-tests] Another version of reproducer for KT-56965
2023-03-08 06:48:52 +00:00
Igor Chevdar
99ec3215d9
[box-tests] Added a reproducer for KT-57053
2023-03-08 06:48:51 +00:00
Evgeniy.Zhelenskiy
88f293d4a9
[IR] Support reflection for MFVC
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2023-03-07 21:44:43 +00:00
Evgeniy.Zhelenskiy
1ff4906880
[IR] Fix NVargs Function lowering when working with MFVC
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2023-03-07 21:44:42 +00:00
Evgeniy.Zhelenskiy
394cd944b6
[IR] Add MFVC representation during serialization of FIR to IR
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2023-03-07 21:44:41 +00:00
Evgeniy.Zhelenskiy
5b868becf4
[IR] Hide regular class constructor with MFVC parameters
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2023-03-07 21:44:41 +00:00
Nikolay Lunyak
07fa86f6bc
[FIR] KT-57085: Ignore the diagnostic case in @Suppress()
...
^KT-57085 Fixed
2023-03-07 20:28:02 +00:00
Pavel Mikhailovskii
9db5ea66a6
KT-57103 Don't inline references to generic synthetic Java properties in K1
2023-03-07 17:35:04 +00:00
Yahor Berdnikau
5ddd60a015
Add '-progressive' option into Gradle compiler options DSL
...
^KT-53923 Fixed
2023-03-07 17:32:20 +00:00
Alexander.Likhachev
4d080c1a82
[IC] Register last-build.bin file in a transaction
...
KT-55995 Related
2023-03-07 16:19:24 +00:00
Alexander.Likhachev
493da2a8b4
[IC] Rename DummyCompilationTransaction -> NonRecoverableCompilationTransaction
2023-03-07 16:19:21 +00:00
Alexander.Likhachev
25a3dcf3d1
[IC] Make CompilationTransaction to be able to close CachesManager
2023-03-07 16:19:21 +00:00
Alexander.Likhachev
3ed651a7a6
[Gradle] Add a property to control if the IC caches in-memory wrapper is enabled
...
#KT-56052 In Progress
2023-03-07 16:19:20 +00:00
Marco Pennekamp
91fb16110f
[FIR] KTIJ-24296 Remove unused isNameForFunctionClass
2023-03-07 11:44:15 +00:00
Marco Pennekamp
eb673e4566
[FIR] KTIJ-24296 Optimize isNameForFunctionClass based on name shape
...
- A `classId` can only be a generated function class if it ends with a
digit, per the contract described in `FunctionTypeKind`.
- The optimization uses this fact to avoid calling
`functionTypeService.getKindByClassNamePrefix`, which can be expensive
due to a hash map access.
2023-03-07 11:44:14 +00:00
Marco Pennekamp
a725fe559c
[FIR] KTIJ-24296 Allow special names in symbol provider pre-filtering
...
- A special name such as `<no name provided>` may not be contained in
the list of names, but may still be found by a provider.
2023-03-07 11:44:14 +00:00
Marco Pennekamp
ece038b49b
[LL FIR] KTIJ-24296 Extract symbol provider name cache into a class
...
- The caching logic from `LLFirProvider` may be used in other symbol
providers.
2023-03-07 11:44:14 +00:00
Marco Pennekamp
18ce21fb13
[FIR] Extract mayHaveTopLevelClassifier from composite symbol provider
...
- The implementation is not trivial and should be usable in other symbol
providers.
2023-03-07 11:44:13 +00:00
Nikolay Lunyak
343deeec1c
[FIR] Check FirReceiverParameter annotations' targets
2023-03-07 11:35:47 +00:00
Nikolay Lunyak
0c77de3049
[FIR] Add a test with an inapplicable receiver annotation
2023-03-07 11:35:47 +00:00
Nikolay Lunyak
1378d730d6
[FIR] Forbid all use-site targets of FirTypeRef annotations
2023-03-07 11:35:47 +00:00
Nikolay Lunyak
93ba0c3e70
[FIR] KT-56769: Ensure @receiver: is only allowed on receivers
...
Note that there's no code that checks that
FirReceiverParameter's annotation's use-site target
is indeed `@receiver:`, because otherwise the
annotation wouldn't have made it into
the FirReceiverParameter.
In contrast, in K1 all such annotations are treated
as annotations on a KtTypeReference.
^KT-56769 Fixed
2023-03-07 11:35:46 +00:00
Yahor Berdnikau
174f39aa46
Add '-opt-in' option into Gradle compiler options DSL
...
^KT-53924 Fixed
2023-03-07 09:40:09 +00:00
Zalim Bashorov
4d7cf81ed0
[Wasm] Stop supporting "_export.js" in test infra, use import/export capability in relevant tests
...
* It works slightly differently in SpiderMonkey.
* It was a hack.
2023-03-06 23:19:02 +01:00
Zalim Bashorov
bec827b654
[Wasm] Update SpiderMonkey to 112.0a1 (2023-03-04-09-52-24)
2023-03-06 23:19:02 +01:00
Alexander Udalov
47c48efa33
JVM IR: do not generate extension receiver parameter as ACC_MANDATED
...
Otherwise Java reflection is not able to load its type as a
parameterized type.
#KT-40857 Fixed
2023-03-06 20:57:52 +00:00
Artem Kobzar
26f6661d1e
[K/JS] Remove the possibility to have negative lines and columns in Source Maps
2023-03-06 16:55:26 +00:00
Kirill Rakhman
b80970b09f
[FIR] Fix references to generic synthetic properties
...
When synthetic properties are built from a substitution override,
set originalForSubstitutionOverride, too.
^KT-56251 Fixed
2023-03-06 09:45:02 +00:00
Yan Zhulanow
1cfd2ae7ff
[LL API] Fix on-air analysis for scripts (KTIJ-21108)
...
The implementation is rather limited. Advanced cases, such as
replacing a script with another one with different import directives,
won't work because of non-trivial relationship between 'FirFile' and
'FirScript'.
2023-03-05 19:18:19 +00:00
Johan Bay
349a6b6e82
Introduce flag for bitcode to native compilation
...
This enables splitting the compilation pipeline into multiple
invocations of the compiler.
2023-03-04 16:13:42 +00:00
vladislav.grechko
7033d78641
Fix SAM conversion generation condition
...
Remove check if array is passed to vararg parameter as it's not
relevant anymore and leads to ^KT-51821.
^KT-51821: Fixed
2023-03-04 12:53:48 +00:00
Yan Zhulanow
c604577132
Embed DefaultErrorMessages extension list (KT-57102)
...
Normally, 'DefaultErrorMessages' extensions should only be loaded
from the main compiler JAR. However, in the in-process JPS build,
there are two versions of the compiler classes in the process, and
'ClassLoader's there are not fully isolated.
'ServiceManager' loads extensions from both 'META-INF' locations. If
the JPS plugin bundles newer compiler components, newly appeared
'DefaultErrorMessages' extensions will be loaded from the JPS (parent)
'ClassLoader', causing an exception.
Such a problem appeared with 'DefaultErrorMessagesWasm':
- - - - -
java.util.ServiceConfigurationError:
org.jetbrains.kotlin.diagnostics.rendering.DefaultErrorMessages$Extension: org.jetbrains.kotlin.wasm.resolve.diagnostics.DefaultErrorMessagesWasm not a subtype
- - - - -
2023-03-04 06:38:34 +00:00
Sergej Jaskiewicz
f40278c036
An option to allow out-of-scope type parameters in IrManglerComputer
...
In the lowered IR there are often references to type parameters whose
containers are not in the current scope. This is incorrect semantically,
but it works in practice due to erasure, so when the mangler is used on
the lowered IR, we don't want to crash the compiler.
2023-03-03 22:08:57 +00:00
Sergej Jaskiewicz
27adfa8370
[FIR] Provide the correct type parameters when building arrayOf function
2023-03-03 22:08:56 +00:00
Sergej Jaskiewicz
88e244c1cf
[IR] Remove JS-specific manglers, as they don't customize any behavior
2023-03-03 22:08:56 +00:00
Sergej Jaskiewicz
1651199ed8
[IR] Add doc comments for KotlinMangleComputer and its inheritors
2023-03-03 22:08:56 +00:00
Sergej Jaskiewicz
c447b91101
[IR] Factor out duplicated code in KotlinMangleComputer into base class
2023-03-03 22:08:55 +00:00
Ivan Kochurkin
de5b475f7a
[FIR] Use KlibBasedSymbolProvider in FirCommonSessionFactory
...
Unify logic of KLib resolving (Common and JS)
^KT-56354 Fixed
2023-03-03 20:58:24 +00:00
Ivan Kochurkin
d829f8b684
[FIR] Drop using of JavaSymbolProvider and OptionalAnnotationClassesProvider in FirCommonSessionFactory
...
Drop using of all Java stuff inside FirCommonSessionFactory
^KT-56063
2023-03-03 20:58:24 +00:00
Svyatoslav Kuzmich
c9c0b9fd10
[Wasm] Add more jsCode diagnostic tests with String properties
2023-03-03 19:39:11 +00:00
Svyatoslav Kuzmich
3566d918d2
[Wasm] Deprecate @JsFun with warning
...
kotlin.js.js("code") should be used instead
2023-03-03 19:39:11 +00:00
Svyatoslav Kuzmich
01fcc84d73
[Wasm] Refactor callingWasmDirectly.kt test from @JsFun to @WasmImport
2023-03-03 19:39:11 +00:00
Svyatoslav Kuzmich
7175b9f31c
[Wasm] Migrate usages of @JsFun to js("code")
2023-03-03 19:39:10 +00:00
Svyatoslav Kuzmich
7a04999e4a
[Wasm] Add K1 compiler diagnostics for js(code) calls (KT-56955)
...
This function is handled as intrinsics and supported in limited context
2023-03-03 19:39:10 +00:00
Svyatoslav Kuzmich
60ef7fcb49
[Wasm] Suppress unused parameters warning for functions with JS body
...
These parameters can be used in js(code)
2023-03-03 19:39:09 +00:00
Svyatoslav Kuzmich
71e6b19760
[Wasm] Support restricted version of js("code") (KT-56955)
2023-03-03 19:39:09 +00:00
Pavel Mikhailovskii
a6e1826bbc
Reimplement the fix for KtSuperTypeList.findEntry
2023-03-03 15:38:12 +00:00
Svyatoslav Kuzmich
3c35328c09
[Wasm] Fix overriding external fun with default parameters (Fix KT-56976)
2023-03-03 12:33:53 +00:00
Artem Kobzar
4eb5af68f4
[K/JS] Add @deprecated commentary if @Deprecated annotation exists on a declaration.
...
^KT-56405 Fixed
2023-03-03 10:18:11 +00:00