Dmitry Petrov
4ad6cfcf53
JVM_IR fix cast to not-null type
...
We can't rely on argument type nullability here, because it still can
hold an uninitialized value on JVM.
KT-50577 KT-35272 KT-27427
2021-12-30 13:41:17 +03:00
Alexander Korepanov
4a29a8a7af
[JS IR] Update an error on cross-module symbol redeclaration
...
The temporary solution for KT-50546.
The complete solution requires the understanding,
whether a cross-module symbol redeclaration is a valid case or not.
If the case is valid, the linker symbol table logic must be reworked.
2021-12-30 08:44:11 +00:00
Dmitry Petrov
5946242d75
JVM_IR fix special bridges in mixed Java/Kotlin hierarchies
...
KT-50257 KT-50476
2021-12-29 13:29:19 +00:00
Anton Bannykh
1b631da3a0
[JS IC] fix cross-module nested class references and interface inheritance
...
^ KT-50528 fixed
2021-12-29 16:04:06 +03:00
Ilmir Usmanov
549ea1a3b9
If fun interface methods are already mangled, do not mangle them twice
...
There are two possible scenarios, when fun interface method with inline
class parameter can be compiled.
First is when we compile fun interface itself before SAM adapter. In
that case, fun interface is lowered before we lower SAM adapter. Thus,
its method is mangled and mangling in the second time is an error.
Second is when we compile SAM adapter before the fun interface. In that
case, fun interface is not lowered, and we have to mangle the method.
The only way to distinguish there two cases I can think of is to check
whether the overridden method is already mangled, in other words, check,
whether the overridden method's suffix is doubled.
#KT-48499: Fixed
2021-12-28 17:35:12 +01: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
93e7eb2a8e
[JS IR] Cleanup StageController & Lowerings magic a bit
2021-12-24 16:50:47 +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
Roman Artemev
353bfe9018
[JS IR] Cleanup pir IC code
2021-12-24 16:50:40 +03:00
Ilya Goncharov
52ccf3d6ec
[JS IR] Not export fun with stable name and default argument
...
if it is not exported, but just with stable name
^KT-50464 fixed
Merge-request: KT-MR-5324
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com >
2021-12-23 15:21:00 +00:00
Ilya Goncharov
0b871d7534
[IR] Be ready if message of CompilationException throw exception
2021-12-22 10:50:36 +00:00
Anton Bannykh
4c33cb8016
[JS IR] IC: support per-module in K2JsIrCompiler
2021-12-22 10:14:33 +03:00
Anton Bannykh
ca60caa7e9
[JS IR] IC: pass through the main args
2021-12-22 10:14:32 +03:00
Anton Bannykh
106d3c4c9c
[JS IR] minor: eliminate obsolete namer creation
2021-12-22 10:14:08 +03:00
Anton Bannykh
aa628ae7b3
[JS IR] tests both per-module and regular mode
2021-12-22 10:14:08 +03:00
Anton Bannykh
95b5c44fba
[JS IR] IC: emit source maps
2021-12-22 10:13:07 +03:00
Anton Bannykh
4d8926cf26
[JS IR] IC: support per-module layout
2021-12-22 10:13:07 +03:00
Anton Bannykh
434c23a343
[JS IR] IC: avoid conflicts in local declaration signatures
2021-12-22 10:13:07 +03:00
Anton Bannykh
9b47a321d5
[JS IR] assert there are no clashing declarations
2021-12-22 10:13:07 +03:00
Anton Bannykh
175d722097
[JS IR] save JsIrProgramFragment definitions
2021-12-22 10:13:07 +03:00
Xin Wang
c74453d8d2
JVM_IR KT-48987 handle star projection arguments in smart casts
2021-12-22 00:48:15 +01:00
Xin Wang
944fa7e2f8
JVM IR: recover accidentally lost backingField (KT-49998)
2021-12-22 00:35:33 +01: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
sebastian.sellmair
e561b095f7
[MPP] Fix checkExpectedParameter using wrong ModuleFilter
...
KT-50120 Partially solved for functions.
ClassConstructors seem to be deserialized with 'isExpect=false'
which will still lead to wrong 'expect/actual matching'
2021-12-21 21:31:43 +00:00
Roman Artemev
9b49f0eb70
[JS IC] Support deleted files in IC cache invalidator
...
- support them in test too
2021-12-21 18:07:56 +03:00
Dmitry Petrov
8905586cbb
IR KT-50258 rewrite enum-based 'when' more carefully
2021-12-21 06:06:45 +00:00
Kristoffer Andersen
91e65edf86
[EE-IR] Minor: Refactor EvaluatorFragmentInfo
...
Part of migration to new constructor signature.
Unblocked by intellij-community#1839.
2021-12-20 19:04:19 +01:00
Alexander Korepanov
b82c306530
[JS IR] Add deep copying for callable reference
...
Perform a deep copy of callable reference adapter on inline lowering
^KT-49844 Fixed
2021-12-20 14:02:11 +00:00
Dmitry Petrov
976998b56c
PSI2IR KT-49526 function reference type approximation hack
2021-12-17 21:06:24 +00:00
Svyatoslav Scherbina
3fd4d90cca
Native: remove harmful assertions from NaiveSourceBasedFileEntryImpl
...
These assertions checked that nobody requests line and column number
for the UNDEFINED_OFFSET.
But diagnostic and crash reporting tools might request line and column,
and crashing during crash reporting is not great.
So handle UNDEFINED_OFFSET gracefully instead, in a conventional manner.
2021-12-17 14:49:34 +00:00
Artem Kobzar
ab7615adaf
fix: fake override on interfaces.
2021-12-17 14:22:46 +00:00
Dmitry Petrov
0805916564
IR KT-47483 handle 'Nothing' in array constructor call
2021-12-17 13:43:59 +03:00
Pavel Kunyavskiy
c9e9cbb62d
[K/N] Fix vtable generation for nested suspend function inheritance
...
^KT-50304
2021-12-17 10:30:48 +00:00
Vyacheslav Gerasimov
f7a9065b75
Build: Use intellij maven repo instead of downloaded IDEA
...
#KTI-82
2021-12-16 21:48:23 +03:00
Dmitry Petrov
8c71e38c92
JVM_IR KT-49765 bridge for throwing stub should just throw UOE
2021-12-16 21:07:12 +03:00
Simon Ogorodnik
7b8ece8758
FIR: Make constraint injector treat stub types as type variables
2021-12-15 22:22:55 +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
Leonid Startsev
2eac2ff3a2
Support Array<KClass> in instantiated annotations
...
#KT-47703 Fixed
2021-12-15 16:05:29 +00:00
Tianyu Geng
a5844b754e
Type Approximation: add separate flag to control approx. anonymous type
...
This extra flexibility is useful for IDE where we always want to
approximate anonymous types but may not want to approximate other local
types
2021-12-15 16:09:27 +03:00
Dmitry Petrov
9375f41936
JVM_IR KT-50073 inline callable reference adapter into 'invoke'
2021-12-14 14:35:12 +00:00
Dmitry Petrov
34c70ea04e
JVM_IR KT-50193 result of !! is non-null
2021-12-14 17:10:20 +03:00
Victor Petukhov
24900630cb
Revert "Revert "[FE 1.0] Provide an API to clean compile time initializer cache for variable descriptor""
...
This reverts commit faeb5d21ab .
2021-12-14 14:21:46 +03:00
Ilya Chernikov
c1c94778ce
Detect and report inner classes capturing script instance
2021-12-14 13:39:22 +03:00
Ilya Chernikov
e865652602
[minor] ScriptLowering cleanup
2021-12-14 13:39:22 +03:00
Ilya Chernikov
10c5071eda
Implement backend error reporting on unsupported script capturing
...
#KT-30616 fixed
#KT-43995 fixed
#KT-19424 fixed
#KT-49443 fixed
2021-12-14 13:39:17 +03:00
Ilya Chernikov
cb5e451e05
Implement script instance capturing in script lowering
...
for regular classes only. Reimplementing the main behavior of the
old BE and implementing few cases on top of it.
#KT-19423 fixed
2021-12-14 13:39:17 +03:00
Ilya Chernikov
87952d63a3
Rollback script related LDL changes...
...
to reimplement them properly in the script lowering
2021-12-14 13:39:16 +03:00
Roman Artemev
b719865c25
[JS IR IC] Implement fast path invalidation check
...
Compute library md5 hash and check it first with cached one. If hashes
are equal it means that cache is up-to-date and no additional checks are
needed
- store library hashes (flat + trans) into cache info file
- change invalidator return value
2021-12-13 20:57:52 +03:00