Commit Graph

94410 Commits

Author SHA1 Message Date
Nikita Bobko 0874fb71c6 Replace all kotlin-reflect-api dependencies with kotlin-reflect
Review: https://jetbrains.team/p/kt/reviews/6753

Why: I'm going to replace source dependency on kotlin-reflect with
binary dependency. Normalize reflect dependency before global
processing.
2022-08-22 15:43:11 +02:00
Nikita Bobko 8f79e833a8 Drop all redundant kotlin-reflect, kotlin-reflect-api dependencies
Review: https://jetbrains.team/p/kt/reviews/6753

All redundant I managed to find, of course.

Why: I'm going to process all reflect dependencies in the next commits.
Cleanup reflect dependency before processing.

They are redundant because:
1. if `compileOnly` then compilation didn't break after dropping the
   dependency
2. if `test*` then tests didn't break after dropping the dependency.
3. `analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts`
   `compiler/fir/checkers/checkers-component-generator/build.gradle.kts`
   Drop `implementation(project(":kotlin-reflect-api"))` because the
   module already depends on
   `implementation(project(":kotlin-reflect"))`
4. `compiler/daemon/daemon-client/build.gradle.kts`. Drop `runtimeOnly`
   because after dropping `compileOnly` compilation didn't break (so
   `runtimeOnly` looks suspicious). Less safe than 1-3
2022-08-22 15:42:57 +02:00
Nikita Bobko 6eb3f1ac05 Refactor: Inline kotlinReflectModule
Review: https://jetbrains.team/p/kt/reviews/6753

In the next commits, source dependency on kotlin-reflect will be
replaced with binary dependency. Thus, it won't be technically be a a
"module" anynmore. So I either have to rename "kotlinReflectModule" or
get rid of it. I decided to get rid of it (inline it) because there is
only one usage.
2022-08-22 15:42:56 +02:00
Nikita Bobko e3bf7698a9 kotlin-scripting-dependencies-maven: fix reflect dependency
Review: https://jetbrains.team/p/kt/reviews/6753

Use the same reflect dependency as in the rest of the project.

Why: I'm going to process all reflect dependencies in the next commits.
Normalize reflect dependency before processing.

This weird reflect dependency style was introduced in
83087291df. I think it was a simple
mistake.
2022-08-22 15:42:45 +02:00
Nikita Bobko 837d100cda Drop settings.gradle.kts from kotlin-native/shared
Review: https://jetbrains.team/p/kt/reviews/6753

I don't know why this settings.gradle.kts is needed. But I think that
it was needed before "kotlin-native merge into kotlin" times. (Pavel
Punegov says the same) I try to remove and if CI doesn't fail then I
will push it.

I need to drop settings.gradle.kts because I'm going to replace
kotlin-reflect dependency from source to binary in the next commits. And
before doing this refactoring I want to normalize all the dependencies
on kotlin-reflect.
2022-08-22 15:42:40 +02:00
Nikita Bobko 70ed76e0bd Drop unused ':dist' dependency in some tests
Review: https://jetbrains.team/p/kt/reviews/6753

This commit doesn't fix any issue except for "cleanup". If you find a
mistake in this commit feel free to revert part of it/the whole commit

I checked every module where I drop ':dist' dependency. Tests still pass
in those modules
2022-08-22 15:42:34 +02:00
Alexander Shabalin 6f844f15e0 [K/N] Worker API improvements ^KT-52429
Merge-request: KT-MR-6898
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-08-22 10:41:14 +00:00
nataliya.valtman 6e2202ad5a Fix repeating custom values in build scan. Refactor build statistic 2022-08-22 09:29:44 +02:00
Igor Chevdar ccb4b5fd7d Revert "[Native][tests] Temporarily disable String codegen/box tests with "-opt" mode"
This reverts commit b210e24b43.
2022-08-22 06:05:53 +00:00
Igor Chevdar 0f9ae605d0 [K/N][codegen] Fixed bug with stack allocated strings
#KT-53667 Fixed
2022-08-22 06:05:53 +00:00
Igor Chevdar 16eaba8f68 [K/N][tests] Added a test on stack allocated string 2022-08-22 06:05:53 +00:00
Aleksandr Kutashov a74f289844 KT-48822: Fixes ConcurrentModificationException in AsmTypes
AsmTypes#getType() could be called from multiple threads, which causes CME sometimes.
Should guard TYPES_MAP modification.
2022-08-20 00:56:52 +02:00
Jinseong Jeon 79686ba242 AA FE1.0: don't return psi for fake overrides 2022-08-20 00:50:10 +02:00
Jinseong Jeon 25f7554a31 AA FIR: constant evaluation for Java field 2022-08-20 00:50:09 +02:00
Leonid Startsev 0869dd9c92 Repair bootstrapping for wasm-ir module by removing class referencing
from constructor of kotlinx.serialization ir generator.

