Commit Graph

154 Commits

Author SHA1 Message Date
vladislav.grechko 54858c2118 [FIR] Fix naming of local classes when serializing metadata
^KT-63655: Fixed
^KT-63901: Fixed
^KT-63988: Fixed
2024-02-07 12:30:50 +00:00
vladislav.grechko 34bac48541 Add JVM ABI K1/K2 consistency tests 2023-12-26 10:18:19 +00:00
Vladimir Sukharev 7930885131 [Test] Convert IGNORE: NATIVE directives in box tests from M to R
^KT-59057

Merge-request: KT-MR-10757
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-06-23 14:15:48 +00:00
Vladimir Sukharev 1e05cb308c [K/N] Convert and enable some tests using System.out?.println()
^KT-59057

Merge-request: KT-MR-10546
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-06-15 20:00:27 +00:00
Dmitriy Novozhilov f7733e819d [FIR] Approximate captured types during approximation of local types
^KT-57222 Fixed
2023-04-30 15:58:32 +00:00
Nikolay Lunyak bcfafc601e Add EnumEntries to minimal-stdlib-for-tests
This change allows to revert adding `WITH_STDLIB` directive
to tests which happened at `a9343aeb`.

Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com>
2023-03-02 10:23:38 +00:00
Svyatoslav Kuzmich 26c1098a4f [Wasm] Fix inliner issues (KT-56584)
* Fix objects in inline functions and lambdas:
  * Add common lowerings used in K/JS and K/Native
* Fix inline lambda call detection logic in presence of additional casts


Merge-request: KT-MR-8791
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
2023-02-13 13:14:43 +00:00
Nikolay Lunyak a9343aeb7d [FIR] KT-55840: Ensure everything actually works
This inconsistency is present due to not using the `// WITH_STDLIB`
in the above tests. When K1 creates the enum, it tries to generate
`entries()`, and for that it tries to load `kotlin.enums.EnumEntries`,
but this is actually an unresolved reference. K1 silently swallows it,
and proceeds.

The reason K2 doesn't fail is that in order to generate `entries()` it
simply creates the necessary `ConeClassLikeType` with the desired
`classId` instead of loading the whole `ClassDescriptor`.

