Commit Graph

103187 Commits

Author SHA1 Message Date
Sebastian Sellmair e07ae23df9 [Gradle] Multiplatform import: Migrate to 'BuildIdentifier.getBuildPath'
^KT-58157 In Progress
2023-07-28 15:55:51 +00:00
Sebastian Sellmair c174bb9aa9 [Gradle] Implement 'buildNameCompat' and 'buildPathCompat' utilities
^KT-58157 In Progress
2023-07-28 15:55:51 +00:00
Sebastian Sellmair f5e946c0b2 [Gradle] IdeaKotlinProjectCoordinates: Replace 'buildId' with 'buildName' and 'buildPath'
^KT-58157 In Progress
2023-07-28 15:55:51 +00:00
Sebastian Sellmair fe3d5014ce [Gradle] Compile against Gradle 8.2
^KT-58157 In Progress
2023-07-28 15:55:51 +00:00
Pavel Kunyavskiy 858f432807 [K/N] Normalize on nan values in code generator
^KT-56041
2023-07-28 15:53:34 +00:00
Sergey.Shanshin 6417f6456f [KxSerialization] Implemented addition of annotations to the named companion
For a more efficient lookup of a companion with the functions of obtaining a serializer, a special annotation is added to the named companions.


Merge-request: KT-MR-11003
Merged-by: Sergey Shanshin <Sergey.Shanshin@jetbrains.com>
2023-07-28 15:53:09 +00:00
Alexander.Likhachev 175c00e5c7 [BT] Introduce the project build uuid
This allows to perform some cleanups after the entire project build finished.
#KT-57398 In Progress
2023-07-28 15:48:28 +00:00
Alexander.Likhachev 28c059f25b [BT] Implement basic non-incremental in-process JVM compilation 2023-07-28 15:48:28 +00:00
Alexander.Likhachev 6356a40fe8 [BT] Introduce KotlinBuildToolsException
#KT-57398 In Progress
2023-07-28 15:48:28 +00:00
Alexander.Likhachev b3fbe4c484 [BT] Introduce CompilationResult
#KT-57398 In Progress
2023-07-28 15:48:28 +00:00
Alexander.Likhachev 754f4830b9 [Gradle] Add integration tests for JVM compilation via the Build Tools API 2023-07-28 15:48:28 +00:00
Andrei Klunnyi 419381af7f KT-60749 Scripting: default definition as a fallback
This commit effectively reverts changes made in the scope of KT-60193,
namely c9eebffb and 2d50bd68.

^KT-60749 fixed
2023-07-28 15:46:45 +00:00
Dmitriy Novozhilov 69a35970eb [FIR] Introduce different synthetic origins for FIR declarations
This is needed to be able to precisely distinguish different synthetic
  declarations (like fields for delegates and functions for data classes)
  in fir2ir
2023-07-28 13:59:38 +00:00
Dmitriy Novozhilov 5b7b885dac [FIR] Remove unused import
This import breaks JPS compilation of the project
2023-07-28 13:59:38 +00:00
Kirill Rakhman ed6948959c [FIR] Make rendering of properties for diagnostics more user-friendly
#KT-60137 Fixed
2023-07-28 13:28:06 +00:00
Simon Ogorodnik b5ea059861 [FIR] Remove dead-code in transformFunctionCallInternal
Logic that was used to complete receiver expression is no longer needed
after the `invoke receiver completion` change:
7b46c59d57

Before that change, we could have generated a new receiver expression
during resolution in case of `call() -> call.<invoke>()` resolution,
Here - `call` is newly generated qualified access that wasn't completed.
We were detecting such situations by detecting change in the receiver
between original `call()` shape and output `___.invoke()` shape in
the expression.

After that change, we always complete the receiver of invoke during
`callResolver.resolveCallAndSelectCandidate`
So the logic that detects receiver mismatch and invokes receiver
completion after it isn't needed anymore
2023-07-28 13:02:24 +00:00
Alexander Udalov 72d048bd62 JVM: introduce JvmBackendConfig
Move language version settings, compiler configuration and different
flags there, and use this config everywhere in both backends instead of
GenerationState.

This will hopefully make GenerationState less of a "god object" and
remove the need to have it available everywhere, in particular in JVM IR
lowerings code, in the future.

Also, future refactorings will make it easier to inject backend-specific
behavior into common code, so that we would not need to handle support
of new features in the old backend.
2023-07-28 12:19:32 +00:00
mvicsokolova b6f8991072 [atomicfu-JVM]: Commonization of K/N and JVM (part 2)
The following transformations were commonized:

* generation of the transformed atomic extension signature
* building atomic array fields (arrays are now supported on both backends JVM and K/N)
* transformation of function calls on atomic array elements
* Generation and invocation of atomic extensions (the only difference is generation of synthetic value parameters)
* Changed synthetic parameters passed to the generated atomic extensions

See, KT-60528

Merge-request: KT-MR-11249
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-07-28 11:45:10 +00:00
Ilya Goncharov 8363bae527 [Gradle, JS] Add test on whole-program output-granularity 2023-07-28 11:19:53 +00:00
Ilya Goncharov a1a046d164 [Gradle, JS] whole-program not produce compiler argument 2023-07-28 11:19:53 +00:00
Sergej Jaskiewicz 2727163a63 [test] Introduce DeserializedIrBackend backend kind
We have `BackendKinds.IrBackend` for IR emitted by the frontend.

We need a different backend kind for IR deserialized from klibs.

We cannot use `BackendKinds.IrBackend` for that purpose, because we
cannot have two different `IrBackendInput` subclasses with the same
kind.

