Commit Graph

102944 Commits

Author SHA1 Message Date
Jinseong Jeon 72de540fc9 AA: try finding a module for an associated analysisContext from KtPsiFactory if any 2023-07-24 11:34:51 +02:00
Jinseong Jeon 2dee644f7a AA FE1.0: restore an option to register AnalysisHandlerExtension w/o use-site module 2023-07-24 11:34:51 +02:00
Nikita Bobko 4f3ecedbca [FE] Stop ignoring ABSTRACT_MEMBER_NOT_IMPLEMENTED for expect classes
^KT-59739 Fixed
Review: https://jetbrains.team/p/kt/reviews/11038/timeline
2023-07-24 09:15:11 +00:00
Svyatoslav Scherbina bfcb90c716 Native: add ExperimentalForeignApi opt-in to performance tests
3f3f6eb marks all cinterop-generated declarations with
@ExperimentalForeignApi. As a result, all usages of such declarations
have to opt-in explicitly. This commit adds those opt-ins to all
usages in the performance tests.

^KT-58362
2023-07-24 09:11:58 +00:00
Pavel Kunyavskiy fd564d4af9 [K/N] Disable custom import for forward declarations
If forward declaration exists in a library, it was
possible to import it both by forward declaration name
and normal library name. This is strange unique behavior.
And it would also make KT-59643 changes binary incompatible.
So from now it's only possible to import forward declaration by
forward declaration name only.

^KT-59642
2023-07-24 08:24:20 +00:00
Pavel Kunyavskiy d797505f06 [K/N] Drop merging forward and real declaration in deserializer
^KT-59643
2023-07-24 08:24:20 +00:00
Javier Segovia Córdoba e4c2fa1080 [IR] Improve printing the value parameter when there is an error 2023-07-23 00:16:46 +02:00
Alexander Udalov f7ba1b4a7a IR: minor, improve assertion error message
KT-60502
2023-07-21 20:57:41 +00:00
Shagen Ogandzhanian 9bc9014c26 [KT-59294] Fix for the WRONG_JS_INTEROP_TYPE error in K1WasmJsTranslatorTestGenerated::simpleUndefined 2023-07-21 19:13:58 +00:00
Shagen Ogandzhanian eb7805baf9 [KT-59294] [wasm] Resolve undefined to null for any nullable types in external functions 2023-07-21 19:13:57 +00:00
Svyatoslav Scherbina ef6dcd9779 Native, K2: add ExperimentalForeignApi to generated forward declarations
cinterop tool should add ExperimentalForeignApi to all generated
declarations, to indicate their experimental status and discourage using
them in public Kotlin API. But the same considerations are applicable
to forward declarations (cnames.*, objcnames.*), which are generated not
by cinterop tool, but directly by the compiler.

This commit adds ExperimentalForeignApi to those compiler-generated
classes.

^KT-58362
2023-07-21 17:44:09 +00:00
Svyatoslav Scherbina cba955cb3e Native, K1: add ExperimentalForeignApi to generated forward declarations
cinterop tool should add ExperimentalForeignApi to all generated
declarations, to indicate their experimental status and discourage using
them in public Kotlin API. But the same considerations are applicable
to forward declarations (cnames.*, objcnames.*), which are generated not
by cinterop tool, but directly by the compiler.

This commit adds ExperimentalForeignApi to those compiler-generated
classes.

^KT-58362
2023-07-21 17:44:09 +00:00
Zalim Bashorov d6ba233bbe Define fail in the test to pass on JVM and Native 2023-07-21 17:27:17 +00:00
Zalim Bashorov b1a4d354f1 Regenerate tests 2023-07-21 17:27:17 +00:00
Zalim Bashorov 5d1379ead1 [Wasm] Optimize when using br_table only if all conditions read and compare the same variable
#KT-60212 Fixed
2023-07-21 17:27:16 +00:00
Svyatoslav Scherbina 39ef189e05 Native: change GCC toolchain for linux_arm32_hfp
^KT-58864
2023-07-21 16:13:26 +00:00
Svyatoslav Scherbina a30b1c6cc1 Native: remove a few headers from linux_arm32_hfp linux platform lib
Those are not available in the new GCC toolchain.

^KT-58864
2023-07-21 16:13:26 +00:00
Svyatoslav Scherbina 682c105230 Native: remove unused headers.x86-64 from linux.def
`headers.x86-64` property in a cinterop .def file is not actually used
by cinterop. `headers.x64` should be used instead.

This commit removes it completely instead of renaming -- no functional
changes are done.
2023-07-21 16:13:25 +00:00
Alexander Udalov 1cd24c61b8 Build: suppress warnings in kotlin-gradle-plugin
There's a lot of warnings which are distracting during each build.

 #KT-60498 Fixed
2023-07-21 15:33:09 +00:00
mvicsokolova 298c4f8c32 [K/N] Introduce atomic arrays in K/N stdlib
This commit introduces API for AtomicIntArray, AtomicLongArray and AtomicArray<T>.

The current set of functions is implemented via atomic arrays intrinsics (see KT-58360) and provides sequentially consistent memory ordering guarantees and no spurious failures in compareAndSet/compareAndExchange operations.

For details see: KT-60608

