Commit Graph

85635 Commits

Author SHA1 Message Date
Elena Lepilkina 8ff960fbe3 [K/N] Updated mimalloc to version 1.7.2 2021-09-08 13:53:17 +00:00
Elena Lepilkina e454c824d5 [K/N] Enable mimalloc support on Windows and Mac Arm64 2021-09-08 13:53:17 +00:00
Igor Chevdar e057e5ffac [K/N][optmz] New strategy for resolving divergence of escape analysis 2021-09-08 18:48:55 +05:00
Igor Chevdar aad2a3303f [K/N][optmz] More debug output for escape analysis 2021-09-08 18:48:50 +05:00
Dmitry Savvinov 699eb47834 Never suggest fake overrides as results of expects-matching
See KT-48291 for example.

The rationale behind the change is that in "findExpectForActual" we want
to find a candidate to be a counterpart for the current (actual)
declaration. Fake overrides can not be a sensible counterpart in that
regard (you can't, nor you should, provide actual for expect which is
FAKE_OVERRIDE)

^KT-48291 Fixed
2021-09-08 16:22:54 +03:00
Dmitry Gridin 724194dec0 [ULC] fix testData in the plugin (related to repeatable annotation) 2021-09-08 19:50:40 +07:00
Mikhail Glukhikh 19a75b31f9 FIR: avoid resolve loop between accessor and other members
#KT-48634 Fixed
2021-09-08 14:47:51 +03:00
Victor Petukhov 72fa330576 Use proper substitution in the error message COULD_BE_INFERRED_ONLY_WITH_UNRESTRICTED_BUILDER_INFERENCE 2021-09-08 13:10:50 +03:00
Victor Petukhov 810aee60db Get nested builder inference sessions properly, across delegated inference sessions too
^KT-48445 Fixed
2021-09-08 13:10:50 +03:00
Victor Petukhov 1d9ffebad6 Create resolution context for delegated property resolve as well
^KT-48445 Fixed
2021-09-08 13:10:46 +03:00
Victor Petukhov ce02cd4729 Enable suspend conversions by default in 1.6
^KT-48618 Fixed
2021-09-08 13:09:20 +03:00
Victor Petukhov 86d8468b8b Introduce a compiler X-flag to use the builder inference by default for all calls
^KT-48622 Fixed
2021-09-08 13:09:19 +03:00
Dmitry Petrov df700117c3 Minor: update testData 2021-09-08 09:05:36 +03:00
Roman Artemev 78cd45f937 [KLIB] Resolve deserialization on for each file separately
Needs for IC
2021-09-07 20:41:28 +03:00
Roman Artemev 28ffcf1e81 [KLIB] Fix typo 2021-09-07 20:41:26 +03:00
Alexander Udalov 5dbf5b1d45 Cleanup type enhancement, remove ValueParameterData
`ValueParameterData.hasDefaultValue` is now always equal to the original
value parameter's `declaresDefaultValue` flag, so `ValueParameterData`
usages can be simplified to just `KotlinType`.
2021-09-07 19:05:48 +02:00
Alexander Udalov 7e43000d9b JVM: do not lose default parameter values during enhancement
The change in signatureEnhancement.kt in 432f581cb2 was incorrect.
Contrary to its name, the removed method `hasDefaultValueInAnnotation`
checked not only if the enhancement annotation has default value (which
is what the removed feature was about), but also if the parameter itself
declares default value. This was mistakenly substituted by just `false`
on line 234. The correct change is to use the `declaresDefaultValue`
flag of the original parameter.

It's kind of weird though that in case there's a nullability annotation
on the whole package (like in KT-48316) type enhancement is being done
on everything, including annotation constructors, whose parameter types
can't have any enhancement information. Maybe this should be improved
independently.

 #KT-48316 Fixed
2021-09-07 19:05:48 +02:00
Dmitry Petrov e28d4a1877 JVM_IR allow remapped variables in inplace arguments transformation 2021-09-07 19:46:03 +03:00
Svyatoslav Scherbina 09c8ca860a Fix output path for :kotlin-native:distEndorsedSources 2021-09-07 15:59:16 +00:00
sebastian.sellmair 1076654bd9 [Gradle] Shared Native compilations: Don't explicitly add stdlib dependency
Shared Native Compilations seem to already implicitly add a
dependency on the stdlib. Adding it again will result in a
'library included more than once' warning.

^KT-46257 Verification Pending
2021-09-07 14:17:40 +00:00
sebastian.sellmair 8fe176f605 [Gradle] CommonizerHierarchicalIT: Add assertions for ^KT-46257 2021-09-07 14:17:40 +00:00
Roman Golyshev 19d11f9149 [FIR IDE] Do not create KtPsiBasedSymbolPointer for generated members
For example, if a class has default constructor (`class Foo`),
both KtClassSymbol and KtConstructorSymbol will be pointing to the same
PSI - thus creating effectively the same `KtSymbolPointer`. Later
it will be impossible to deduce which symbol we had in mind

