Alexander Udalov
fc0ce415d7
JVM: remove source code from not null assertion message text
...
This is implemented under a LanguageFeature which will be enabled later,
when behavior change described in KT-57570 is approved.
#KT-57570
2023-04-28 10:26:15 +00:00
Zalim Bashorov
bd852e87ab
[Wasm] Add an option to dump declaration IR sizes to file
2023-04-25 19:44:03 +02:00
Zalim Bashorov
3c343e3074
[Wasm, JS] Minor: make description non-nullable
2023-04-25 19:44:02 +02:00
Zalim Bashorov
62b21ac078
[Wasm] Add an option to dump reachability info to file
2023-04-25 19:44:02 +02:00
Artem Kobzar
27b103e2ca
[K/JS] Eliminate duplication of init block inside exported ES-classes ^KT-58246 Fixed
2023-04-25 16:21:08 +00:00
Alexander Korepanov
81b591ed21
[JS IR IC] Interface default implementations affect IC hash
...
Adding or removing a method or property with
a default implementation to an interface should
invalidate all children: we must regenerate JS code for them
^KT-56237 Fixed
2023-04-25 15:34:22 +00:00
Alexander Udalov
a0790047f7
JvmDefault: remove -Xjvm-default modes "enable" and "compatibility"
...
#KT-54746
2023-04-25 14:33:00 +00:00
Artem Kobzar
4327c6645a
[K/JS] Save order for modulesWithReachableTopLevels and deserializersForModules to make partial linkage work again
2023-04-25 12:20:14 +00:00
Pavel Mikhailovskii
37ed7beda0
KT-57135 Take into account annotations' allowed targets
...
- Check allowed targets
- Attach field annotations to the backing field
2023-04-25 12:18:26 +00:00
Nataliya.Valtman
2a391f7330
Move kotlin-build-statistic project to :compiler
2023-04-25 11:29:09 +00:00
nataliya.valtman
e34dd043da
Add minimal statistic report for JPS build
...
Fix build stat for gradle 8
#KT-56438 Fixed
2023-04-25 11:29:09 +00:00
Dmitriy Dolovov
9d4db72d72
[PL] Fix: Don't raise an error when external interface inherits from external class
...
^KT-57378
2023-04-25 08:00:14 +00:00
Dmitriy Dolovov
3bc744af35
[PL] Fix: Don't raise an error for unimplemented callables in external classes
...
^KT-57378
2023-04-25 08:00:14 +00:00
Artem Kobzar
9bcfd093c5
[K/JS] Remove super keyword insertion if the body of method was moved into another place (private methods, lambdas, coroutines) ^KT-57990 Fixed
2023-04-24 13:54:36 +00:00
Alexander Udalov
f04d01cf21
JVM IR: fix behavior of Enum.entries for unlowered enums
...
#KT-57671 Fixed
2023-04-24 12:43:43 +00:00
Alexander Udalov
449c866c7a
JVM IR: minor, fix enum lowering kdoc
...
invokedynamic-based logic was removed in 562b27db4e .
2023-04-24 12:43:43 +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
Zalim Bashorov
a9683bd4a8
Wasm: temporary force keeping Unit_getInstance in DCE
2023-04-22 17:41:23 +00:00
Ivan Kochurkin
b72dcf8b37
[K2, MPP] Fix actualization of nullability-based overloads
...
^KT-58043 Fixed
2023-04-20 17:22:45 +00:00
Alexander Udalov
bc7aea1426
Kapt+JVM_IR: generate delegated members correctly
...
Generate a declaration for each delegated member without body. If we
don't generate delegated declarations, subclasses will have incorrect IR
with unbound symbols in fake overrides.
#KT-58027 Fixed
2023-04-19 23:04:45 +00:00
Alexander Korepanov
898ed7658a
[JS IR] Update list of config settings affecting IC invalidation
2023-04-19 15:43:22 +00:00
Ivan Kylchik
c00c7ffbe0
[K2] Use file name as one of parameters to extract evaluated const
...
It is not enough to store evaluated constants only by
<startOffset, endOffset> pair. We need to consider case there constant
can be located in different files with the same offset but with
different values.
#KT-57928 Fixed
#KT-57929 Fixed
2023-04-19 13:52:46 +00:00
Ivan Kylchik
1ddcdcfc39
[IR] Rewrite logic around object interpretation
...
Basically we want to allow object interpretation only when we try
to access some const val property.
#KT-57810 Fixed
2023-04-19 13:52:44 +00:00
Ivan Kylchik
5956e9b500
[IR] Print evaluated const directly into interpreter's tests
2023-04-19 13:52:44 +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
Zalim Bashorov
34f8851ac1
[psi2ir] Ignore private members when creating fake overrides from descriptors
...
The behavior is unified with the IR deserializer.
See `isOverridableMemberOrAccessor` in IrOverridingUtil.kt
Without this change, if we add a private member to the Any in wasm stdlib,
the compiler starts crashing with a linker error.
It's hard to write a relevant, self-contained box test for that since it requires
adding a private member to Any and affects **only** "virtual" FunctionN interfaces.
2023-04-18 18:44:47 +02:00
Alexander Korepanov
79d378f2bd
[JS IR] Perform optimizations on the generated JS code
...
The patch adopts and reuses the optimizations from the legacy backend.
The optimizations remove useless temporary variables,
statements and simplify generated JS code.
The optimizations can be disabled by `-Xoptimize-generated-js=false`.
Related to KT-51139
2023-04-18 12:49:33 +00:00
Alexander Korepanov
84b5af3c89
[JS IR] Style fixes
2023-04-18 12:49:32 +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
Dmitriy Dolovov
9d3deb7e0e
[PL] Fix: Don't count value arguments vs value parameters for external functions
2023-04-18 09:22:52 +00:00
Dmitriy Dolovov
b644fc009d
[PL] Fix: Constructor of external class may delegate to kotlin.Any regardless of the actual superclass
2023-04-18 09:22:52 +00:00
Dmitriy Dolovov
997b6e6722
[PL] Fix: Don't try to implement non-implemented fake overrides in stdlib & co
2023-04-18 09:22:51 +00:00
Dmitriy Dolovov
dd8eedb8da
[PL] Fix: Don't try to implement non-implemented overridden callables in case of inheritance delegation to Nothing
2023-04-18 09:22:51 +00:00
Dmitriy Dolovov
16da1af525
[PL] Support handling IR error types
2023-04-18 09:22:50 +00:00
Dmitriy Dolovov
161c3fccb6
[PL] Enable partial linkage by default
...
#KT-51447
#KT-51443
2023-04-18 09:22:50 +00:00
Alexander Korepanov
980d83eccd
[JS IR IC] Drop incremental cache after updating a klib set
...
Enabled Partial Linkage may replace entire IR expressions with a stub
during klib linking and loading. This may break the incremental cache
dependency graph. Dropping incremental cache files after updating klibs
(e.g. update klib version) covers almost all cases which
could not be tracked due to a broken dependency graph.
This patch could be reverted after fixing KT-57347
2023-04-18 09:06:07 +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
Zalim Bashorov
c114afb55d
[Wasm] export __callFunction_* only when a respective closure/lambda converter is used
2023-04-17 16:15:21 +00:00
Mads Ager
699ad87be2
[KAPT+IR] Use ErrorType for unresolved delegate class.
...
^KT-57946
2023-04-17 16:49:11 +02: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
Evgeniy.Zhelenskiy
8c748bfea4
[IR] Add more tests for inline/value classes secondary constructors
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-55333
2023-04-17 12:10:14 +00:00
Alexander Udalov
287e0909cc
Kapt+JVM_IR: do not generate super constructor call
...
#KT-57699 Fixed
#KT-57939 Fixed
2023-04-17 10:40:15 +00:00
Vladimir Sukharev
3cdf4bae07
[K2/N] Refactor KonanSymbols before re-enabling special backend checks
...
^KT-55598
Merge-request: KT-MR-9477
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-04-17 10:35:55 +00:00
Pavel Kunyavskiy
95541da9a1
[K/N] Remove unused default dependencies from klib
...
^KT-55603
2023-04-13 18:28:51 +00:00
Artem Kobzar
5dc6da2b33
[K/JS] Add serialization/deserialization for JsImport/JsExport nodes
2023-04-13 12:58:46 +00:00