sebastian.sellmair
75d7c830e7
[Commonizer] Minor: Improve naming of methods and types
...
^KT-48288
2021-09-22 06:45:04 +00:00
sebastian.sellmair
808ea11072
[Commonizer] Improve access performance for TargetDependent
...
^KT-48288
2021-09-22 06:45:04 +00:00
sebastian.sellmair
cf0f061db5
[Commonizer] Implement two phased re-approximation
...
^KT-48288
2021-09-22 06:45:03 +00:00
sebastian.sellmair
b68f14960a
[Commonizer] Implement first ReApproximationCirNodeTransformer
...
^KT-48288
2021-09-22 06:45:03 +00:00
sebastian.sellmair
d2627f0a76
[Commonizer] CirCommonClassifierIdResolver: Implement caching as composition
...
^KT-48288
2021-09-22 06:45:03 +00:00
sebastian.sellmair
97befd0520
[Commonizer] Consider negative type distances 'worse'
...
^KT-48288
2021-09-22 06:45:02 +00:00
sebastian.sellmair
24680144da
[Commonizer] CirTypeDistance: Ensure consistent function signatures
...
^KT-48288
2021-09-22 06:45:02 +00:00
sebastian.sellmair
24ac122e88
[Commonizer] CirTypeDistance: Use property for 'unreachable'
...
^KT-48288
2021-09-22 06:45:01 +00:00
sebastian.sellmair
31445d1471
[Commonizer] ClassOrTypeAliasTypeCommonizer: Use typeDistance and type substitution
...
^KT-48288
2021-09-22 06:45:01 +00:00
sebastian.sellmair
4a6366ed9b
[Commonizer] TargetDependent: Implement inline map functions
2021-09-22 06:45:01 +00:00
sebastian.sellmair
b424800714
[Commonizer] Implement additional 'ParameterizedTypesCommonizationTest'
...
^KT-48288
2021-09-22 06:45:00 +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
e2343094ec
[Commonizer] Adapt CirUnderscoredTypeAliasSubstitutorTest
...
^KT-48288
2021-09-22 06:44:59 +00:00
sebastian.sellmair
9d2553bd18
[Commonizer] Adapt TypeCommonizerTest
...
^KT-48288
2021-09-22 06:44:59 +00:00
sebastian.sellmair
36a5b53398
[Commonizer] AbstractCommonizerTest.doTestFailure: Support single invocation commonizers
...
^KT-48288
2021-09-22 06:44:58 +00:00
sebastian.sellmair
4e6ad03df6
[Commonizer] Fix AbstractListCommonizer and adapt ValueParameterListCommonizerTest
...
^KT-48288
2021-09-22 06:44:58 +00:00
sebastian.sellmair
cdd917bd0b
[Commonizer] Adapt ExtensionReceiverCommonizerTest
...
^KT-48288
2021-09-22 06:44:58 +00:00
sebastian.sellmair
35a29acdc7
[Commonizer] Always use parent arguments for type substitution
2021-09-22 06:44:57 +00:00
sebastian.sellmair
5c7ac614ce
[Commonizer] Remove old implementations for type commonization
...
Removed AliasedTypeSubstitutor: Covered by ClassOrTypeAliasTypeCommonizer
Removed ClassTypeCommonizer: Covered by ClassOrTypeAliasTypeCommonizer
Removed type alias substitution transformers: Covered by CirCommonClassifierId
^KT-48288
2021-09-22 06:44:57 +00:00
sebastian.sellmair
bfa433fa06
[Commonizer] Split type substitution into forward and backwards
...
^KT-48288
2021-09-22 06:44:56 +00:00
sebastian.sellmair
698b3fce9e
[Commonizer] ClassOrTypeAliasTypeCommonizer: Support 'enableOptimisticNumberTypeCommonization'
...
^KT-48288
2021-09-22 06:44:56 +00:00
sebastian.sellmair
595cab2aaf
[Commonizer] ClassOrTypeAliasTypeCommonizer: Implement proper type argument substitution
...
^KT-47574 Verification Pending
2021-09-22 06:44:56 +00:00
sebastian.sellmair
c1f118e502
[Commonizer] Include dependencies in CirCommonClassifierId
...
^KT-48288
2021-09-22 06:44:55 +00:00
sebastian.sellmair
ef6f84b151
[Commonizer] Implement ClassOrTypeAliasTypeCommonizer with type substitution
...
^KT-48288
2021-09-22 06:44:55 +00:00
sebastian.sellmair
97e37243c6
[Commonizer] Move type commonization to single invocation commonizer
...
^KT-48288
2021-09-22 06:44:54 +00:00
sebastian.sellmair
3ee87f1635
[Commonizer] Use typealias invariant Approximation Keys
...
^KT-48288
2021-09-22 06:44:54 +00:00
sebastian.sellmair
763ddcddf4
[Commonizer] Implement CirCommonClassifierId & CirCommonClassifierIdResolver
...
This common representation of a classifier id can later be used
to render typealias invariant approximation keys.
^KT-48288
2021-09-22 06:44:54 +00:00
sebastian.sellmair
a3d60f8ed2
[Commonizer] Minor: Don't unnecessarily capture size as local property
2021-09-07 11:36:48 +00:00
sebastian.sellmair
f3e55aeac0
[Commonizer] Rename type parameter from 'Context' to 'T'
...
NullableContextualSingleInvocationCommonizer:
Naming the type parameter 'Context' might provoke different/
misleading intuitions for many.
https://jetbrains.team/im/code/KFc0x1LxezP?message=BDpl60SJkVM&channel=2Ty4Ld4L0Aer
^KT-48567
2021-09-07 11:36:48 +00:00
sebastian.sellmair
2e053be703
[Commonizer] ReturnTypeCommonizer: Only allow covariant nullability for covariant types
...
The return type of any property with a setter can be considered invariant
and should enable covariant nullability commonization
^KT-48567
2021-09-07 11:36:47 +00:00
sebastian.sellmair
9e34382db5
[Commonizer] Implement TypeNullabilityCommonizer and ReturnTypeCommonizer
...
^KT-48567 Verification Pending
2021-09-07 11:36:47 +00:00
sebastian.sellmair
b13f3599cf
[Commonizer] Initial implementation for nullable return type commonization
...
^KT-48567
2021-09-07 11:36:46 +00:00
sebastian.sellmair
f56419cbf8
[Commonizer] Implement ReturnTypeNullabilityCommonizationTest
...
^KT-48567
2021-09-07 11:36:46 +00:00
sebastian.sellmair
5a63498963
[Commonizer] Use qualified name string for 'UnsafeNumber' annotation
...
^KT-48459
^KT-48455
2021-08-30 19:25:43 +00:00
sebastian.sellmair
e7e3cedf69
[Commonizer] Finalize tests for ^KT-48455
2021-08-30 19:25:43 +00:00
sebastian.sellmair
60ccdf23ea
[Commonizer] Choose lower bit width numbers for optimistic number commonization
...
^KT-48455
2021-08-30 19:25:43 +00:00
sebastian.sellmair
642bb68916
[Commonizer] Rename TargetDependentCommonizer.kt to SingleInvocationCommonizer.kt
2021-08-30 19:25:42 +00:00
sebastian.sellmair
f7839e847a
[Commonizer] Emit 'UnsafeNumber' for optimistically commonized typealias
...
^KT-48459 Verification Pending
2021-08-30 19:25:42 +00:00
sebastian.sellmair
814a147a53
[Commonizer] Implement optimistic number commonization for typealias
...
When typealias point to a number of different bit width on
certain platforms, this implementation will choose
the number type with higher bit width as commonization result
for typealias types and typealias underlying types.
This will effectively port the "analyse code for a single
selected platform" UX approach into HMPP (for numbers only)
^KT-48455 Verification Pending
2021-08-30 19:25:41 +00:00
sebastian.sellmair
565ea2c4f5
[Commonizer] Improve iteration performance in transformer and mergeCirTree
...
An allocation/iterator free `forEach` is used for lists that
are not intended to be modified at the same time.
2021-08-19 12:19:15 +00:00
sebastian.sellmair
e2816ffabb
[Commonizer] Rename CirTypeSubstitutor implementations
...
^KT-48287
^KT-48286
2021-08-19 12:19:14 +00:00
sebastian.sellmair
8aceff3641
[Commonizer] Implement CirUnderscoredTypeAliasSubstitutor
...
Try substituting TypeAlias types that start with `__` in favour
of TypeAlias without the underscored prefix
^KT-48287 Verification Pending
^KT-48286 Verification Pending
2021-08-19 12:19:14 +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
1e95717b8d
[Commonizer] Implement SimpleCirSupertypesResolverTest
...
^KT-47430
2021-08-16 10:44:03 +00:00
sebastian.sellmair
f64a0efa8b
[Commonizer] Respect artificial supertypes when loading dependencies
...
CirProvided.ExportedForwardDeclarationClass will now correctly
report artificial superclasses.
The InlineTypeAliasCirNodeTransformer does not need to know anything
about artificial supertypes anymore. When inlining any
type alias, it is enough to resolve the type-alias's expansions
supertypes.
^KT-47430
2021-08-16 10:44:03 +00:00
sebastian.sellmair
26ede5d885
[Commonizer] Add small documentation on CirSupertypesResolver
...
^KT-47430
2021-08-16 10:44:03 +00:00
sebastian.sellmair
9fb41b6334
[Commonizer] CirKnownClassifiers: Store indices and target dependencies as 'TargetDependent'
...
^KT-47430
2021-08-16 10:44:02 +00:00
sebastian.sellmair
367db345a8
[Commonizer] Do not re-calculate classifier indices for transformer
...
^KT-47430
2021-08-16 10:44:02 +00:00
sebastian.sellmair
dda9bb93f6
[Commonizer] Consider exportForwardDeclarations as dependency
...
This will make follow-up commits easier:
forward declarations are closer to dependencies than being part
of the library. They will be used in the module, bot not
directly provided.
This commit also enables tracking of provided dependency classifiers
in the CirTreeRoot and CirRootNode
^KT-47430
2021-08-16 10:44:01 +00:00
sebastian.sellmair
3d4e861f05
[Commonizer] ModulesProvider: refactor 'loadModuleInfos()' to property
...
This is done to signal that accessing this data is indeed lightweight.
^KT-47430
2021-08-16 10:44:01 +00:00