Commit Graph

42228 Commits

Author SHA1 Message Date
Ilya Goncharov 7ae85ed68e [JS IR] Module descriptors depends on each other 2023-01-23 16:16:48 +00:00
Roman Efremov 878608b7b2 Don't add Enum.entries to scope if it can't be called
^KT-53929 Fixed
2023-01-23 12:53:06 +01:00
Roman Efremov 14b4cdc7c4 Write "hasEnumEntries" flag into metadata when feature enabled
^KT-53929 Fixed
2023-01-23 12:53:04 +01:00
Vladimir Sukharev 195ecbac2e Serialize native klib extensions to pass most ObjCExport and CInterop tests.
Merge-request: KT-MR-8398
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-01-23 11:34:47 +00:00
Nikolay Krasko e895409c4a Bump kotlinx-html-jvm version 0.6.12 -> 0.7.3 2023-01-21 16:38:48 +00:00
Ilya Chernikov 61e39f2c31 minor: fix a typo leading to the wrong lines count with LT 2023-01-21 11:20:59 +00:00
Ilya Chernikov 7ec72b568d Fix assertion in light tree diagnostic reporter
happened then two diagnostics are reported on the same element.
#KT-55924 fixed
2023-01-20 17:57:15 +00:00
Sergey Bogolepov 5bd405856f [IR] Pass input value to AbstractNamedCompilerPhase.runAfter
It is needed for the K/N dynamic compiler driver where phase input
might be required for actions performed after its execution.
2023-01-20 13:33:07 +00:00
Sergey Bogolepov c22285f824 [IR] Remove unused Ir.irModule property
It is required for the Native backend refactoring
where `Context` does not contain a reference for any
particular IrModuleFragment.
2023-01-20 13:33:06 +00:00
Sergej Jaskiewicz 1f76d39e66 [IR] Make IrTypeArgument a sealed interface 2023-01-20 10:58:28 +00:00
Nikolay Lunyak ff96033e95 [FIR] KT-55666: Support labels to local functions
^KT-55666 Fixed
2023-01-20 08:09:08 +00:00
Dmitrii Gridin 4fa338ccf4 [LC] skip some tests in IDE 2023-01-19 19:25:04 +00:00
Ilmir Usmanov 945cdc8884 Minor. Ignore tests in JS_IR_ES6, regenerate tests 2023-01-19 17:04:31 +01:00
Nikita Bobko 887547c445 Drop MetadataComparisonTest & drop build-tools -> util-klib dependency
Review: https://jetbrains.team/p/kt/reviews/8360

MetadataComparisonTest was the only one in build-tools module who
depended on util-klib, that's why we can drop build-tools -> util-klib
dependency

MetadataComparisonTest is no longer needed, that's why we can drop it.

The dependency drop is a one step forward in dropping
`kotlin.srcDir("../compiler/util-klib/src")` line in
`buildSrc/build.gradle.kts`. Adding source roots in `buildSrc` is hacky
and can lead to frustrations (e.g. KT-55874). That's why it's desirable
to drop buildSrc -> util-klib hacky dependency.

Unfortunatelly, I couldn't drop buildSrc -> util-klib dependency,
because:
1. buildSrc depends on kotlin-native/shared/src/library/kotlin +
   buildSrc depends on kotlin-native/tools/kotlin-native-gradle-plugin +
   maybe smth else
2. kotlin-native/shared/src/library/kotlin depends on util-klib +
   kotlin-native/tools/kotlin-native-gradle-plugin depends on util-klib +
   maybe smth else
