Commit Graph

90939 Commits

Author SHA1 Message Date
Ilya Kirillov dcbf84771d Analysis API: regenerate tests 2022-02-01 16:31:27 +01:00
Mads Ager d13e117a58 Change FIR analysis API resolution for super type calls.
The IDE expects the super type calls to resolve to the constructor
invoked and not the class. The frontend itself resolves to the
class, so an extra layer is needed to adjust that to the constructor.
2022-02-01 16:31:26 +01:00
Yahor Berdnikau 95698b0138 Allow specifying additional JVM arguments for Kapt task
These arguments are only used when 'kapt.workers.isolation=process' mode
is used. It allows users to apply workaround for running kapt on newer
JDK version without waiting for a new Kotlin release

^KT-48450 Fixed
2022-02-01 15:00:12 +00:00
Denis.Zharkov adb9dfb256 FIR: Rework processing AugmentedArraySetCall
Previously (few commits earlier), it contained two versions
of receiver (lhs) generated separately for each desugaring version
that looked a bit redundant.

Now, at FIR building stage we just don't create desugaring sub-trees,
instead they are being built during bodies transformation and that seems
to be much convenient there, since we don't need to reverse-engineer
get-set-operator version to check if containing calls are successful
(as we just built those calls and retain them)

Semantically, this changes may only change how data flow works
for such statements (see changed compatibilityResolveWithVarargAndOperatorCall.kt)

^KT-50861 Relates
2022-02-01 13:12:49 +03:00
Denis.Zharkov 772579143b FIR: Change semantics for combination of safe calls and operators
^KT-41034 Fixed
2022-02-01 13:12:49 +03:00
Denis.Zharkov 0dd5042e62 FIR: Extract putIncrementOrDecrementStatements 2022-02-01 13:12:48 +03:00
Denis.Zharkov 32ba136366 FIR: Minor. Put variable closer to its usages 2022-02-01 13:12:47 +03:00
Denis.Zharkov e8581bdde5 FIR: Clarify parameter names in BaseFirBuilder.generateIncrementOr* 2022-02-01 13:12:46 +03:00
Denis.Zharkov 111b606580 FIR: Clarify contract for BaseFirBuilder.generateAssignment
^KT-50861 Relates
2022-02-01 13:12:45 +03:00
Denis.Zharkov 6f89f1ebf4 FIR: Allow selector of safe calls to be a FirStatement
It's necessary to allow a?.b += v be interpreted as a?.(b += v)
But currently FirAssignmentOperatorStatement is not FirQualifiedAccess

^KT-41034 In Progress
2022-02-01 13:12:45 +03:00
Ilya Matveev c35b8342d8 [K/N][Runtime] Support equality and hashcode for stacktraces 2022-02-01 10:02:50 +00:00
Hung Nguyen 1cb509d529 KT-45777: Remove proto-based approach to compute Java class snapshots
as the ASM-based approach is better, and we have switched to the
ASM-based approach for a while now.
2022-02-01 12:41:53 +03:00
Pavel Punegov f819a10968 [K/N][test] Ignore test with synchronized java keyword 2022-02-01 11:46:35 +03:00
Alexander Udalov 7dfe1793c8 Remove obsolete code used to load module annotations
`CliModuleAnnotationsResolver.getAnnotationsOnContainingModule` took
0.5% of total compilation time on IntelliJ.

 #KT-48233
2022-02-01 08:42:40 +01:00
Alexander Udalov d0f958d7a1 JVM IR: optimize isStaticInlineClassReplacementDelegatingCall
Static inline class replacements are possible only in inline classes.

Iterating over class declarations here took ~0.5% of backend time on
average projects, and up to 4% of total compilation time on degenerate
projects such as the one in KT-20055.
2022-02-01 08:42:39 +01:00
Ilya Kirillov 6e999f6e84 LL API: refactoring: replace FirIDE prefixes with LLFir prefixes 2022-01-31 21:12:31 +01:00
Ilya Kirillov 4530041cbb Analysis API: move reference resolve testsdata with errors to dedicated folders 2022-01-31 21:12:30 +01:00
Ilya Kirillov 1a2de65421 Add Generate Analysis Tests run configuration 2022-01-31 21:12:29 +01:00
Ilya Kirillov caddbda01b Analysis API FIR: introduce library resolve tests 2022-01-31 21:11:56 +01:00
Ilya Kirillov 96e1f1e7d4 Analysis API: fix some compilation errors in reference resolve testdata 2022-01-31 21:11:54 +01:00
Ilya Kirillov d926dda27f Analysis API FIR: introduce declarations from library resolve
^KT-50252 fixed
2022-01-31 21:11:52 +01:00
Ilya Kirillov d9200affe4 LL API: simplify FirModuleResolveState interface 2022-01-31 21:11:51 +01:00
Mikhail Glukhikh 05d65275bf FIR u/s scope: choose most specific intersection member for override check
Before this commit we took just first intersection member for this check.
However it's quite bad, because we were dependent on supertype order.
Choosing the most specific member looks more consistent here.

