Commit Graph

1511 Commits

Author SHA1 Message Date
Alexander Udalov abaffeddab Remove LocalClassProtoTestGenerated, replace with kotlinp tests
This test uses a hacky mode of the compiler which is not worth it to
support further (especially in K2), `USE_SINGLE_MODULE`, where
everything is compiled in one module. The purpose of the test is just to
check that metadata for local/anonymous classes is written correctly.
So we can replace it with the tests on kotlinp, which uses
kotlinx-metadata-jvm and dumps all loaded metadata to text.

This replacement is not perfect, in particular because it won't check
that the reflection machinery is able to load this metadata, and because
it won't check that annotations are loaded correctly from the bytecode.
But IMHO it's good enough, there are box tests on reflection on local
classes (e.g. `reflection/annotations/localClassLiteral.kt`), so this
way is better than having to support the weird compiler mode for just
one test.
2022-08-31 20:54:50 +02:00
Nikita Bobko 2a4f3f41aa 2/5 Replace source dependency on kotlin-reflect with binary dependency
Review: https://jetbrains.team/p/kt/reviews/6753

Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.

Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276

Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
2022-08-22 15:43:49 +02:00
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
Simon Ogorodnik 513af2dfbc FIR. Refactor smart-cast representation in FIR tree
Make smart-casts non-transparent expression without delegation
to underlying FirQualifiedAccessExpression, as children delegation in
fir tree has unclear semantics
Remove two different kinds of tree nodes for smart-casts
2022-08-15 21:46:11 +00:00
Abduqodiri Qurbonzoda cf44753aed Remove :compiler:tests-common-jvm6 project and JvmTarget6OnBaseJvm tests 2022-08-13 01:33:48 +03:00
Vsevolod Tolstopyatov e32e5c26a4 [reflect] Fix flaky tests that depend on Reflection.clearCaches()
* Use ReflectionFactoryImpl as single point of synchronization
* Synchronize all cache-sensitive tests on it in order to be robust in parallel test runners
* Remove redundant cache clear after each test

Merge-request: KT-MR-6842
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2022-08-12 14:10:08 +00:00
Sergej Jaskiewicz 5e34ae5e0d [IR] Print annotations in source range compiler tests 2022-08-03 16:45:56 +00:00
Jinseong Jeon 199219483e FIR LC: set modifier list as a parent of light annotations
^KTIJ-22354 Fixed
2022-08-03 08:57:37 +02:00
Victor Petukhov d89fa8dea9 [FE 1.0] Get rid of OldResolutionCandidate and its usages 2022-08-02 10:29:39 +00:00
Victor Petukhov 9be181f1ad [FE 1.0] Remove constraint system tests
These tests used the old type inference constraint system, so it didn't cover the current compiler logic almost at all

It'd be fine to implement similar test for the new type inference constraint system

^KT-52699
2022-08-02 10:29:38 +00:00
Victor Petukhov 8500ee08a8 [FE 1.0] Remove CONSTRAINT_SYSTEM_FOR_OVERLOAD_RESOLUTION analysis flag
The constraint system for the old type inference is going to be removed.
Also, `CONSTRAINT_SYSTEM_FOR_OVERLOAD_RESOLUTION` isn't used in the production
2022-08-02 10:29:38 +00:00
Dmitry Gridin 1708b4fe48 [light classes] move light-classes-base module to analysis
^KT-53097
2022-08-01 13:56:34 +00:00
Ivan Kochurkin 2f56b29b3f [FIR] Extract FirSessionConfigurator and IncrementalCompilationContext to separated classes
With FirSessionFactory and FirJsSessionFactory
2022-07-25 23:30:09 +02:00
Mikhail Glukhikh bc396b9765 K2: don't report RETURN_TYPE_MISMATCH on last statement returns
#KT-53198 Fixed
2022-07-22 16:39:51 +00:00
Victor Petukhov c0ae68fe93 [FE 1.0] Remove type predicate calculation from CFG tests
That logic is hard to support because it used deprecated `OldResolutionCandidate` and `ResolvedCallImpl`. Moreover FIR has own CFG utils.
2022-07-22 16:03:51 +00:00
Victor Petukhov 5f5c3aa534 [FE 1.0] Clean-up pseudocodeUtils.kt: remove unused methods, move test specific methods into test-common module 2022-07-22 16:03:50 +00:00
Mikhail Glukhikh 9add6f3d55 K2: add more accurate & more automatic control of diagnostic suppression
#KT-51363 Fixed
2022-07-22 11:35:26 +00:00
Dmitry Gridin 35258da509 [light classes] replace light class dependency from compiler.tests-common to light-classes-base
^KT-53097
2022-07-19 15:42:00 +00:00
Mikhail Glukhikh 089044e5b0 FirRenderer: get rid of direct Visitor usages 2022-07-14 09:38:34 +00:00
Mikhail Glukhikh a82baf87cb FIR renderer: extract separate ConeTypeRenderer 2022-07-14 09:38:33 +00:00
Mikhail Glukhikh 38d6f3d548 Move FirRenderer to separate package 2022-07-14 09:38:31 +00:00
Dmitriy Novozhilov 1a8496757e [Compiler] Mark all entrypoints to compiler API as experimental 2022-06-29 12:00:01 +00:00
Dmitriy Novozhilov 22dae9bff4 [FIR] Fix registration of multiple compiler plugins 2022-06-29 11:59:59 +00:00
Dmitriy Novozhilov c979e1edcf [Plugins] Deprecate ComponentRegistrar
^KT-52665 In Progress
2022-06-29 11:59:58 +00:00
Dmitry Gridin 6e75e4a56e Revert "Revert "[light classes] drop old light classes and backend: iteration #12""
This reverts commit 732a08f0df.
2022-06-28 17:57:35 +02:00
Dmitry Gridin cbf9b13ef8 Revert "Revert "[light classes] drop old light classes and backend: iteration #9""
This reverts commit 38c623bc3a.
2022-06-28 17:57:33 +02:00
Dmitry Gridin 38c623bc3a Revert "[light classes] drop old light classes and backend: iteration #9"
This reverts commit 38378309b1.
2022-06-28 13:52:07 +02:00
Dmitry Gridin 732a08f0df Revert "[light classes] drop old light classes and backend: iteration #12"
This reverts commit 36d1eef6fe.
2022-06-28 13:52:06 +02:00
Dmitry Gridin 36d1eef6fe [light classes] drop old light classes and backend: iteration #12
drop LightClassDataHolder

