Commit Graph

99254 Commits

Author SHA1 Message Date
Ilya Gorbunov 3b97bfb426 Extract kotlinLanguageVersion to gradle.properties
Read it when building docs in order to keep
docs version filter/language analyzer version in sync with
the language version used to compile libraries.
2023-03-07 17:55:23 +00:00
Ilya Gorbunov 28ae0c1649 docs build: allow to specify custom dokka repository
- centralize repository management in settings.gradle.kts
- allow to specify dokka repository with a gradle property
- automatically add mavenLocal for -local dokka versions
- specify kotlin version for building plugins in one place
2023-03-07 17:55:23 +00:00
Ilya Gorbunov 93650dcada docs build: move parameter initialization to the parent project
in order to avoid evaluationDependsOn dependency
2023-03-07 17:55:23 +00:00
Ilya Gorbunov e627356aea docs: cleanup remaining previous version specializations 2023-03-07 17:55:22 +00:00
Pavel Mikhailovskii 9db5ea66a6 KT-57103 Don't inline references to generic synthetic Java properties in K1 2023-03-07 17:35:04 +00:00
Yahor Berdnikau 5ddd60a015 Add '-progressive' option into Gradle compiler options DSL
^KT-53923 Fixed
2023-03-07 17:32:20 +00:00
Alexander.Likhachev 8bb0c5135b [IC] Add unit tests for InMemoryStorageWrapper
#KT-56052 Fixed
2023-03-07 16:19:25 +00:00
Alexander.Likhachev 4aedf77431 [IC] Avoid many collection allocations in InMemoryStorageWrapper
#KT-56052 In Progress
2023-03-07 16:19:25 +00:00
Alexander.Likhachev cc16ca2bf8 [IC] Add synchronization to all the DefaultInMemoryStorageWrapper public methods
#KT-56052 In Progress
2023-03-07 16:19:25 +00:00
Alexander.Likhachev 99830d7f28 [IC] Segregate LazyStorage into LazyStorage and AppendableLazyStorage
#KT-56052 In Progress
2023-03-07 16:19:24 +00:00
Alexander.Likhachev cef557c407 [IC] Notify user about enabled IC backup optimizations
KT-52625, KT-55995, KT-56052 Related
2023-03-07 16:19:24 +00:00
Alexander.Likhachev 4d080c1a82 [IC] Register last-build.bin file in a transaction
KT-55995 Related
2023-03-07 16:19:24 +00:00
Alexander.Likhachev ae75736864 [Gradle] Enable in-memory wrappers for the precise outputs backup tests
#KT-56052 In Progress
2023-03-07 16:19:23 +00:00
Alexander.Likhachev ca8d0bd100 [IC] Add unit tests for resetting in-memory caches wrappers in a transaction
#KT-56052 In Progress
2023-03-07 16:19:23 +00:00
Alexander.Likhachev 04a5c7761c [IC] Add unit tests for CachesManager closing in transaction
#KT-56052 In Progress
2023-03-07 16:19:23 +00:00
Alexander.Likhachev 2bff38dd27 [IC] Fix transaction wasn't marked as unsuccessful on execution exception
#KT-56052 In Progress
2023-03-07 16:19:22 +00:00
Alexander.Likhachev 8825cf7bf6 [IC] Fix RecoverableCompilationTransaction wasn't throwing an exception properly
#KT-56052 In Progress
2023-03-07 16:19:22 +00:00
Alexander.Likhachev 83ea1ca3cf [IC] Let CompilationTransaction to reset in-memory changes in IC caches
#KT-56052 In Progress
2023-03-07 16:19:22 +00:00
Alexander.Likhachev 493da2a8b4 [IC] Rename DummyCompilationTransaction -> NonRecoverableCompilationTransaction 2023-03-07 16:19:21 +00:00
Alexander.Likhachev 25a3dcf3d1 [IC] Make CompilationTransaction to be able to close CachesManager 2023-03-07 16:19:21 +00:00
Alexander.Likhachev 3ed651a7a6 [Gradle] Add a property to control if the IC caches in-memory wrapper is enabled
#KT-56052 In Progress
2023-03-07 16:19:20 +00:00
Alexander.Likhachev e7e5a3488b [IC] Introduce a wrapper for IC caches storage to keep changes in-memory
#KT-56052 In Progress
2023-03-07 16:19:20 +00:00
Vladimir Sukharev 8dc6ae41f6 Exclude 3 KonanDriverTest testcases from K2 testing due to KT-56855
Merge-request: KT-MR-9114
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-03-07 14:05:12 +00:00
Oleg Yukhnevich dddd5a57c5 fix api dumpp 2023-03-07 13:57:35 +01:00
Oleg Yukhnevich 3726bf0ed5 replace KDoc comment with simple one 2023-03-07 13:57:35 +01:00
Oleg Yukhnevich 3f8f25fe43 move ExperimentalWasmDsl opt-in to file level 2023-03-07 13:57:35 +01:00
Oleg Yukhnevich b240b8452a support WASM in KotlinTargetHierarchyBuilder 2023-03-07 13:57:35 +01:00
Marco Pennekamp 91fb16110f [FIR] KTIJ-24296 Remove unused isNameForFunctionClass 2023-03-07 11:44:15 +00:00
Marco Pennekamp eb673e4566 [FIR] KTIJ-24296 Optimize isNameForFunctionClass based on name shape
- A `classId` can only be a generated function class if it ends with a
  digit, per the contract described in `FunctionTypeKind`.