We need a different `IrBackendInput` subclass for deserialized IR
because the `IrBackendInput` for frontend-emitted IR contains some
properties like `sourceFiles` which don't make sense for
deserialized IR.

Since we now have two backend kinds for IR artifacts, we need to make
certain functions and classes in the test infrastructure generic
over backend kinds.

Note: the JsIrDeserializedFromKlibBackendInput class is not used
anywhere yet. We will use it in the coming commits.
2023-07-28 11:19:21 +00:00
mvicsokolova 0521b63cb1 [K/N] Do not cast the result of atomicGet/atomicSet invocation from Boolean to Byte in VolatileFieldsLowering, because this cast is done by the property getter.
Merge-request: KT-MR-11347
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-07-28 10:14:27 +00:00
Dmitriy Dolovov 5171d92fb9 [KLIB] API for dumping KLIB ABI
^KT-54402
2023-07-28 09:52:18 +00:00
Dmitriy Dolovov 8d9954c0b4 [CODEOWNERS] Assign Native Team as owner of new 'util-klib-abi' module 2023-07-28 09:52:18 +00:00
Dmitry Savvinov c9b7063d96 [mpp] Report commonTest with dependsOn similarly to commonMain
^KT-60556
2023-07-28 09:41:51 +00:00
Ilya Goncharov 890e53b8e7 [Gradle, JS] Use jsIr preset 2023-07-28 09:29:03 +00:00
Ilya Goncharov 4c82206d3b [Gradle,JS] Return legacy target to Gradle plugin back 2023-07-28 09:29:03 +00:00
Ivan Kylchik fe9de6875a [FIR2IR] Use a fully expanded type when generating IrClassReference
#KT-60639 Fixed
2023-07-28 09:02:45 +00:00
Ivan Kylchik 7e5e2fe1e4 [FIR] Drop dependency on ir.serialization from fir-serialization 2023-07-28 09:02:44 +00:00
Ivan Kylchik 88191e8b1a [IR] Add new test to check that nullable access to enum is not evaluated
Just a safety check. If an expression like `EnumClass.Value?.name` was
evaluated, we would consider it as breaking change.
2023-07-27 22:50:21 +00:00
Ivan Kylchik d0da736b13 [FIR] Add the new test set to render diagnostics from IR const evaluator 2023-07-27 22:50:21 +00:00
Ivan Kylchik 87b3d69d1b [FIR] Add new error diagnostic EVALUATION_ERROR
This diagnostic will be used to report errors from IR constant
evaluator.
2023-07-27 22:50:21 +00:00
Ivan Kylchik 84159596bd [FIR] Pass diagnosticReporter in Fir2IrConfiguration
This parameter will be used to report diagnostics from constant
evaluator, in addition to report diagnostic from actualizer.
2023-07-27 22:50:21 +00:00
Ivan Kylchik 6e45c9d4c7 [Test] Drop convertToIr method from AbstractFirAnalyzerFacade
We are going to use `convertToIr` from `ModuleCompilerAnalyzedOutput`
without an intermediate wrapper.
2023-07-27 22:50:21 +00:00
Ivan Kylchik 3c9eb87c8d [Test] Reuse buildFir... methods from firUtils.kt 2023-07-27 22:50:21 +00:00
Ivan Kylchik 34f8228441 [Test] Reuse runResolution and runCheckers from analyze.kt 2023-07-27 22:50:20 +00:00
Ivan Kylchik d4a7b7a1f6 [Test] Drop unused parameters from FirAnalyzerFacade 2023-07-27 22:50:20 +00:00
Ivan Kylchik 1d1b0092a3 [Test] Make createModuleFragmentWithSignaturesIfNeeded to be called once 2023-07-27 22:50:20 +00:00
Dmitrii Gridin e99cfbd3b7 [LL FIR] add script tests for AbstractFirLazyDeclarationResolveTest
^KT-60728
2023-07-28 00:13:59 +02:00
Dmitrii Gridin 1515fbe99f [LL FIR] add script tests for AbstractGetOrBuildFirTest
^KT-60728
2023-07-28 00:13:59 +02:00
Dmitrii Gridin a60abc6c06 [LL FIR] add script tests for AbstractInBlockModificationTest
^KT-60728
2023-07-28 00:13:59 +02:00
Alexander Shabalin 576f6642f9 [K/N] Add hard memory boundary ^KT-54727 2023-07-27 21:27:30 +00:00
Alexander Shabalin 220ecc4788 [K/N] Track memory in big chunks ^KT-57773
Additionally removed testFixtures{} and test{} in gcScheduler/common runtime module,
because that source set became empty.
2023-07-27 21:27:30 +00:00
Alexander Shabalin 0a726d4ebf [K/N] Move CUSTOM_ALLOCATOR macro to gc modules only ^KT-55364 2023-07-27 21:27:30 +00:00
Alexander Shabalin a69cd5e333 [K/N] Extract ThreadRegistry::waitAllThreads 2023-07-27 21:27:30 +00:00
Alexander Shabalin 9baac3685d [K/N] Add tests on safe points 2023-07-27 21:27:30 +00:00
Alexander Shabalin fd522ea756 [K/N] Add condition_variable that spins on atomics 2023-07-27 21:27:30 +00:00
Alexander Shabalin ee736c90b0 [K/N] Allow tweaking executionTimeout of RunGTest 2023-07-27 21:27:30 +00:00
Timofey Solonin 6d9b34ab46 Deprecate kotlin.mpp.androidSourceSetLayoutVersion=1
^KT-58489
2023-07-27 18:37:06 +00:00
Ivan Kochurkin 2eba7da5eb [FIR] Rename FirArrayOfCall to FirArrayLiteral 2023-07-27 17:53:44 +00:00