Commit Graph

88109 Commits

Author SHA1 Message Date
Dmitriy Dolovov 0f745032af [Native][tests] External tests: Generate tests only relevant for Native 2021-12-06 17:28:23 +03:00
Dmitriy Novozhilov f307ec2275 Add .idea/artifacts/kotlinx_atomicfu_runtime_legacy_1_6_255_SNAPSHOT.xml to .gitignore 2021-12-06 17:24:07 +03:00
Dmitriy Novozhilov df2e9e3797 [FE 1.0] Correctly set USED_AS_EXPRESSION for unreachable when and if blocks
^KT-50028 Fixed
2021-12-06 17:24:06 +03:00
Dmitriy Novozhilov 7bcd3c7948 [FIR] Add FirExtensionRegistrarAdapter to fix extension points in FE 1.0 IDE plugin
FirExtensionRegistrar is FIR specific extension which requires FIR
  classes to work, which are missing in dependencies of FE 1.0 IDE plugin.
  To fix this issue FirExtensionRegistrarAdapter is introduced. This
  class is a base class for FirExtensionRegistrar and it does not have
  any FIR specific classes in it's API, so it can be safely registered
  in IDE
2021-12-06 17:19:34 +03:00
Mikhael Bogdanov a2395ec8bb Additional diagnostics for @JvmDefaultWithCompatibility 2021-12-06 14:20:25 +01:00
Mikhael Bogdanov a1262a4ecd Rename JVM default flags 2021-12-06 14:20:25 +01:00
Mikhael Bogdanov ea58c858d1 JvmDefault. Support @JvmDefaultWithCompatibility annotation
#KT-48217 Fixed
2021-12-06 14:20:24 +01:00
Alexander Shabalin feefaf2273 [K/N] Update NEW_MM.md about AtomicReference
Merge-request: KT-MR-5187
^KT-50026
2021-12-06 13:13:00 +00:00
Pavel Kunyavskiy 01345ad62b [K/N] Get rid of work with lagacy descriptor-based types 2021-12-06 12:32:08 +00:00
Tianyu Geng eeb4e4278d FE1.0 Analysis API: comment out KtFe10CallResolver for now 2021-12-06 12:40:43 +01:00
Tianyu Geng 9b05019137 FIR Analysis API: reimplement KtFirCallResolver with new data model 2021-12-06 12:40:43 +01:00
Tianyu Geng c9f9ce99c1 Analysis API: adapt to KtCall data model change
Also add API to check if a `KtFunctionSymbol` is the invoke function on
a Kotlin builtin functional type.
2021-12-06 12:40:42 +01:00
Tianyu Geng 53b3893738 Analysis API: rework data model of resolve call API 2021-12-06 12:40:42 +01:00
Tianyu Geng 58067e0a1e FIR checker: carry original candidate in ConeDiagnosticWithCandidates
This is needed by IDE when resolving calls because candidates carry more
information than just the targeting symbol.
2021-12-06 12:40:42 +01:00
Tianyu Geng b2e1dfa6db FIR checker: set source for assign call for augmented array set call
The source is set on the alternative block but not the XXXAssign call.
BTW, the real source is incorrect shared among the  FirAugmentedArraySetCall,
FirBlock, so this change uses a fake source for the FirBlock and the
FirFunctionCall. Using fake source does not seem to be necessary for
compilable code because in that case FirAugmentedArraySetCall is
transformed to either a FirBlock or a FirFunctionCall. But it's needed
for ambiguous code where such transformation fails. In this case, all
three FirElements are present and they should not share the same real
source.

In addition, this change also sets a fake source for the `get` call of
the array access to the left hand side of the operator. For example,
`m[a] += 1` where `m` is some custom map implementation that does not
return `null` from `get`. The (fake) source of the synthetic `get` call
in FIR is now `m[a]`. This is handy because the analysis API will
resolve `m[a]` to the `get` call.
2021-12-06 12:40:42 +01:00
Tianyu Geng bc95733818 FIR LL API: resolve PSI elements to more specific FIR element
Compound access and implicit delegated constructor are mapped to FIR
elements that are way too broad.
2021-12-06 12:40:41 +01:00
Tianyu Geng e8f1af6140 Analysis API: introduce KtSignature 2021-12-06 12:40:41 +01:00
Alexander Likhachev 5802ab1342 [Gradle, K/N] Use TCA-compliant API in KotlinNativeTargetConfigurator
#KT-47768 Fixed
2021-12-06 10:37:48 +00:00
Ilya Gorbunov eba6a4a000 KT-44089 Reflect Android SDK version to determine whether platform implementatoins are eligible
SDK version sanity check, suppress all reflection errors, duplicate SDK reflection code for more robustness
2021-12-06 12:24:45 +03:00
Ilya Gorbunov fe77046fe4 KT-44089 Try to use all known PlatformImplementation classes in Android
Currently platform method implementations loaded are limited by the
java.specification.version system property value, however that property
always returns 0.9 in Android.
2021-12-06 12:24:43 +03:00
Elena Lepilkina 219d9707ec [K/N][stdlib] Fix cases with existing pattern before matched with dot quantifier interval in regular expressions implementation(^KT-49967 Fixed) 2021-12-06 09:23:19 +00:00
Ilya Gorbunov 9c90d4e471 KT-50033 Add missing public API packages to module-info and setup a test
The test checks that new packages are not accidentally non-exported,
so each new stdlib package must be either exported or specified in that
test's expected non-exported package list.
2021-12-06 00:58:51 +00:00
Anton Bannykh 8c558fb6ba [JS IR] fix compilation 2021-12-05 15:38:04 +03:00
Anton Bannykh 53fe540884 [JS IR] use correct factory for new IR2JS 2021-12-05 15:38:04 +03:00
Anton Bannykh 038514ed65 [JS IR] fix IC (KT-49878 fixed) 2021-12-05 15:38:04 +03:00
Anton Bannykh bca9f19c86 [JS IR] enable new Ir2JS by default 2021-12-05 15:38:04 +03:00
Yahor Berdnikau 699671cb82 Ported forward additional changes for TaskOutputsBackup.
^KT-49782 Fixed
2021-12-03 21:24:34 +03:00
Anton Lakotka 550f5cf776 [Gradle] Mute Gradle Configuration Cache test for HMPP projects
Relates to #KT-49933
2021-12-03 17:54:56 +00:00
Anton Lakotka bdb94e282f [Gradle] Remove redundant HMPP Flags from integration tests
These flags are now set by default and hence no longer do any effect:
 * kotlin.mpp.enableGranularSourceSetsMetadata=true
 * kotlin.native.enableDependencyPropagation=false
 * kotlin.mpp.enableHierarchicalCommonization=true
