Commit Graph

449 Commits

Author SHA1 Message Date
Dmitriy Dolovov bfe0623837 [Commonizer] Drop CirModuleFactory 2021-03-09 13:11:35 +03:00
Dmitriy Dolovov 1f17d238f8 [Commonizer] Drop CirRootFactory 2021-03-09 13:11:30 +03:00
Dmitriy Dolovov d7ed8ff804 [Commonizer] Encapsulate interning inside of CIR entities: CirTypeAliasType 2021-03-09 13:11:24 +03:00
Dmitriy Dolovov 36294352ef [Commonizer] Encapsulate interning inside of CIR entities: CirClassType 2021-03-09 13:11:19 +03:00
Dmitriy Dolovov c6d8cddcd9 [Commonizer] Encapsulate interning inside of CIR entities: CirTypeParameterType 2021-03-09 13:11:14 +03:00
Dmitriy Dolovov 3012839f49 [Commonizer] Encapsulate interning inside of CIR entities: CirAnnotation 2021-03-09 13:11:08 +03:00
Dmitriy Dolovov f7d977d7c4 [Commonizer] Encapsulate interning inside of CIR entities: CirPropertySetter 2021-03-09 13:11:02 +03:00
Dmitriy Dolovov f1739980d3 [Commonizer] Encapsulate interning inside of CIR entities: CirPropertyGetter 2021-03-09 13:10:57 +03:00
Dmitriy Dolovov ec1e4fb26e [Commonizer] Encapsulate interning inside of CIR entities: CirFunctionModifiers 2021-03-09 13:10:51 +03:00
Dmitriy Dolovov 5e41a7c66b [Commonizer] Encapsulate interning inside of CIR entities: CirValueParameter 2021-03-09 13:10:46 +03:00
Dmitriy Dolovov f43626d545 [Commonizer] Drop no more necessary logic for forward declarations 2021-03-09 13:10:40 +03:00
Dmitriy Dolovov 12be9c99ca [Commonizer] Replace DescriptorVisibilit[y,ies] by Visibilit[y,ies] 2021-03-09 13:10:35 +03:00
Dmitriy Dolovov 7bdbc893a0 [Commonizer] Move test-specific logic to 'tests' module 2021-03-09 13:10:30 +03:00
Dmitriy Dolovov a0baecc6e4 [Commonizer] Rename: CirTreeMergerV2 -> CirTreeMerger 2021-03-09 13:10:24 +03:00
Dmitriy Dolovov 126b634529 [Commonizer] Drop support of descriptors, part 2 2021-03-09 13:10:18 +03:00
Dmitriy Dolovov 607568fb73 [Commonizer] Rework mocks for tests to drop descriptors 2021-03-09 13:10:13 +03:00
Dmitriy Dolovov e96dd3b301 [Commonizer] Drop support of descriptors, part 1 2021-03-09 13:10:07 +03:00
Dmitriy Dolovov eddeef1d51 [Commonizer] Build CIR tree directly from metadata 2021-03-09 13:10:01 +03:00
sebastian.sellmair 3d6893e518 [Commonizer] Implement safe SharedCommonizerTarget factory function
Do not try to instantiate SharedCommonizerTarget with no leaves
^KT-45350 Verification Pending
2021-03-09 10:02:00 +00:00
Alexander Udalov ee11202db5 Add Flag.IS_VALUE for value classes to kotlinx-metadata-jvm
#KT-44783 Fixed
2021-03-08 21:22:40 +01:00
Dmitriy Dolovov 149282a888 [Commonizer] Fix: Stats not logged for "native-dist-commonize" CLI task 2021-03-04 22:24:11 +03:00
Dmitriy Dolovov 1c06972ec6 [Commonizer] Minor. Formatted 2021-03-04 22:24:05 +03:00
Dmitriy Dolovov d6961a6e60 [Commonizer] Rework MetadataDeclarationsComparator API
1. Formalize all possible variants of entities where mismatch could happen via sealed interface MetadataDeclarationsComparator.EntityKind
2. Track the path to the place of mismatch in terms of MetadataDeclarationsComparator.PathElement
2021-03-04 22:23:57 +03:00
Dmitriy Dolovov 43d9c6cc90 [Commonizer] Reworked functions for making nullable CIR types 2021-03-02 11:37:25 +03:00
Dmitriy Dolovov 7ad35b2f49 [Commonizer] Change CIR type calculation procedure
- By default, all CIR types are created as abbreviated types
  (if such information is available in descriptors).
- When necessary, CIR type can be "unabbreviated" to remove any
  abbreviations from it. This can be done via a separate function
  in CirTypeFactory: unabbreviate().