Such references may be null if plugin was applied to the module, but no
runtime was provided in current compile configuration (see added test).
2022-08-19 14:42:36 +00:00
Leonid Startsev 0b3d9ffa71 Replace ad-hoc .newRef() with .toFirResolvedTypeRef() 2022-08-19 14:42:35 +00:00
Leonid Startsev dc7ba5d22b Remove module-wide ObsoleteDescriptorApi opt-in
and remove access to .descriptor whenever possible
2022-08-19 14:42:34 +00:00
Leonid Startsev 783087a551 Add tests for value classes serialization
apparently they're already working in FIR
2022-08-19 14:42:33 +00:00
Leonid Startsev 89a8bdc0f6 Support enum serialization in FIR
for all runtime versions, re-enable optimization in IR backend
by correctly determining presence of functions in runtime.
2022-08-19 14:42:32 +00:00
Leonid Startsev 472aca1491 Tests for sealed & abstract serializable classes in FIR 2022-08-19 14:42:31 +00:00
Leonid Startsev 6b32ce76c2 Support serializable objects in FIR plugin 2022-08-19 14:42:30 +00:00
Dmitriy Novozhilov 4db579e128 [FIR2IR] Add enum entries to Fir2IrLazyClass for enums 2022-08-19 14:42:29 +00:00
Dmitriy Novozhilov 7390d8cd54 [Build] Add reflect to runtime classpath of kotlinx.serialization tests
This is needed to be able to run those tests with JPS build
2022-08-19 14:42:28 +00:00
Leonid Startsev edff4d43bf Generate writeSelf and load constructor even if they were not created by frontend
which is true in case for FIR which discourages purely synthetic declarations.
2022-08-19 14:42:27 +00:00
Leonid Startsev acd6180c30 Support generic classes in serialization FIR plugin 2022-08-19 14:42:26 +00:00
Ilya Gorbunov 805fc747b9 Advance bootstrap to 1.8.0-dev-2023 2022-08-19 14:06:16 +00:00
Mikhail Glukhikh b78106e437 Don't report INFERRED_..._INTO_EMPTY_INTERSECTION with explicit arguments 2022-08-19 14:01:38 +00:00
Mikhail Glukhikh a6b90fcb8e Add a test with false positive "inferred into empty intersection"
Related to KT-50232
2022-08-19 14:01:37 +00:00
Igor Chevdar d3eedd791e [K/N][IR] Turned off prerequisite for ReturnsInsertionsPhase
Sometimes we have 0 files in the module and CompilerPhase thinks no work has been done
causing the prerequisite requirement to fail
2022-08-19 16:19:53 +03:00
Igor Chevdar 3462d4e5e8 [K/N][IR] Made caches ABI lowerings per file 2022-08-19 10:33:22 +00:00
Igor Chevdar 85379159be [K/N][IR] Reworked caches ABI lowering 2022-08-19 10:33:21 +00:00
Igor Chevdar c1d63fa6dd [K/N][IR] Moved caches ABI lowerings to a separate file 2022-08-19 10:33:20 +00:00
Mikhail Glukhikh d3648bce0c Run LoadJava.CompiledKotlin test group with stdlib if some enum is inside
This commit makes compiler tests working similarly to ResolveByStub IDE tests.
2022-08-19 10:08:11 +00:00
Mikhail Glukhikh fb1c80a7c9 K2: discriminate synthetic 'Enum.entries' during resolve 2022-08-19 10:08:11 +00:00
Mikhail Glukhikh 68ca453467 K2: don't report REDECLARATION on Enum.entries 2022-08-19 10:08:10 +00:00
Mikhail Glukhikh 730de8fd7c K1/K2: add test for enum class with 'entries' entry 2022-08-19 10:08:09 +00:00
Mikhail Glukhikh 8a4105e542 IR: fix origin of default getter of Enum.entries synthetic property 2022-08-19 10:08:08 +00:00
Alexander Korepanov 28c83e43ad [JS IR] Performance fixes for the IC infrastructure 2022-08-19 09:38:09 +00:00
Sergey Bogolepov 5152966aa0 [K/N] KT-39747
Add a WinHTTP platform library.
2022-08-19 08:27:26 +00:00
Dmitriy Novozhilov bb38690273 [FIR] Introduce FirAssignExpressionAltererExtension
This extension can be used to override resolution of assign statements
  with custom statement
2022-08-19 07:44:09 +00:00
Dmitriy Novozhilov 42b1621b4b Reformat coneDiagnosticToFirDiagnostic.kt 2022-08-19 07:44:09 +00:00
Dmitriy Novozhilov 6573533b95 [FE 1.0] Make all components of ExpressionTypingComponents public
There is no much sense to have them package-private, since all setters
  for them are public. Also those services can be used in assign alterer
  extension
2022-08-19 07:44:08 +00:00
Dmitriy Novozhilov f843883985 [FE 1.0] Introduce AssignResolutionAltererExtension
This extension can be used to override resolution of assign statements
  with custom logic

WARNING: there is no compatibility guarantees for this extension
2022-08-19 07:44:08 +00:00
Arseniy Terekhov c0ab367281 [FIR] DeprecationProvider: fix test, remove FIR_IDE_IGNORE 2022-08-19 07:37:55 +00:00
Arseniy Terekhov 539e5f82e2 [FIR] DeprecationProvider: inline builder, fix named arguments, cosmetic 2022-08-19 07:37:55 +00:00
Arseniy Terekhov a80870bc8f [FIR] DeprecationsProvider: caching results 2022-08-19 07:37:54 +00:00
Arseniy Terekhov 25fc948d95 [FIR] DeprecationsProvider: make evaluation of deprecations on demand 2022-08-19 07:37:54 +00:00
Ilya Gorbunov 98ebad2d75 Implement JS-IR intrinsic for rangeUntil builtin member operator #KT-52933 2022-08-18 19:15:27 +00:00
Ilya Gorbunov cda90dbfa5 Implement JS-legacy intrinsic for rangeUntil builtin member operator #KT-52933 2022-08-18 19:15:26 +00:00
Ilya Gorbunov 66facac25b Implement JVM intrinsic for rangeUntil builtin member operator #KT-52933 2022-08-18 19:15:25 +00:00