Denis.Zharkov
9c988fd8d8
K2: Introduce FirCachingCompositeSymbolProvider
...
The main idea is pre-computing the sets of names that might be
met there, that helps to decrease the sizes of the backing maps
(by avoiding irrelevant keys)
Totally, this branch with previous commits speeds up MT Full Kotlin
approximately on 3 seconds (~5%)
2023-01-19 10:57:43 +00:00
Denis.Zharkov
6705d211a6
K2: Get rid of FirDependenciesSymbolProviderImpl
...
Its usages will be safely replaced
with FirCachingCompositeSymbolProvider
But here, in the commit plain FirCompositeSymbolProvider used temporary
2023-01-19 10:57:43 +00:00
Denis.Zharkov
9302fe3cb5
K2: Get rid of redundant FirDependenciesSymbolProvider class
2023-01-19 10:57:42 +00:00
Denis.Zharkov
58c1b5dd1f
K2: Optimize AbstractFirDeserializedSymbolProvider
...
Avoid filling caches with keys that are definitely empty
(if it's cheap to compute that), to decrease the size of backing maps.
The strategy is pre-computing the sets of names that might be met.
NB: the size of the sets is way fewer than a size of all queried names.
2023-01-19 10:57:42 +00:00
Mikhail Glukhikh
70fc891260
K2: move -Xuse-k2 VS language version checks to CommonCompilerArguments
2023-01-16 18:16:49 +01:00
Mikhail Glukhikh
3dc05f4ec5
Introduce language version 2.0 and associate K2 compiler with it
2023-01-16 18:12:55 +01:00
Mikhail Glukhikh
ecc81098a6
Unbind FIR mangler from use-site session (by Simon Ogorodnik)
2023-01-13 12:56:01 +00:00
Mikhail Glukhikh
890e3d1c10
FIR2IR/MPP: use single SymbolTable during MPP compilation
2023-01-13 12:56:00 +00:00
Ivan Kochurkin
8936220876
[IR] Implement IR actualizer and use it for K2 test and CLI scenario
...
Implement calculateExpectActualMap for Fir2IrComponents
^KT-51753 Fixed
2023-01-13 12:55:58 +00:00
Ivan Kochurkin
f17e1314f6
[FIR2IR] Implement tables merging in Fir2Ir classes and SymbolTable
...
- Pass dependent (usually common code) components to further FIR2IR converters
- Don't reinitialize builtin
2023-01-13 12:55:57 +00:00
Ivan Kochurkin
5d273ce839
[FIR & FIR2IR] Prepare test and CLI infrastructure to support MPP
...
- Move out getAnalyzerServices from FirFrontendFacade to TestSetupUtils
- Simplify DependencyListForCliModule. Now it takes BinaryModuleData as input
- FirOutArtifact contains several FirOutputArtifactPart
- Simplify FirFrontendFacade
2023-01-13 12:55:57 +00:00
Ivan Kochurkin
3029e47609
[FIR] Add BinaryModuleData
2023-01-13 12:55:56 +00:00
Ivan Kochurkin
bcfdbaa6a6
[FIR] Use ModuleCompilerAnalyzedOutput instead of FirResult
...
Remove FirResult since it has the same semantics value
2023-01-13 12:55:55 +00:00
Svyatoslav Scherbina
b1e3226ed5
K2: add KlibDeserializedContainerSource.isFromNativeInteropLibrary
...
This will be required when serializing IR symbols referring declarations
from interop libraries.
2023-01-11 11:47:45 +00:00
Svyatoslav Scherbina
6877b2fc55
K2: add KlibDeserializedContainerSource to packages too
...
^KT-55809
2023-01-11 11:47:45 +00:00
Nikolay Lunyak
5ae9444745
[FIR JS] Add a test runner for FIR JS with old diagnostic tests
2023-01-09 08:57:07 +00:00
Svyatoslav Scherbina
d9ba950d7b
Introduce KlibDeserializedContainerSource
...
It is a DeserializedContainerSource implementation for deserializing
metadata from klibs.
2023-01-06 16:57:38 +00:00
Vladimir Sukharev
924898afb7
[K/N] KFC-446: K2 platform: Native alpha
...
Merge-request: KT-MR-7905
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-01-04 16:10:40 +00:00
Ilya Kirillov
79fe4100aa
[FIR] extract exception handing into a service to have additional implementation for the ide
2023-01-03 10:23:50 +00:00
Ilya Chernikov
00a28f9f49
K2 Scripting: compiler extension for script configuration
2022-12-21 14:34:20 +00:00
Ilya Kirillov
7bac119f20
[FIR] add lazy resolution contract checks in resolve
2022-12-12 16:21:06 +00:00
Sergej Jaskiewicz
1539d7ef1a
[klib] Bring package names in sync with the directory layout
...
Basically, some package names were Native-specific, whilst the packages
themselves were not Native-specific at all. This was already reflected
in the directory layout, but not in the package names.
This is fixed here.
NFC, just an automatic rename of packages with fixes of imports.
2022-12-01 21:46:43 +00:00
Nikolay Lunyak
2e9f9f987b
[FIR] KT-44698: Print file:line:offset on K2 crash
...
^KT-44698 Fixed
2022-11-29 22:35:51 +00:00
Egor Kulikov
067036c162
RawFirBuilder refactoring
...
Second step for KT-52615
Get rid of PsiHandlingMode
Get rid of source in FirLazyBlock
Refactor lazy creation
Merge-request: KT-MR-7753
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com >
2022-11-22 14:43:53 +00:00
Ilya Chernikov
92ec8e6a3e
FIR JS: Convert KLib symbol provider for handling multiple libs
2022-11-12 16:28:25 +01:00
Ilya Chernikov
4e8fed09b4
FIR JS: fix klib matching in fir dependencies
...
use file paths for more reliable matching, since klib-based libs
do strange things with libraryName
2022-11-12 16:28:24 +01:00
Ilya Chernikov
1f11a2865f
FIR: refactor session factory to better support JS scenarios
2022-11-12 16:28:23 +01:00
Ilya Chernikov
8feb2a9505
FIR: component for deserialized class configuration
...
do not add Serializable JVM interface to non-JVM classes
2022-11-12 16:28:23 +01:00
Ilya Chernikov
8f18ab19f7
FIR: use serialization extension protocol correctly
...
otherwise the deserialization breaks on KLibs
2022-11-12 14:34:08 +01:00
Ilya Chernikov
302ccf12d0
FIR: deserialize classes lazily from KLib to avoid cycles
...
the cycle appears e.g. on the Target annotation
2022-11-12 14:34:08 +01:00
Ilya Chernikov
fa0cda6236
FIR JS: enable full JS box tests with FIR
2022-11-12 14:34:07 +01:00
Ilya Chernikov
30df65c321
FIR2IR: pass external builtins to module descriptor
...
to support scenario when builtins are deserialized from KLib
2022-11-12 14:34:07 +01:00
Ilya Chernikov
c0cf8e508a
FIR JS: prepare session factory for JS/KLib usage
2022-11-12 14:34:07 +01:00
Denis.Zharkov
52eb535a7d
FIR: Use platform specific overridability rules for platform members
...
^KT-54570 Fixed
2022-10-31 14:28:55 +00:00
Nikolay Lunyak
dd861515ad
[FIR] KT-52157: Fix missing type parameter annotations
2022-10-20 13:08:11 +00:00
Ivan Kochurkin
fe670d98a9
[FIR] Rename FirSessionFactory to FirJvmSessionFactory
2022-10-13 18:11:48 +00:00
Ivan Kochurkin
40a01180ff
[FIR] Move createSessionWithDependencies and createEmptySession into FirSessionFactoryHelper
2022-10-13 18:11:48 +00:00
Ivan Kochurkin
281c79e21e
[FIR] Inline createModuleDataForBuiltins method since it doesn't look useful
2022-10-13 18:11:48 +00:00
Ivan Kochurkin
4d89eddbe8
[FIR] Don't create FirDependenciesSymbolProvider without need
2022-10-13 18:11:47 +00:00
Dmitriy Novozhilov
6623456d2a
[FIR] Properly support @JvmRecord
...
^KT-53867 Fixed
2022-10-03 15:48:17 +03:00
Mikhail Glukhikh
036f9affd8
K2: link via signatures if -Xlink-via-signatures is set
...
Related to KT-53505
2022-09-14 10:15:22 +00:00
Nikita Bobko
8f79e833a8
Drop all redundant kotlin-reflect, kotlin-reflect-api dependencies
...
Review: https://jetbrains.team/p/kt/reviews/6753
All redundant I managed to find, of course.
Why: I'm going to process all reflect dependencies in the next commits.
Cleanup reflect dependency before processing.
They are redundant because:
1. if `compileOnly` then compilation didn't break after dropping the
dependency
2. if `test*` then tests didn't break after dropping the dependency.
3. `analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts`
`compiler/fir/checkers/checkers-component-generator/build.gradle.kts`
Drop `implementation(project(":kotlin-reflect-api"))` because the
module already depends on
`implementation(project(":kotlin-reflect"))`
4. `compiler/daemon/daemon-client/build.gradle.kts`. Drop `runtimeOnly`
because after dropping `compileOnly` compilation didn't break (so
`runtimeOnly` looks suspicious). Less safe than 1-3
2022-08-22 15:42:57 +02:00
Dmitriy Novozhilov
bb38690273
[FIR] Introduce FirAssignExpressionAltererExtension
...
This extension can be used to override resolution of assign statements
with custom statement
2022-08-19 07:44:09 +00:00
Vsevolod Tolstopyatov
2fcef7af89
[FIR] Fix IrInlineBodiesHandler
...
Validate that inline function actually is present in at least on of the
modules, not in all of them. That enables support of MODULE directive
in boxInline tests for FIR.
Also, hide a few minor style fixes in this commit
2022-08-12 09:35:26 +00:00
Vsevolod Tolstopyatov
8a181cf2bd
[FIR] Create stub language settings for FIR-related test to keep relying on it
...
#KT-48872
2022-08-12 09:35:23 +00:00
Ilya Kirillov
0748f28efe
[FIR] rename ensureResolve -> lazyResolveToPhase as it better describes function semantics
2022-08-10 22:49:18 +02:00
Ivan Kochurkin
502349c594
[FIR] Implement Native test infrastructure, add FirNativeSessionFactory
2022-07-25 23:30:09 +02:00
Ivan Kochurkin
2f56b29b3f
[FIR] Extract FirSessionConfigurator and IncrementalCompilationContext to separated classes
...
With FirSessionFactory and FirJsSessionFactory
2022-07-25 23:30:09 +02:00
Ivan Kochurkin
94527e24e8
[FIR] Commonize code for creating common, JVM and JS session
...
Extract FirAbstractSessionFactory
2022-07-25 23:30:09 +02:00
Mikhail Glukhikh
9add6f3d55
K2: add more accurate & more automatic control of diagnostic suppression
...
#KT-51363 Fixed
2022-07-22 11:35:26 +00:00