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
b79e9c9f90
IR: Compute IrBasedDescriptor.isExpect where possible
2022-01-27 01:02:21 +03:00
Georgy Bronnikov
f4ddbb5e71
JVM_IR: remove DeclarationStubGenerator from deserializeLazyDeclarations.kt
...
No descriptor references remain.
2022-01-27 01:02:21 +03:00
Georgy Bronnikov
633e3a82e2
JVM_IR: record file facade fq name in serialized IR
...
This is needed to distinguish between file level privates by signature.
2022-01-27 01:02:20 +03:00
Georgy Bronnikov
c0f6508ff9
JVM_IR: do not compute stored file signature when not needed
2022-01-27 01:02:19 +03:00
Georgy Bronnikov
10c3429ce6
IR: remove dead code
2022-01-27 01:02:19 +03:00
Georgy Bronnikov
836925b4be
JVM_IR: replace calls to expect declarations in ExprectDeclarationRemover
...
References to expect declarations still remain in IrTypes;
we will need to remove those as well sooner or later.
2022-01-27 01:02:18 +03:00
Georgy Bronnikov
63359d8492
IR: use descriptor directly in IrLazyEnumEntryImpl
...
This works even when the symbol contains no descriptor
(as it does happen after deserialization).
2022-01-27 01:02:17 +03:00
Georgy Bronnikov
eda913554d
IR: compute correct IR-based mangles for Java fields
2022-01-27 01:02:17 +03:00
Georgy Bronnikov
044acbb5ef
JVM_IR: do not use return type in Java property mangles
...
Another case of discrepancy between IR-based mangles and
descriptor-based mangles.
2022-01-27 01:02:16 +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
Igor Yakovlev
2ec0411a7f
[WASM] DCE implementation
2022-01-26 23:40:41 +03:00
Dmitry Petrov
e55f7459f4
JVM_IR drop StripTypeAliasDeclarationsLowering
2022-01-26 12:49:20 +00:00
Mikhail Glukhikh
ad0d0ca47f
Drop redundant Suppress("RemoveExplicitTypeArguments")
2022-01-26 12:19:55 +00: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
Dmitry Petrov
baf4b3158c
JVM_IR merge lateinit lowerings into one
2022-01-25 13:50:21 +00:00
Sergey Bogolepov
2306834b06
[K/N] Fix comparison of IrConstantPrimitiveImpl
2022-01-25 09:11:00 +00:00
Xin Wang
ebcc2cc3b2
PSI2IR: KT-49485 chunk ktConditions to avoid stackoverflow
2022-01-24 19:28:59 +03:00
Alexander Korepanov
b40227b66e
[JS IR] Re-export all JS-exports from main module in multi-module mode
...
Add an implicit transitive re-export through
main module for all other module's JS-exports.
2022-01-24 15:17:56 +00:00
Igor Yakovlev
b22190ccc1
[WASM] Initialize constant fields by wasm-initializers
2022-01-20 19:18:46 +03:00
Alexander Udalov
f40a0ca704
JVM IR: avoid unnecessary toIrBasedKotlinType in ExpressionCodegen
...
Result of calling `ExpressionCodegen.gen` was used only in two call
sites in the inliner. In all other call sites, we were doing unnecessary
work (and sometimes were even failing) by trying to construct a
KotlinType instance out from an IrType.
Note that even though the code from KT-50617 no longer fails to compile,
the underlying problem is still not solved, since the IrType for foo's
dispatch receiver is constructed incorrectly. The reason is that
SymbolTable links everything by IdSignature, which is identical for
classes with the same FQ name.
#KT-50617 Fixed
2022-01-20 16:05:42 +01:00
Dmitry Petrov
12d8b189a9
JVM_IR KT-50856 fix generic signature for SAM proxy function
2022-01-20 10:41:55 +00:00
Xin Wang
56e5db9f0e
JVM_IR KT-50074 generate tableswitch for literal string subject of when expression
2022-01-19 22:25:49 +03:00
Alexander Udalov
3e7b1c027f
IR: make IrConst.copyWithOffsets an extension function
...
Co-authored-by: mcpiroman <mcpiroman@gmail.com >
2022-01-19 17:50:36 +01:00
Alexander Udalov
785eb83822
IR: refactor IrMemberAccessExpression internals
...
The idea is to keep the subclasses as simple as possible, to simplify
transition to auto-generated IR.
Co-authored-by: mcpiroman <mcpiroman@gmail.com >
2022-01-19 17:50:36 +01:00
Alexander Udalov
6f6bdd8aec
IR: change acceptChildren/transformChildren order in IrClass
...
Traverse properties of supertypes first, and then handle thisReceiver.
This will simplify transition to auto-generated IR.
2022-01-19 17:50:35 +01:00
Alexander Udalov
4ecc5e517a
IR: move some accept/acceptChildren/transformChildren to base classes
...
This will be helpful for the transition to auto-generated IR.
Co-authored-by: mcpiroman <mcpiroman@gmail.com >
2022-01-19 17:50:35 +01:00
Alexander Udalov
886545262b
IR: use mutable lists in IrStringConcatenation, IrTry, IrVararg
...
Make addArgument/addElement/putElement extension functions. This will
simplify transition to auto-generated IR.
Co-authored-by: mcpiroman <mcpiroman@gmail.com >
2022-01-19 17:50:35 +01:00
Alexander Udalov
9ee570ae54
IR: update copyright in ir.tree declarations and expressions
...
To simplify review of the upcoming IR tree generator.
Note that copyright is dated 2021, since that's in
license/COPYRIGHT_HEADER.txt which is used by generators.
2022-01-19 17:50:35 +01:00
Alexander Udalov
f17fc67683
IR: split files containing multiple classes/functions
...
This change only moves code around, no behavior is changed.
Specifically, ir.tree sources containing several declarations are split
into several files: one file per class, and one file for all extension
functions per package (IrDeclarations.kt, IrExpressions.kt,
IrVisitors.kt, IrConstructorCallTypeArguments.kt).
This is useful because after introducing IR tree generator, we can
easily see how generated sources are different from those which were
written manually, since Git will recognize file moves. Also, it will
keep Git history for sources which consisted of one big class + a couple
of extension functions (e.g. IrElementVisitorVoid.kt).
2022-01-19 17:50:35 +01:00
Alexander Udalov
e4b63d4a2b
IR: minor, rename some files to keep git history
2022-01-19 17:50:35 +01:00
Alexander Udalov
6445a29893
IR: remove type parameter in visitConst
...
Co-authored-by: mcpiroman <mcpiroman@gmail.com >
2022-01-19 17:50:35 +01:00
Alexander Udalov
81106526b1
IR: remove IrConstantObject.putArgument, IrConstantArray.putElement
...
Change `valueArguments` and `elements` types to be mutable lists. This
will simplify IR tree generator.
2022-01-19 17:50:35 +01:00
Alexander Korepanov
59173baf5a
[JS IR] Pass forward -Xir-property-lazy-initialization option
...
Pass forward -Xir-property-lazy-initialization option
for the incremental cache.
^KT-50175 Fixed
2022-01-19 13:28:47 +00:00
Pavel Kunyavskiy
2f853175c7
[K/N] Get rid of using base class default values for annotations
...
They can be not available in incremental compilation case
^KT-50211
2022-01-19 13:17:17 +00:00
Ilmir Usmanov
b794b0f1be
Check if there is bridge by signatures instead of IR
...
#KT-50649 Fixed
2022-01-18 16:57:00 +03:00
Alexander Korepanov
8fe4e9030f
[JS IR] Add an implicit cast to int for the mod operation
...
^KT-45620 Fixed
2022-01-18 12:01:37 +00:00
Sergej Jaskiewicz
ceb744b53b
Revert "[JS IR] [runtime] Remove valueOf method from Long"
...
This reverts commit e13b6b2a90 .
The significance of the breakage caused by the removal of `valueOf`
was underestimated.
#KT-50202 Open
2022-01-18 10:33:54 +00:00
Elena Lepilkina
d15270b9e5
[K/N][BCE] Check indexedObject type to avoid classes without optimized get operators
2022-01-14 21:48:08 +03:00
Xin Wang
60657022e0
JVM_IR: Generate counter loop for reversed array (KT-22429)
2022-01-14 21:48:07 +03:00
Evgeniy.Zhelenskiy
ec720ecfb5
[Ir, Fir2Ir] Remove unnecessary IsValue parameters of builder functions
2022-01-14 13:51:58 +00:00
Evgeniy.Zhelenskiy
e97ca2ada4
[Psi2Ir, Fir2Ir] Generate toString, hashCode, equals methods for MF VC
2022-01-14 13:51:57 +00:00
Dmitry Petrov
d184babda6
JVM_IR fix cast to non-null primitive type (FIR bootstrap issue)
2022-01-13 12:47:00 +00:00