Currently, `Show Parameters Info` works incorrectly for
such generated declarations  because of that - it throws CCE while
trying to cast class symbol to function (constructor) symbol
2021-09-07 13:36:11 +00:00
Dmitry Gridin 8b5d6827c9 [ULC] fix compatibility with java analyzer for repeatable annotation
* imitate `getReferenceName` to provide interop with existed java analyzer [AnnotationsHighlightUtil.java:238](https://github.com/JetBrains/intellij-community/blob/ad7c664356b2f21af1fa204d5b7b014d8af10fd3/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/AnnotationsHighlightUtil.java#L238)

^KTIJ-19318
2021-09-07 12:47:25 +00:00
Dmitry Gridin 11e71e4e27 [ULC] support repeatable annotation and container
^KTIJ-19318
2021-09-07 12:47:24 +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
Dmitriy Novozhilov 661d89c67f [FIR] Fix diagnostic message rendering for OVERRIDE_DEPRECATION 2021-09-07 14:11:46 +03:00
Dmitriy Novozhilov 9f4abd8ff7 [FE 1.0] Fix diagnostic message rendering for OVERRIDE_DEPRECATION 2021-09-07 14:11:45 +03:00
Dmitriy Novozhilov 9844671ded [FIR] Add KDoc about thread safety rules of FirDeclarationAttributes 2021-09-07 12:38:02 +03:00
Dmitriy Novozhilov a13696072d [FIR-IDE] Properly calculate return type for fake overrides 2021-09-07 12:38:01 +03:00
Dmitriy Novozhilov 37a34e12d0 [FIR] Make Forced FakeOverrideTypeCalculator thread safe 2021-09-07 12:38:00 +03:00
Dmitriy Novozhilov 4f99140c2d [FIR] Split fake override storage to three different components 2021-09-07 12:38:00 +03:00
Dmitriy Novozhilov 9a8ad059d5 [FIR] Minor: rename firSession to session 2021-09-07 12:37:59 +03:00
Dmitriy Novozhilov c8bd6d3203 [FIR] Store SAM constructors in global session component 2021-09-07 12:37:58 +03:00
Dmitriy Novozhilov b832242c36 [FIR] Use NullableMap in FirSamResolver 2021-09-07 12:37:58 +03:00
Dmitriy Novozhilov 5bcd854bee [FIR] Store intersection overrides in global session component 2021-09-07 12:37:57 +03:00
Dmitriy Novozhilov 38a2af0c92 [FIR] Store substitution overrides in global session component 2021-09-07 12:37:56 +03:00
Igor Chevdar e67a78abaf [K/N][codegen] Fix for https://youtrack.jetbrains.com/issue/KT-48543
Sometimes an interface contains final methods, they shouldn't be in its itable
cause they can't be called virtually
2021-09-07 12:04:26 +05:00
Sergey Bogolepov 479e7a5169 [K/N] Fix KT-48566 by falling back to the old behavior
In 1.5.20 HostManager.host started to check host architecture and it
leads to regressing in case of os+arch combination that is not supported
by HostManager.
Before 1.5.20 HostManager.host was determined only by OS. It is
not correct, but Gradle plugin uses HostManager even if there are
no Native targets. We fallback to this behavior to workaround this
regression.
2021-09-07 04:42:01 +00:00
Georgy Bronnikov bf62e98a1a JVM_IR: protect LookupTracker use by a lock 2021-09-06 23:39:12 +03:00
Dmitry Petrov 860c80d210 JVM_IR add bytecode shape check to all relevant for-loop tests 2021-09-06 22:16:41 +03:00
Dmitry Petrov d9e4dec810 JVM_IR reuse loop variable as index variable should happen after LDL
We can't apply "reuse loop variable as index variable" transformation
before local declarations lowering, otherwise it will affect captured
loop variable behavior, resulting in KT-48626.

Since it's JVM-specific, move it to JvmOptimizationLowering.
2021-09-06 22:16:40 +03:00
Sergej Jaskiewicz f62ffeaa0a [JS, Frontend] Forbid @JsExporting inline/value classes
Previously the compiler would just crash.

#KT-46202 Fixed
2021-09-06 16:13:00 +03:00
Sergej Jaskiewicz 5eaea04bc8 [JS, Frontend] Fix a typo in an error message
The single apostrophe was eaten, resulting in the wrong
spelling "cant".
2021-09-06 16:13:00 +03:00
Sergej Jaskiewicz cb3d5f90e6 [JS IR] Export protected members too
#KT-47524 Fixed
#KT-47525 Fixed
2021-09-06 12:46:25 +00:00
Philipp Smorygo 6abd3bf589 Fix CocoaPodsIT 2021-09-06 12:32:25 +00:00