Dmitrii Gridin
a539203e73
[SLC] drop KtAnalysisSession from SymbolLightClassBase
...
^KT-54051
2022-11-29 13:33:33 +00:00
Dmitriy Novozhilov
46928eaa0b
[FIR] Unconditionally enable BooleanElvisBoundSmartCasts feature in K2
...
^KT-54694 Fixed
^KT-26357
2022-11-29 12:25:45 +00:00
Dmitriy Novozhilov
ac7fddaad5
[FE] Always infer upper types to intersection types in K2...
...
...and always use old algorithm for K1
^KT-51221
2022-11-29 12:25:44 +00:00
Sergej Jaskiewicz
d50c072af0
[klib] Validate paths when unpacking zip archives
2022-11-29 12:21:04 +00:00
Mads Ager
30002e29d1
[KAPT+JVM_IR] Do not generate initializers for delegated properties.
...
^KT-54870 Fixed
2022-11-28 22:27:09 +01:00
Alexander Korepanov
9dab8637a8
[JS Gradle] Pass incremental cache root dir to K2JS compiler
2022-11-28 20:46:40 +00:00
Alexander Korepanov
693258ae91
[JS IR] Invalidate all klib dependencies after removing it
...
Without the invalidation, broken JS code
(with broken cross-module references) may appear.
^KT-54911 Fixed
2022-11-28 20:46:40 +00:00
Alexander Korepanov
ca19d71a00
[JS IR] Commit cache header after lowering
...
Commiting cache header before lowering may
break caches in case of lowering errors.
^KT-54912 Fixed
2022-11-28 20:46:40 +00:00
Alexander Korepanov
8cde0a81bc
[JS IR] Use topological order for loading klibs in JS IR IC
...
Generally, the library order doesn't matter.
However, after lowering we need to post process
lowered klibs in topological order:
- commit incremental cache artifacts,
- produce JS AST.
The patch uses an ability of the Kotlin library resolver to load klibs
in topological order and drops its reimplementation from IC infrastructure.
There is one side effect:
klibs which are not reachable from the main module, will produce their JS.
This should be more correct than just ignoring them.
2022-11-28 20:46:39 +00:00
Alexander Korepanov
ec6a7094e6
[JS IR] Manage cache root dir from IC cache updater
...
- pass cache root directory instead of dir list
- manage klib cache dirs from cache updater
2022-11-28 20:46:39 +00:00
Alexander Korepanov
c7589245c4
[JS IR] Minor IC refactoring
...
Move metadata classes from cache updater to separate file.
2022-11-28 20:46:38 +00:00
Mikhail Glukhikh
8ffabddf75
FIR2IR: cleanup field static fake override caching
2022-11-28 17:27:51 +00:00
Mikhail Glukhikh
91a3c78844
Fir2IrDeclarationStorage: drop redundant 'with' + fix formatting
2022-11-28 17:27:51 +00:00
Mikhail Glukhikh
237f357016
FIR: don't copy initializer for field override, unwrap it instead
2022-11-28 17:27:50 +00:00
Mikhail Glukhikh
c698d060c6
FIR2IR: support static fake overrides for fields (related to KT-53441)
...
#KT-54921 Fixed
2022-11-28 17:27:50 +00:00
Sergej Jaskiewicz
aa1b18b0c8
[IR] Prevent infinite recursion when rendering bound symbol references
...
Refactor the renderer, make BoundSymbolReferenceRenderer a static class
to prevent calling RenderIrElementVisitor's methods from it to avoid
infinite recursion in the future.
^KT-52677 Fixed
2022-11-28 16:43:53 +00:00
Vladimir Dolzhenko
af08e4121d
Fix fragment element types class hierarchy.
...
They must not extend `IStubFileElementType`.
#KT-55160 Fixed
2022-11-28 15:44:37 +00:00
Vladimir Dolzhenko
e751b11b5e
Add extra checks
...
#EA-721785
2022-11-28 15:20:29 +00:00
Ilya Chernikov
e4a361a4b4
K2 Scripting: disable scripts in source roots by default
...
fixes ultimate FP test
2022-11-28 15:10:55 +00:00
Pavel Kunyavskiy
09518a457a
Better unbound symbols support for dumpKotlinLike
...
If there is an unbound symbols in IrTree near backend exception,
compiler failed again during processing an error.
It led to hard-understandable error. Now at least it would show
problematic part of code, which is better for making workarounds.
^KT-55088
2022-11-28 14:22:46 +00:00
Ilya Chernikov
4af32b8d36
K2 Scripting, IR: non-class based scripts support in IR
2022-11-26 18:01:49 +00:00
Ilya Chernikov
cc9a7480a2
K2 Scripting: add FIR2IR conversion for FirScript
2022-11-26 18:01:49 +00:00
Ilya Chernikov
47448d779c
K2 Scripting: enable script diagnostic tests for FIR
...
also add script scopes test
2022-11-26 18:01:49 +00:00
Ilya Chernikov
a3a1550933
K2 scripting: add initial scripting support to K2 frontend
2022-11-26 18:01:48 +00:00
Evgeniy.Zhelenskiy
002f6bd34a
[FIR] Fix JvmName annotation diagnostics
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-55143
2022-11-25 16:30:22 +01:00
Zalim Bashorov
7f8f7aa050
[Wasm] Revert ref cast and test instructions to be compatible with Binaryen
2022-11-25 15:31:48 +01:00
Zalim Bashorov
5f140dac21
[Wasm] Remove wasm_ref_cast and use wasm_ref_cast_null inside the compiler
2022-11-25 15:31:47 +01:00
Zalim Bashorov
e7d0e451e7
[Wasm] Fix immediate type for recently (in M6) introduced instructions
...
STRUCT_TYPE_IDX -> HEAP_TYPE
WasmImmediate.TypeIdx -> WasmImmediate.HeapType
2022-11-25 15:31:47 +01:00
Anna Kozlova
abb45a0728
[AA] don't treat incomplete function as anonymous
...
^KTIJ-23672
sync anonymous function predicate with RawFirBuilder/DeclarationsConverter
2022-11-25 14:27:03 +00:00
Egor Kulikov
d585f068dd
[FIR] Make anonymous initializer lazy in RawFirBuilder
...
Fourth step for KT-52615
Merge-request: KT-MR-7798
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com >
2022-11-25 11:41:44 +00:00
Nikolay Lunyak
a454d42e65
[FIR] KT-54587: Report the missing diagnostics
...
^KT-54587 Fixed
Merge-request: KT-MR-7791
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com >
2022-11-25 10:19:58 +00:00
Nikolay Lunyak
7147b7d17b
[FIR] KT-55033: Split runTransaction into smaller functions
...
^KT-55033 Fixed
Merge-request: KT-MR-7779
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com >
2022-11-25 09:12:15 +00:00
vladislav.grechko
50e92d2238
Add null checks in constructors taking value class types
...
^KT-53492: Fixed
2022-11-24 20:12:05 +00:00
Vladislav Grechko
cd6e865fb3
Improve support of 'lateinit' modifier
...
- Allow 'lateinit' for inline classes which underlying type
is suitable for 'lateinit'
- K2: report all problems related to 'lateinit' modifier
^KT-55052: Fixed
2022-11-24 19:47:21 +00:00
vladislav.grechko
e0c13e5276
Fix addAll & putAll invocations on inline mutable collections
...
^KT-54950: Fixed
2022-11-24 19:27:42 +00:00
Dmitrii Gridin
3bc9299b3b
[FIR] SignatureEnhancement: drop redundant 'resolvePhase' for type parameter
...
^KT-54826
2022-11-24 18:32:45 +00:00
Dmitrii Gridin
ec613e57ef
[FIR] add Enhancement wrapping for type parameters
...
^KT-55095 Fixed
2022-11-24 18:32:43 +00:00
Dmitrii Gridin
2155a23e4e
[AA FIR] implement FirCallableSignature to simplify search by signature
...
^KT-54826 Fixed
2022-11-24 18:32:43 +00:00
Denis.Zharkov
ca12cfb90d
K2: Do not fix variables that has yet unprocessed constraints in forks
...
Otherwise, exception from org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintInjector.TypeCheckerStateForConstraintInjector.fixedTypeVariable
might happen during forks resolution
The test data is extracted from intelliJ FP test
^KT-43296 Fixed
2022-11-24 17:29:30 +00:00
Denis.Zharkov
b73acd7a3a
K2: Apply constraints from forks at UNTIL_FIRST_LAMBDA completion phase
...
Otherwise, OVERLOAD_RESOLUTION_AMBIGUITY is reported for the calls to
the functions annotated as @OverloadResolutionByLambdaReturnType
^KT-43296 In Progress
2022-11-24 17:29:29 +00:00
Denis.Zharkov
10d63cc52a
K2: Postpone inference forks resolution until FULL completion
...
It helps to use expected type information when choosing the branch
even in the nested calls
^KT-43296 In Progress
2022-11-24 17:29:29 +00:00
Denis.Zharkov
c958c79362
Minor cleanup at ConstraintInjector.kt
2022-11-24 17:29:29 +00:00
Denis.Zharkov
02b2927921
Clarify naming around inference fork points
...
^KT-43296 In Progress
2022-11-24 17:29:28 +00:00
Denis.Zharkov
715a73c8fb
K2: Support inference case with a mix of smart-cast and expected type
...
The idea is that we should not fix (i.e. choose any of the fork branches)
on the stage of candidate processing before completion, but it's enough
just to check that current state can be converged to success.
And when completion starts, and we add expected type to the system,
we've got more information to choose the correct fork branch.
NB: The old `processForkConstraints` is being called just
at the beginning of the completion phase.
^KT-43296 In Progress
2022-11-24 17:29:28 +00:00
Sergej Jaskiewicz
77e197d46a
[IR] Add documentation comments for IdSignatures
2022-11-24 17:13:31 +00:00
Sebastian Sellmair
7870c82221
[Gradle][Native] K2NativeCompilerArguments.refinesPaths: Use Array<String> instead of String
...
^KT-55071 Verification Pending
2022-11-24 14:42:11 +00:00
Sebastian Sellmair
752ff04245
[Gradle][Native] Setup refinesPaths as expectedBy module dependencies
...
Previously, dependsOn dependencies were just passed as friend modules
to shared native compilations.
^KT-55071 Verification Pending
2022-11-24 14:42:10 +00:00
Ivan Kylchik
a1477983ba
Properly handle vararg interpretation for classic frontend
...
#KT-55108 Fixed
2022-11-24 11:07:07 +00:00
Denis.Zharkov
f7d8fd54ca
K2: Fix deserialization of flexible type based on type parameter
...
It's anyway safe to use avoidComprehensiveCheck = true because
during deserialization we're sure that we need DNN type because
it's been serialized as such.
2022-11-24 09:39:58 +00:00
Artem Kobzar
ad78f27cce
[K/JS] Fix problem with dynamic return type inside coroutine
2022-11-23 21:33:56 +00:00