Commit Graph

87184 Commits

Author SHA1 Message Date
Ivan Kochurkin c97587cc53 [FIR] Fix containingClassForStaticMemberAttr initialization 2021-10-03 17:10:05 +03:00
Vladimir Dolzhenko b2afb602c5 Add InvalidModuleNotifier capability
Relates to #KT-48977
2021-10-02 14:29:25 +02:00
Sergey Bogolepov 48a26204a7 [K/N] Make xcrun failures a bit more useful 2021-10-02 09:16:53 +00:00
Sergey Bogolepov 6e2c35edf5 [K/N] Update list of optInCacheableTargets
Caches for iosArm64 and linuxX64 are promoted to stable since 1.6.0-M1.
2021-10-02 09:16:53 +00:00
Sergey Bogolepov 8dcca8dc8b [K/N] Remove obsolete dependencyPacker subproject
We have a proper LLVM distribution for users, so there is no need
for hacks anymore.
2021-10-02 09:16:52 +00:00
Svyatoslav Kuzmich fa3e75463e [Wasm] Support throwIAE and throwNoBranchMatchedException
Add a couple of test stubs
Unmute tests
2021-10-02 06:14:36 +00:00
Svyatoslav Kuzmich 6eb81517a0 [Wasm] Unmute passed Wasm tests 2021-10-02 06:14:35 +00:00
Svyatoslav Kuzmich c88cde2f8b [Wasm] DONT_TARGET_WASM_BACKEND => IGNORE_BACKEND in testdata 2021-10-02 06:14:35 +00:00
Alexander Likhachev 0eca8b9727 [Gradle] Optimize configuration time
#KT-48884 Fixed
2021-10-02 03:00:41 +00:00
Georgy Bronnikov 41e38d5a1a JVM_IR: move serialized IR to a separate annotation 2021-10-02 00:56:46 +03:00
Roman Artemev fcf44be785 [JS IR] Add test for KT-46225 2021-10-01 23:36:41 +03:00
Roman Artemev 0621b79505 Add test for KT-46225 2021-10-01 23:36:40 +03:00
Roman Artemev 38f21b7139 [JS IR] Add test to check proper type substitution 2021-10-01 23:02:24 +03:00
Roman Artemev d4ace2ffe8 [JS IR] Make sure TypeOperatorLowering is after Interop CR Lowering 2021-10-01 23:02:23 +03:00
Roman Artemev f3035ac78e [IR] Add descriptive error message instead of NPE 2021-10-01 23:02:22 +03:00
Roman Artemev 23cba59b90 [JS IR] Unmute fixed test 2021-10-01 23:02:22 +03:00
Roman Artemev fe4a25eba1 [JS IR] Use context-dependent names for lambdas
Partially fix KT-46525

Now the code like
```
fun foo(a: () -> Unit) {}
interface A {
    fun run()
}
fun main() {
    foo {
        println()
    }
    val a = object : A {
        override fun run() {
            TODO()
        }
    }
}
```

is being compiled into

```
  function foo(a) {
  }
  function A() {
  }
  A.$metadata$ = {
    simpleName: 'A',
    kind: 'interface',
    interfaces: []
  };
  function main() {
    foo(main$lambda());
    var a = new _no_name_provided_();
  }
  function main$lambda() {
    return function () {
      println();
    };
  }

  // TODO
  function _no_name_provided_() {
  }
  _no_name_provided_.$metadata$ = {
    kind: 'class',
    interfaces: [A]
  };
```
2021-10-01 23:02:21 +03:00
Roman Artemev 76e08356d8 [JS IR] Change logic of InteropCallableReferenceLowering a bit
Now it first transforms Lambda classes and after fixes the call sites
2021-10-01 23:02:12 +03:00
Roman Artemev 693a5740c1 [JS IR] Disable pir tests by default 2021-10-01 23:02:11 +03:00
Roman Artemev 7ec593b22a [JS IR] Inline lambda class into its interop wrapper 2021-10-01 23:02:10 +03:00
Roman Artemev a1b223e33d [JS IR] Set proper statement origin for bound receiver save 2021-10-01 23:02:09 +03:00
Victor Petukhov abd2507107 Don't discriminate generics during callable references resolution
^KT-49038 Fixed
2021-10-01 22:09:33 +03:00
Victor Petukhov 23f6c29efc Provide some additional proxies for external use of deprecate package org.jetbrains.kotlin.resolve.calls.callUtil
Provided API is `getCalleeExpressionIfAny` and `createLookupLocation`
2021-10-01 19:29:44 +03:00
Tianyu Geng 154ceaa89f FIR: Make default visitor only visit single parent 2021-10-01 18:57:35 +03:00
Tianyu Geng 263f6b1fd8 FIR: generate FirDefaultVisitor and FirDefaultVisitorVoid...
so they won't be outdated when FIR class tree is updated.
2021-10-01 18:57:34 +03:00
Jinseong Jeon 8f3b06ac06 RAW FIR: record annotations on destructuring declarations 2021-10-01 18:54:16 +03:00
Jinseong Jeon 464eecef03 FIR IDE: add more tests about annotation resolution 2021-10-01 18:54:14 +03:00
Ilya Kirillov e95313acbb ULC: do not use synchronized lazy as safe publication lazy is enough for LC 2021-10-01 16:48:35 +02:00
Ilya Kirillov f90fc8a46e ULC: do not break laziness contract when computing declaration qualified name
^KTIJ-19780 fixed
2021-10-01 16:48:35 +02:00
Ilya Kirillov c8c1ee2b5a Fix usage of readWriteAccess without resolve
^KTIJ-19777 fixed
2021-10-01 16:48:35 +02:00
Tianyu Geng c1754ad427 FIR: fix label on non-lambda anonymous function 2021-10-01 17:21:42 +03:00
Tianyu Geng d3b9419837 FIR checker: FirReturnAllowedChecker -> FirReturnSyntaxAndLabelChecker 2021-10-01 17:21:42 +03:00
Tianyu Geng fadde98a86 FIR: fix label stealling and crash with multiple labels
Consider the code below

