Dmitrii Gridin
f3b3dcee9e
[LL FIR] LLFirLazyResolver: more generic checks and cleanup
...
We should use more common classes which it is possible to potentially
not miss any changes in the future
^KT-63681
2023-11-29 19:52:29 +00:00
Ivan Kylchik
8039e38519
[JVM_IR] Override visitInlinedFunctionBlock in ExpressionCodegen
2023-11-29 18:14:02 +00:00
Ivan Kylchik
1125891a13
[K2] Properly report diagnostics on const properties with Java usages
...
#KT-63752
#KT-59894
#KT-61920 Fixed
2023-11-29 16:33:18 +00:00
Ivan Kylchik
9f64edb31e
[FIR] Add hasConstantInitializer field in FirField class
...
This field is required to be able to analyze Java fields
without triggering lazy const evaluation.
#KT-59894
#KT-61920
2023-11-29 16:33:17 +00:00
Alexander Shabalin
6ca8f546fe
[K/N][tests] Migrate console runtime tests to new testing infra ^KT-61259
2023-11-29 16:22:28 +00:00
Alexander Shabalin
2abf9bccba
[K/N][tests] Close stdin after piping all the data ^KT-61259
2023-11-29 16:22:28 +00:00
Alexander Shabalin
97a86e0ee3
[K/N][tests] Add global TEST_KIND override ^KT-61259
2023-11-29 16:22:28 +00:00
Dmitriy Novozhilov
e75b29032f
Advance bootstrap to 2.0.0-dev-9013
2023-11-29 15:14:14 +00:00
Denis.Zharkov
bb548e3df4
K2: Fix exception for PropertyDelegateProvider + lazy case
...
^KT-63646 Fixed
2023-11-29 15:10:36 +00:00
Sergej Jaskiewicz
11d203d0a7
[IR] Add a kDoc for IrStringConcatenation
2023-11-29 14:52:04 +00:00
Sergej Jaskiewicz
2f98b4310a
[IR] Add a kDoc for IrAnonymousInitializer
2023-11-29 14:52:04 +00:00
Sergej Jaskiewicz
de502301ed
[IR] Add a kDoc for IrRawFunctionReference
2023-11-29 14:52:04 +00:00
Sergey Bogolepov
fea73ae64a
[Swift Export] Minor tests fixes and adjustments
2023-11-29 14:04:00 +00:00
Sergey Bogolepov
5eeb82bb6f
[Swift Export] Update sir-compiler-bridge to use SIR
...
Now that SIR has finally landed in the repository, we can remove
unnecessary entities from the bridge generator.
2023-11-29 14:03:59 +00:00
Artem Olkov
a040954f68
rrn/rd/KT-63270-swift-printer
...
KT-63270: add swift printing capabilities to SIR
Co-authored-by: Artem Olkov <artem.olkov@jetbrains.com >
Co-authored-by: Sergej Jaskiewicz <jaskiewiczs@icloud.com >
Merge-request: KT-MR-13191
Merged-by: Gleb Lukianets <Gleb.Lukianets@jetbrains.com >
2023-11-29 14:03:59 +00:00
Brian Norman
f9933adf5e
[FIR] Substitute parameter bounds when checking EXPANSIVE_INHERITANCE
...
^KT-63649 Fixed
2023-11-29 13:35:00 +00:00
Evgenii Mazhukin
3f8505a090
[IC] Smoke tests for KMP IC, part 1.5
...
Refactorings: rework testData to better reflect usages of declarations,
clean up internal test methods.
Merge-request: KT-MR-13232
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com >
2023-11-29 13:28:26 +00:00
Ivan Kylchik
35cf9cb0c4
[Project] Drop Generate Compiler Tests in favor of Generate All Tests
...
`Generate Compiler Tests` configuration is not working properly
because it doesn't include analysis api test generator. It was decided
to keep only one generate configuration for tests.
2023-11-29 11:50:01 +00:00
Ilya Goncharov
08e3cb300a
[JS] Migrate tests onto IR compiler with outputDir API instead of outputFile
...
^KT-61117 fixed
2023-11-29 11:21:56 +00:00
Yahor Berdnikau
e50f6e6bca
[Gradle] Add '@JvmStatic' annotation to companion methods in Kotlin types
...
This should improve usability in groovy scripts.
^KT-63601 Fixed
2023-11-29 10:24:23 +00:00
Dmitrii Gridin
21de05e5ac
[FIR] FirDeclarationsContractResolveTransformer: drop redundant transformations
...
There is no sense to trying to transform aliases and dangling lists
2023-11-29 10:24:03 +00:00
Dmitrii Gridin
06aad65ed3
[FIR] pass correct scope during annotation resolve for local declarations
...
We should pass container for correct logic around CLASS_HEADER_ANNOTATIONS.
Also, such correct containers will be used in the context of KT-63042 to
correctly detect an annotation ownership
^KT-63042
^KT-63842 Fixed
2023-11-29 10:24:03 +00:00
Dmitrii Gridin
fcb3f003dc
[FIR] add more tests on annotations for local declarations
...
^KT-63842
2023-11-29 10:24:02 +00:00
Dmitrii Gridin
98e12b0d7b
[FIR] add missed scope for annotations on property receiver, typealias and init and dangling list
...
Also, we shouldn't transform type alias during the implicit type phase
^KT-63042
^KT-63832 Fixed
2023-11-29 10:24:02 +00:00
Dmitrii Gridin
aaaf35fcb8
[FIR] add missed tests for declaration annotations
...
^KT-63832
2023-11-29 10:24:02 +00:00
Egor Kulikov
001e9a4489
[FIR] Source for property delegates should not be null
...
^KT-60327 fixed
Merge-request: KT-MR-13221
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com >
2023-11-29 08:27:53 +00:00
Roman Efremov
5cf33c3556
[IR] Render different quotes depending on IR constant type
...
This is needed for ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT diagnostic
message, but also seems to be good improvement for IR dumps in tests.
^KT-62559
2023-11-28 23:17:23 +00:00
Roman Efremov
8f6b6e17be
[IR] Print annotation arguments in report of ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT
...
Now IR checker is not duplicated by FIR checker reporting, so it's
useful to have more verbose report of annotations in diagnostic message.
^KT-62559
2023-11-28 23:17:23 +00:00
Roman Efremov
ec7a2c20d1
[FIR] Beautify ::class expression rendering in annotation arguments
...
...in `ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT` diagnostic message.
^KT-62559
2023-11-28 23:17:23 +00:00
Roman Efremov
c609de5195
[FIR] Refactor: extract class reference expression rendering out of
...
...`FirRenderer`.
^KT-62559
2023-11-28 23:17:23 +00:00
Roman Efremov
fa897e4148
[Tests] Cover rendering of KClass annotation args in
...
...`ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT`.
^KT-62559
2023-11-28 23:17:23 +00:00
Roman Efremov
29c82c668f
[IR] Prevent duplicated reports of ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT
...
...on property accessors and enum entries.
^KT-62559
2023-11-28 23:17:23 +00:00
Roman Efremov
2b120f6cdc
[Tests] Cover rendering of diagnostic text by IR checker in
...
...`ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT`.
^KT-62559
2023-11-28 23:17:23 +00:00
Svyatoslav Scherbina
3297e6774f
Bump Kotlin/Native version in KGP to 2.0.0-dev-8858
2023-11-28 19:08:21 +00:00
Sergey Bogolepov
fe77fe89f4
[Swift Export] update CODEOWNERS to include new modules
2023-11-28 18:00:43 +00:00
Sergey Bogolepov
ec82d54ef7
[Swift Export] Fix test infrastructure according to the review
2023-11-28 18:00:43 +00:00
Gleb Lukianets
c3725ec8c8
rrn/rd/KT-63266/sir-gen
...
Swift Export: generated sir snapshot
Merge-request: KT-MR-13128
Merged-by: Gleb Lukianets <Gleb.Lukianets@jetbrains.com >
2023-11-28 18:00:43 +00:00
Artem Olkov
1f4099833a
KT-63269: add dependency on dist for sir-analysis-api tests, as they are dependent on JVM dist
...
Merge-request: KT-MR-13142
Merged-by: Artem Olkov <artem.olkov@jetbrains.com >
2023-11-28 18:00:43 +00:00
Sergey Bogolepov
58bef34b9c
[Swift Export] Rename tests generation tool
...
Now it generates test-cases for sir-compiler-bridges as well,
so it makes sense to move away from Analysis API in its name.
2023-11-28 18:00:43 +00:00
Sergey Bogolepov
fe9ab0a1fc
[Swift Export] KT-63516
...
Add a sir-compiler-bridge module that adds Kotlin and C bridges
for SIR. As SIR is still WIP, the module accepts `BridgeRequest`
instances instead of SIR elements.
2023-11-28 18:00:43 +00:00
Artem Olkov
7c15e3f229
KT-63269: implementation for SIRGenerator with top-level functions
...
KT-63269: add test generator
Merge-request: KT-MR-12945
Merged-by: Artem Olkov <artem.olkov@jetbrains.com >
2023-11-28 18:00:43 +00:00
Sergey Bogolepov
cc14f11e2a
[Swift Export] initial infrastructure for Swift IR
...
New modules 'sir', 'sir-passes', and 'sir-analysis-api' were added under
'native:swift' for creating and manipulating Swift IR elements.
* `sir` contains the implementation of Swift IR.
* `sir-analysis-api` contains translation from Analysis API to SIR.
* `sir-passses` contains transformation passes.
This groundwork will allow to progress with the Swift IR.
2023-11-28 18:00:43 +00:00
Svyatoslav Scherbina
d15ee71b6c
Native: get rid of __NSCFBoolean references in ObjCExport
...
ObjCExport accessed `__NSCFBoolean` using
`objc_getClass("__NSCFBoolean")`. This class is a private API.
Remove this private API usage by getting the same class from
`[[NSNumber numberWithBool:YES] class]` instead.
Also remove `__NSCFBoolean` from the related error messages.
`__NSCFBoolean` didn't cause Kotlin-compiled apps to be rejected by
Apple, but this commit reduces the risk that this might happen in the
future, and addresses related user concerns.
^KT-62091
2023-11-28 17:57:47 +00:00
Svyatoslav Scherbina
707a650de1
Native: improve tests for __NSCFBoolean RTTI conversion
...
- ObjCExport tests for numbers RTTI conversions didn't really check
RTTI, because of a compiler optimization. Fix this by converting to
Any.
- Also add more tests that specifically check that bool `NSNumber` get
dynamically converted to `kotlin.Boolean` box. Those tests can't be
affected by possible future compiler optimizations.
2023-11-28 17:57:47 +00:00
Sergej Jaskiewicz
7bd4de65f8
[IR generator] Deduplicate field copying logic
2023-11-28 16:24:40 +00:00
Sergej Jaskiewicz
5f04bc8a27
[IR generator] Simplify computation of walkable children
...
Don't require to specify them explicitly via `isChild` in IR generator,
instead test the field type whether it is an element.
2023-11-28 16:24:40 +00:00
Sergej Jaskiewicz
ad4e97154f
[FIR/IR generator] Factor out allFields to AbstractElement
2023-11-28 16:24:40 +00:00
Sergej Jaskiewicz
38ee477ab4
[FIR/IR generator] Make AbstractField generic over itself
...
This will make some code more type-safe.
2023-11-28 16:24:40 +00:00
Sergej Jaskiewicz
c6eb7d6c21
[FIR/IR generator] Factor out walkableChildren and transformableChildren
2023-11-28 16:24:40 +00:00
Sergej Jaskiewicz
13ae129505
[FIR/IR generator] Move isSealed property to AbstractElement
2023-11-28 16:24:40 +00:00