Commit Graph

92269 Commits

Author SHA1 Message Date
Alexander Korepanov 7920b8302c [JS IR] Fix race condition of IC hash calculator
^KT-52154 Fixed
2022-04-26 11:30:00 +00:00
Dmitry Gridin 0be0627e34 [jps][tests] remove hardcoded js-ir-runtime path
^KTIJ-20456
2022-04-26 13:19:35 +07:00
Kristoffer Andersen 4f8ef8c315 [EE-IR] Support Local Functions
This commit introduces support for calling and referencing local functions and
objects in evaluate expression on the IR backend.

The primary incision is a lowering inserted after Local Declaration Lowering,
that uses the intermediate data structures recorded by LDL to rewrite calls to
local functions to the appropriate function in the binary, instead of predicting
the compilation strategy. The required changes to the rest of the pipeline
facilitate piping the required data around.

The key to this transformation is that _captures by the local function_ must be
introduced as _captures by the fragment function_, such that the evaluator
infrastructure can find the appropriate values at run-time. This is necessary
due to the strategy of compiling local functions to static functions instead of
closures.

Additional test coverage of stepping behavior support the corresponding changes
in the Evaluator, part of the Kotlin Debugger plug-in.
2022-04-25 16:59:04 +03:00
Yahor Berdnikau 5af9303a16 Add Kvision project to build regression benchmarks
This project covers Kotlin/JS build performance

^KT-51380 Fixed
2022-04-25 14:08:24 +02:00
Yahor Berdnikau ce0116e1f2 Color percents
Depending on the percent color it to highlight problematic place

^KT-51360 Fixed
2022-04-25 14:08:24 +02:00
Yahor Berdnikau fbc3608959 Show difference in percent
For configuration and execution phases from previous stable release

^KT-51360 In Progress
2022-04-25 14:08:23 +02:00
Yahor Berdnikau c890e42ae6 Increase cell limit for benchmark result html
^KT-51360 In Progress
2022-04-25 14:08:23 +02:00
Yahor Berdnikau 375eff4993 Update kotlin-dataframe to 0.8.0-dev-952
This version contains fix for https://github.com/Kotlin/dataframe/issues/101

^KT-51360 In Progress
2022-04-25 14:08:23 +02:00
Yahor Berdnikau 67093b49ac Bump Gradle profiler version to 0.18.0
^KT-51360 In Progress
2022-04-25 14:08:23 +02:00
Yahor Berdnikau 198c215c75 Update duckduckgo project for regression benchmarks.
Build with Kotlin 1.7.0 is broken due to Anvil dependency doesn't have
Kotlin 1.7.0 supported release.
2022-04-25 14:08:23 +02:00
Yahor Berdnikau 9c00787641 Update graphql-kotlin project for regression benchmarks 2022-04-25 14:08:23 +02:00
Ilya Kirillov 34c855b450 [decompiler] add missing cache to annotation loader
it was missed during moving the code from intellij repository

