Dmitriy Novozhilov
83d0a3e7a3
[FIR] Extract FirPluginKey into :core:compiler.common and rename it to GeneratedDeclarationKey
...
This is needed to avoid dependency on :compiler:fir:fir2ir module in
backend parts of compiler plugins. It will allow to publish those
parts into jars for IDE, where they are needed for working of debugger
and bytecode toolwindow
2022-06-07 14:12:25 +00:00
Georgy Bronnikov
ad625a4631
Fir2Ir: deal with Java fields in FirIrProvider
2022-05-19 12:02:43 +02:00
Georgy Bronnikov
0ef474a8d3
Do not set parent for deserialized IR declarations
2022-05-19 12:02:42 +02:00
Georgy Bronnikov
0012ba79e1
Fir2Ir: rework FirIrProvider
2022-05-19 12:02:41 +02:00
Dmitriy Dolovov
8de4eb798c
[IR] Fix removal-of-abstract-fun IR linkage case
...
^KT-50771
2022-05-18 18:05:09 +03:00
Igor Chevdar
f62e4e7b97
[klibs] Refactored BasicIrModuleDeserializer
2022-04-28 19:11:14 +00:00
Igor Chevdar
31eedebec6
[klibs] Added deserialization strategy: on-demand
...
With on-demand strategy only file header is deserialized
2022-04-28 19:11:13 +00:00
Igor Chevdar
231fe42c0a
[klibs] Fixed a bug in the signature-to-descriptor searcher
...
#KT-51927 Fixed
2022-04-14 07:33:56 +00:00
Pavel Kunyavskiy
7ba4d9e1f0
Rework nullability in IR
2022-03-30 06:27:59 +00:00
Evgeniy.Zhelenskiy
28bf83ceac
[IR] Unite inline class and multi-field value class representation
...
#KT-1179
2022-03-24 11:38:43 +00:00
Victor Petukhov
b5933c70e2
[FE 1.0] Refactor error utils: split error entities and introduce error type and error scope kinds
2022-03-23 21:13:33 +00:00
Sergey Bogolepov
2f46a45bfd
[IR] Deserialize annotation classes as open
...
Compiler backend relies on the fact that all annotation classes have
OPEN modality. This is not the case for libraries that were compiled
before 1.6.20. 948dc4f3 fixes compatibility for Lazy IR, here we do the
same for IR deserializer.
^KT-51302 fixed
2022-02-17 11:12:57 +00:00
Roman Artemev
412194dd75
[KLIB] Fix DNN type key in serializer
2022-02-11 18:24:32 +00:00
Dmitry Petrov
1fd2b9c9d9
IR fix DNN type mangling
2022-02-11 18:24:32 +00:00
Alexander Udalov
6379fe4c4c
JVM IR: link via descriptors instead of signatures by default
...
Doing so speeds up psi2ir ~2 times, and thus improves total compiler
performance by about 6-8%.
Unless JVM IR is in the mode where linking via signatures is the only
way (-Xserialize-ir, -Xklib), signatures are actually not needed at all,
SymbolTable can use the frontend representation (descriptors for FE1.0,
and hopefully FIR elements for K2) as hash table keys. The only catch is
that since other backends still need to work with signatures, all the
common IR utilities, such as irTypePredicates.kt, need to work correctly
for IR elements both with signatures and without.
Also, introduce a fallback compiler flag -Xlink-via-signatures, in case
something goes wrong, to be able to troubleshoot and workaround any
issues.
#KT-48233
2022-02-03 02:48:05 +01:00
Igor Chevdar
949e222305
[IR] Fixed a problem with signature search
...
The function findDescriptorBySignature should return null if no such signature has been found
letting the caller to handle this correctly. Fixes https://youtrack.jetbrains.com/issue/KT-50976
2022-02-02 22:46:16 +05:00
Georgy Bronnikov
d2418a1329
IR: never attach return type to signatures of fake overrides
...
Cases that necessitate the return type hack (see KT-46042) always
involve exactly two methods, exactly one of which is a fake override. It
is sufficient to mark one of them.
2022-01-27 01:02:25 +03:00
Georgy Bronnikov
f0fb0cbefe
IR: remove IdSignatureBuilder.isKotlinPackage()
2022-01-27 01:02:23 +03:00
Georgy Bronnikov
6a3a375372
IR: pass DescriptorByIdSignatureFinder as parameter to DeclarationStubGeneratorimpl
...
This breaks dependency between serialization.common and psi2ir modules.
2022-01-27 01:02:23 +03:00
Georgy Bronnikov
3f91674090
IR: inline and remove ...FromLinker methods from SymbolTable
2022-01-27 01:02:22 +03:00
Georgy Bronnikov
eda913554d
IR: compute correct IR-based mangles for Java fields
2022-01-27 01:02:17 +03:00
Georgy Bronnikov
4d2bcf7e66
IR: compute file local signatures from descriptors
2022-01-27 01:02:16 +03:00
Georgy Bronnikov
b6ddd758ec
IR: fix deserialization of publicly visible type parameters
2022-01-27 01:02:15 +03:00
Georgy Bronnikov
3cc883cf7b
IR: use DescriptorBySignatureFinder in DeclarationStubGenerator
...
Duplicating code that was used for the same purpose in
DeclarationStubGenerator is removed.
2022-01-27 01:02:14 +03:00
Dmitriy Dolovov
24b011436c
[IR] Improve partial linkage error messages
...
^KT-50775
2022-01-26 13:36:24 +03:00
Dmitriy Dolovov
319125607e
[IR, JS] Refactoring: Introduce JsUnlinkedDeclarationsSupport
...
^KT-50775
2022-01-26 13:36:23 +03:00
Dmitriy Dolovov
0b1a7d05a9
[IR] Move UnlinkedDeclarationsProcessor to another package
...
^KT-50775
2022-01-26 13:36:23 +03:00
Evgeniy.Zhelenskiy
e97ca2ada4
[Psi2Ir, Fir2Ir] Generate toString, hashCode, equals methods for MF VC
2022-01-14 13:51:57 +00:00
Dmitriy Dolovov
99300bd885
[IR] IrModuleDeserializerKind API cleanup
...
Related to #KT-50591
2022-01-12 11:05:12 +03:00
Dmitriy Dolovov
716ca3c319
[IR] Do best effort explaining IR linker issue to the user if computation of the detailed IR linker error message failed due to unexpected error
...
Related to #KT-50591
2022-01-11 21:53:12 +03:00
Dmitriy Dolovov
cb5a052227
[IR] Distinguish IrModuleDeserializers with and w/o underlying KLIBs
...
Fixes #KT-50591
2022-01-11 21:53:06 +03:00
Irene Dea
d444978ebf
Add support for attribute serialization.
2022-01-08 15:25:07 +03:00
Roman Artemev
723ef8f1fb
[KLIB] Deserialize backing field initializers of const in IB-only mode
...
Missing const initializer leads to crash in property accessors inline
lowering during IC recompilation on JS.
- fix #KT-50512
- add test for JS IR IC
2021-12-27 23:43:43 +03:00
Ilya Kirillov
49e9c47071
Move DynamicTypeDeserializer.id from IR module to common module
...
So, it can be used from cls-psi-stub-builder module
2021-12-27 16:23:06 +03:00
Roman Artemev
7341a17a5d
[IR] Cleanup ir serialization
2021-12-24 16:50:44 +03:00
Roman Artemev
4babc30624
[IR] Remove Persistent IR
2021-12-24 16:50:42 +03:00
Anton Bannykh
434c23a343
[JS IR] IC: avoid conflicts in local declaration signatures
2021-12-22 10:13:07 +03:00
sebastian.sellmair
2e55b82ba3
[MPP] Introduce allModulesProviding(Expects|Actuals)For filters
...
This new filters will also take care of filtering out descriptors
that are provided by 'regular' dependencies instead of 'dependsOn'
dependencies.
^KT-50120
2021-12-21 21:31:44 +00:00
Vyacheslav Gerasimov
f7a9065b75
Build: Use intellij maven repo instead of downloaded IDEA
...
#KTI-82
2021-12-16 21:48:23 +03:00
Roman Artemev
fb84287ae0
[KLIB] Compute relative path instead of absolute if relative base is provided
...
- normalize path if required
- path it in JS/Native
- path null for JVM (temporary)
- fix build
2021-12-15 21:13:52 +03:00
Roman Artemev
002d6723ac
[KLIB] Fix partially-linked mode
...
- don't mark super classes as unlinked if its type argument is
- check IrCall type as well
2021-12-08 20:18:15 +03:00
Anastasiya Shadrina
cd2fbfed2e
[IR] Add context receivers count to KotlinIr.proto
2021-12-02 20:24:47 +03:00
Anastasiya Shadrina
403ec7a5b1
[BE] Mangle context receiver params
2021-12-02 20:24:09 +03:00
Roman Artemev
53a65f818f
[KLIB] Support partially linked klibs in Ir linker
...
Now it's possible to compile against klib even if in there are
references to declarations from other klibs which are no longer existed
- add switch flag to turn on/off that mode
- pass switch flag from JS CLI to JS Linker
2021-11-19 01:16:35 +03:00
Roman Artemev
8381badcc4
[KLIB] Make IrModuleDeserializer constructor nullable
2021-11-19 01:16:30 +03:00
Roman Artemev
918ed1f077
[KLIB] Refactored IrSymbolDeserializer.kt
...
- extract function which creates a new symbols in linker
2021-11-19 01:16:29 +03:00
Roman Artemev
df9d039c03
[KLIB] Don't use module descriptor to compute library in error reporter
2021-11-19 01:16:28 +03:00
Roman Artemev
d809e260cb
[KLIB] Support DefinitelyNotNull type in KLIB
...
- add proto message
- serialize/deserialize
2021-10-28 18:03:11 +03:00
Dmitry Petrov
af18b10da9
JVM_IR KT-49203 generate stubs for not found classes
2021-10-15 12:15:49 +03:00
Georgy Bronnikov
a9ce25cf33
JVM_IR: only serialize inline functions themselves with -Xserialize-ir=inline
2021-10-11 11:53:30 +03:00