- The optimization uses this fact to avoid calling
  `functionTypeService.getKindByClassNamePrefix`, which can be expensive
  due to a hash map access.
2023-03-07 11:44:14 +00:00
Marco Pennekamp a725fe559c [FIR] KTIJ-24296 Allow special names in symbol provider pre-filtering
- A special name such as `<no name provided>` may not be contained in
  the list of names, but may still be found by a provider.
2023-03-07 11:44:14 +00:00
Marco Pennekamp ece038b49b [LL FIR] KTIJ-24296 Extract symbol provider name cache into a class
- The caching logic from `LLFirProvider` may be used in other symbol
  providers.
2023-03-07 11:44:14 +00:00
Marco Pennekamp d9a024bab2 [LL FIR] KTIJ-24296 Implement symbol name pre-filtering in LLFirProvider
- The optimization reduces time spent in `LLFirProvider.SymbolProvider`
  during my tests by 30-90% in some highlighted files. In other
  performance tests, the optimization makes performance worse, so more
  work is needed. In general, higher workload tests run faster with the
  optimization, while lower workload tests run slower. This is expected
  as the optimization trades short-term performance (for building
  classifier/callable name sets) in favor of long-term speedup.
- The changes should also reduce the size of declaration caches like
  `LLFirProviderHelper.classifierByClassId`.
- Building the name sets has a second use, as a similar optimization can
  be implemented for dependent module providers, which may rely on the
  sets computed here.
2023-03-07 11:44:13 +00:00
Marco Pennekamp 18ce21fb13 [FIR] Extract mayHaveTopLevelClassifier from composite symbol provider
- The implementation is not trivial and should be usable in other symbol
  providers.
2023-03-07 11:44:13 +00:00
Nikolay Lunyak 343deeec1c [FIR] Check FirReceiverParameter annotations' targets 2023-03-07 11:35:47 +00:00
Nikolay Lunyak 0c77de3049 [FIR] Add a test with an inapplicable receiver annotation 2023-03-07 11:35:47 +00:00
Nikolay Lunyak 1378d730d6 [FIR] Forbid all use-site targets of FirTypeRef annotations 2023-03-07 11:35:47 +00:00
Nikolay Lunyak 93ba0c3e70 [FIR] KT-56769: Ensure @receiver: is only allowed on receivers
Note that there's no code that checks that
FirReceiverParameter's annotation's use-site target
is indeed `@receiver:`, because otherwise the
annotation wouldn't have made it into
the FirReceiverParameter.

