Commit Graph

102543 Commits

Author SHA1 Message Date
Nikolay Lunyak 4f0563dee1 [FIR] Add a test for KT-55933 2023-07-10 09:43:22 +00:00
Nikolay Lunyak da60be06a0 [FIR] Add references to TODOs in checkers 2023-07-10 09:28:55 +00:00
Nikolay Lunyak 8c5b2ae85b [FIR] Fix modifying CheckerContext inside checkers
`InlineFunctionBodyContext` was not moved
outside the class to preserve as much
git blame info as possible.

^KT-56460 Fixed
2023-07-10 09:28:55 +00:00
Nikolay Lunyak ed2f0c295b [FIR] Remove the TODO from FirExplicitBackingFieldForbiddenChecker
Looks obsolete, nothing seems to fail.
2023-07-10 09:28:54 +00:00
Nikolay Lunyak b46d4e5399 [FIR] Check classes for EXPECTED_PRIVATE_DECLARATION 2023-07-10 09:28:54 +00:00
Nikolay Lunyak e7f1da3619 [FIR] Check actuals in FirOverloadsChecker 2023-07-10 09:28:54 +00:00
Nikolay Lunyak a9207a8396 [FIR] Remove the TODO in FirJvmAnnotationHelper.kt
This code should not be reachable when not
in JVM. `jvmDefaultModeState` is only
accessed from the JVM checkers.
2023-07-10 09:28:54 +00:00
Nikolay Lunyak 8541143d6f [FIR] Fix the TODO in FirConflictsHelpers
According to
https://github.com/Kotlin/KEEP/blob/master/proposals/enhancing-main-convention.md#rules-and-semantics,
only main function without args may avoid
`CONFLICTING_OVERLOADS`, but since the
jps/jps-plugin/testData/incremental/withJava/other/mainRedeclaration
test dates back to 2015, this is not the
current behavior.
2023-07-10 09:28:54 +00:00
Nikolay Lunyak 3014c7b353 [FIR] Check isMember via the dispatch receiver 2023-07-10 09:28:54 +00:00
Nikolay Lunyak 553f400c25 [FIR] Remove the TODO from ConeTypeCompatibilityChecker
Ignore, because `@JvmDefault` is deprecated
and we don’t even have tests for it, and
the new
``@JvmDefaultWith[out]Compatibility` only
allow classes as their targets
2023-07-10 09:28:54 +00:00
Nikolay Lunyak c2c073ab2d [FIR] Remove the TODO from ConeTypeCompatibilityChecker
The issue is closed as fixed
2023-07-10 09:28:54 +00:00
Nikolay Lunyak 0e70e9e8d9 [FIR] Remove the TODO from FirReturnsImpliesAnalyzer
Declined, ignore.
2023-07-10 09:28:54 +00:00
Nikolay Lunyak 884cd6c754 [FIR] Move FirReturnsImpliesAnalyzer to the extended checkers 2023-07-10 09:28:54 +00:00
Nikolay Lunyak db720d375d [FIR] Remove the TODO from FirModifierChecker.kt
Pasha said we can delete it.
2023-07-10 09:28:54 +00:00
Nikolay Lunyak b8377d49a8 [FIR] Remove unused code from FirExpectActualDeclarationChecker
Dima said this code is not needed.
2023-07-10 09:28:54 +00:00
Nikolay Lunyak 62d0060f0d [FIR] Remove the TODO in FirDelegatedPropertyChecker
This TODO is unclear, and since we don't
really care what should happen to the
unreachable code, it can be ignored.
2023-07-10 09:28:54 +00:00
Nikolay Lunyak be8d9ba262 [FIR] Remove the TODO in FirDelegatedPropertyChecker
It looks like in `differentDelegatedExpressions.fir.kt`
there're no diagnostics on the delegates
already, so this TODO is unclear.
2023-07-10 09:28:54 +00:00
Nikolay Lunyak 24b1fb2ccf [FIR] Create tickets for some of the TODOs 2023-07-10 09:28:54 +00:00
Pavel Kunyavskiy ef9413108b [K/N] Consolidate forward declarations handling
This is refactoring in preparation for KT-59764.
Names and layout of forward declarations related classes
was copy-pasted many times over compiler code.

Implementing KT-59764 would require copy-pasting it two more times.
So instead of doing this it was put in single place.

No behaviour changes intended in this commit.
2023-07-10 08:59:16 +00:00
Pavel Kunyavskiy 0179b45840 Introduce compiler.common.native module 2023-07-10 08:59:16 +00:00
Vladimir Dolzhenko c1b70a7303 Move under debug log message when nested class is not found
To avoid freezes and useless reporting calculations

#KTIJ-25465 Fixed


Merge-request: KT-MR-10996
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com>
2023-07-08 07:18:09 +00:00
Igor Yakovlev b5eafb9eb7 [Wasm] WasmExport implementation 2023-07-07 20:45:51 +00:00
Igor Chevdar 58639951f6 [K/N] Refactored 2-stage splitting 2023-07-07 17:51:46 +00:00
Igor Chevdar afdc596121 [K/N] Fix for two-stage compilation 2023-07-07 17:51:46 +00:00
Vladimir Sukharev 4cfcf45120 [K/N] Partially fix IncrementalCompilationTest
^KT-59245
2023-07-07 17:51:46 +00:00
Vladimir Sukharev e240d7aae3 [K/N] Fix test split_compilation_pipeline
^KT-59245
2023-07-07 17:51:46 +00:00
Vladimir Sukharev 32a390ea18 [K/N] K1/MPP: Enable splitting 1-stage to two CLI invocations
^KT-59245 Fixed
2023-07-07 17:51:46 +00:00
Vladimir Sukharev a87b662bc5 [K/N] Split 1-stage K1 compilations to two stages
^KT-59245 Fixed
2023-07-07 17:51:46 +00:00
Sergei Kharitontcev-Beglov 34c6afec5e [Wasm] A name cache to distinguish same named declarations in DCE dump 2023-07-07 17:42:00 +00:00
Sergei Kharitontcev-Beglov bc0afc36a2 [Wasm] Renovated Ir declarations dump by adding a type entry 2023-07-07 17:42:00 +00:00
Sergei Kharitontcev-Beglov 3b52b452a3 [Wasm] Escaped quotes and added export in DCE in IR dumps 2023-07-07 17:42:00 +00:00
Pavel Punegov d5c6dd5f5c [K/N][test] Improve testStackTrace test
Make it print stack trace before the checks
2023-07-07 17:09:40 +00:00
Igor Yakovlev 0a49b79104 [Wasm] Fix debug mode for wasm tests 2023-07-07 15:23:18 +00:00
Igor Yakovlev 750653e4b3 [Wasm] Add kotlin wasm wasi mode compiler flag 2023-07-07 15:23:18 +00:00
Artem Kobzar 7c7aa98875 [K/JS] Throw error when a module contains file with the same name and package (ignoring case) 2023-07-07 13:50:04 +00:00
Anton Prokhorov 0e6930e7ef [Gradle] Getting a root project of root gradle after project loading
#KT-59863 Fixed
2023-07-07 13:43:43 +00:00
Yan Zhulanow e5f9eb5b24 [LL API] Fix 'getResolvableSessionFor()' for library sessions 2023-07-07 13:34:01 +00:00
Bart van Helvert 362675a1b5 [AA] Support getting type from get and set annotation calls
#KTIJ-26206 Fixed
2023-07-07 12:57:45 +00:00
Andrei Klunnyi c9eebffbfa KT-60193 K2 scripts: configuration discovery might fail silently
Due to possible data races configuration discovery might fail. So far,
it happened silently and we used so-called default one. This
configuration is unaware of specific implicit imports, receivers, base
class, etc. Hence, broken highlighting and navigation.

This commit introduces the following changes:
1. Having default configuration for building `FirScript` is no longer an
   option. Missing configuration means error reported via exception.
2. Every configuration usage is now logged in DEBUG mode.
   Troubleshooting becomes easier.

^KT-60193 fixed
2023-07-07 14:50:35 +02:00
Dmitrii Gridin 6867dffff1 [LL FIR] rewrite on-air resolve
Now we will resolve declarations only ones and to the
minimal required phase to get a fully resolved element
depends on an insert position, because not all elements
require body resolution

A side change: `getOnAirGetTowerContextProvider` now
won't do rebind to the original declaration. In the future,
this part will be rewritten to avoid on-air resolution,
so it is not a problem

^KT-59685 Fixed
2023-07-07 11:42:22 +00:00
Brian Norman 61acd2b6f5 [FIR] Do not allow context receivers on value classes
#KT-59413 Fixed
2023-07-07 11:41:59 +00:00
Brian Norman b74ff19930 [FIR] Improve synthetic function condition in annotation class checker 2023-07-07 11:41:59 +00:00
Dmitriy Novozhilov e7a10057f2 [Test] Use special test facade for IR actualization and IR plugins in all codegen configurations
Previously application of plugins was part of fir2ir conversion and
  ir actualization was the responsibility of each specific IR backend
  facade. Now (after moving IR extensions after IR actualization) those
  actions are extracted into separate facade for two purposes:
1. Avoid code duplication in backend facades
2. Step with this facade goes exactly after fir2ir conversion before
   irHandlersStep, which allows IR handlers to observe IR which was
   actualized and modified by extensions, which is quite useful

^KT-56173
2023-07-07 11:26:15 +00:00
Dmitriy Novozhilov fd87d722c1 [FIR2IR] Make ExternalPackageParentPatcher a lowering
This is needed for two reasons:
1. Consistency
2. It should run after compiler plugins, which are now runs after fir2ir
   is finished for all modules

^KT-56173
2023-07-07 11:26:15 +00:00
Dmitriy Novozhilov 8e73d5a54a [FIR] Run irGenerationExtensions after IR actualization
^KT-56173 Fixed
2023-07-07 11:26:15 +00:00
Dmitriy Novozhilov 81da96fed3 [FIR Plugin] Reproduce KT-56173 2023-07-07 11:26:15 +00:00
Pavel Mikhailovskii 083f54aceb [KAPT4] Create basic infrastructure for KAPT4 2023-07-07 11:09:16 +00:00
Dmitriy Novozhilov fc57f48c8f [FIR] Union CFG edges from postponed lambdas only if outer call was analyzed independently
Before this change nodes unification was called if outer call was
  completed in the FULL mode, but it may happen even if this call is
  actually a part of some other outer call
2023-07-07 06:45:20 +00:00
Artem Kobzar cf949e8760 [K/JS] Support KClass<*>.createInstance reflection method ^KT-58684 Fixed 2023-07-06 18:18:14 +00:00
Mikhail Glukhikh ca0b061675 Add forgotten issue reference for PrioritizedEnumEntries 2023-07-06 17:49:15 +00:00