Dmitriy Novozhilov
3b7409be5f
[FIR] Properly pass optIn annotations to full pipeline test
2022-01-28 17:53:59 +03:00
Mikhail Glukhikh
c2f43dd98e
Revert OPT_IN_MARKER_ON_OVERRIDE limitation #KT-48890 Fixed
2022-01-28 13:40:35 +00:00
Mikhail Glukhikh
0c49ae04cb
Delay AbstractClassMemberNotImplementedWithIntermediate... to 1.8
...
Related to KT-45508
2022-01-28 13:40:35 +00:00
Mikhail Glukhikh
2a6462ef09
Enable KT-45508 and KT-49017 errors when jvmDefault=all(-compatibility)
2022-01-28 13:40:35 +00:00
Mikhail Glukhikh
d3f6ba99cb
Add links to related issues to some deprecation warnings
2022-01-28 13:40:34 +00:00
Dmitriy Novozhilov
938baa5cfe
[FIR] Support reading optIn annotations from module dump in MT and FP tests
2022-01-28 16:12:13 +03:00
Dmitriy Novozhilov
1265dda880
[FIR] Render diagnostic names in full pipeline tests
2022-01-28 16:12:12 +03:00
Dmitriy Novozhilov
aab66bd623
[FIR] Support rendering diagnostic names in CLI FIR compiler
2022-01-28 16:12:12 +03:00
Dmitriy Novozhilov
199edd59f8
[FE] Delay StopPropagatingDeprecationThroughOverrides till 1.9
...
^KT-47902
2022-01-28 13:59:21 +03:00
Sergej Jaskiewicz
8149189585
[JS IR] Optimize away upcasts
...
#KT-50212 Fixed
2022-01-28 10:03:53 +00:00
Artem Kobzar
0cf1ebd686
fix(d.ts for Default Argument Value): add question mark to exported funcitons with default parameter.
2022-01-27 19:44:59 +00:00
Simon Ogorodnik
4c5eb9ac32
KT-50889: Fix caching of module descriptors in K2MetadataKlibSerializer
...
Previously, in case of repeated analysis, descriptors cached in
CommonDependenciesContainer was initialized multiple times
#KT-50889 Fixed
2022-01-27 17:32:18 +00:00
Mikhail Glukhikh
fd3d86eddf
FE 1.0: introduce deprecation for Enum.declaringClass (KT-49653)
2022-01-27 17:27:40 +03:00
Mikhail Glukhikh
983fa4c8c7
FIR: add temporary access to Enum.getDeclaringClass (see KT-49653)
2022-01-27 17:27:39 +03:00
Mikhail Glukhikh
c2ab09fa84
Add test for KT-49653
2022-01-27 17:27:38 +03:00
Victor Petukhov
1a23cd8c45
[FE 1.0] Don't try to report specialized resolution ambiguity error for builder inference if the corresponding substitutor is empty
...
^KT-50989 Fixed
2022-01-27 15:30:16 +03:00
Mikhail Glukhikh
eeadd8588d
Drop CommonCompilerArguments.optInDeprecated
...
On the way to KT-22956
2022-01-27 11:48:22 +00:00
Mikhail Glukhikh
c255da815f
Change some names in source code from useExperimental to optIn
2022-01-27 11:48:21 +00:00
Sergej Jaskiewicz
4a724611d8
[JS IR] Extract varargs in bridges generated for external methods
...
The issue this commit fixes occurs when we have an external interface
implemented by a Kotlin class, if that interface has methods with
varargs.
Kotlin functions expect varargs passed as arrays, but JavaScript code
may be unaware of this convention.
So, when generating a bridge for external interface method
implementaion, we insert some additional logic for extracting varargs
using the JavaScript `arguments` object.
A simplified example:
```kotlin
external interface Adder {
fun sum(vararg numbers: Int): Int
}
class AdderImpl: Adder {
override fun sum(vararg numbers: Int) = numbers.sum()
}
```
For `AdderImpl` we generate the following JS code:
```js
AdderImpl.prototype.sum_69wd7h_k$ = function (numbers) {
return sum(numbers);
};
AdderImpl.prototype.sum = function () {
var numbers = new Int32Array([].slice.call(arguments));
return this.sum_69wd7h_k$(numbers);
};
```
#KT-15223 Fixed
2022-01-27 11:06:17 +00:00
Sergej Jaskiewicz
d5e46e0607
[JS IR] Introduce intrinsics for slicing array-like objects
2022-01-27 11:06:16 +00:00
Sergej Jaskiewicz
08e6116ecb
[JS IR] Introduce jsArguments() intrinsic function
...
`jsArguments()` is lowered into a reference of the `arguments` object.
This is useful for extracting varargs, when calling Kotlin code from
JavaScript. For a concrete example, see KT-15223.
2022-01-27 11:06:16 +00:00
Sergej Jaskiewicz
d8838f4e7b
[JS IR] Fix binary operator lookup in JsIrBackendContext
...
Previously, if multiple operators with the same name were defined in
a single class, we could look up neither of them (for example, the `Int`
class defines multiple `plus` operators, one for each primitive type
referenced on the RHS).
Now we can distinguish operator functions by their RHS type when
performing operator lookup in the backend.
2022-01-27 11:06:15 +00:00
Artem Kobzar
9547b0cae1
fix(Generic Constraints d.ts): add to d.ts generic type parameters constraints.
2022-01-27 10:37:10 +00:00
Georgy Bronnikov
d2418a1329
IR: never attach return type to signatures of fake overrides
...
Cases that necessitate the return type hack (see KT-46042) always
involve exactly two methods, exactly one of which is a fake override. It
is sufficient to mark one of them.
2022-01-27 01:02:25 +03:00
Georgy Bronnikov
d2738c02cc
Add test for IR serialization
2022-01-27 01:02:24 +03:00
Georgy Bronnikov
f0fb0cbefe
IR: remove IdSignatureBuilder.isKotlinPackage()
2022-01-27 01:02:23 +03:00
Georgy Bronnikov
6a3a375372
IR: pass DescriptorByIdSignatureFinder as parameter to DeclarationStubGeneratorimpl
...
This breaks dependency between serialization.common and psi2ir modules.
2022-01-27 01:02:23 +03:00
Georgy Bronnikov
3f91674090
IR: inline and remove ...FromLinker methods from SymbolTable
2022-01-27 01:02:22 +03:00
Georgy Bronnikov
b79e9c9f90
IR: Compute IrBasedDescriptor.isExpect where possible
2022-01-27 01:02:21 +03:00
Georgy Bronnikov
f4ddbb5e71
JVM_IR: remove DeclarationStubGenerator from deserializeLazyDeclarations.kt
...
No descriptor references remain.
2022-01-27 01:02:21 +03:00
Georgy Bronnikov
633e3a82e2
JVM_IR: record file facade fq name in serialized IR
...
This is needed to distinguish between file level privates by signature.
2022-01-27 01:02:20 +03:00
Georgy Bronnikov
c0f6508ff9
JVM_IR: do not compute stored file signature when not needed
2022-01-27 01:02:19 +03:00
Georgy Bronnikov
10c3429ce6
IR: remove dead code
2022-01-27 01:02:19 +03:00
Georgy Bronnikov
836925b4be
JVM_IR: replace calls to expect declarations in ExprectDeclarationRemover
...
References to expect declarations still remain in IrTypes;
we will need to remove those as well sooner or later.
2022-01-27 01:02:18 +03:00
Georgy Bronnikov
63359d8492
IR: use descriptor directly in IrLazyEnumEntryImpl
...
This works even when the symbol contains no descriptor
(as it does happen after deserialization).
2022-01-27 01:02:17 +03:00
Georgy Bronnikov
eda913554d
IR: compute correct IR-based mangles for Java fields
2022-01-27 01:02:17 +03:00
Georgy Bronnikov
044acbb5ef
JVM_IR: do not use return type in Java property mangles
...
Another case of discrepancy between IR-based mangles and
descriptor-based mangles.
2022-01-27 01:02:16 +03:00
Georgy Bronnikov
4d2bcf7e66
IR: compute file local signatures from descriptors
2022-01-27 01:02:16 +03:00
Georgy Bronnikov
b6ddd758ec
IR: fix deserialization of publicly visible type parameters
2022-01-27 01:02:15 +03:00
Georgy Bronnikov
3cc883cf7b
IR: use DescriptorBySignatureFinder in DeclarationStubGenerator
...
Duplicating code that was used for the same purpose in
DeclarationStubGenerator is removed.
2022-01-27 01:02:14 +03:00
Igor Yakovlev
a655f9da58
[WASM] Remove ignore from passing tests
2022-01-26 23:40:42 +03:00
Igor Yakovlev
2ec0411a7f
[WASM] DCE implementation
2022-01-26 23:40:41 +03:00
Dmitry Petrov
e55f7459f4
JVM_IR drop StripTypeAliasDeclarationsLowering
2022-01-26 12:49:20 +00:00
Mikhail Glukhikh
ad0d0ca47f
Drop redundant Suppress("RemoveExplicitTypeArguments")
2022-01-26 12:19:55 +00:00
Dmitriy Dolovov
7df68af664
[IR, Native] KLIB ABI tests: backup but don't overwrite artifacts
...
^KT-50775
2022-01-26 13:36:25 +03:00
Dmitriy Dolovov
9096725d1d
[IR, JS] KLIB ABI tests: separate testing logic so that it can be reused in non-JS tests
...
^KT-50775
2022-01-26 13:36:25 +03:00
Dmitriy Dolovov
d64a720749
[IR, JS] KLIB ABI tests: create KotlinCoreEnvironment in setUp()
...
^KT-50775
2022-01-26 13:36:24 +03:00
Dmitriy Dolovov
d80572dac8
[IR, JS] KLIB ABI tests: create and clean up build directory with setUp()/tearDown()
...
^KT-50775
2022-01-26 13:36:24 +03:00
Dmitriy Dolovov
703fd8539d
[IR, JS] KLIB ABI tests: don't create unnecessary disposable
...
^KT-50775
2022-01-26 13:36:24 +03:00
Dmitriy Dolovov
24b011436c
[IR] Improve partial linkage error messages
...
^KT-50775
2022-01-26 13:36:24 +03:00