In contrast, in K1 all such annotations are treated
as annotations on a KtTypeReference.

^KT-56769 Fixed
2023-03-07 11:35:46 +00:00
Yahor Berdnikau 174f39aa46 Add '-opt-in' option into Gradle compiler options DSL
^KT-53924 Fixed
2023-03-07 09:40:09 +00:00
Pavel Kunyavskiy 2b4abb0c7b [K/N] Remove outdated boxing related functions and classes
^KT-55765
2023-03-07 08:51:00 +00:00
Zalim Bashorov 4d7cf81ed0 [Wasm] Stop supporting "_export.js" in test infra, use import/export capability in relevant tests
* It works slightly differently in SpiderMonkey.
* It was a hack.
2023-03-06 23:19:02 +01:00
Zalim Bashorov bec827b654 [Wasm] Update SpiderMonkey to 112.0a1 (2023-03-04-09-52-24) 2023-03-06 23:19:02 +01:00
Alexander Udalov 47c48efa33 JVM IR: do not generate extension receiver parameter as ACC_MANDATED
Otherwise Java reflection is not able to load its type as a
parameterized type.

 #KT-40857 Fixed
2023-03-06 20:57:52 +00:00
Sebastian Sellmair d23a4f46cc [Gradle] Split Tasks.kt into several source files (per class) (2/2)
^KT-57142 Verification Pending
2023-03-06 18:19:12 +00:00
Sebastian Sellmair 02ac54fe5f [Gradle] Split Tasks.kt into several source files (per class) (1/2)
^KT-57142 Verification Pending
2023-03-06 18:19:11 +00:00
Yan Zhulanow 0044f49af8 Revert "[LL API] Fix vararg parameter matching in PSI-FIR comparison"
This reverts commit 2d8c3c5aaf.
2023-03-07 02:49:41 +09:00
Yan Zhulanow 07fdbeca19 [LL API] Search declarations in dependencies as a fallback
'JvmClassFileBasedSymbolProvider' works incorrectly for some cases,
such as built-in classes. Moreover, the whole declaration binding logic
looks over-complicated and redundant, as we get a 'ClassId'/'CallableId'
from a 'KtDeclaration', and look for it again in indices.

This commit fixes a bunch of failing completion tests:
- HighLevelJvmBasicCompletionTestGenerated
- HighLevelMultiFileJvmBasicCompletionTestGenerated
- FirKeywordCompletionHandlerTestGenerated
2023-03-06 17:49:16 +00:00
Yan Zhulanow 342488e66e [LL API] Restrict accepted declarations for on-air resolution
After 1cfd2ae7ff, all non-local
declarations became targets for on-air resolution. However, some of
them, including secondary constructors, are not supposed to be used
in that way. The commit restores the previous behavior.

This commits fixes failing tests in the following groups:
- FirIdeDependentAnalysisSourceModuleIsUsedAsExpressionTestGenerated
- FirIdeDependentAnalysisSourceModuleReferenceResolveTestGenerated
- FirOnAirResolveTestGenerated
2023-03-06 17:49:16 +00:00
Artem Kobzar 26f6661d1e [K/JS] Remove the possibility to have negative lines and columns in Source Maps 2023-03-06 16:55:26 +00:00
Pavel Kunyavskiy f2c1145462 [K/N] Disable failing test on mips, target is deprecated 2023-03-06 11:56:10 +00:00
Kirill Rakhman b80970b09f [FIR] Fix references to generic synthetic properties
When synthetic properties are built from a substitution override,
set originalForSubstitutionOverride, too.

^KT-56251 Fixed
2023-03-06 09:45:02 +00:00