Commit Graph

99647 Commits

Author SHA1 Message Date
Ivan Kochurkin 8a3e2543f7 [K2, MPP] Ignore MPP tests in DiagnosisCompilerTestFE10TestdataTestGenerated 2023-03-22 01:28:17 +00:00
Ivan Kochurkin ceb34e5a8a [K2, MPP] Introduce IGNORE_FIR2IR_EXCEPTIONS_IF_FIR_CONTAINS_ERRORS
Use it for K2 MPP tests
2023-03-22 01:28:16 +00:00
Ilya Chernikov 59b88f33b2 [K2, MPP] implement IR errors reporting and test infrastructure
Fix test data

^KT-56344 Fixed
2023-03-22 01:28:16 +00:00
Ivan Kochurkin 3b1071b42b [FIR LT] Use FILLER_TOKENS instead of DOC_AND_COMMENT_TOKENS in startOffsetSkippingComments 2023-03-22 01:28:16 +00:00
Alexander Udalov 17e4ed8ffc Kapt+JVM_IR: add stub converter test for KT-57388 2023-03-21 22:12:58 +01:00
Mads Ager a525983e38 [JVM IR] Use error types in KAPT mode for unresolved delegate types.
^KT-57388 Fixed
2023-03-21 22:09:14 +01:00
Ivan Kochurkin 5a6e896b45 [FIR] Extract FirDeclarationPresenter to the separated class 2023-03-21 20:24:58 +00:00
Ivan Kochurkin b490130e8e [FIR] Merge DeclarationInspector into FirDeclarationInspector
There is no need of two separated classes
2023-03-21 20:24:58 +00:00
Ivan Kochurkin 07fd778319 [FIR] Optimize FirConflictsDeclarationChecker
Don't allocate inspector without need
2023-03-21 20:24:57 +00:00
Ivan Kochurkin a3e7a35cb1 [FIR] Create separated FirBlock for loop local val
Refactor FIR builders code for ForExpression
2023-03-21 20:24:57 +00:00
Ivan Kochurkin e49bb1fe37 [FIR] Support of REDECLARATION for local val/var, ^KT-54405 Fixed 2023-03-21 20:24:57 +00:00
Ivan Kochurkin 879deb90fc [FIR] Report friendly errors for type aliases from stdlib if -no-jdk option is set
^KT-54531 Fixed
2023-03-21 20:24:56 +00:00
Ivan Kylchik 8eeb7e2631 Modify test data to reflect changes with IntrinsicConstEvaluation 2023-03-21 20:02:44 +00:00
Ivan Kylchik b28d9a1b48 Add new IntrinsicConstEvaluation language feature
This feature will allow to evaluate function marked with
`IntrinsicConstEvaluation` annotation and so use such function
in `const val`.
2023-03-21 20:02:43 +00:00
Ivan Kylchik 6bce668cac Introduce language version 2.1 2023-03-21 20:02:42 +00:00
Pavel Punegov 668dfdd81d [K/N][test] Exclude skia interop test that fails due to ^KT-57484
Merge-request: KT-MR-9291
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-03-21 18:45:17 +00:00
Simon Ogorodnik a5a3c1ff8d [K2, MPP] Cleanup, remove unused FirDeclaration.actualForExpectMap
The concept of actual for expect map is broken and won't work in IDE
properly, since to fill such map we need to analyze all
dependant modules
2023-03-21 17:16:22 +00:00
Ivan Kylchik 2302e14dd6 [FIR LT] Extract getChildren function into common utils 2023-03-21 16:33:01 +00:00
Ivan Kylchik eb86aabb50 [FIR LT] Unmute some stepping and local variable tests
Corresponding tests were fixed together with #KT-56982, #KT-56913,
#KT-56926
2023-03-21 16:33:00 +00:00
Ivan Kylchik 2b387e7a10 [FIR LT] Get correct startOffset value for declarations with comments
#KT-56913 Fixed
#KT-56926 Fixed
2023-03-21 16:33:00 +00:00
Ivan Kylchik e4591d7af9 [FIR LT] Add proper source for when with subject
#KT-56982 Fixed
2023-03-21 16:33:00 +00:00
Mikhail Glukhikh 45e78455b2 K2: repeat K1 behavior around multiple inheritance by delegation
#KT-56720 Fixed
2023-03-21 16:16:20 +00:00
Mikhail Glukhikh ab883d91c8 FE: add tests to reproduce KT-56720 2023-03-21 16:16:19 +00:00
Marco Pennekamp 4981a52904 [FIR] Extensions symbol provider: Rename create to createIfNeeded 2023-03-21 16:08:43 +00:00
Marco Pennekamp d9f515fbb8 [FIR] KT-57220 Avoid creating useless synthetic function providers
- This optimization applied to LL FIR can be extended to K2 as a whole.
  Likely, there won't be any performance benefits in CLI runs, but it's
  still better to avoid useless symbol providers.
