Commit Graph

103174 Commits

Author SHA1 Message Date
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
Ivan Kochurkin f4e4c5e724 [FIR] Fix missing type mismatch with array literals
Clarify existing type mismatch errors on array literals

^KT-60474 Fixed

Remove ResolutionMode.TransformingArrayLiterals
2023-07-27 17:53:44 +00:00
Roman Golyshev e1ebbc10d9 KTIJ-24877 [Analysis API] Ignore type qualifiers with fake sources when optimizing imports
When optimizing imports, it does not make any sense to account for
type qualifiers which are not directly present in the code

ATM such implicit type references are present for every
callable declaration call

^KTIJ-24877 Fixed
2023-07-27 17:28:47 +00:00
Timofey Solonin 167ddc556d [MPP] Don't publish PM20
^KT-60198
2023-07-27 15:54:06 +00:00
Stanislav Ruban 9ecf02fddf fixup! Add a 2nd user-defined class to InsideNestedBuilderInferenceLambda.kt 2023-07-27 14:25:08 +00:00
Stanislav Ruban 816906c7b7 fixup! Remove integer literals from InsideNestedBuilderInferenceLambda.kt 2023-07-27 14:25:08 +00:00
Stanislav Ruban 8bd823de0d [tests] BI (1P&1TV/1TIO): add tests for contexts of source-sink feeds
single builder parameter
single postponed type variable
single origin of type information

relevant issues:
KT-60274
KT-60663
2023-07-27 14:25:08 +00:00
Stanislav Ruban b13a225949 [tests] BI (1P&1TV/1TIO): add tests for basic cases
single builder parameter
single postponed type variable
single origin of type information

relevant issues:
KT-59551
2023-07-27 14:25:07 +00:00
Aleksei.Glushko 1eda35a59c [K/N] Process objc run loop on the finalizer thread ^KT-58851
Merge-request: KT-MR-11024
Merged-by: Alexey Glushko <aleksei.glushko@jetbrains.com>
2023-07-27 14:17:48 +00:00
Aleksei.Cherepanov 6ac76aa3e9 Fix passing K2 language version to K1 multimodule tests
After splitting K1 and K2 tests some multimodule tests in K1 configuration were still running with 2.0 language version. The reason was in misconfiguration of complex multimodule projects - they don't apply override of compiler arguments. This fix added such arguments update.

#KT-60589 Fixed
2023-07-27 14:15:49 +00:00
Aleksei.Cherepanov f6963d04e9 Run K1 configuration on TC with languageVersion="1.9"
KotlinVersion is overrided on TC, so we need to rely on LanguageVersion

#KT-60589 Fixed
2023-07-27 14:15:49 +00:00
Yahor Berdnikau 6089d3efc5 [Gradle] Update Gradle test versions
^KT-56178 Fixed
2023-07-27 13:29:57 +00:00
Yahor Berdnikau 7c563d8484 [Gradle] Update AGP 8.2 version in tests
ExternalAndroidTargetIT: Update to AGP 8.2.0-alpha13

^KT-56178 In Progress
2023-07-27 13:29:57 +00:00
Yahor Berdnikau 2dacb6e816 [Gradle] Run Gradle integrations tests against Gradle 8.1.1
^KT-56178 In Progress
2023-07-27 13:29:57 +00:00