^KTIJ-21613 fixed
2022-04-25 10:32:02 +02:00
Jason Parachoniak df71cebf34 Fixed malformed utf8 string.
Replacing: byte sequence "040 251 040" with "040 302 251 040" properly
escaping the © symbol.
2022-04-25 10:28:49 +03:00
Zalim Bashorov 56d0255a8a [JS] Update nodejs to latest LTS version (16.14.2)
Also, remove verification metadata for older versions.
2022-04-23 17:58:42 +02:00
Zalim Bashorov 90c867ae1d [JS] Define Node.js version in one place and use a single version everywhere
Consequently, it fixes the inability to run some JS related tests on Apple devices with ARM.
2022-04-23 17:58:42 +02:00
Zalim Bashorov 64bcd8c91e [JS, atomicfu] Stop applying unused node plugin 2022-04-23 14:06:24 +02:00
Zalim Bashorov 2ed3349f7b [JS] Support downloading v8 for mac-arm64 2022-04-23 14:06:24 +02:00
Jinseong Jeon af21b67eb5 LL: cache reverse converted constant expression 2022-04-22 18:55:31 +02:00
Jinseong Jeon 7e8c893ce1 LL: showcase converted constants in raw FIR 2022-04-22 18:55:30 +02:00
Jinseong Jeon 61cca31b6b AA: special handling for converted constants 2022-04-22 18:55:30 +02:00
Jinseong Jeon faf6939515 AA: showcase strange const evaluation for -1 2022-04-22 18:55:30 +02:00
Stanislav Erokhin 249dc1e1d2 Fix potential AbstractMethodError on KotlinJvmBinaryClass.getContainingLibrary()
Compiler supposed to generate such method inside the
LocalFileKotlinClass class, but because of the KT-18489 method
getContainingLibrary is not generated. Because of that we potentially
could get AbstractMethodError. In order to fix that we are adding
explicit ovverride in java super class
2022-04-22 16:21:10 +00:00
Ilya Chernikov 352fa7540c Fix versions in poms, etc, unmute and fix appropriate test 2022-04-22 15:04:26 +02:00
Alexander Udalov 24f3c7dc7d Psi2Ir: fix usage of flexible vararg type after approximation
This only affects JVM IR, and this is similar to how this was done in
the old JVM backend in `CallBasedArgumentGenerator.generateVararg`.

 #KT-52146 Fixed
2022-04-22 14:15:28 +02:00
Yahor Berdnikau 5450367e39 Flip Gradle plugin kotlin_module names
Now common SourceSet output will have '_common' suffix, while all
variants will have the same name - '<module-name>.kotlin_module'.

This change is required for KSP as short-term workaround, as they
are using some internal properties/methods, which was mangled before
this change and hard to access in different variants.

^KT-52138 Fixed
2022-04-22 10:54:46 +00:00
sebastian.sellmair 204bc4ca95 [Commonizer] Provide union of forwardDeclarations as common dependencies
^KT-52050 Verification Pending

The issue described in KT-52050 happened, because forwardDeclarations
were not carried into next commonization steps. For commonization
it is fair to choose the union of all modules forwardDeclarations
as common dependency (instead of a union), since we can assume that
all those forward declarations will be provided.
2022-04-22 08:47:39 +00:00
sebastian.sellmair 99d995a313 [Commonizer] Implement integration test for KT-52050
The test project will be compiled and proves that
'platform.posix.DIR' retains it's 'CPointed' supertype.

The test is expected to fail on platforms that do not support
macos (windows and linux), since the issue seems to be caused
by optimistic, single platform propagation.
2022-04-22 08:47:36 +00:00
Svyatoslav Scherbina 4cf10686d6 Native: delete konan_temp right after the compilation instead of on exit
The Kotlin/Native compiler uses `.deleteOnExit()` as a substitute for
"delete after the compilation". But when the compiler runs in a Gradle
daemon, `.deleteOnExit()` means "delete on Gradle daemon exit", which
might be not soon. If a single Gradle daemon runs the compiler many
times, the remaining temporary files can consume quite a lot of disk
space. For example, this is the case for the Kotlin build.

Replace some of `.deleteOnExit()` calls with an explicit removal of
temporary files at the end of a compilation session.
2022-04-22 06:47:39 +00:00
Roman Golyshev ea8a05ec02 [FIR IDE] Small refactoring of KtSymbol's value parameters 2022-04-21 21:12:57 +00:00
Roman Golyshev 1d5cb8ab75 [FIR] Get FirSession from declaration in ReturnTypeCalculatorWithJump
If the session is from the other module, it might not know about
FirFiles which are relevant for transforming and resolving the
declaration

^KT-52136 Fixed
2022-04-21 19:23:20 +00:00
Pavel Punegov ed6ddf4e4f [K/N][build] Set kotlin root to get versions.properties file 2022-04-21 18:15:28 +00:00
Hung Nguyen 862c0b0c9a Trivial cleanup for KotlinCompile.classpathSnapshotProperties
^KT-51978 Fixed
2022-04-21 17:34:02 +00:00
Hung Nguyen c109d3d95b Trivial cleanup for PlainTextBuildReportWriter
^KT-51978 In Progress
2022-04-21 17:34:02 +00:00
Hung Nguyen 6d3e679a59 Implement cache eviction for classpath snapshot cache
Implement an in-memory cache that uses a combination of strong
references and `SoftReference`s so that it adapts to memory
availability.