2023-03-21 16:08:43 +00:00
Marco Pennekamp 2d85e9db51 [LL FIR] KT-57220 Optimize & combine synthetic function symbol providers
- Dependency symbol providers contained a lot of useless
  `FirExtensionSyntheticFunctionInterfaceProvider`s, because such a
  provider only generates function classes from compiler plugins. If
  there aren't any such `FunctionTypeKind`s in the session, there is no
  need to even add the provider.
- `FirExtensionSyntheticFunctionInterfaceProvider`s that are added to
  the list of dependency providers despite this optimization will now be
  combined in `LLFirCombinedSyntheticFunctionSymbolProvider`. It checks
  `ClassId` heuristics once, which is more efficient than checking them
  in every provider separately.
2023-03-21 16:08:42 +00:00
Marco Pennekamp 09ab192205 [FIR] Optimize synthetic function symbol provider with ClassId heuristic
- Similar to the implementation of `isNameForFunctionClass` in
  `FirSymbolProvider`, `FirSyntheticFunctionInterfaceProvider` benefits
  from checking the `ClassId` for a digit before accessing its class
  cache.
2023-03-21 16:08:42 +00:00
Marco Pennekamp 79457ec074 [LL FIR] KT-57220 Flatten session dependency symbol providers
- Replace the "recurse one layer deep" approach of
  `LLFirDependentModuleProviders` with a flattened list of dependency
  symbol providers.
- This refactoring is a necessary component of supporting combined
  symbol providers.
2023-03-21 16:08:42 +00:00
Ilya Goncharov 1817213e1d [Gradle, JS] Upgrade yarn.lock 2023-03-21 14:33:42 +00:00
Ilya Goncharov 723aa84ea7 [Gradle, JS] No error on default compiler
^KT-57480 fixed
2023-03-21 13:23:32 +00:00
Denis.Zharkov 38138bf079 K2: Fix bounds erasure for raw types
Basically, this commit reworks eraseToUpperBound* stuff
Instead of a bunch of vague flags, we introduce two modes
(rawTypes/intersection emptiness checker) which defined those flags.

Also, it makes choosing `eraseArgumentsDeeply` option always because
that how it works in K1 and also use invariant projection inside
`eraseArgumentsDeeply` for raw types for the same reason.

^KT-57198 Fixed
2023-03-21 12:38:22 +00:00
Anton Bannykh b0de442d76 JS IR: fix throwable descendants
^ KT-43490 fixed
2023-03-21 12:32:41 +00:00
Nikita Bobko 48ed6c4cc7 2/2 Implement deprecation for use-site '@get:' target
^KT-15470 Fixed
Review: https://jetbrains.team/p/kt/reviews/9250
2023-03-21 13:29:10 +01:00
Nikita Bobko 8cf5216555 1/2 Refactoring: split GetterAnnotations & PropertyAnnotations tests for K1 and K2
These tests won't be FIR_IDENTICAL after the next commit. That's why I
split them prematurely. This allows me to have a nicer diff in `2/2`
commit.

