1. Local declarations don't participate in IR-linkage, because they
can be referenced only inside the same body -> can be dropped
from IR text tests.
2. Mangled names for private declarations computed by descriptors/fir
are actually not used anywhere (they are recomputed by IR
immediately before serialization of IR). But sometimes such
mangled names diverge between K1 and K2 -> don't check them, but
always check mangled names computed by IR even for private
declarations.
3. Also: Drop DUMP_LOCAL_DECLARATION_SIGNATURES test directive.
^KT-57428 Obsolete
^KT-57430 Obsolete
^KT-57434 Obsolete
^KT-57778 Obsolete
^KT-57775 Obsolete
Code generation for the intrinsic `jvmDebuggerInvokeSpecialIntrinsic`
includes dispatch receiver, but ignores arguments
passed to a super-call. This change passes arguments in the IR
representation in an array, and during the codegen the array is
unpacked and the bytecode is generated for the elements,
right before generating the actual `INVOKESPECIAL`.
#KT-63848 fixed
Merge-request: KT-MR-13270
Merged-by: Alexander Kuznetsov <Aleksander.Kuznetsov@jetbrains.com>
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>
`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.
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
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.
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.
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
- 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.