Merge-request: KT-MR-11071
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-07-21 15:30:20 +00:00
Alexander Udalov ebd43fc8c0 Tests: minor, improve tests on $EntriesMappings classes
These tests were initially testing that $EntriesMappings classes were
correctly generated, but started to check something else once the
language feature EnumEntries was enabled by default.
2023-07-21 14:55:22 +00:00
Alexander Udalov 56ed240774 JVM: rename IrIntrinsicFunction -> IntrinsicFunction
To avoid confusion that this might be an IR tree element.
2023-07-21 14:55:22 +00:00
Alexander Udalov f8faa0fe5a JVM: cleanup intrinsics code
Remove unused methods, remove dependency on old backend structures,
reformat, fix some inspections.
2023-07-21 14:55:21 +00:00
Alexander Korepanov ad3583ac38 [JS IR] Fix KClass equals for Nothing type 2023-07-21 14:48:30 +00:00
Alexander Korepanov 90498593f3 [JS IR] Fix review comments. 2023-07-21 14:48:30 +00:00
Alexander Korepanov 09501224e8 [JS IR] Add comments
^KT-59001
2023-07-21 14:48:30 +00:00
Alexander Korepanov bfb7f74e47 [JS IR] Add linkedHashMap tests
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov 2fdb605a03 [JS IR] Fix tests
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov 0b4a9499f0 [JS IR] Catch concurrent modifications of HashMap
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov 5e2c1761fc [JS IR] Implement InternalStringLinkedMap
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov 058cc9def2 [JS IR] Rework HashSet
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov f834007da6 [JS IR] Remove unused code & comments & style fixes
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov 2300facead [JS IR] Rework HashMapEntries, get rid of LinkedHashMap
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov f202865080 [JS IR] Improve InternalStringMap iterators & Extend InternalMap interface
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov 6f0628cb8a [JS IR] Replace InternalHashCodeMap with InternalHashMap
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov 6a1e14df0b [JS IR] Implement InternalMap interface
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov 6a77514a83 [JS IR] Get rid of HashMap EqualityComparator
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov 402d5e63fd [JS IR] Cleanup InternalHashMap
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov e26c06f0e1 [JS IR] Copy paste native-wasm HashMap implementation
Copy from libraries/stdlib/native-wasm/src/kotlin/collections/HashMap.kt

^KT-59001
2023-07-21 14:48:29 +00:00
Sebastian Sellmair 96b33007e5 [Gradle] Implement 'publishJvmEnvironmentAttribute' flag
When the flag is 'on', then publications will include
The 'org.gradle.jvm.environment' Gradle attribute.

We previously did not publish this attribute, as it lead
to problems for 'old' consumers.

We will roll out publications gradually with this feature flag.
The external Android target is expected to opt into this flag
as it is necessary for disambiguating Android from JVM targets
when the external Android target also uses KotlinPlatformType.jvm
2023-07-21 14:24:10 +00:00
Alexander Korepanov 89c3781c8e [JS FIR] Support NAME_CONTAINS_ILLEGAL_CHARS diagnostic
^KT-59392 Fixed
2023-07-21 13:54:34 +00:00
Alexander Korepanov 37c8ec1e51 [JS FIR] Support JS_BUILTIN_NAME_CLASH diagnostic
^KT-59391 Fixed
2023-07-21 13:54:34 +00:00
Sergej Jaskiewicz f061215ee9 [IR] Reorder parameters in IrFactory#createFunctionWithLateBinding
This is to prepare for IrFactory auto-generation (KT-59308).
2023-07-21 13:12:37 +00:00
Sergej Jaskiewicz 3828552a1c [IR] Make IrFunctionWithLateBinding a subclass of IrSimpleFunction 2023-07-21 13:12:37 +00:00
Dmitrii Gridin 88da053408 [AA] forbid analyze from write action
Analysis is not supposed to be called from write action.
Such actions can lead to IDE freezes and incorrect behavior

^KT-60586 Fixed
2023-07-21 13:03:04 +00:00
Sergej Jaskiewicz c624bba8cd [klib] Introduce the "ir_signature_versions" in klib manifests
^KT-60576 Fixed
2023-07-21 12:51:47 +00:00
Sergej Jaskiewicz d16445aef2 [klib] Drop the addDebugInfo setting that was always true 2023-07-21 12:51:47 +00:00
Dmitrii Gridin 82061a73eb [util] SmartPrinter: override toString to print content instead of identity hash
Otherwise, all current exceptions contain only something like SmartPrinter@1234
2023-07-21 12:40:00 +00:00
Svyatoslav Scherbina bcc4a891be Native: add tests for ExperimentalForeignApi on cinterop declarations
Add tests checking that all (top-level) declarations generated by
cinterop now have ExperimentalForeignApi annotation.

^KT-58362
2023-07-21 11:54:14 +00:00
Svyatoslav Scherbina 3f3f6eb5a8 Native: add ExperimentalForeignApi to generated cinterop declarations
cinterop tool should add ExperimentalForeignApi to all generated
declarations by default. This commit implements adding the annotation.
Nested declarations don't get the annotation, because they inherit the
opt-in requirement from the enclosing classes implicitly.

The annotation is not added to platform libraries, as intended. See
previous commits.

^KT-58362
2023-07-21 11:54:14 +00:00