2021-12-03 17:54:56 +00:00
Anton Lakotka c2ef443b0a [Gradle] Fix gradle integration tests after enabling HMPP by default 2021-12-03 17:54:56 +00:00
Anton Lakotka 6fd76a0ae6 [Gradle] Dont fail when resolving MetadataDependencies configuration
When HMPP project depends on non-mpp (ex. java) gradle project
Resolving *MetadataDependencies configurations should not fail due to
lack of Gradle's Kotlin MPP Extension.
Simply return null when no such extension found in non-mpp project.
2021-12-03 17:54:55 +00:00
Anton Lakotka 9a2f18581c [Gradle] Enable HMPP by default
Relates to KT-46721
2021-12-03 17:54:55 +00:00
Anastasiya Shadrina 4d3035e2f7 [Parser] Do not support local contextual declarations 2021-12-03 20:22:17 +03:00
Alexander Shabalin 4fd61ad1b0 [K/N] Change AtomicReference for the new MM ^KT-50026
Make AtomicReference behave like FreezableAtomicReference with the new MM: not frozen by default, don't require freezing value unless the ref itself is frozen. The behaviour with the old MM is unchanged.

Merge-request: KT-MR-5155
2021-12-03 17:08:21 +00:00
Alexander Likhachev 1d2e60a2af [Gradle] Measure TESTS_EXECUTED & COMPILATION_STARTED metrics report time 2021-12-03 15:59:48 +00:00
Alexander Likhachev 59b6aefe67 [Gradle] Validate compiler classpath & invoke compiler in single action
#KT-50037 Fixed
2021-12-03 15:59:47 +00:00
Sergey Bogolepov 26994817d1 [K/N] Update watchOS platform libraries for Xcode 13.1 2021-12-03 12:46:35 +00:00
Sergey Bogolepov 4bd4ef6fee [K/N] Update tvOS platform libraries for Xcode 13.1 2021-12-03 12:46:34 +00:00
Sergey Bogolepov c6574d9d80 [K/N] Update iOS platform libraries for Xcode 13.1 2021-12-03 12:46:34 +00:00
Sergey Bogolepov 5cd3043628 [K/N] Update macOS platform libraries for Xcode 13.1 2021-12-03 12:46:34 +00:00
Svyatoslav Scherbina 00c945ea4a Native: pack licenses from license/ into the bundle as well
Also remove duplicates from kotlin-native/licenses/
2021-12-03 11:24:43 +00:00
Svyatoslav Scherbina 13d0793a43 Update kotlin-native/licenses/ files copied from license/
These files were copied long ago, when kotlin-native/ was in the
separate Git repository, and now some of them don't match the updated
originals.
2021-12-03 11:24:43 +00:00
Svyatoslav Scherbina 427c2bde97 Native: remove kotlin-native/LICENSE as it duplicates license/LICENSE.txt 2021-12-03 11:24:43 +00:00
Svyatoslav Scherbina 3898c52454 Native: extract license packing into a function 2021-12-03 11:24:42 +00:00
Svyatoslav Scherbina 71deeab57c Native: don't pack Xcode license into non-macOS bundles 2021-12-03 11:24:42 +00:00
Svyatoslav Scherbina 0a6c4c985c Native: fix packing licenses into the bundle
The source directory became wrong after merging the kotlin-native/ into
kotlin.
2021-12-03 11:24:42 +00:00
Svyatoslav Scherbina 3d7ac9037a Native: fix packing licenses into the samples archive
The source directory became wrong after merging the kotlin-native/ into
kotlin.
2021-12-03 11:24:41 +00:00
Svyatoslav Scherbina 5af9ecf959 Native: fix packing RELEASE_NOTES.md into the bundle
The source directory became wrong after merging the kotlin-native/ into
kotlin.
2021-12-03 11:24:41 +00:00
Svyatoslav Scherbina 7b9f196528 Native: update Xcode license to 8/7/2019 2021-12-03 11:24:40 +00:00
Dmitriy Novozhilov 1f0b62b25f [FIR] Add smartcasts from == if equals is from Any
^KT-49127 Fixed
2021-12-03 14:19:25 +03:00