#KT-50969 Fixed
2022-01-31 21:59:18 +03:00
Mikhail Glukhikh 1137e61fc8 FIR: add test for KT-50969 2022-01-31 21:59:15 +03:00
Hung Nguyen 37c6b1c2dc KT-45777: Track build time in nanoseconds instead of milliseconds
to ensure precision (otherwise, rounding errors to milliseconds may
add up and cause unexplainable gaps in the running time).

We can still use milliseconds in the final report after all the precise
sub-build-times have been aggregated.
2022-01-31 19:50:03 +03:00
Yahor Berdnikau 52a21a4e1a Remove 'noStdlib' from Gradle options
^KT-49011 Fixed
2022-01-31 17:28:13 +01:00
Yahor Berdnikau 57c342fec8 Remove 'noReflect' from Gradle options
^KT-49011 In Progress
2022-01-31 17:28:13 +01:00
Yahor Berdnikau 27e449cd56 Remove 'useIR' from Gradle options
^KT-49011 In Progress
2022-01-31 17:28:13 +01:00
Yahor Berdnikau 8ffe78dba4 Remove GradleOption from 'includeRuntime' argument
^KT-49011 In Progress
2022-01-31 17:28:13 +01:00
Yahor Berdnikau c019dbce47 Rename DeprecatedOption into GradleDeprecatedOption
This should make it more explicit

^KT-49011 In Progress
2022-01-31 17:28:13 +01:00
Svyatoslav Scherbina 118bda675f [Gradle] Fix Native offline tests on Windows
Don't remove the temporary KONAN_DATA_DIR because it might be still in
use by the Gradle daemon process.
Create a new temporary directory instead.

The tests were introduced in 544447e...fa951f8
2022-01-31 14:42:12 +00:00
Dmitriy Novozhilov 086d874fe2 Docs: Fix links to sources in FIR Plugins documentation 2022-01-31 16:28:03 +03:00
Dmitry Petrov beb4cf3d99 PSI2IR KT-51036 fix lambda return value generation 2022-01-31 12:18:19 +00:00
Ilya Goncharov 02d731255c [Gradle, JS] Add to test success of compilation task 2022-01-31 12:00:14 +00:00
Ilya Goncharov a83cb9740e [Gradle, JS] Correct order of libraries 2022-01-31 12:00:13 +00:00
Ilya Goncharov 6872b6ef8a [Gradle, JS] Remove redundant argument 2022-01-31 12:00:13 +00:00
Ilya Goncharov 32cda8a37e [JS IR] Fix cache format, module name one the second line 2022-01-31 12:00:12 +00:00
Aleksei.Cherepanov 76637a8844 Fix JPS test after 9e1a771d 2022-01-31 12:55:37 +03:00
Alexander Korepanov 769fbcf3d0 [JS IR] Improve performance for runtime typecheck
This is a part of KT-42743
2022-01-31 09:15:58 +00:00
Svyatoslav Scherbina fa951f8f9c [Gradle] Propagate offline mode to Native platform libs generator
^KT-49247
2022-01-31 09:14:20 +00:00
Svyatoslav Scherbina a28884b1c3 [Gradle] Propagate offline mode to Native cinterop
^KT-49247
2022-01-31 09:14:19 +00:00
Svyatoslav Scherbina 15a52f33ad [Gradle] Propagate offline mode to Native compiler
^KT-49247
2022-01-31 09:14:19 +00:00
Svyatoslav Scherbina 544447e67e Native: do not cache DependencyDirectories.localKonanDir
Caching is wrong when this code is running in Gradle daemon, because
the daemon can change the environment, while localKonanDir depends on
the environment.
2022-01-31 09:14:19 +00:00
Svyatoslav Scherbina b4fb0e9894 [Gradle] Remove unused internal class KotlinNativeKlibRunner 2022-01-31 09:14:18 +00:00
Svyatoslav Scherbina a4f1147815 Bump bundled K/N version to 1.7.0-dev-1132 2022-01-31 09:14:18 +00:00
Vladimir Dolzhenko 289b838d77 [kotlin] Optimize file.fileType calculation
#KTIJ-20095
2022-01-31 08:31:33 +00:00
Roman Golyshev bc3142f4da Remove accidentally copied testData file 2022-01-29 07:42:18 +00:00
Roman Golyshev f0f2f67024 KT-50862 Unwrap use-site substitution overrides
Use-site substitution override happens in situations like this:

```
interface List<A> { fun get(i: Int): A }

fun take(list: List<String>) {
  list.get(10) // this call
}
```

We want to have those overrides unwrapped, because we don't want
to deal with a different KtSymbol for each possible use-site

^KT-50862 Fixed
2022-01-29 07:42:18 +00:00
Roman Golyshev 564e408434 KT-50862 Add name property to KtSignature
See the KDoc of the property for the reasons why
it was created
2022-01-29 07:42:17 +00:00
Mads Ager e2c7290214 [JVM CLI] Prefer source over classpath.
If the class `A` is in a jar `previous.jar`, the following CLI
invocation will take that class instead of the `A` class
defined in `A.java`:

kotlinc -cp previous.jar A.java B.kt

This is problematic for build tools that put the jar for a
previous build on the classpath when recompiling some of the
files.

^KT-51025 Fixed.
2022-01-29 00:58:00 +01:00