^KT-48773
2022-06-28 11:44:46 +00:00
Dmitry Gridin 38378309b1 [light classes] drop old light classes and backend: iteration #9
drop KotlinExtraDiagnosticsProvider

^KT-48773
2022-06-28 11:44:44 +00:00
Ilya Gorbunov 1cfc6a8fca Move sources of ranges to common stdlib from builtins
But still cherry-pick them when serializing builtins because they are
used in builtins signatures.

Merge-request: KT-MR-6488
Merged-by: Ilya Gorbunov <Ilya.Gorbunov@jetbrains.com>
2022-06-23 03:49:30 +00:00
Jinseong Jeon b18999be82 FIR/LC: filter out scripts for facade creation
^KTIJ-22016 Fixed
2022-06-20 17:38:50 +02:00
Mikhael Bogdanov 41d6f0dca4 Remove ir.tree.impl from build 2022-06-20 11:42:52 +00:00
Alexander Udalov a52017a130 Rewrite light analysis mode test class filter
Instead of filtering local/synthetic classes based on ClassDescriptor
instances, do it by interpreting kotlin.Metadata. This is needed to
enable these tests for JVM IR, where descriptors are not available in
this way.
2022-06-17 16:51:06 +02:00
Alexander Udalov 65c7a7f939 Minor, remove obsolete abstract test classes 2022-06-17 16:51:05 +02:00
Nikolay Lunyak ac1fb07102 [FIR JS] Add checkers.js 2022-06-02 13:47:28 +00:00
Ivan Kylchik f3252334b2 Move most of ir utils from backend.common to ir.tree 2022-05-18 21:20:03 +03:00
Simon Ogorodnik 58885a1b07 KT-52217 Rename 'use-fir' to 'use-k2', update message 2022-04-28 15:42:42 +00:00
Aleksei.Cherepanov 3d8f140d6b [JPS] Fix incremental build after changing Java enum used in Kotlin when
EnumWhenTracker implemented for tracking changed java enum class items, that used in kotlin when expression.

#KT-47824 Fixed
2022-04-19 18:39:41 +00:00
Denis.Zharkov 55159eba45 FIR: Do not verify descriptors consistency for FIR-based IR functions 2022-04-06 16:05:40 +00:00
Ilya Chernikov 03cbfea737 FIR LT: Introduce source file abstraction, carry it from parsing to IR
along with source lines mapping, allows to "emulate" usage of the
PSI files which allows to extract source file and line mapping info
on every stage from source element.
It makes sense to use this mapping for the error reporting too.
2022-03-30 08:34:30 +00:00
Ilya Chernikov a08e70ae5c FIR CLI: fix java sources search scope usage 2022-03-30 08:33:27 +00:00
Ilya Chernikov f89765eb33 Make JDK classpath roots configuration explicit...
instead of relying on the "configuration files" parameter.
(in the process of migration from KotlinCoreEnvironment).
2022-03-30 08:32:56 +00:00
Ilya Chernikov 275135a1b2 FIR: extend cli pipeline with incremental compilation logic
use it in the IncrementalCompilationRunner
2022-03-30 08:31:10 +00:00
Ilya Chernikov 12d49c2cd8 FIR: new cli pipeline with LightTree support 2022-03-30 08:29:47 +00:00
Victor Petukhov b5933c70e2 [FE 1.0] Refactor error utils: split error entities and introduce error type and error scope kinds 2022-03-23 21:13:33 +00:00
Mikhail Glukhikh 9aaf7b7d24 FIR: drop pluginPhase special parameter 2022-03-10 20:42:40 +00:00
Dmitriy Novozhilov 44bfb6fde8 [FIR] Don't register FirJavaElementFinder for common session 2022-02-18 17:44:40 +03:00
Victor Petukhov 5c8ca0ca9b [Compiler CLI] Use reading language version settings from environment only if the resource is presented or flag is set 2022-02-16 18:41:51 +03:00
Victor Petukhov 683a3e74a0 [Compiler CLI] Implement reading language version settings from environment variable
^KT-51306 Fixed
2022-02-16 18:41:50 +03:00