Commit Graph

100082 Commits

Author SHA1 Message Date
Sebastian Sellmair e76f3fb925 [Gradle] KaptGenerateStubsTask: Implement KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:59 +00:00
Sebastian Sellmair 6455f602a0 [Gradle] AbstractKotlinCompile: Remove kotlinSources from callCompilerAsync
(as sources are expected to be part of the compiler arguments directly)

KTIJ-24976
2023-04-06 16:02:58 +00:00
Sebastian Sellmair df2a64b183 [Gradle] KotlinNativeLink: Implement KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:58 +00:00
Sebastian Sellmair e8d217a8d9 [Gradle] KotlinJsDce: Implement KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:57 +00:00
Sebastian Sellmair d6e3b63069 [Gradle] Implement CompilerArgumentAware (for compatibility) using the new KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:57 +00:00
Sebastian Sellmair 30a4911a51 [Gradle] KotlinNativeCompile: Implement KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:57 +00:00
Sebastian Sellmair 16cce7516e [Gradle] KotlinCompileCommon: Implement KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:56 +00:00
Sebastian Sellmair ff0b070398 [Gradle] Kotlin2JsCompile: Implement KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:56 +00:00
Sebastian Sellmair d4cc842200 [Gradle] KotlinCompile: Implement KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:55 +00:00
Sebastian Sellmair 0a3eb68934 [Gradle] Implement IdeCompilerArgumentsResolver service
KTIJ-24976
2023-04-06 16:02:55 +00:00
Sebastian Sellmair 36ff6531ea [Gradle] Deprecate CompilerArgumentAware in favor of KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:55 +00:00
Sebastian Sellmair f5fadc1f68 [kotlin-tooling-core] Add Interner.clear API 2023-04-06 16:02:54 +00:00
Anna Kozlova 22b0a8d9fb [FIR] reference shortener should not touch fake sources
e.g. implicit types can't be shortened.
On the other hand, requesting textRange means building ast
which might be slow, especially for compiled code
2023-04-06 15:44:02 +00:00
Sergej Jaskiewicz 4b6975c3d0 [fir2ir] Set origins for componentN and copy methods of data classes
This aligns the behavior with psi2ir.
2023-04-06 14:45:47 +00:00
Roman Efremov c718c77c43 [FE] Check visibilities of expected and actual property setters are compatible
^KT-30905 Fixed
2023-04-06 13:10:30 +00:00
Roman Efremov 9044dfe394 [FE] Revert prohibition of protected members inside actual final classes
^KT-28850 Fixed
2023-04-06 13:10:12 +00:00
Anton Lakotka 88488f4dc9 [Gradle, Test] Fix disable default publications test
Windows has different line endings, so it is not possible to
to seek multiline substrings.
2023-04-06 12:34:12 +00:00
Bart van Helvert f7ec5885f5 KT-56200 Don't leak user code in reference resolve exception 2023-04-06 12:04:13 +00:00
Anna Kozlova de965d39be [LL] always get fir from decompiled stubs 2023-04-06 11:50:39 +00:00
Alexander Shabalin 4cd1f2ff82 [K/N] Fix a race in MemorySharedRefs ^KT-56233 2023-04-06 11:40:47 +00:00
Alexander Shabalin 8a8aeed998 [K/N] Handle permanent objects in new MM MemorySharedRefs ^KT-56233
Do not create a foreign ref to the permanent objects. There's no need to
do it, and, moreover, this ref would have leaked.
2023-04-06 11:40:45 +00:00
Alexander Shabalin 1f1b26f2a5 [K/N] Split Weak and MemorySharedRefs between mm implementations ^KT-56233
* A separate RegularWeakReferenceImpl for the new mm. Name is chosen for
  better consistency with other WeakReferenceImpl implementations.
* KRefSharedHolder and BackRefFromAssociatedObject implementations are
  independent between the legacy and the new mm.
* Better support for WeakReference in runtime unit tests.
2023-04-06 11:40:45 +00:00
Alexander Shabalin 87da670319 [K/N] Add more tests on associated object handling ^KT-56233 2023-04-06 11:40:44 +00:00
Alexander Shabalin dbe14a0a90 [K/N] Make gc::SweepExtraObjects similar to gc::Sweep. ^KT-56233 2023-04-06 11:40:44 +00:00
Alexander Shabalin eec3987e85 [K/N] Fix RunFinalizerHooks ^KT-56233 2023-04-06 11:40:43 +00:00
Alexander Shabalin aad6d2c8f8 [K/N] Add kotlin::ManuallyScoped<T> ^KT-56233
kotlin::ManuallyScoped<T> is a wrapper over T that pins T in place
and has a trivial constructor and destructor. Creation and destruction
of T must be carried out manually by construct and destroy methods.
2023-04-06 11:40:43 +00:00
Alexander Shabalin 6a0e6b11bd [K/N] Add kotlin::RWSpinLock ^KT-56233
Trivially constructible and destructible std::shared_mutex
implementation with additional guarantee that try_* methods fail only if
the mutex is locked.
2023-04-06 11:40:42 +00:00
Alexander Shabalin 9e5a2efb03 [K/N] Add kotlin::raw_ptr<T> helper class ^KT-56233
kotlin::raw_ptr<T> is exactly T* but with the default constructor
setting value to nullptr and with destructive move.
2023-04-06 11:40:42 +00:00
Sebastian Sellmair 4bc1271f55 [Gradle] AbstractCInteropCommonizerTask: Do not use ';' character in fileName
The ';' will later be used as path separator. Therefore,
using the ';' as joiner for multiple cinterop commonizer groups
will confuse the CLI argument parser inside the Commonizer

