Commit Graph

1839 Commits

Author SHA1 Message Date
Tianyu Geng d77db2cda6 FIR checker: expose API to check if two types are compatible
This is useful for quickfixes offering casts. We don't want to offer
user to cast incompatible types.

Also, explicitly allow compare to `Nothing` and handle `Nothing` from intersection
2021-09-17 01:59:05 +03:00
Jinseong Jeon 068e81570d FIR IDE: type-aware constant conversion 2021-09-15 22:32:12 +02:00
Ilya Kirillov 5b38bd2be2 FIR IDE: fix generators after changing analysis api packages 2021-09-15 11:32:47 +02:00
Ilya Kirillov 4d52b354af FIR IDE: move analysis api fir generator to the analysis directory 2021-09-15 11:32:33 +02:00
Ilya Kirillov b70f4f581e FIR IDE: move low level api main sources to the analysis directory 2021-09-15 11:32:22 +02:00
Roman Golyshev 911bfcf150 [FIR IDE] Add basic compiler-side Import Optimizer tests
These tests are not complete, but it is intentional - it is just a basic
setup, so when the need arise, the tests can be added right away
2021-09-02 18:10:16 +00:00
Ilya Kirillov abe2311372 FIR IDE: move declaration/package providers to separate module 2021-08-24 20:12:58 +03:00
Steven Schäfer d08990ebb4 JVM: New single-pass implementation for jvm-abi-gen 2021-08-23 18:25:33 +02:00
Ivan Kylchik b85a796492 Support interpretation for floorDiv and mod functions 2021-08-13 16:18:28 +03:00
Nikita Bobko 5455800de4 [imltogradle] Exclude 'kotlin.util.compiler-dependencies' module from generation
This module is used as helper module in JPS project module to make sure that IDEA will download
all required dependencies. There are some dependencies which IDEA cannot determine as used so
we force it to download them (kotlinc.kotlin-dist, kotlinc.kotlin-compiler-testdata)

We don't need this module in Gradle project model

This commit fixes:
```
Could not resolve project :prepare:ide-plugin-dependencies:kotlin-compiler-testdata-for-ide.
Required by:
    project :kotlin-ide.kotlin.util.compiler-dependencies
```
2021-08-11 02:17:52 +02:00
Nikita Bobko 747cc7d55d [imltogradle] Fix other kotlinc libraries which don't follow kotlinc.* naming
e.g. kotlin-reflect
2021-08-11 02:17:51 +02:00
Nikita Bobko 784273ac5b [imltogradle] Add additional check for absence of snapshot version in JpsLikeJarDependency 2021-08-11 02:17:51 +02:00
Nikita Bobko 493fdbd418 Fix kotlin stdlib handling for 212 IDEA in ide-iml-to-gradle-generator 2021-08-11 02:17:51 +02:00
Alexander Udalov 0d1380c232 Fix warnings in generator modules 2021-08-10 17:57:50 +02:00
Nikita Bobko a97b4ea4ae Fix UnsupportedClassVersionError when running ./gradlew generateIdePluginGradleFiles
This commit fixes:
```
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/intellij/jps/impl/JpsIdePluginManagerImpl has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
```
2021-08-07 00:07:30 +03:00
Nikita Bobko dac4fe7507 Adapt coop-dev for 212 platform 2021-08-07 00:07:28 +03:00
Alexander Udalov ca7334acb9 Fix some warnings in Gradle plugin and related modules 2021-08-06 22:36:58 +02:00
Dmitriy Novozhilov c2e2068682 [Test] Add ability to mark group of tests with specific tags
Currently tags can be applied to all tests in specific testdata
  directory by placing `_tags.txt` file in it, where all tags should
  be listed on separate lines. Test generator adds those tags to
  corresponding generated test classes with `@Tag` annotation

Please note that is applicable only to JUnit 5 tests
2021-08-01 22:23:41 +03:00
Ilya Kirillov f19dfd9d2a HL API: restore SymbolByReferenceTest
Now it is possible as references are working in HL API tests now
2021-07-27 17:58:46 +03:00
Ilya Kirillov c678d4b506 HL API: generate reference resolve tests
The testdata is taken from corresponding IDE reference resolve tests
2021-07-27 17:58:45 +03:00
Nikolay Krasko bba0dfb469 Cleanup as42 bunch files
We don't build AS42 plugin from main kotlin repo anymore.
2021-07-23 16:58:24 +03:00
Nikita Bobko d1e46e8ce7 Delete Kotlin IntelliJ IDEA plugin modules from settings.gradle 2021-07-21 11:23:53 +02:00
Nikita Bobko 39fa2b0baf Delete Kotlin IntelliJ IDEA plugin sources
Kotlin plugin sources were migrated to intellij-community:
https://github.com/JetBrains/intellij-community/tree/master/plugins/kotlin

