Commit Graph

21 Commits

Author SHA1 Message Date
Roman Efremov c8023eac13 [commonizer] Don't commonize "tailrec" and "external" modifiers
expect external and tailrec were prohibited
in previous commit.

^KT-58536
2023-05-23 12:43:51 +00:00
sebastian.sellmair 4349f98954 [Commonizer] Fix CirConversions and substitute arguments
CirConversions did not cover some potential convertible types.
ClassOrTypeAliasTypeCommonizer did not apply type substitution
for parameterized types coming from a dependency

^KT-48288
2021-09-22 06:45:00 +00:00
sebastian.sellmair 68e7476765 [Commonizer] ClassSuperTypeCommonizer: Don't find consumed TypeNodes
This commit will also add some simple documentation
to this class and its implementation.

^KT-47430
2021-08-16 10:44:04 +00:00
sebastian.sellmair dff392f2cd [Commonizer] ClassSuperTypeCommonizer: Include transitive supertypes
This commit still has some left-over todos that shall be done
in a separate commit.

TODOs:
- CirClassifierIndex is calculated once too often
- Reconsider position of classifierIndices in 'CirKnownClassifiers'
- Add documentation/description to complicated 'ClassSuperTypeCommonizer'
- Add documentation/description to CirSupertypesResolver

^KT-47430 Verification Pending
2021-08-16 10:44:00 +00:00
sebastian.sellmair 5b5dddc2d1 [Commonizer] Restore TypeAliasCommonizer's Commutative property & TypeAliasTypeCommonizer: substitute underlying-type arguments
^KT-47574 The fix done here supports only one level of substituting
underlying type-arguments.

HierarchicalTypeAliasCommonizationTest.`KT-47574 - test long typealias chain`
will assert proper behaviour for nested chains.
2021-07-05 09:00:46 +00:00
sebastian.sellmair 9794068f22 [Commonizer] typeAliasUtils: computeSuitableUnderlyingType: Consider commonized type-aliases 2021-07-05 09:00:42 +00:00
sebastian.sellmair 8e2780345c [Commonizer] HierarchicalClassAndTypeAliasCommonizationTest: Un-ignore tests fore ^KT-47432 and ^KT-47434 and add additional test's 2021-07-05 09:00:39 +00:00
sebastian.sellmair 21cef41ba5 [Commonizer] AbstractCommonizationFromSourcesTest remove assertions on commonized leaf/platform libraries
Those assertions are not necessary anymore, since the commonizer is not
expected to produce any new "actuals" per given expect.
The IDE is supposed to analyze leaf source sets against the original
platform libraries.
2021-06-23 13:43:37 +00:00
sebastian.sellmair 8272564ca0 [Commonizer] Prototype: Commonize TypeAliases with Classes
^KT-45992 Fixed
^KT-46061 Fixed
2021-06-07 09:07:40 +00:00
sebastian.sellmair 05a6d89151 [Minor] Re-format :kotlin-klib-commonizer and :kotlin-klib-commonizer-api 2021-04-16 14:56:32 +00:00
Dmitriy Dolovov eddeef1d51 [Commonizer] Build CIR tree directly from metadata 2021-03-09 13:10:01 +03:00
Dmitriy Dolovov 45b17120ad [Commonizer] Minor. Rename: 'dependee' -> 'dependency' 2021-02-16 17:19:49 +03:00
Dmitriy Dolovov ee93efc19d [Commonizer] Avoid leaking non-commonized types as arguments in short-circuited TAs 2021-01-15 22:01:56 +03:00
Dmitriy Dolovov b0ff3e7e5e [Commonizer] More fine-grained control of commonized module dependencies
- Reduce usage of 'isUnderStandardKotlinPackages' check in commonizer source code
- Rely on common module dependencies supplied via commonizer Parameters which not only
  Kotlin standard library but may also include common fragments of other libraries
2020-12-03 13:11:27 +03:00
Dmitriy Dolovov f5bb60f7cd [Commonizer] Refactor CIR type representation
1. Drop CirClassifierId
2. Specialized classes for each kind of types (classes, TAs, type parameters, flexible types).
3. TypeCommonizer now returns commonized type. In case of TAs this could be a completely new type
   describing expect class or a new TA with the different underlying type.
2020-11-05 18:50:43 +03:00
Dmitriy Dolovov 2764550bbe [Commonizer] Relax conditions for TA lifting-up
Allow lifting up matching TAs with non-empty list of type parameters
and non-empty list of type arguments in the expanded type.
2020-11-05 18:50:37 +03:00
Dmitriy Dolovov c69402c800 [Commonizer] Fix computing underlyingType and expandedType in CirTypeAlias 2020-10-19 11:21:53 +03:00
Dmitriy Dolovov 74dce725cc [Commonizer] Tests for missed supertypes in commonized type aliases
^KT-41247
2020-09-01 13:11:33 +07:00
Dmitriy Dolovov d40bca4143 [Commonizer] Short-circuiting of type aliases
^KT-41220
2020-08-24 12:21:12 +07:00
Dmitriy Dolovov d9bfe11ca1 [Commonizer] Source-based tests on lifting up identical type aliases
^KMM-55
2020-06-09 11:12:45 +07:00
Dmitriy Dolovov 9594b8db42 Rename Kotlin/Native modules for uniformity 2020-01-29 20:30:46 +07:00