Cache eviction is currently performed after loading a classpath snapshot
(this can be changed later if necessary).

Evicted cache entries' values will be converted from strong references
into `SoftReference`s so that they can still be used for as long as the
JVM allows them.

There are 2 types of cache eviction:
  - Least recently used: Oldest entries will be evicted
  - Memory usage limit: If memory is limited, all entries will be
    evicted

Test: Added InMemoryCacheWithEvictionTest unit test

^KT-51978 In Progress
2022-04-21 17:34:01 +00:00
Jinseong Jeon 889db4cc5d AA: indicate whether a value parameter is an implicit lambda parameter
^KTIJ-18800 In progress
2022-04-21 19:18:25 +02:00
Jinseong Jeon a74a51b2d9 AA: add tests about resolution of implicit lambda parameter 2022-04-21 19:18:24 +02:00
Alexander Udalov 6734f542b3 JVM IR: sanitize indy lambda proxy names correctly
In case there are several proxy functions for indy lambdas in the same
container, its names are "...__proxy", "...__proxy-0", "...__proxy-1",
..., yet before this change, only the first one was sanitized. So if
it's happening inside a constructor, `<init>` was left unrenamed which
led to ClassFormatError.

 #KT-52040 Fixed
2022-04-21 17:06:16 +02:00
Victor Petukhov 2cfba51a29 [Compiler PSI] Make getContextReceivers default to preserve compatibility
^KT-51747 Fixed
2022-04-21 13:41:30 +00:00
Nicolay Mitropolsky ccb6331e10 LC: better facade detection to fix KTIJ-21223
Merge-request: KT-MR-6130
Merged-by: Nicolay Mitropolsky <nicolay.mitropolsky@jetbrains.com>
2022-04-21 10:52:29 +00:00
Artem Kobzar 7327bc864e test(KT-31614): fixate behavior of serialization/deserialization of UTF characters. 2022-04-21 09:22:24 +00:00
konstantin.tskhovrebov e974d16e7a Add KotlinArtifactsExtensionImpl code generator. 2022-04-21 08:32:28 +00:00
konstantin.tskhovrebov 3085f6bacf Extract kotlin artifacts public API. 2022-04-21 08:32:27 +00:00
konstantin.tskhovrebov 19dc91135c Add info comments to KotlinNativeLinkArtifactTask.kt 2022-04-21 08:32:26 +00:00
konstantin.tskhovrebov 5f0303698e Add kotlin artifacts config and object collections for extensibility.
Extending by external plugins:
project.kotlinArtifactsExtension.apply {
    artifactConfigs.all {
      //add custom extension to artifact config DSL
      (it as ExtensionAware).extensions.create("myConfig", Config::class.java)
    }
    artifacts.all {
      val config = it.extensions.findByName("myConfig") as Config
      //configure additional tasks, etc
      //here we can use artifact parameters
    }
}
2022-04-21 08:32:26 +00:00
konstantin.tskhovrebov 9430f0bafb Add artifacts collection inside KotlinArtifacts extension.
And make KotlinArtifact instances expandable via groovy machinery.
2022-04-21 08:32:25 +00:00
Kristoffer Andersen aafab7800b [EE-IR] Add "different classloader" check to synthetic accessor lowering 2022-04-20 23:33:38 +02:00
Mikhail Glukhikh f65364b191 FIR: add test for #KT-49438 Obsolete 2022-04-20 22:31:54 +03:00
Ilya Chernikov af933b9d3d Switch to FastJarFS for scripting
#KT-51731 fixed
2022-04-20 19:15:12 +00:00
Svyatoslav Scherbina fce5ad1358 Native: check return value of clang_saveTranslationUnit 2022-04-20 16:56:41 +00:00
Artem Kobzar 59bd2fbb91 test(KT-51066): fixate behavior of value classes in composition with suspend lambdas. 2022-04-20 15:49:09 +00:00