The reason we can still observe `$ENTRIES` and `$entries` in K1
is because they are generated during the JVM codegen, and it
only checks if the `EnumEntries` language feature is supported. It
doesn't check if the `entries` property has really existed in IR
(by this time it's expected to have already been lowered to the
`get-entries` function - that's why "has ... existed").

The reason why the codegen doesn't fail when working with
`kotlin.enums.EnumEntries` is because it creates its
own `IrClassSymbol`.

^KT-55840 Fixed

Merge-request: KT-MR-8727
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2023-02-10 16:57:51 +00:00
Igor Chevdar 12d0b1e846 [K/N][codegen] Fixed wrong arguments evaluation order for IrSetField
#KT-56326 Fixed
2023-02-08 06:56:09 +00:00
Vladimir Sukharev fbcb07d375 [K2/N] KT-55828 Enable already fixed and accidentally disabled tests
Merge-request: KT-MR-8605
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-02-01 10:44:26 +00:00
Vladimir Sukharev ff6ea40056 KT-55828: Disable failed tests for K2 Native in OPT mode
Merge-request: KT-MR-8229
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-01-09 15:09:04 +00:00
Steven Schäfer 7d59c7689c JVM IR: Avoid direct invokes in callable reference tests
Due to the direct invoke optimization, most callable reference tests
were not generating callable references/lambdas.
2022-07-14 23:24:18 +02:00
Pavel Kunyavskiy dfcf2cfa84 [K/N] Fix extracting local classes from lambda in cached inline function
^KT-52540
2022-06-27 14:09:27 +00:00
Ivan Kochurkin 05bed8f751 [FIR] Hide local type for return type of single expression function ^KT-51418 Fixed 2022-04-18 15:36:18 +00:00
Victor Petukhov 3aabc8d666 [FE 1.0] Substitute anonymous object's supertypes while using that in public declarations
^KT-46136 Fixed
2022-03-23 21:13:32 +00:00
Ivan Kochurkin f68c8f8f01 [FIR] Fix visibility issues with private members within inner and anonymous scopes ^KT-49992 Fixed 2021-12-09 12:31:24 +00:00
Mikhail Glukhikh cf104c8433 FIR: add status line to all failing black box tests 2021-11-20 03:37:31 +03:00
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Igor Chevdar 232608e300 [box-tests] Added a test 2021-10-04 14:34:56 +00:00
Svyatoslav Kuzmich c88cde2f8b [Wasm] DONT_TARGET_WASM_BACKEND => IGNORE_BACKEND in testdata 2021-10-02 06:14:35 +00:00
Svyatoslav Kuzmich ab9a23cbfa [Wasm][Stdlib] Reuse K/N collections and StringBuilder 2021-10-01 17:18:49 +03:00
Igor Laevsky c526145a48 WASM: Disable bunch of tests which expose the same issue after switch to the wasm native strings 2021-08-04 16:23:37 +03:00
Dmitriy Novozhilov b9c549803d [Test] Replace public fun box() with fun box() in all box tests 2021-08-01 22:23:40 +03:00
Mikhael Bogdanov c9c82ab3a6 Update test affected by SafeCallsAreAlwaysNullable feature 2021-07-29 19:45:55 +02:00
Mikhael Bogdanov 1fe1c197ee Mute WASM safeAccess.kt test
Update JS tests
2021-07-29 19:45:54 +02:00
Mikhael Bogdanov 392dce9a40 Update test affected by PrivateInFileEffectiveVisibility feature 2021-07-16 13:26:36 +00:00
Dmitry Petrov 851980e36f JVM_IR KT-45103 optimize direct invoke for lambdas and callable refs 2021-05-18 22:20:12 +03:00
Mads Ager 7dbb0c7d20 [IR] Make IrGetObjectValue copyable to avoid duplicate IR nodes.
Fixes KT-45170
2021-03-09 09:48:16 +03:00
Alexander Udalov 73aa465ee9 Add tests for issues fixed in JVM IR
Note that KT-30696 is fixed only in the single-module case, and KT-42012
is not fixed fully (see KT-44855).

 #KT-30041
 #KT-30629
 #KT-30696
 #KT-30933
 #KT-32351
 #KT-32749
 #KT-38849
 #KT-42012
 #KT-42990
 #KT-44234
 #KT-44529
 #KT-44631
 #KT-44647
2021-02-10 21:42:10 +01:00
Mikhail Glukhikh f85fc47383 FIR: introduce separate companion object resolve context
Before this commit, during the resolve of companion objects we used
the same context than for any nested class. However, during companion
object resolve we should not have companion object receiver itself
accessible in any case (in particular, it should not be accessible
in constructor). So in this commit we introduced separate context
for this purpose.
2021-01-18 08:32:06 +03:00
Jinseong Jeon aaa3f2e2c1 FIR2IR: correct IR origin for substitution overrides
#KT-44054 Fixed
2020-12-23 16:13:05 +03:00
Jinseong Jeon 34dbbdce07 FIR2IR: use lookupTag or class to getLocalClass, not classId
Before this commit, we sometimes tried to fetch anonymous object by id,
getting sometimes a wrong result because it's singleton.
Now we use lookupTag or FIR class itself instead.

#KT-44050 Fixed
2020-12-23 16:12:58 +03:00
Dmitry Petrov e17158d961 JVM_IR KT-42758 don't use 'this' for object self-reference by name 2020-11-19 16:34:04 +03:00
Svyatoslav Kuzmich fdd7fa5aea [Wasm] Mute codegen box tests 2020-11-09 16:04:43 +03:00
Jinseong Jeon 99286a6ce3 FIR2IR: introduce & use ClassId-based lookup for local class as IrParent 2020-08-26 10:08:16 +03:00
Jinseong Jeon bff36e0199 FIR2IR: convert annotations on FirTypeRef 2020-07-30 11:25:36 +03:00
Jinseong Jeon da6e96f4f1 FIR2IR: don't declare dispatch receiver for local functions 2020-07-28 13:43:10 +03:00
Mikhail Glukhikh fbbf4e06ba [FIR] Support imported callable from object properly #KT-35730 Fixed 2020-07-10 10:25:39 +03:00
Denis Zharkov 38922a84f1 FIR: Do not create synthetic properties for non-Java accessors
^KT-35495 Fixed
2020-06-11 11:01:43 +03:00
Mikhail Glukhikh 19f1a3de1a [FIR2IR] Populate overridden symbols also with public symbol inheritors 2020-05-28 22:19:21 +03:00
Mikhail Glukhikh 85760770a8 [FIR2IR] Initialize built-in symbols at start of conversion 2020-05-28 22:18:20 +03:00
Vitaly fe047f9b47 [JS BE] mutes tests for JS_IR_ES6, which muted for JS_IR 2020-05-27 00:32:56 +03:00
Mikhail Glukhikh 457fb09e3a [FIR] Use tower to resolve delegated constructors, set dispatch receiver 2020-05-12 16:57:07 +03:00
simon.ogorodnik a11866ab5a [FIR2IR] Fix labeled this references 2020-04-30 13:15:43 +03:00
Jinseong Jeon ef09850df8 FIR2IR: set superQualifierSymbol for super call 2020-04-27 11:50:26 +03:00
Mikhail Glukhikh e1c78b31a6 [FIR2IR] Convert explicit receiver in advance 2020-04-10 14:49:27 +03:00
Mikhail Glukhikh a93c7a39e0 [FIR] Provide object [dispatch] && callable reference receivers properly 2020-04-09 15:22:56 +03:00
Mikhail Glukhikh 5c758af0a6 [FIR] Use ScopeSession from resolve transformer in FIR2IR 2020-04-09 15:22:55 +03:00
Juan Chen 882e6931d6 [FIR] Add backing fields to const properties during Fir2Ir translation 2020-04-06 16:41:57 +03:00
Mikhail Glukhikh d7460d47de [FIR] Generate dispatch & extension receivers for variable assignments 2020-04-03 17:21:21 +03:00