Commit Graph

91170 Commits

Author SHA1 Message Date
Sergey Igushkin d495c5b604 Introduce a container for the KPM model for different kinds of projects 2022-02-14 15:04:51 +00:00
Sergey Igushkin a998e2d291 Model mapping experiment: map source sets to KPM fragments
TODO: keep type compatibility,
      inject the behavior in DefaultKotlinSourceSet
2022-02-14 15:04:51 +00:00
Dmitry Petrov 8274709621 IR fix substituteType for DNN type 2022-02-14 14:16:56 +00:00
Denis.Zharkov 58408d8a78 FIR: Fix incorrect qualifier resolution in case of type parameters
^KT-51265 Fixed
2022-02-14 17:16:22 +03:00
Sergey Bogolepov 52c8b6166c [K/N] Fix filecheck_function_attributes_at_callsite test 2022-02-14 13:38:51 +00:00
Sergey Bogolepov fbbe5cbd03 [K/N] Disable filecheck tests in some cases 2022-02-14 13:38:50 +00:00
Sergey Bogolepov b4cbe703cd [K/N] Test for KT-50970 2022-02-14 13:38:50 +00:00
Sergey Bogolepov ad793ac624 [K/N] Support cross targets in FileCheckTest
Also mark property's getter with Input and Optional annotations instead of
property itself.
2022-02-14 13:38:49 +00:00
Sergey Bogolepov 34cb79fc9f [K/N] Fix KT-50970
Force generation of ARM instruction set for iosArm32 and
watchosArm32 targets for C++ code. There is no need for such
adjustments for Kotlin code because we don't specify any target
features in IrToBitcode and compiler backend infers target features
from target architecture (which is armv7* and not thumbv7).
2022-02-14 13:38:49 +00:00
Yahor Berdnikau a26c7ace8b Remove accidentally left test debug parameters 2022-02-14 16:08:22 +03:00
Pavel Punegov 423e5a6530 [K/N][build] Rewrite endorsed libraries build to kts 2022-02-14 15:58:39 +03:00
Pavel Punegov 361d922119 [K/N][build] Rewrite kotlinx.cli build to kts
Rewrite to kts and use konan plugin instead of simple JavaExec task.
Produce cache in the project instead of the upper one.
2022-02-14 15:58:38 +03:00
Victor Petukhov fd6500c167 [FE 1.0] Set a fixation priority for self type variables less than any of ready for fixation kinds
^KT-51040 Fixed
^KT-49838
2022-02-14 15:43:53 +03:00
Victor Petukhov 78f4b9f1cd [FE 1.0] Fix mistakes in error messages for resolution ambiguity with stub types
^KT-51022 Fixed
2022-02-14 15:43:47 +03:00
Victor Petukhov a54c9edaad [FE 1.0] Report progressions resolve changing warning while calling Java methods which pass Collection
^KT-51062 Fixed
2022-02-14 15:43:43 +03:00
Ilmir Usmanov 8f23fc54a4 Mangle bridges if its return type is not inline
#KT-51235 Fixed
2022-02-14 13:06:13 +01:00
Dmitriy Dolovov 7ad69ea8eb [Native][tests] Regenerated native tests 2022-02-14 13:50:40 +03:00
Dmitriy Dolovov f62dcf65fc [Native][tests] Fix generation of *.def file in accidentally disappeared dir 2022-02-14 13:41:00 +03:00
Dmitriy Dolovov 334dffd3e4 [Native][tests] Remove external tests from old test infra 2022-02-14 13:41:00 +03:00
Dmitriy Dolovov 4f0785cbb2 [Native][tests] Rename test tag "klib" to "klib-abi" to be more specific 2022-02-14 13:40:59 +03:00
Dmitriy Dolovov ca45252143 [Native][tests] Add separate Gradle tasks to run tests for stdlib and kotlin-test libraries 2022-02-14 13:40:59 +03:00
Dmitriy Dolovov 174f4cd220 [Native][tests] Rename Gradle task "externalTest" to "codegenBoxTest" 2022-02-14 13:40:59 +03:00
Dmitriy Dolovov e5f819ffad [Native][tests] Allow using "test" task in dev environment 2022-02-14 13:40:59 +03:00
Dmitriy Dolovov 45abf752ec [Native][tests] Don't ignore test failures 2022-02-14 13:40:59 +03:00
Dmitriy Dolovov 22d5d7343b [Native][tests] Drop obsolete "kotlin.internal.native.test.useCache" property 2022-02-14 13:40:59 +03:00
Dmitry Savvinov ea466353fb Dont store type refinement mode in analysis flags
Instead, check the refiner from the DI-container or refiner from
capability of a module descriptor.

The reason is because in the IDE there might be multiple
ResolutionFacades (-> multiple DI-containers -> multiple module
descriptors) for one and the same IDE module, with different refinement
settings.
However, due to how the code is written, it's hard to have
different LanguageVersionSettings for one and the same module.