In scope of KT-15470
Review: https://jetbrains.team/p/kt/reviews/9250
2023-03-21 13:28:55 +01:00
hungvietnguyen 4f3244fb78 IC: Compute symbols impacted by classpath changes (#5111)
IC: Compute symbols impacted by classpath changes

Incremental compilation has 4 key steps:
  1. Compile changed/impacted files
  2. Detect symbols that have changed after compiling
  3. Detect symbols that are impacted by the changed symbols
  4. Based on the changed-or-impacted symbols, identify files that need
     to be recompiled. Go back to step 1.

Normally, step 2 and 3 are done together when the changed symbols
and impacted symbols are in the same module.

However, if the changed symbols and impacted symbols are in different
modules (e.g., a `Subclass` in lib1 extends a `Superclass` in lib2),
we currently do not compute symbols in the current module that are
impacted by changes in another module (step 3 above).

This is the case for both the new IC and the old IC.

In this commit, we will compute impacted symbols for the new IC. We can
fix the old IC later if necessary (they can't be fixed together easily).

Test: Added BaseIncrementalCompilationMultiProjectIT.testChangeInterfaceInLib
^KT-56197 Fixed
2023-03-21 13:12:15 +01:00
Ilya Goncharov bb09395952 [Gradle, JS] Unique name for NPM projects based on project path
^KT-56025 fixed
^KT-32209 fixed
2023-03-21 11:43:37 +00:00
Ilya Goncharov 5ce3132f9f [Gradle, JS] No format-util in gradle plugin dependencies 2023-03-21 10:18:42 +00:00
Kirill Rakhman a434b73fc8 [FIR] Refactor transform*UsingSmartcastInfo 2023-03-21 08:48:38 +00:00
Kirill Rakhman 45d2424ad8 [FIR] Let prefix inc/dec call getter twice for compatibility with K1
#KT-57179 Fixed
2023-03-21 08:48:38 +00:00
Ilya Chernikov fea344faa4 Test infra: fix regexes relying on \n line endings 2023-03-21 07:53:13 +00:00
Ilya Chernikov b2b2914da1 Switch git checkout to eol=auto on testdata
so the tests on windows run on files with crlf line endings
2023-03-21 07:53:13 +00:00
Pavel Kunyavskiy 3afdce3168 [K/N] Fix volatile intrinsics tests on K2
^KT-55904
2023-03-21 06:28:51 +00:00
Ivan Kylchik 7cf70e7b15 [JVM IR] Fix performance issue caused by support of IR Inliner 2023-03-20 23:36:33 +00:00
aleksandrina-streltsova e8272fa02e [Analysis API] Move testdata for scope provider 2023-03-20 22:04:48 +00:00
aleksandrina-streltsova 4b7164a557 [Analysis API] Allow handling scopes from KtScopeContext separately
^KT-55527
2023-03-20 22:04:48 +00:00
aleksandrina-streltsova d89d774411 [AA] Consider context receivers in FirTowerDataElement.getAvailableScope 2023-03-20 22:04:48 +00:00
Vyacheslav Gerasimov 5996b41443 Build: Workaround deadlock in Gradle
Sometimes Gradle hangs during relocation of compiler plugins because
`compilerDummyJar` configuration is resolved inside ShadowJar's exclude
https://github.com/gradle/gradle/issues/24317
2023-03-20 20:46:58 +01:00
Vyacheslav Gerasimov 3dcac61f7c Build: Update org.gradle.crypto.checksum to 1.4.0 2023-03-20 19:45:40 +00:00
Vyacheslav Gerasimov 98cadcdaaf Build: Update org.jetbrains.kotlinx.benchmark to 0.4.6 2023-03-20 19:45:40 +00:00
Vyacheslav Gerasimov 76c54a8ff3 Build: Fix usages of apis deprecated in Gradle 8 2023-03-20 19:45:39 +00:00