2023-01-19 12:55:56 +00:00
hungvietnguyen f172c50f27 New IC: Ignore LookupSymbols that refer to file facades (#5069)
A LookupSymbol should only refer to either a class, a class member, or a
package member.

When a LookupSymbol refers to a file facade (e.g.,
LookupSymbol(name="FooKt", scope="com.example")), it is redundant as it
doesn't impact the IC analysis to find files to recompile.

Previously, the new IC (ClasspathChangesComputer) would fail when
detecting that IncrementalJvmCache reported these redundant
LookupSymbols. With this change, the new IC will just ignore them.

Note: A better approach would be to fix IncrementalJvmCache to not
report these LookupSymbols, but it will require some significant
cleanup/refactoring work, so we can consider it later.

Test: New KotlinOnlyClasspathChangesComputerTest.testRenameFileFacade
^KT-55021 Fixed
2023-01-19 12:21:29 +01:00
Denis.Zharkov 490970e65e Adjust KotlinJavaPsiFacade::knownClassNamesInPackage for empty scope
The method must return an empty set in that case, instead of null
that would mean we can't compute it.

The problem was found when running FirLoadCompiledKotlinGenerated
2023-01-19 10:57:44 +00:00
Denis.Zharkov 9c988fd8d8 K2: Introduce FirCachingCompositeSymbolProvider
The main idea is pre-computing the sets of names that might be
met there, that helps to decrease the sizes of the backing maps
(by avoiding irrelevant keys)

Totally, this branch with previous commits speeds up MT Full Kotlin
approximately on 3 seconds (~5%)
2023-01-19 10:57:43 +00:00
Denis.Zharkov 6705d211a6 K2: Get rid of FirDependenciesSymbolProviderImpl
Its usages will be safely replaced
with FirCachingCompositeSymbolProvider

But here, in the commit plain FirCompositeSymbolProvider used temporary
2023-01-19 10:57:43 +00:00
Denis.Zharkov 9302fe3cb5 K2: Get rid of redundant FirDependenciesSymbolProvider class 2023-01-19 10:57:42 +00:00
Denis.Zharkov dab50daf56 K2: Add ability identify DI components by string key instead of KClass
It allows having several the same typed-component in the container
2023-01-19 10:57:42 +00:00
Denis.Zharkov 58c1b5dd1f K2: Optimize AbstractFirDeserializedSymbolProvider
Avoid filling caches with keys that are definitely empty
(if it's cheap to compute that), to decrease the size of backing maps.

The strategy is pre-computing the sets of names that might be met.
NB: the size of the sets is way fewer than a size of all queried names.
2023-01-19 10:57:42 +00:00
Dmitrii Gridin e2e87bd107 [FIR] CustomAnnotationTypeAttribute: drop redundant type specification
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:05 +00:00
Dmitrii Gridin 0420be603f [FIR] ScopeClassDeclaration: introduce new property to avoid container clash
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:04 +00:00
Dmitrii Gridin 7f24a38997 [FIR] FirTypeResolveTransformer: support lazy type annotations for all declarations
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:04 +00:00
Dmitrii Gridin 73cdaf5c3c [FIR] CustomAnnotationTypeAttribute: support type aliases
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:03 +00:00
Dmitrii Gridin 0e2967e520 [FIR] FirTypeResolveTransformer: avoid super call
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:03 +00:00
Dmitrii Gridin 8ce4c4eba9 [FIR] CustomAnnotationTypeAttribute: store fir symbol instead of declaration
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:02 +00:00
Dmitrii Gridin 9d42a5cb01 [FIR] provide containerDeclaration to CustomAnnotationTypeAttribute for lazy resolve
tested by FirIdeNormalAnalysisSourceModuleSymbolByPsiTestGenerated.testTypeAnnotations

^KTIJ-23547 Fixed
^KTIJ-24141 Fixed
2023-01-19 10:53:02 +00:00
Dmitrii Gridin f32483000a [AA FIR] KtFirAnnotationListForDeclaration: avoid resolve on creation 2023-01-19 10:53:02 +00:00
Denis.Zharkov b1bb7dd25f K1: Fix regression with callable references as last statements in lambda
^KT-55729 Fixed
2023-01-19 10:00:02 +00:00
Denis.Zharkov a37e3def14 Add test for KT-55931 2023-01-19 10:00:02 +00:00
Ilmir Usmanov d18672bfb1 Wrap continuation with ContinuationImpl on callable references
in startCoroutineUninterceptedOrReturn. Otherwise, the coroutine will
not be interceptable later.

Add a test, which checks, that intercepted continuation is released.

 #KT-55869
2023-01-19 00:35:36 +00:00
Igor Chevdar bd24fc4f0c [IR] Don't wrap KotlinExceptionWithAttachments
#KT-56015 Fixed
2023-01-18 15:47:48 +00:00
Mikhail Glukhikh c8db20bd0b Compiler: restore an opportunity to switch light tree mode OFF
#KT-55996 Fixed
2023-01-18 14:01:22 +00:00
Dmitrii Gridin 5aef179a3d [LC] fix testData 2023-01-18 14:11:14 +01:00
Pavel Kunyavskiy 2843c0ad1e [K/N] Fix cleaning stack-local primitive array
^KT-55984
2023-01-18 11:52:43 +00:00
Alexander.Likhachev 3dcf5af4b0 [IC] Add methods to write without explicit registering in a transaction
#KT-49785 In Progress
2023-01-17 22:15:57 +00:00
Alexander.Likhachev 581bc89849 [IC] Introduce ICContext to simplify configuration propagation to caches
#KT-49785 In Progress
2023-01-17 22:15:56 +00:00
Alexander Likhachev 0260d1d63f [IC] Move marking a transaction as successful up
#KT-49785 In Progress
2023-01-17 22:15:55 +00:00
Alexander Likhachev 4c2923f96f [IC] Support precise output backup for kapt stubs
#KT-49785 In Progress
2023-01-17 22:15:53 +00:00
Alexander Likhachev 274c9b6294 [IC] Register JS IC header file and lookup counter in transaction
#KT-49785 In Progress
2023-01-17 22:15:53 +00:00
Alexander Likhachev 20ed029ba5 [Gradle, IC] Add gradle property to control precise compilation outputs backup
#KT-49785 In Progress
2023-01-17 22:15:52 +00:00
Alexander Likhachev 6a91dd6bac [IC] Add KDoc for compilation transactions
#KT-49785 In Progress
2023-01-17 22:15:52 +00:00
Alexander Likhachev 7d471dafa3 [IC] Lower logging level inside RecoverableCompilationTransaction
#KT-49785 In Progress
2023-01-17 22:15:52 +00:00
Alexander Likhachev 5461667421 [IC] Measure time metrics in CompilationTransaction
#KT-49785 In Progress
2023-01-17 22:15:51 +00:00
Alexander Likhachev 742e240bdc [IC] Report messages with CompilerMessageSeverity.OUTPUT without grouping
#KT-49785 In Progress
2023-01-17 22:15:51 +00:00
Alexander Likhachev 1a5d2a7b7e [IC] Implement compiler outputs backup logic
#KT-49785 In Progress
2023-01-17 22:15:50 +00:00
Alexander Likhachev 3806105821 [IC] Introduce transactions to be able to revert compiler output changes
#KT-49785 In Progress
2023-01-17 22:15:50 +00:00
Artem Kobzar c4eca5f2df [K/JS] Exclude componentN methods from JsExport 2023-01-17 21:18:50 +00:00
Zalim Bashorov ab1cbc49dd [Wasm] Minor: move buildUnreachable* helpers to more specific module 2023-01-17 19:37:05 +01:00