^KT-57796 Verification Pending
2023-04-06 11:34:07 +00:00
Sebastian Sellmair 59d78b4d96 [Gradle] Create commonize-kt-57796-twoCInteropCommonizerGroups to cover KT-57796 2023-04-06 11:34:07 +00:00
Zalim Bashorov 1e6626338d [CODEOWNERS] Changes in wasm output size tests must be shown to Zalim.Bashorov 2023-04-06 10:14:06 +00:00
Dmitrii Gridin 03eab387c0 [FIR] FirRenderer: render annotation resolve phase as well
^KT-56543
2023-04-06 08:09:41 +00:00
Kirill Rakhman 210e8750f4 [FIR] Deserialize nested typealias
#KT-57689 Fixed
2023-04-06 08:03:12 +00:00
Kirill Rakhman f9540d8f69 [JS] Remove non-functional IGNORE_FIR directive in js box tests 2023-04-06 08:03:12 +00:00
Zalim Bashorov 155eb9b77a [Wasm, stdlib] extract Any::identityHashCode to workaround the bug in FunctionDescriptorFactory
A fix is on its way -- KT-MR-9426.
2023-04-05 20:50:53 +02:00
Zalim Bashorov 46459dfa60 [Wasm] Minor: update expected size after rebase 2023-04-05 20:50:52 +02:00
Zalim Bashorov 2e4a09f841 [Wasm] Replace takeIf with ifEmpty in TeamcityAdapter 2023-04-05 20:50:52 +02:00
Zalim Bashorov 9760e3ee1e [Wasm] Introduce check and error specialized for String to reduce output size 2023-04-05 20:50:52 +02:00
Zalim Bashorov 295acdf2af [Wasm] Rewrite lazy initialization without by lazy and lateinit to reduce overhead 2023-04-05 20:50:52 +02:00
Zalim Bashorov 1a8a4fa65d [Wasm] Don't use by lazy inside Throwable 2023-04-05 20:50:52 +02:00
Zalim Bashorov 67357fa5d4 [Wasm] Replace heavyweight stackTraceToString with "pure" JS stack 2023-04-05 20:50:52 +02:00
Zalim Bashorov 14af47bbd9 [Wasm] Introduce utilities to get package and name of class directly from metadata and use it in some places 2023-04-05 20:50:52 +02:00
Zalim Bashorov f206b0b72d [Wasm] TeamcityAdapter: rewrite lazy property initialization using lateinit 2023-04-05 20:50:52 +02:00
Zalim Bashorov a9b553f16e [Wasm] Don't use by lazy to keep some JS values used by adapters 2023-04-05 20:50:52 +02:00
Zalim Bashorov 494403c4bb [Wasm] Don't use by lazy inside TeamcityAdapter 2023-04-05 20:50:52 +02:00
Zalim Bashorov 2ef47901d0 [Wasm] Introducing private identityHashCode shared between Any's hashCode and toString
It splits the dependency of toString from hashCode that prevents keeping hashCode when toString is used.
2023-04-05 20:50:51 +02:00
Zalim Bashorov 6e3eef7a88 [Wasm] add simple tests to track the size of wasm and mjs files 2023-04-05 20:50:51 +02:00
Zalim Bashorov 1697a28bf0 [Wasm] introduce a directive to check output size in some wasm tests
Syntax:
// WASM_DCE_EXPECTED_OUTPUT_SIZE: <file extension> <expected size in bytes>

Example:
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 10_000
2023-04-05 20:46:13 +02:00
deotime 7aaba3b78a [KT-57607] Fix performance of ArrayList.addAll methods in JS stdlib (#5116)
* Fix performance of ArrayList.addAll methods in JS stdlib: extend the backing array and copy elements manually
* Update expected reachable nodes after DCE in test data

---------

Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com>
2023-04-05 20:18:11 +02:00
Anton Lakotka 11b7fe2c4a [Gradle] Add possibility to disable default multiplatform publications
Additionally, skip pom rewriting mechanism in case
if default publications were disabled to prevent unexpected poms.
2023-04-05 17:58:02 +00:00