```
fun test() {
  a@ b@ {
    {}
  }
}
```

Currently when the code is converted to FIR, label `b` is bound to the
outer lambda and `a` gets bound to the inner lambda because it's not
consumed. This is wrong and also leads transfromation to fail with
exceptions because of the unexpected consumption of `a`.

This change fixes the above issue by designating a specific node in the
AST as the allowed user of a label when the label is added.
2021-10-01 17:21:40 +03:00
Tianyu Geng 5c716ea979 FIR checker: report NOT_A_FUNCTION_LABEL 2021-10-01 17:21:39 +03:00
Svyatoslav Kuzmich ab9a23cbfa [Wasm][Stdlib] Reuse K/N collections and StringBuilder 2021-10-01 17:18:49 +03:00
Svyatoslav Kuzmich 6ad6bca503 [Stdlib] Fix K/N StringBuilder insertRange capacity issue 2021-10-01 17:18:48 +03:00
Svyatoslav Kuzmich 80c9dd3440 Update .idea/kotlinc.xml automatically modified by IDE 2021-10-01 17:18:48 +03:00
Sergey Bogolepov b9bb56d9c6 [K/N] FileCheck-based tests
Introduce a simple infrastructure for testing produced bitcode with
FileCheck LLVM utility.

^KT-48925
2021-10-01 14:18:01 +00:00
Sergey Bogolepov b692705092 [K/N] Add LLVM utils into developer LLVM distribution.
Including FileCheck utility.
2021-10-01 14:18:01 +00:00
Sergey Bogolepov 5c1a4f79c4 [K/N] Minor LLVM builder fixes 2021-10-01 14:18:00 +00:00
Sergey Bogolepov 7a3f33ad0b [K/N] Add option to save unoptimized bitcode
Add `-Xsave-llvm-ir` option that stores LLVM IR text into temporary
directory right after IrToBitcode translation. This is required for
FileCheck-based tests and just helpful during development.
2021-10-01 14:18:00 +00:00
Alexander Likhachev a1424489b7 [Gradle, JS] Reduce configuration cache state size by data deduplication
#KT-49037 Fixed
2021-10-01 13:44:09 +00:00
Ilya Goncharov 18189ece48 [JS IR] Fix stdlib API 2021-10-01 13:32:14 +00:00
Ilya Goncharov 490ebde992 [JS IR] Commonize JsEagerInitialization 2021-10-01 13:32:13 +00:00
Ilya Goncharov 8bd009c5fd [JS IR] Eager initialization on side effect test 2021-10-01 13:32:13 +00:00
Ilya Goncharov 23c8433fce [JS IR] Eager initialization of adapter for kotlin.test tests 2021-10-01 13:32:13 +00:00
Ilya Goncharov dedb9d9018 [JS IR] Fix assertion to enable early created declarations 2021-10-01 13:32:12 +00:00
Ilya Goncharov 8f22e30515 [JS IR] Enable property lazy initialization in tests 2021-10-01 13:32:12 +00:00
Ilya Goncharov 4c0045b136 [JS IR] Add test on initialization calling only once 2021-10-01 13:32:11 +00:00
Ilya Goncharov 01fbe6bacc [JS IR] Use property lazy initialization by default 2021-10-01 13:32:11 +00:00