2021-03-01 23:17:16 +03:00
sebastian.sellmair a7a085d640 [Commonizer] ModuleSerializer: Sanitize library names for Windows
The CInterop tool can produce klibs that contain colons in their library name.
Therefore the library name, as is, cannot be used as file name.
The sanitizer will replace any occurring ':' with '_'
2021-03-01 19:53:08 +03:00
Alexander Udalov ca5a35b4b3 Move CompilerEnvironment from 'frontend' to 'cli'
This is needed in order to have a single convenient place where to
register frontend services implemented _outside_ of the 'frontend'
module, such as the control flow analysis, extracted to a separate
module in a subsequent commit.
2021-02-24 17:17:03 +01:00
Dmitriy Dolovov fa2b2c8735 [Commonizer] Make CirProperty.compileTimeInitializer non-nullable
There is effectively no difference between null and CirConstantValue.NullValue recorded in compileTimeInitializer.
2021-02-22 21:06:49 +03:00
Dmitriy Dolovov b3e68d3704 [Commonizer] Make CirProperty.[backing|delegate]FieldAnnotations non-nullable
There is effectively no difference between missing field and a field with no annotations.
2021-02-22 21:06:41 +03:00
Dmitriy Dolovov 215dd8515b Minor. Remove compilation warning 2021-02-22 21:06:34 +03:00
Dmitriy Dolovov 05447ce0c8 [Commonizer] Print true time for resolving of libraries to be commonized 2021-02-18 18:47:38 +03:00
Dmitriy Dolovov 0b26a281de [Commonizer] Print pretty target name in console output 2021-02-18 18:47:33 +03:00
Dmitriy Dolovov fb51105a5d [Commonizer] Log time in commonizer result consumers 2021-02-18 18:47:28 +03:00
Dmitriy Dolovov 496aad3c4a [Commonizer] Log commonization only for really present targets 2021-02-18 18:47:19 +03:00
Dmitriy Dolovov 3ad7b60747 [Commonizer] Prefer using CommonizerTarget instead of KonanTarget 2021-02-18 18:47:14 +03:00
Dmitriy Dolovov 1895c230ef [Commonizer] K/N dist: Process targets in alphabetical order 2021-02-18 18:47:10 +03:00
Dmitriy Dolovov f473b88e47 [Commonizer] Nicer API for CirProvidedClassifiers 2021-02-18 18:47:05 +03:00
Dmitriy Dolovov 84ce9c612c [Commonizer] Keep only "common" dependencies in CirKnownClassifiers 2021-02-18 18:47:00 +03:00
Dmitriy Dolovov 2581b67cda [Commonizer] Rename: CirCommonizedClassifiers -> CirCommonizedClassifierNodes 2021-02-18 18:46:55 +03:00
Dmitriy Dolovov 43ad0ed907 [Commonizer] Optimized implementation of CirProvidedClassifiers
Read classifiers directly from metadata, don't use descriptors.
2021-02-18 18:46:49 +03:00
Dmitriy Dolovov 79e3ce022f [Commonizer] Fix: Keep fwd declarations under real names in CirForwardDeclarations cache 2021-02-18 18:46:45 +03:00
sebastian.sellmair 35008df969 [Commonizer] Rename NativeDistributionCommonizer to LibraryCommonizer 2021-02-17 19:24:54 +00:00
sebastian.sellmair 4500b6ce74 [Commonizer] Implement :native:kotlin-klib-commonizer:api with support for library commonization
- Implement new Gradle module ':native:kotlin-klib-commonizer'
- Implement new NativeKlibCommonize task
- Implement CommonizerTarget.identityString
2021-02-17 19:24:54 +00:00
Dmitriy Dolovov 45b17120ad [Commonizer] Minor. Rename: 'dependee' -> 'dependency' 2021-02-16 17:19:49 +03:00
Dmitriy Dolovov ec7e411d80 [Commonizer] Remove classifierId from CIR class/TA nodes 2021-02-16 17:19:43 +03:00
Dmitriy Dolovov ef931d5561 [Commonizer] Don't keep kotlin/Any as the single supertype in CirClass 2021-02-16 17:19:38 +03:00
Dmitriy Dolovov 0eaea655d0 [Commonization] Improvements in approx. keys
- Don't print upper bounds if it contains only kotlin/Any?
- Print variance in lowercase
2021-02-15 13:25:52 +03:00
Dmitriy Dolovov 3c6eb8f8f4 Minor. Formatted 2021-02-15 13:25:47 +03:00
Dmitriy Dolovov 0af31abb04 [Commonizer] Add tests for overloading purely by different upper bounds 2021-02-15 13:25:40 +03:00
Dmitriy Dolovov 90cdb9203f [Commonizer] Fix integration tests: wrong mismatches filter 2021-02-15 13:25:34 +03:00