Commit Graph

88124 Commits

Author SHA1 Message Date
Mikhael Bogdanov 6474a90555 Fix Android box tests 2021-12-06 19:34:40 +01:00
Mads Ager 529944fe9c [JVM_IR] Fix inline class default method codegen.
Do not coroutine transform static inline class replacements that
forward to a default interface suspend method. No boxing has to
take place on return (as the default interface method always
boxes) so we can simply forward the call.

^KT-49645 Fixed
2021-12-06 17:29:59 +01:00
Dmitriy Novozhilov 50f610cfd8 [Test] Add forgotten dumps for Fir2Ir text tests 2021-12-06 19:23:14 +03:00
Dmitriy Novozhilov 3519543831 [IR Test] Properly create empty dump for IR files witout source 2021-12-06 19:23:12 +03:00
Mikhail Glukhikh de783ad51f FIR: clarify some calls around lookupTag.toSymbol 2021-12-06 18:07:20 +03:00
Mikhail Glukhikh d842ac5d3e FIR: change dispatch receiver type to ConeSimpleKotlinType 2021-12-06 18:07:20 +03:00
Mikhail Glukhikh 4ed2defd00 FirReifiedChecker: minor cleanup 2021-12-06 18:07:19 +03:00
Mikhail Glukhikh 2ba2453062 ConeFlexibleType: statically require to have simple bounds 2021-12-06 18:07:19 +03:00
Mikhail Glukhikh fa8441fb23 FIR2IR: insert implicit not-null casts in delegated calls 2021-12-06 18:07:18 +03:00
Mikhail Glukhikh 7cfec0d846 FIR2IR: find & use delegate-to members properly 2021-12-06 18:07:18 +03:00
Mikhail Glukhikh a919351d07 FIR2IR: change delegate field type to initializer type 2021-12-06 18:07:18 +03:00
Mikhail Glukhikh 49bb2a578e FIR2IR: delay generation of delegated member bodies
Before this commit, we generated delegated member bodies eagerly
at the moment when delegated member itself was generated.
However, in fact delegated member may access e.g. fake override inside
its body, so to work properly, we must delay body generation.
2021-12-06 18:07:17 +03:00
Mikhail Glukhikh 85240bdb06 FIR2IR: generate type arguments in delegation calls 2021-12-06 18:07:17 +03:00
Alexander Shabalin c57df1ac40 [K/N] Track stats in Mark
Tracking alive heap set size after Mark GC phase.

Merge-request: KT-MR-5179
^KT-48537
2021-12-06 14:51:01 +00:00
Dmitry Petrov 7206c06d26 IR KT-50039 don't initialize outer 'this' in delegating constructor 2021-12-06 17:31:37 +03:00
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