[JS IR] Add non overridden property and method insode exported class
[JS IR] Add method into exported interface in test
[JS IR] Add interface properties cases to all file export test
[JS IR] Fix usage of isExported inside IrJsUtils
Co-authored-by: Anton Bannykh <Anton.Bannykh@jetbrains.com>
Merge-request: KT-MR-6087
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
^KT-51973 fixed
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.
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');
}
```
[JS IR] Add single file test
[JS IR] isExportedMember considers only public API
[JS IR] Add case with non default accessor
Merge-request: KT-MR-6008
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
^KT-50504 fixed
[JS IR] Fix line number test
[JS IR] Ignore isInstance repl test
[JS IR] Ignore isInstance repl test
[JS IR] Add test with unsafe variance
Revert "[JS IR] Optimize away upcasts"
This reverts commit 8149189585.
Get rid of duplicated signatures
Revert "[JS IR] Consider erasing type parameters in return type in js signatures"
This reverts commit 6adcbe081e.
Revert "rra/ilgonmic/exported-bridges-2 [JS IR] Use js name for signature"
This reverts commit 00289d35
[JS IR] Leave as is
[JS IR] Add test with overloading by generic
[JS IR] Add test from master
[JS IR] Add tests from master
Merge-request: KT-MR-5987
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
^KT-51700 fixed
^KT-51523 fixed
^KT-51685 fixed
1. Extension functions declared in data classes are generated earlier by `generateMembersDeclaredInClassBody`
2. Extension functions fake override from parent class are generated earlier by `generateFakeOverrideMemberDeclarations`
So it is safe to filter out extension functions inside `generateAdditionalMembersForDataClass`
#KT-49715
#KT-51798
[JS IR] Test import.meta syntax
[JS IR] Add possibility to use import.meta
[JS IR] Check if import function-like returns Promise
[JS IR] Add test with import function syntax
[JS IR] Allow import function-like in js function
Merge-request: KT-MR-5948
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
^KT-51125 fixed
If we do not do this, the state-machine builder will not know the type
of the ACONST_NULL, defaulting to Object, leading to VerifyError.
Alternatively, we could use LVT to deduce the type, but getting types
from LVT is something I got rid of long time ago, and I have no desire
to return it back.
Generating CHECKCAST hints the state-machine builder the type of the
variable avoiding the issue of VerifyError. However, this CHECKCAST
replaces StrictBasicValue.NULL_VALUE with BasicValue in
OptimizationBasicInterpreter. To preserve optimization on not-spilling
known nulls, introduce BasicValues, which represent typed nulls and
create BasicInterpreter, which is aware of them. This way we have the
best of two worlds - we do not spill known nulls, and we know the type
of ACONST_NULL.
#KT-51718 Fixed