Commit Graph

13 Commits

Author SHA1 Message Date
Alexander Korepanov f5d0c22736 [K2 JS] Unmute and link to issue some JS K2 tests 2024-01-18 15:48:55 +00:00
vladislav.grechko 34bac48541 Add JVM ABI K1/K2 consistency tests 2023-12-26 10:18:19 +00:00
Artem Kobzar 08bd0d6ce1 [K/JS] Generate tests for K2 + ES-classes compilation 2023-08-01 09:16:20 +00:00
Alexander Udalov ff65324172 JVM: use a safer version of fileParent for Java declarations
Java declarations do not have a file parent, their outer element is
IrExternalPackageFragment.

The test did not fail in K1 only by accident, because there's an extra
IrTypeOperatorCall on the property reference's dispatch receiver, which
automatically makes it non-inlinable. In K2, it's IrGetField, so we were
trying to compute if its dispatch receiver is inlinable and for that we
tried to get its fileParent, which resulted in exception if it comes
from Java.

Also refactor PropertyReferenceDelegationTransformer.canInline a bit.

 #KT-57955 Fixed
2023-05-11 13:17:34 +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
Ilya Chernikov 78ca733c38 FIR JS: add K2 variants of all other JS tests
except tests that are not possible to add without some modifications in
the test infra. See todos on the commented-out test declarations
2022-11-12 16:28:24 +01:00
Ilya Chernikov 5b3816cce5 Test infra: refactor IGNORE_BACKEND directive
treat it as a general one, introduce *_K1 and *_K2 variants for
more specific ignoring
2022-11-12 16:28:23 +01:00
Pavel Mikhailovskii 2ceccec2b8 KT-52551 Create a static initialization section in case of delegation to a property reference from a file class 2022-05-30 14:16:18 +00:00
Georgy Bronnikov 9d4ab09b41 FIR: mute test
Getters for synthetic Java properties are generated as substituted
declarations, which leads to wrong bytecode.
2022-05-19 12:02:43 +02:00
Ivan Kochurkin 8a8bdc9ff4 [FIR2IR] Fix synthetic property reference in delegate expression 2022-02-07 17:21:58 +03:00
Alexander Udalov 1471602c9f JVM IR: do not optimize properties with -Xno-optimized-callable-references
#KT-50019 Fixed
2021-12-08 03:15:49 +01:00
Alexander Udalov 4df937ff7f JVM IR: keep property for $receiver field of optimized delegated properties
For properties which delegate to other property via the getValue
operator from stdlib (see KT-39054), we generate `$receiver` field which
stores the receiver of the property reference used in the delegate. The
problem was that this backing field was missing `correspondingProperty`.
It's needed because it is used as a map key to store static fields in
`JvmCachedDeclarations.getStaticBackingField`. If it's null, accesses to
the static $receiver fields are not remapped correctly in
`RemapObjectFieldAccesses` and
`MoveOrCopyCompanionObjectFieldsLowering`, which led to ICCE or NSFE.

 #KT-49793 Fixed
2021-11-26 19:21:16 +01:00
Alexander Udalov 29c1fe1be1 Minor, move tests on KT-39054 into a subdirectory 2021-11-26 19:18:25 +01:00