Commit Graph

92010 Commits

Author SHA1 Message Date
Alexander Korepanov 2f3ad476be [JS IR] Ignore fake override calls in IC
Fake overrides don't have a signature and can't be assiciated with klib index,
therefore they can't be tracked with incremental cache invalidation logic.

Should be fixed after KT-51896.
2022-04-08 08:54:22 +00:00
Nikolay Krasko 3ee8aabe4c Add root project dir as a base path in -Xklib-relative-path-base
Previous code didn't work for kotlin-stdlib-wasm because sources from
other gradle projects are included.

`$rootDir/libraries/stdlib/native-wasm/src/*` sources
were present in files.knf as absolute paths. Now they are truncated
as libraries/stdlib/native-wasm/src/*. For example:
libraries/stdlib/native-wasm/src/kotlin/collections/Collections.kt

Should be removed after fixing KT-50876

KTI-729
2022-04-07 19:17:20 +00:00
Nikolay Krasko 405e90abee Apply -Xklib-relative-path-base to all KotlinCompile tasks
As absolute paths were also revealed in
   atomicfu.jar
   kotlin-stdlib-wasm
   kotlin-test-wasm

Use solution from Alexander Likhachev (avoid accessing
buildDir, projectDir in doFirst()) to prevent breaking the configuration
cache.

Should be removed after fixing KT-50876

KTI-729
2022-04-07 19:17:20 +00:00
Ivan Kochurkin 81b1ed9ad4 [FIR] Fix false positive RETURN_TYPE_MISMATCH in intellij ultimate 2022-04-07 21:03:08 +03:00
Elena Lepilkina 04da0ba55d [K/N][perf] Fix swiftinterop benchmarks linkTask names 2022-04-07 20:06:40 +03:00
Elena Lepilkina 23d66fabad [K/N][perf] Fix swiftinterop benchmrks 2022-04-07 20:06:40 +03:00
Elena Lepilkina 655ed0f7c8 [K/N][perf] Fix compile task name for debug binaries 2022-04-07 20:06:40 +03:00
Elena Lepilkina f401573e5c [K/N][perf] Added chart for execution time of debug binaries on performance server 2022-04-07 20:06:40 +03:00
Elena Lepilkina 087f7e3b31 [K/N] Added possibility to run only base part of benchmarks 2022-04-07 20:06:40 +03:00
Dmitriy Novozhilov b79f5a445f [FIR] Use proper ReturnTypeCalculator inside FakeOverrideTypeCalculator 2022-04-07 12:18:49 +00:00
Dmitriy Novozhilov 6e2402620f [FIR] Fix collecting member candidates on receiver with smartcast
^KT-51460 Fixed
^KT-51827
2022-04-07 12:18:48 +00:00
Dmitriy Novozhilov 51bd0fd2db [FIR] Add ability to specify module name in modularized test
Use `fir.bench.filter.name` property to specify module name instead of
  module path regex
2022-04-07 12:18:48 +00:00
Sergej Jaskiewicz d7d86a0e95 [JS IR] Lift lambdas that capture no context
If a lambda expression does not capture any local variables, convert
it to a global free function and replace the lambda creation with
a reference to that function.

Example: for the following Kotlin code

```kotlin
fun foo(f: () -> Unit) = f()

fun bar() = foo { console.log("hello") }
```

before this patch, we generated:

```js
function foo(f) {
  return f();
}
function bar() {
  return foo(bar$lambda());
}
function bar$lambda() {
  return function () {
    console.log('hello');
  };
}
```

after this patch, we generate:

```js
function foo(f) {
  return f();
}
function bar() {
  return foo(bar$lambda);
}
function bar$lambda() {
  console.log('hello');
}
```
2022-04-07 10:31:35 +00:00
Sergej Jaskiewicz 026f292f4f [IR] Add IrClass.invokeFun helper and use it throughout 2022-04-07 10:31:34 +00:00
Pavel Punegov 4b3a5ad875 [K/N][samples] Use compilations for libcurl dependency setting 2022-04-07 10:13:04 +00:00
Ilmir Usmanov 1488790cd3 Replace recursion with a loop
#KT-51530 Fixed
2022-04-07 01:08:22 +00:00
Denis.Zharkov 6937e08b9c FIR: Remove effectively incorrect code from Candidate.getReceiverType 2022-04-06 16:05:42 +00:00
Denis.Zharkov 3d06a92eea K1: Adjust positioning for NO_CONTEXT_RECEIVER 2022-04-06 16:05:41 +00:00
Denis.Zharkov 82b6fdf97e FIR: Serialize type attributes for non-type-ref types, too 2022-04-06 16:05:41 +00:00
Denis.Zharkov 66bd8dccfa FIR: Unignore all Fir2IrText tests on context receivers 2022-04-06 16:05:40 +00:00
Denis.Zharkov 55159eba45 FIR: Do not verify descriptors consistency for FIR-based IR functions 2022-04-06 16:05:40 +00:00
Denis.Zharkov 2a6700e5d5 FIR: Unignore all blackbox tests on context receivers 2022-04-06 16:05:39 +00:00
Denis.Zharkov 41bc842b9d FIR: Support context receivers in Fir2Ir 2022-04-06 16:05:39 +00:00
Denis.Zharkov aa74bd4293 FIR: Minor. Drop effectively-always-null body parameter 2022-04-06 16:05:38 +00:00
Denis.Zharkov 512446843b FIR: Support typeRef-name label for this 2022-04-06 16:05:37 +00:00
Denis.Zharkov ac399321f0 FIR: Add replace method for contextReceiverNumber 2022-04-06 16:05:37 +00:00
Denis.Zharkov 445705369e FIR: Support context receivers in FirPropertyTypeParametersChecker 2022-04-06 16:05:36 +00:00
Denis.Zharkov 0ba5c528d0 FIR: Support (de)serialization of context receivers 2022-04-06 16:05:35 +00:00
Denis.Zharkov dfc736161a FIR: Fix overload resolution with context receivers 2022-04-06 16:05:35 +00:00
Denis.Zharkov 4349060db1 K1: Support referencing class context receivers in a form of this@Name 2022-04-06 16:05:34 +00:00
Denis.Zharkov c33f06b9e4 FIR tree: add context receivers helper properties 2022-04-06 16:05:34 +00:00
Denis.Zharkov 202413c2f4 FIR: Add context receivers from the containing class to constructors 2022-04-06 16:05:33 +00:00
Denis.Zharkov b2d5bf3eae FIR: Adjust diagnostics test data after resolution of context receivers 2022-04-06 16:05:32 +00:00
Denis.Zharkov ef84dddc88 FIR: Add preliminary support for context receivers in resolution 2022-04-06 16:05:32 +00:00
Denis.Zharkov 588dd23fd9 Drop unused members from DescriptorStorageForContextReceivers 2022-04-06 16:05:31 +00:00
Denis.Zharkov 90b12433ec FIR: Add replaceContextReceivers to FirCallableDeclaration 2022-04-06 16:05:31 +00:00
Denis.Zharkov 8f013db94d FIR: Simplify resolution for invokeExtension on implicit extension 2022-04-06 16:05:29 +00:00
Denis.Zharkov 9a070ad4f6 FIR: Get rid of SessionBasedTowerLevel 2022-04-06 16:05:28 +00:00
Denis.Zharkov 150f951fb2 FIR: Simplify and clarify contracts in FirInvokeResolveTowerExtension 2022-04-06 16:05:28 +00:00
Denis.Zharkov f7371816de FIR: Minor. Simplify FirInvokeResolveTowerExtension 2022-04-06 16:05:27 +00:00
Denis.Zharkov c595780d83 FIR: Add two label-related fields to FirContextReceiver 2022-04-06 16:05:26 +00:00
Denis.Zharkov 550d24f8c6 FIR: Introduce ContextFunctionTypeParams type attribute 2022-04-06 16:05:26 +00:00
Denis.Zharkov f3e28c3767 FIR: Prepare ConeAttribute infrastructure for non-singleton attrs 2022-04-06 16:05:25 +00:00
Denis.Zharkov 54c3e7e7c5 FIR: Support context receiver in FIR building 2022-04-06 16:05:24 +00:00
Denis.Zharkov 4379460177 Fix AST/PSI structure for context receivers in function types
Having CONTEXT_RECEIVER_LIST inside FUNCTION_TYPE_RECEIVER looks a bit hacky
2022-04-06 16:05:24 +00:00
Denis.Zharkov a89680fb34 FIR: Prepare tree for context receivers 2022-04-06 16:05:23 +00:00
Alexander Korepanov c4bb445c01 [JS IR] IC close input streams
^KT-51853 Fixed
2022-04-06 15:42:17 +00:00
Yahor Berdnikau 92d9c5b150 Remove 'kotlin2js' Gradle plugin
Plugin class is still left untouched as it is used by
js platform old plugin.

^KT-48276 Fixed
2022-04-06 13:32:34 +00:00
Mikhail Glukhikh 9bd6a9c069 FIR: handle 'SinceKotlin' as a special kind of deprecated
#KT-51850 Fixed
2022-04-06 12:51:20 +00:00
Mikhail Glukhikh 07b5bd72ae FIR: suppress CONFLICTING_OVERLOADS diagnostic properly 2022-04-06 12:51:19 +00:00