Dmitriy Novozhilov
1248ee12d6
[FIR] Add ability to provide additional synthetic declarations to metadata from plugins
...
^KT-55885 Fixed
2023-02-08 08:44:49 +00:00
Ivan Kochurkin
8cbb6ff47a
[FIR2IR] Use convertToIrAndActualize() for JS CLI
2023-02-07 14:16:31 +00:00
Svyatoslav Scherbina
cf4934f539
[FIR2IR] Make convertToIrAndActualize() more reusable across backends
2023-02-07 14:16:30 +00:00
Ivan Kochurkin
199b0e8cbe
[FIR] Minor: Unify all create*Session functions across all factories
...
Rename: createJsLibrarySession -> createLibrarySession
Rename: createJsModuleBasedSession -> createModuleBasedSession
2023-02-07 14:16:30 +00:00
Ivan Kochurkin
a9bac2f18b
Add PackageAndMetadataPartProvider interface
...
Use it for parameter in MetadataSymbolProvider
2023-02-07 14:16:29 +00:00
Ivan Kochurkin
f3e3cc0037
[FIR] Implement support of MPP in JS CLI
2023-02-07 14:16:29 +00:00
Dmitriy Novozhilov
89c42e20c9
[FIR] Consistently use _function_ instead of _functional_ in names of classes and functions
2023-02-02 08:24:52 +00:00
Dmitriy Novozhilov
87a9103cc6
[FIR] Extract SyntheticFunctionsCache from builtins provider into separate one
...
This is needed because now set of available synthetic functional interfaces
depends on session, because each module can contain different plugins,
which provide different kinds of functional types
2023-02-02 08:24:50 +00:00
Dmitriy Novozhilov
e0c8f2354a
[FIR] Properly implement FirFunctionalTypeKindService
...
This implementation takes additional functional type kinds from compiler
plugins into account
2023-02-02 08:24:49 +00:00
Dmitriy Novozhilov
c86495dcae
[FIR] Introduce ConeFunctionalTypeKind as a replacement of FunctionClassKind
...
This is needed to provide an ability to extend different kinds of
functional types
Also, cleanup and rename utilities related to functional types to avoid
possible confusions
2023-02-02 08:24:49 +00:00
Ivan Kochurkin
6bdd0edd6c
[FIR2IR] Add Fir2IrCommonMemberStorage, get rid of merge in Fir2Ir storages
...
Extract DescriptorSignatureComposerStub and WrappedDescriptorSignatureComposer to separate classes
2023-02-01 11:42:46 +00:00
Ivan Kochurkin
e601b01be2
[FIR2IR] Use single IrBuiltInsOverFir for all MPP source modules
...
^KT-56229 Fixed
2023-02-01 11:42:45 +00:00
Ivan Kochurkin
001b11f285
[FIR2IR] Use single SymbolTable and SignatureComposer for all MPP modules
...
Merge createModuleFragmentWithSignaturesIfNeeded and createModuleFragmentWithoutSignatures
into the createModuleFragmentWithSignaturesIfNeeded
2023-02-01 11:42:44 +00:00
Artem Vasilev
ccc3f52acf
[FIR] Rename FirSyntheticPropertiesStorage, extract property creation
2023-01-30 20:05:51 +00:00
Artem Vasilev
075a80613b
[FIR] Introduce cache for not-yet-enhanced synthetic properties
...
The original synthetic properties from Java were not cached anywhere and
created anew for every session. However, the enhanced properties are
(along with their originals) saved inside the session's cache, causing
inconsistency with newly created symbols via referential equality.
2023-01-30 20:05:50 +00:00
Ilya Chernikov
62f2a09d70
FIR: fix use-site file in supertypes resolution
...
manifested in the IC tests by a seemingly redundant lookup,
although theoretically may lead to more severe issues.
Also fixes lookup recording ignoring logic, since the old
one may break with the new us-site file calculation.
#KT-55195 fixed
2023-01-26 11:56:21 +00:00
Ivan Kochurkin
04fc2bde96
[FIR] Extract resolveAndCheckFir to firUtils
...
Use it in compilerPipeline and FirKotlinToJvmBytecodeCompiler
2023-01-24 15:27:13 +00:00
Ivan Kochurkin
1edc9f0a1d
[FIR] Introduce FirCommonSessionFactory
2023-01-24 15:27:12 +00:00
Ilya Chernikov
61e39f2c31
minor: fix a typo leading to the wrong lines count with LT
2023-01-21 11:20:59 +00:00
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