Dmitriy Novozhilov
6bb7fc05df
[IR] Split implementation of DataClassMembersGenerator to IR based and descriptor based
2023-07-05 14:57:55 +00:00
Kirill Rakhman
04f16d75d2
[K2 MPP] Fix hasStableParameterNames check for fake overrides
...
This fixes a false positive error regarding different
parameter names in expect actual matching with fake overrides.
#KT-59737 Fixed
2023-07-05 13:30:01 +00:00
Sergej Jaskiewicz
6281faa063
[IR] Move IrFactory#createBlockBody overloads to extension methods
...
This is to prepare for IrFactory auto-generation (KT-59308).
2023-07-04 15:19:28 +00:00
Sergej Jaskiewicz
3f6420c5b9
[IR] Move IrFactory#createExpressionBody overloads to extension methods
...
This is to prepare for IrFactory auto-generation (KT-59308).
2023-06-30 11:06:09 +00:00
Alexander Udalov
b75aa9af4e
IR: do not copy call in CrossFileCallAdjuster
...
This is just a refactoring/optimization that makes use of the fact that
IrCall.symbol is now mutable.
2023-06-22 17:18:59 +00:00
Alexander Udalov
42057b7fe0
IR: do not copy call in ForLoopsLowering
...
This is just a refactoring/optimization that makes use of the fact that
IrCall.symbol is now mutable.
2023-06-22 17:18:59 +00:00
Alexander Udalov
bb4d25dfc9
IR: do not copy calls/references in ExpectSymbolTransformer
...
This is just a refactoring/optimization that makes use of the fact that
IrCall.symbol and other similar fields are now mutable.
2023-06-22 17:18:59 +00:00
Alexander Udalov
978553c513
IR: make call symbols mutable
...
This will help in some lowerings which need to change the callee of a
call. Instead of creating a new call and copying everything (type
arguments, value arguments, receivers, annotations, attributes, ...),
it's easier to modify the `symbol`. In a way, this is a continuation of
22b4b29292 .
2023-06-22 17:18:59 +00:00
Sergej Jaskiewicz
0b7db067e6
[IR] Reorder parameters in IrFactory#createField
...
This is to prepare for IrFactory auto-generation (KT-59308).
2023-06-22 15:55:02 +00:00
Dmitriy Novozhilov
1b24b95cde
[FIR] Check for subtyping during actualization of supertypes of expect class
...
^KT-59356 Fixed
2023-06-22 07:05:31 +00:00
Dmitriy Novozhilov
5717b59f52
[FIR/IR] Introduce an ability to propagate generated IR annotation to metadata
...
^KT-58638 Fixed
2023-06-21 06:56:59 +00:00
Artem Kobzar
039b5fca7a
[K/JS] Use declared upper-bound types for parameters inside inlined functions body, instead of the provided types
2023-06-20 12:01:28 +00:00
Dmitriy Novozhilov
d972b78627
[FIR] Allow actualization of expect classes by classes with wider visibility
...
^KT-59355 Fixed
2023-06-19 11:09:32 +00:00
Abduqodiri Qurbonzoda
295fdc36ce
Enum.valueOf throws inconsistent exception across multiple platforms #KT-35116
2023-06-16 22:18:20 +00:00
Ivan Kylchik
0e2b348fa0
[IR] Try to tun IrInterpreterKCallableNamePreprocessor only once
...
#KT-58923 Fixed
2023-06-14 19:02:39 +00:00
Ivan Kylchik
dd264cff50
[IR] Split const folding into necessary one and for optimizations only
...
In this commit we have a lot of change in test data. This was caused
by the way where we evaluate constants. We split constant evaluation
into two distinct parts: only necessary evaluations for `fir2ir`
(like const val and annotations) and optimizations for lowering.
Now we don't do all constant evaluation on `fir2ir`, but IR
dump is executed after this phase, so test data changed.
#KT-58923
2023-06-14 19:02:39 +00:00
Ivan Kylchik
0021a5f655
[K2] Save inlined java field into special InlineConstTracker
2023-06-14 19:02:39 +00:00
Dmitriy Novozhilov
29afd0dc97
[FIR] Properly match expect fun interfaces with java interfaces
2023-06-10 07:33:30 +00:00
Dmitriy Novozhilov
8b9079d026
[Expect/Actual] Add ability to skip matching of constructors of expect enums
...
In terms of MPP there are no such thing as `expect constructor` for enums,
but they are physically exist in FIR and IR, so we need a switch which
skips matching for them
FE 1.0 implementation did not touch to avoid any hidden changes
2023-06-10 07:33:29 +00:00
Dmitriy Novozhilov
ba41e8ec38
[IR] Use common expect/actual matching algorithm in IR actualizer
...
^KT-58578 Fixed
2023-06-10 07:33:29 +00:00
Ilmir Usmanov
95662234d0
JVM: Support instantiation of annotations with vararg parameters
...
when they are instantiated without argument.
#KT-59033 Fixed
2023-06-06 17:27:52 +00:00
Ivan Kylchik
b9856320cf
[IR] Rename fqName to packageFqName for IrPackageFragment
2023-06-02 16:38:04 +00:00
Artem Kobzar
bfd57fd2df
[K/JS, K/Wasm] Optimize simple objects declaration and usage ^Fixed KT-58797
2023-06-02 14:23:40 +00:00
Ivan Kochurkin
432c781ff7
[K2, MPP] Fix actualization of fake overrides (fixes a set of bugs in coroutines / ktor)
...
Split MissingFakeOverridesAdder on FakeOverridesActualizer and ActualFakeOverridesAdder
^KT-57984 Fixed
^KT-58003 Fixed
^KT-58124 Fixed
^KT-57833 Fixed
^KT-58153 Fixed
2023-05-24 14:54:51 +00:00
Ivan Kylchik
e58e20fc7b
[IR] Add special preprocessors for ir interpreter
...
These preprocessors allow us to modify IR at first and only after that
try to evaluate. With this we can drop `KCallableNamePropertyLowering`.
2023-05-18 18:16:54 +00:00
Ivan Kylchik
104ac4bd69
[IR] Move IR interpreter transformers into separate package
2023-05-18 18:16:53 +00:00
Ivan Kylchik
55cac9caa6
[IR] Separate IrConstTransformer into two distinct classes
...
The first one `IrConstExpressionTransformer` is responsible for
transforming ordinary expressions and the second one
`IrConstAnnotationTransformer` is responsible for annotations.
#KT-57812
2023-05-11 08:22:13 +00:00
Sergej Jaskiewicz
93d1932ccb
[IR] Make IrReturnTargetSymbol a sealed interface
2023-05-10 11:51:26 +00:00
Sergej Jaskiewicz
6c211f3a39
[IR] Make IrFunctionSymbol a sealed interface
2023-05-10 11:51:26 +00:00
Pavel Kunyavskiy
68a68b2763
[K/N] Refactor KonanSymbols to avoid descriptors when built over FIR
...
^KT-58437
2023-05-08 07:51:56 +00:00
Evgeniy.Zhelenskiy
bf5fa61ffb
[IR] Unify MFVC bridge redirection, fix related bugs, support MFVC overriding functions with default parameters
...
#KT-1179
2023-05-04 16:44:18 +00:00
Pavel Kunyavskiy
af318fdfb0
[K/N] Fix default arguments in suspend functions
...
AddContinuationToFunctionsLowering was rewritten in way the order
of this lowering and defaults lowering doesn't matter.
^KT-58214
2023-05-03 12:14:53 +00:00
Dmitriy Novozhilov
e9c8be3b64
[FIR] Don't generated fake-overrides for private declarations of actualized super classes
...
^KT-58252 Fixed
2023-05-02 10:24:53 +00:00
Pavel Kunyavskiy
f55fd481e9
[K/N] Refactor default argument lowering to avoid boxing
...
Current inline classes API is not compatible between different backends.
So implementing common function required for this optimization
was not possible in Native backend.
So, common default arguments lowering was refactored to make bigger
piece of code replaceable in backends.
^KT-57860
2023-05-01 13:04:21 +00:00
Igor Chevdar
4e661a6337
[IR] Liveness analysis
...
Compute actually used variables for specified IR nodes
2023-04-24 09:57:06 +03:00
Igor Chevdar
6a79163205
[K/N][IR] Extracted a common util function
2023-04-24 09:36:43 +03:00
Ivan Kochurkin
b72dcf8b37
[K2, MPP] Fix actualization of nullability-based overloads
...
^KT-58043 Fixed
2023-04-20 17:22:45 +00:00
Ivan Kylchik
37c3dff0c5
[K2] Add new class to keep track of evaluated const by IrInterpreter
2023-04-19 13:52:42 +00:00
Artem Kobzar
33c5068b79
[K/JS] Rework IR deserialization and lowering phases to consume less memory
2023-04-19 13:10:19 +00:00
Dmitriy Dolovov
87125d0703
[PL] Fix: Don't run partial linkage on early stages when no external dependencies have been loaded yet
2023-04-18 09:22:54 +00:00
Ivan Kochurkin
beaeb405d2
[K2, MPP] Build expect-actual map for type parameters from functions
...
^KT-57181 Fixed
2023-04-17 19:55:35 +00:00
Ivan Kochurkin
3a60b30dae
Minor: IrActualizationResult -> IrActualizedResult
2023-04-17 19:55:35 +00:00
Ivan Kochurkin
b7bb9c317f
[K2, MPP] Introduce FunctionDefaultParametersActualizerVisitor and use it in FunctionDefaultParametersActualizer
...
^KT-57263 Fixed
2023-04-17 19:55:34 +00:00
Ivan Kochurkin
1073797ed3
[IR] Extract ActualizerSymbolRemapper and ActualizerVisitor from ExpectActualLinker
...
It will provide the possibility to use them not only locally
Clarify code of IrActualizer pipeline
2023-04-17 19:55:34 +00:00
Evgeniy.Zhelenskiy
aceab2ac1f
[IR] Fix KT-57973
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-57973
2023-04-17 12:33:10 +00:00
Artem Kobzar
c695da1bed
[K/JS] Allow declare inline functions inside external declarations with a million suppresses ^KT-48154 Fixed
2023-04-13 08:53:57 +00:00
Ivan Kochurkin
9a09565cf6
[K2, MPP] Handle overloaded properties
...
^KT-57532 Fixed
2023-04-12 20:43:57 +00:00
Igor Yakovlev
edf4e80165
[Wasm] Fix for ReturnableBlockLowering invalid ir type for converted inlined blocks
2023-04-12 13:24:02 +00:00
Kirill Rakhman
6e7b078873
[IR] Refactor IrActualizerUtils to use buildString
2023-04-05 08:44:57 +00:00
Kirill Rakhman
4dfef6ba6f
[IR] Fix arguments of backend error messages
...
#KT-57662 Fixed
2023-04-05 08:44:56 +00:00