Commit Graph

185 Commits

Author SHA1 Message Date
Alexander Udalov 8ae19f5cd7 Fix deprecated Interner/StringInterner usages after update to 202 2021-01-13 19:17:21 +01:00
Alexander Udalov 77a9d14f93 Capitalize/decapitalize only ASCII characters across project
Use {de,}capitalizeAsciiOnly and to{Lower,Upper}CaseAsciiOnly where
possible, and stdlib's functions with Locale.US everywhere else.

Otherwise, if the default system locale is Turkish, the capital latin
letter "I" is transformed in toLowerCase to "ı" (see
https://github.com/JetBrains/kotlin/blob/66bc142f92085047a1ca64f9a291f0496e33dd98/libraries/stdlib/jvm/test/text/StringJVMTest.kt#L119),
which for example breaks the codegen for `intArrayOf` in
KT-25400/KT-43405.

Similarly, lower case latin letter "i" is transformed to "İ".

 #KT-13631 Fixed
 #KT-25400 Fixed
 #KT-43405 Fixed
2020-12-28 16:10:30 +01:00
Dmitriy Dolovov 740b8a9aec [Commonizer] Fix computing outer class type arguments 2020-12-24 15:55:36 +03:00
Dmitriy Novozhilov c8f3a4802e [TEST] Introduce test-infrastructure-utils module and extract common test utilities here 2020-12-16 19:52:22 +03:00
Andrei Klunnyi 3af0257b38 KTIJ-664 [SealedClassInheritorsProvider]: IDE-specific implementation 2020-12-15 18:43:00 +01:00
Dmitriy Dolovov 6e9ac6b333 [Commonizer] Internal tool for tracking memory usage 2020-12-15 09:48:27 +03:00
Dmitriy Novozhilov 55b0775565 [FE] Call SealedClassInheritorsProvider only for sealed classes 2020-12-14 10:43:14 +03:00
Dmitriy Dolovov 2be62c13b0 [Commonizer] Minor. Renamings
- Absent* -> Missing*
- Target -> CommonizerTarget
- Result -> CommonizerResult
- Parameters -> CommonizerParameters
2020-12-11 22:15:11 +03:00
Dmitriy Novozhilov 6809adee9c [FE] Extract computation of sealed class inheritors into separate component
This is needed to provide more optimal provider in IDE plugin
2020-12-09 22:54:31 +03:00
Dmitriy Novozhilov e76acc8ee0 [FE] Collect inheritors of sealed classes from new places in computeSealedSubclasses
#KT-13495
2020-12-09 22:54:24 +03:00
Dmitriy Dolovov e5c46a86aa [Commonizer] Minor. Rename file 2020-12-03 15:33:26 +03:00
Dmitriy Dolovov daf42c1ee6 [Commonizer] Remove unnecessary nullability at CirKnownClassifiers.commonDependeeLibraries 2020-12-03 15:33:20 +03:00
Dmitriy Dolovov 68f8e88d8b [Commonizer] Introduce various types of classifier caches
- New CirCommonizedClassifiers and CirForwardDeclarations caches
- New CirProvidedClassifiers cache with classifier names loaded from arbitrary modules
- CirClassifiersCache is replaced by CirKnownClassifiers umbrella
- Replace the remaining usages of 'isUnderStandardKotlinPackages' by delegation to
  CirKnownClassifiers.commonDependeeLibraries
2020-12-03 13:11:40 +03:00
Dmitriy Dolovov dce3d4d1b7 [Commonizer] Rename InputTarget and OutputTarget
Rename target classes to better reflect their meaning:
- InputTarget -> LeafTarget
- OutputTarget -> SharedTarget
2020-12-03 13:11:33 +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
Ilmir Usmanov 92f1681de0 Value classes: treat @JvmInline value classes as inline classes
Report error on value classes without @JvmInline annotation.
Do not check for @JvmInline annotation in value classes since
it breaks reflection.
2020-11-27 23:52:06 +01:00
Ilmir Usmanov 361ed117bb Value classes: Add isValue property to class descriptors
Reuse isInline flag in proto and IR.
Check metadata version on deserialization.
2020-11-27 23:52:05 +01:00
Dmitriy Dolovov c741284458 [Commonizer] Stricter processing of forward declarations 2020-11-26 10:57:11 +03:00
Dmitriy Dolovov eca231a01d [Commonizer] Extract CIR classifiers cache from the root node 2020-11-26 10:57:05 +03:00
Dmitriy Dolovov 8d9abed3dc [Commonizer] Minor. More specific upper bounds for CirNodeWithClassId 2020-11-26 10:56:59 +03:00
Dmitriy Dolovov 0d50ccc42d [Commonizer] Fix: Lost nullability in commonized type aliases 2020-11-19 16:47:24 +03:00
Dmitriy Dolovov 66bc142f92 [Commonizer] Empty sources/javadocs Jars 2020-11-17 19:02:18 +03:00
Dmitriy Dolovov f5329b6f1d [Commonizer] Don't publish sources and javadocs 2020-11-12 17:23:52 +03:00
sebastian.sellmair 06cb64bb51 Allow open callable members in expect interfaces
#KT-42094 fixed
2020-11-11 17:41:59 +00:00
Alexander Likhachev 2d2042ad12 [Gradle, K/N] Configuration cache support for compile & link with warns
#KT-43151 Fixed
2020-11-11 10:58:37 +03:00
Dmitriy Dolovov 734dff6282 [Commonizer] Use compact variants of collections to reduce memory footprint 2020-11-05 18:50:56 +03:00
Dmitriy Dolovov 30bf7b87fe Minor. Code formatted 2020-11-05 18:50:50 +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 cb2e94df16 [Commonizer] Minor. Convert approximation keys back to data classes 2020-11-05 18:50:31 +03:00
Mikhail Zarechenskiy bb2e9e2d56 Extract new method from the publicly used interface for compatibility
Note that we can't just use ``@JvmDefault` annotation as the main change
 is in the `core` module which targets Java 6

 #KT-42259 Fixed
2020-10-27 14:14:39 +03:00
Igor Chevdar 9d1cb6a2c0 Turned off TypeOfChecker for K/N 2020-10-23 18:27:10 +05:00
Leonid Startsev 4ec90b18bc Rework DescriptorSerializerPlugin to be a part of Project's extensions
instead of statically registering it.

Static registering can cause subtle errors when plugin implementation
(e.g. SerializationDescriptorPluginForKotlinxSerialization) is registered
from multiple classloaders: in multi-module with daemon compilation scenario

 #KT-41857 Fixed
2020-10-22 17:04:35 +03:00
Sergey Bogolepov 2ad13847d1 [KT-40670] Allow to override konan.properties from CLI 2020-10-20 17:00:00 +07:00
Dmitriy Dolovov c69402c800 [Commonizer] Fix computing underlyingType and expandedType in CirTypeAlias 2020-10-19 11:21:53 +03:00
Dmitriy Dolovov 3d8b614778 [Commonizer] Allow debugging through "runCommonizer" Gradle task 2020-10-14 09:33:12 +03:00
Dmitriy Dolovov f49f5cb3d5 [Commonizer] Fix classpath for "runCommonizer" Gradle task 2020-10-14 09:33:06 +03:00
Dmitriy Dolovov 07f78f5ab8 [Commonizer] Drop "kind" from CirClassConstructor
... as it is always CallableMemberDescriptor.Kind.DECLARATION
for serialized constructor declarations
2020-10-02 16:47:29 +03:00
Vladimir Dolzhenko 3c380faeb5 Added deprecated PackageFragmentProvider#getPackageFragments for BWC
Relates to ^KT-33394
^KT-42259 Fixed
2020-09-29 19:14:44 +00:00
Sergey Bogolepov 5a0a853d9b [Native] Add simple symbol mechanism to konan.properties
Java Properties format is extremely trivial and does not support any
kind of references or variables. It makes konan.properties repetitive.
This commits adds support of perl-like `$` sigil which allows to
reference properties inside values.
2020-09-15 13:54:09 +07:00
Vladimir Dolzhenko 5036673187 Improve package caching in KotlinJavaPsiFacade
^KT-33394 Fixed
2020-09-10 07:38:46 +00:00
Dmitriy Novozhilov d1fd1da56f Rename Visibility to DescriptorVisibility 2020-09-04 11:07:42 +03:00
Dmitriy Dolovov 8a7f33f044 [Commonizer] Fix internal error when TAs have different expanded classes
^KT-41643
2020-09-04 01:19:41 +07: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 96736b0126 [Commonizer] Add missed supertypes in commonized type aliases
^KT-41247
2020-09-01 13:11:27 +07:00
Dmitriy Dolovov e21d99334b [Commonizer] Lookup common descriptors that don't participate in commonization (for tests only)
This is necessary to run integration tests with fake declarations from
Kotlin/Native stdlib that are absent in stdlib-common.
2020-09-01 13:11:22 +07:00
Dmitriy Dolovov ed78169051 [Commonizer] README: Describe the case when target is not available 2020-09-01 13:11:16 +07:00
Dmitriy Novozhilov a764732020 Rename KotlinBuiltInsNames to StandardNames 2020-08-25 10:41:33 +03:00
Dmitriy Novozhilov 7a7fe77b8e Move static constants with builtin names to :core:descriptors.common module 2020-08-25 10:31:36 +03:00
Dmitriy Dolovov d40bca4143 [Commonizer] Short-circuiting of type aliases
^KT-41220
2020-08-24 12:21:12 +07:00