After this commit the refinement settings are determined by the
moduleDescriptor capabilities, which is much easier to tweak

See usage of that change in Kotlin IDE Plugin (commit is linked to the
YT issue)

^KTIJ-20775
2022-02-14 13:08:50 +03:00
Svyatoslav Scherbina 5afbbecea4 Native: rename Xcode.current to .findCurrent()
To reflect that it is a non-trivial operation with possible performance
overhead.
2022-02-14 08:52:14 +00:00
Svyatoslav Scherbina e92f7b5ec3 Native: don't cache Xcode.current between different compiler invocations
The compiler might be executed in a Gradle daemon process,
so current Xcode might actually change between different invocations.

^KT-49496 Fixed
2022-02-14 08:52:13 +00:00
Svyatoslav Scherbina 86ad804848 Native: remove support for pre-Xcode 12 libclang_rt
Kotlin/Native doesn't support Xcode versions older than 12.5 anymore,
so just remove the obsolete code.
2022-02-14 08:52:13 +00:00
Dmitry Petrov f5e4c72f06 IR fix IrType.makeNullable() for DNN type 2022-02-11 18:24:34 +00:00
Mikhail Glukhikh 705d960b8f FIR2IR: fix behavior of implicitCastOrExpression for DNN types 2022-02-11 18:24:34 +00:00
Dmitry Petrov 53210770a6 IR use abstract classes in IrType hierarchy 2022-02-11 18:24:33 +00:00
Dmitry Petrov 54299e83e8 JVM reorganize AbstractTypeMapper.mapType 2022-02-11 18:24:33 +00:00
Dmitry Petrov 7b18d69f5f FIR+JVM_IR DNN-related fixes 2022-02-11 18:24:33 +00:00
Roman Artemev 412194dd75 [KLIB] Fix DNN type key in serializer 2022-02-11 18:24:32 +00:00
Dmitry Petrov 1fd2b9c9d9 IR fix DNN type mangling 2022-02-11 18:24:32 +00:00
Dmitry Petrov 4326e26907 JVM_IR Support IrDefinitelyNotNullType 2022-02-11 18:24:31 +00:00
Dmitry Petrov a565a17f3e IR IrDefinitelyNotNullTypeImpl should not extend IrSimpleType 2022-02-11 18:24:31 +00:00
nataliya.valtman d4d5c701fe Make statistic more readable 2022-02-11 17:23:38 +03:00
Pavel Kunyavskiy b575d98272 [K/N] Eliminate frame creation in some cases 2022-02-11 13:52:07 +00:00
Svyatoslav Scherbina d8b1992fde Native: fix cinterop for Swift-produced Objective-C categories
For some reason, libclang's indexer doesn't index categories with
__attribute__((external_source_symbol(language="Swift",...))),
so we have to additionally enumerate them explicitly.

^KT-49455 Fixed
2022-02-11 12:45:39 +00:00
Mark Punzalan f1623347d8 Analysis API: Use stub FirDataFlowAnalyzer when getting candidates. 2022-02-11 13:22:58 +01:00
Mark Punzalan 3f3873dc50 Analysis API: Return KtCallCandidateInfo instead of KtCallInfo in
KtCallResolver.collectAllCandidates().
2022-02-11 13:22:58 +01:00
Mark Punzalan b8cdfc5aad Analysis API: Move AllCandidatesResolver closer to
SingleCandidateResolver and share common code.
2022-02-11 13:22:58 +01:00
Mark Punzalan 7a1ef25333 Analysis API: Rename resolveCandidates to collectCallCandidates.
Didn't bother to rename the directory in the test data.
2022-02-11 13:22:58 +01:00
Mark Punzalan 58c6c25fe9 Analysis API: Handle other FirElements in
KtCallResolver.resolveCandidates() and copy over remaining tests.
2022-02-11 13:22:58 +01:00
Mark Punzalan 9b9da94a09 Analysis API: Fix issues related to implicit invoke calls:
- Correctly set explicit receiver value.
- Restore original function call from FirImplicitFunctionCall (i.e.,
calls implicitly resolved to `invoke`) to get the correct name for
getting all candidates.
- Collect candidates at all tower levels.

Also make order of candidate calls in tests deterministic.
2022-02-11 13:22:58 +01:00
Mark Punzalan ace826c570 Analysis API: Get argument mapping from candidate and type parameters
from candidate symbol.
2022-02-11 13:22:58 +01:00
Mark Punzalan 0ed802bca4 Analysis API: Add tests for KtCallResolver.resolveCandidates(). 2022-02-11 13:22:57 +01:00
Mark Punzalan f62bdf5826 Analysis API: Move AbstractResolveCallTest from fir to components
package.
2022-02-11 13:22:57 +01:00