Preserve `jps-plugin/testData/incremental`
because it's used in `compiler/incremental-compilation-impl/test`

Preserve `idea/testData/multiModuleHighlighting/multiplatform`
because it's used in `MppHighlightingTestDataWithGradleIT`
2021-07-21 11:23:43 +02:00
Dmitriy Novozhilov f3116cb64a Fix NON_EXHAUSTIVE_WHEN_STATEMENT warnings in project code 2021-07-20 13:33:46 +03:00
Ilya Kirillov c0eb669191 LL API: add basic tests for kt -> fir mapping 2021-07-19 18:45:28 +03:00
Ilya Chernikov dee0487185 IR: Refactor IrBuiltIns to abstract it from descriptors 2021-07-16 02:24:18 +03:00
Georgy Bronnikov 9efd0d7589 JVM_IR: JvmIrSerializer 2021-07-14 21:20:02 +03:00
Igor Yakovlev 64afba299f [imltogradle] Don't use deprecated kotlinOptions.jdkHome in generated build.gradle.kts files 2021-07-05 17:52:04 +02:00
Roman Artemev 6cdac22a23 [IR] Introduce new IdSignatures
FileSignature, CompositeSignature, LocalSignature

They are needed to make possible reference any non-local declaration via
 signature, including private signature, type parameters and so on.

- Support those new signatures in proto and klibs
- Rename `isPublic` -> `isPubliclyVisible` due to changed semantic
- Fix FIR
- clean up code
2021-07-01 17:40:31 +03:00
Yahor Berdnikau 430306b23d Change 'jvmTarget' backing property visibility to internal.
Allows to check if this property was updated by the user or not.

^KT-45611 In Progress
^KT-43095 In Progress
2021-06-25 16:28:54 +00:00
Tianyu Geng 45ccec3b64 FIR IDE: Add HLAddWhenRemainingBranchesIntention 2021-06-24 18:26:20 +02:00
Tianyu Geng 55e7cc7ea3 FIR IDE: add HLConvertToBlockBodyIntention 2021-06-23 22:22:14 +03:00
Tianyu Geng 3aa6cb25ba FIR IDE: Add ImportMemberIntention 2021-06-23 22:22:12 +03:00
Tianyu Geng 66d44f2471 FIR IDE: Add ImportAllMembersIntention 2021-06-23 22:22:10 +03:00
Nikolay Krasko d6aedc3229 Ignore more tasks if disableKotlinPluginModules explicitly set 2021-06-22 11:02:49 +03:00
Nikita Bobko 8b018f0a40 frontend-api-generator: remove unused module dependencies 2021-06-22 03:06:17 +03:00
Nikita Bobko 938cd955e1 Remove :idea prefix in IDE FIR modules which are going to stay in kotlin repo
This commit fixes not possibility to build project with `disableKotlinPluginModules`
flag on because Gradle tries to resolve `:idea` module which is disabled
2021-06-22 03:06:16 +03:00
Ilya Kirillov dbba9297ff FIR IDE: restore InnerDeclarationsResolvePhaseTest 2021-06-21 20:43:43 +03:00
Ilya Kirillov 61651c685c FIR IDE: restore FirLazyDeclarationResolveTest 2021-06-21 20:43:40 +03:00
Ilya Kirillov 822590a62b FIR IDE: temporary disable AbstractFirLazyDeclarationResolveTest.kt 2021-06-21 00:51:31 +02:00
Ilya Kirillov 72b8593240 FIR IDE: do not use IJ test infrastructure in frontend-api-fir tests 2021-06-20 22:07:31 +02:00
Ilya Kirillov 75331b3448 FIR IDE: abstract low-level-api from dependency on idea 2021-06-20 22:07:11 +02:00
Jinseong Jeon fcdb8866d2 FIR: rewrite evaluator to use eval utils in frontend.common 2021-06-19 21:58:47 -07:00
Jinseong Jeon 477c1c8cd7 Migrate CompileTimeType and OperationsMap to frontend.common 2021-06-19 21:58:47 -07:00
Jinseong Jeon 720104de78 Temporarily allow deprecated conversions in FIR operations map
Also, switch to the new copyright header
2021-06-19 21:35:35 -07:00
Jinseong Jeon fc5d1d8cb5 FirConstKind has been renamed to ConstantValueKind (d243319) 2021-06-19 21:35:35 -07:00
Jinseong Jeon bb297b87bd Avoid hard-coded operator names in CompileTimeConstantEvaluator 2021-06-19 21:35:34 -07:00
Jinseong Jeon a969924248 FIR: generate operations map for CompileTimeConstantEvaluator 2021-06-19 21:35:34 -07:00
Nikita Bobko 306f8b7358 [imltogradle] Add "imls in same directory are not allowed" check 2021-06-18 17:42:23 +02:00
Nikolay Krasko 80677c88cb Update gradle task in generated files 2021-06-17 18:36:10 +03:00