Pavel Mikhailovskii
65b2cee913
KT-23397 Optimize out field for property delegate when it's safe (JVM)
2022-06-07 10:46:01 +00:00
Nikolay Lunyak
8d2868da32
[FIR JS] Regenerate tests
...
вфцвфдцьв
2022-06-02 13:47:34 +00:00
Nikolay Lunyak
da8a8a8988
[FIR JS] Add a Fir2IrJsText runner
2022-06-02 13:47:30 +00:00
Nikolay Lunyak
994e2970c7
[FIR JS] Suppress EQUALITY_NOT_APPLICABLE
2022-06-02 13:47:30 +00:00
Nikolay Lunyak
0e549e3329
[FIR JS] Suppress INVISIBLE_REFERENCE
2022-06-02 13:47:27 +00:00
Nikolay Lunyak
5e97a36680
[FIR JS] Ignore tests with unsupported features
2022-06-02 13:47:26 +00:00
Nikolay Lunyak
bdc3b5fe6f
[FIR JS] Mute 170 failing multi-module tests
2022-06-02 13:47:24 +00:00
Nikolay Lunyak
ccc72e5125
[FIR JS] Add a FirJsTest runner
...
Note: 763/1627 failed tests
- 170 are multi-module tests which can be ignored for now
2022-06-02 13:47:24 +00:00
Nikolay Lunyak
9a9beef25b
[FIR JS] Prepare the infrastructure for FIR JS tests
2022-06-02 13:47:24 +00:00
Ilmir Usmanov
f922684169
Minor. Add regression test
...
#KT-52561 Fixed
2022-06-02 13:26:24 +00:00
Denis.Zharkov
c1904004c4
FIR: Fix case when smartcast receiver is used for call to private method
...
^KT-54432 Fixed
2022-06-01 16:02:30 +00:00
Sergej Jaskiewicz
58e2652ba6
[JS IR] Test in-line anonymous functions with extension functions
2022-06-01 09:02:32 +00:00
Sergej Jaskiewicz
e03747ea7d
[JS IR] Introduce the GENERATE_INLINE_ANONYMOUS_FUNCTIONS feature flag
2022-06-01 09:02:31 +00:00
Sergej Jaskiewicz
c10af22b27
[JS IR] Lower lambdas into in-line anonymous functions when possible
...
Previously we always generated factories for contextful lambdas:
```kt
fun foo(a: Int) = { a }
```
```js
function foo(a_38) {
return foo$lambda(a_38);
}
// factory!
function foo$lambda($a) {
return function () {
return $a;
};
}
```
After this patch, the generated code for `foo` is more concise:
```js
function foo(a) {
return function() { return a; };
}
```
2022-06-01 09:02:30 +00:00
Victor Petukhov
96d1f89836
[BE] Support until operator in back-ends
2022-05-31 08:42:56 +00:00
Victor Petukhov
2378979a99
[FE JS] Support until operator in WRONG_OPERATION_WITH_DYNAMIC error
2022-05-31 08:42:55 +00:00
Pavel Mikhailovskii
2ceccec2b8
KT-52551 Create a static initialization section in case of delegation to a property reference from a file class
2022-05-30 14:16:18 +00:00
Ivan Kochurkin
0ef043b074
[FIR2IR] Consider property init value from nested class, ^KT-52057 Fixed
2022-05-29 23:41:23 +03:00
Victor Petukhov
0199c76c06
[FE 1.0] Check callable reference return type safety during resolution
...
^KT-51844
^KT-52503 Fixed
2022-05-27 13:56:34 +00:00
Victor Petukhov
51551998c7
Revert "[FE 1.0] Take care callable reference candidates with recursive candidate return type"
...
This reverts commit d04beaa8bb49c99ceb993f3f7b32169c393b39f4.
2022-05-27 13:56:33 +00:00
Victor Petukhov
b411eb36e8
[FE 1.0] Take care standalone lambdas during updating types in the builder inference
...
^KT-50520 Fixed
2022-05-27 13:56:32 +00:00
Sergej Jaskiewicz
e9db050245
[JS] Optimize resolving paths when building source maps
...
`File.getCanonicalFile` follows symlinks, that is not necessary.
2022-05-26 16:32:07 +00:00
Sergej Jaskiewicz
375c13cd7e
[JS] Add a doc comment for SourceMapLocationRemapper
2022-05-26 16:32:06 +00:00
Sergej Jaskiewicz
0614c519af
[JS] Convert SourceFilePathResolver to Kotlin, fix usages
2022-05-26 16:32:05 +00:00
Sergej Jaskiewicz
4bf79cd23b
Rename SourceFilePathResolver.java -> SourceFilePathResolver.kt
2022-05-26 16:32:04 +00:00
Dmitriy Novozhilov
c777ecd470
[JS] Unmute tests due to fixed KT-52339
2022-05-23 12:04:37 +00:00
Artem Kobzar
8bc5508f5c
fix(KT-52339): add newlines to SourceMap to calculate multiline comments in a right way.
2022-05-20 13:35:54 +00:00
Svyatoslav Kuzmich
84ed3ff5b0
[Wasm] Don't generate wat format by default in box tests
...
Gives ~15% tests speedup
Use kotlin.wasm.debugMode=1 to enable old behaviour
2022-05-20 13:34:28 +00:00
Svyatoslav Kuzmich
d1c81eb6ba
[Wasm] Support Wasm GC milestone 5
2022-05-20 12:22:43 +03:00
Georgy Bronnikov
39bba7973c
Fir2Ir: create file level signatures where appropriate
...
This is godugly code, where a flag for file level signatures is passsed
around.
An alternative would be not to create file level signatures for toplevel
private clases, since those still need unique names, at least on JVM.
But that would break binary compatibility.
Signatures are due for overhaul anyway. Hopefully this code can be
reverted at that point.
2022-05-19 12:02:43 +02:00
Ivan Kylchik
f3252334b2
Move most of ir utils from backend.common to ir.tree
2022-05-18 21:20:03 +03:00
Ivan Kylchik
4ddbb89103
[JS] Manually change receiver's type of Char's equals method
...
Char's equals method in js doesn't work properly because now equals
method is not fake override in Char, but it is actual override and so
when we call equals for some char in js, it will not be boxed. To fix
it we need to get correct receiver's type.
2022-05-18 21:19:54 +03:00
Dmitriy Dolovov
deb9039b0f
[IR][tests] Add tests for IR linkage issues related to properties
2022-05-18 18:05:05 +03:00
Dmitriy Dolovov
8e8ecc48ad
[IR][tests] Add tests for removal-of-abstract-fun IR linkage case
...
^KT-50771
2022-05-18 18:04:26 +03:00
pyos
513ef575ce
JVM: correctly merge typed null values
...
1. merge(null of type A, null of type B) = null of unknown type;
2. merge(null of type A, something of type B) = merge(unknown null, B).
^KT-52311 Fixed
2022-05-17 11:58:06 +00:00
Svyatoslav Kuzmich
813b600555
[Wasm] Don't write .wat files in box tests
...
These files take space on CI, but they are not validated or processed
automatically in any way.
Disabled by default, enabled via kotlin.wasm.debugMode=1
2022-05-13 11:20:13 +00:00
Artem Kobzar
6da3b3b274
fix: remove unnecessary warnings for export declarations.
2022-05-13 11:10:17 +00:00
Artem Kobzar
4e06ff26d4
fix(KT-39423): add support of optional parameters to constructor + fix bug with optional parameters inside functions.
2022-05-13 10:46:32 +00:00
Ilya Goncharov
0c24d0ec9f
[JS IR]Add case with file-exported class inherited from non-exported int
...
KT-52252
Merge-request: KT-MR-6270
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com >
2022-05-13 10:41:16 +00:00
Dmitriy Novozhilov
be76cd39d2
[JS] Ignore some tests due to KT-52339
2022-05-10 16:16:55 +00:00
Ilmir Usmanov
4f53b085ec
Do not override collection stub, if the override is suspend
...
but the stub is not. The other way around should be OK.
#KT-52237 Fixed
2022-05-09 23:16:58 +00:00
pyos
b19b265735
JVM_IR: generate continuation classes for suspend inline references
...
This is somewhat suboptimal since this results in `::suspendInline`
generating 2 classes while `{ suspendInline() }` only creates 1, but
it's the best allowed by the existing hierarchy of classes in stdlib. At
least it works?
^KT-50832 Fixed
2022-05-09 23:15:05 +00:00
Victor Petukhov
9f31f074da
[FE 1.0] Take care callable reference candidates with recursive candidate return type
...
^KT-51844 Fixed
2022-05-09 19:23:43 +00:00
Victor Petukhov
7675361380
[FE 1.0] Continue completion of calls inside that builder inference call postponed type variables of which has already been inferred
2022-05-09 12:38:39 +00:00
Victor Petukhov
6027c2a9aa
[FE] Substitute fixed type variables with inferred stub types
...
Actually, a type variable might be fixed into a stub type. Such stub type should be substituted before sub calls completion
^KT-51988 Fixed
2022-05-09 12:38:37 +00:00
Alexander Udalov
6d664bcd10
JVM IR: fix operand type for CompareTo intrinsic
...
It's incorrect to take the first parameter type from the expression
itself because it can be nullable if smart casts are used. And if it's
nullable, it's mapped to the wrapper type and calling
`comparisonOperandType` for it makes no sense. Instead, take the type
from the callee function, as it's guaranteed to be mapped to a JVM
primitive type.
E.g. in `test1` function in the added test, the problem was that the
dispatch receiver type of the call expression is `Double?`, which is
mapped to `java/lang/Double`, whereas we clearly wanted to obtain the
primitive `D` (double) type.
#KT-52163 Fixed
2022-05-05 23:06:21 +02:00
Zalim Bashorov
f8ef028da3
[Wasm] Remove no longer existed dirs from exclude list
2022-05-05 21:03:40 +00:00
Zalim Bashorov
e594cad02a
[Wasm] Add tests from "boxInline"
2022-05-05 21:03:38 +00:00
Zalim Bashorov
2c20a71d08
[Codegen tests] Specify JVM as target backend for inferenceFlexibleTToNullable.kt
2022-05-05 21:03:37 +00:00
Zalim Bashorov
db4888b3d4
[Wasm] Stop excluding a bunch of tests
2022-05-05 21:03:34 +00:00