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
Sergey Igushkin
62c351874f
KT-49089 Fix using @OptionalExpectation annotations from dependencies
...
Fix the behavior of the common (metadata KLIB) compiler with
hierarchical project structures support as
it analyses usages of annotations from dependencies that are marked
with `@OptionalExpectations`.
The fix on the Kotlin Gradle plugin side is to add the
-Xcommon-sources=... compiler argument to those the invocations of the
compiler, just as it is done with the other compilers.
Issue #KT-49089 Verification Pending
2022-01-27 06:32:08 +00:00
Hung Nguyen
9e1a771d57
KT-44741: Update test data to use companion object with custom name
...
Test: Existing IncrementalJvmCompilerRunnerTestGenerated.PureKotlin#testCompanionConstantChanged
and similar *.PureKotlin#testCompanionConstantChanged tests
2022-01-27 02:34:42 +03:00
Ilya Muradyan
070f537ee9
REPL: Extract IDE-specific tests to a separate test set
2022-01-27 02:23:28 +03:00
Ilya Muradyan
9637b6b848
REPL: Fix REPL scripts metadata to be correctly recognized by class file decompiler
2022-01-27 02:23:27 +03: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
3a72c44184
Repair Native compilation
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
sebastian.sellmair
162dcef73a
[KPM] Mark overwriting custom capabilities as advanced
2022-01-26 21:51:58 +00:00
sebastian.sellmair
252a966cb4
[KPM] Kotlin...CapabilitiesContainer: Remove API to read capabilities
2022-01-26 21:51:58 +00:00
sebastian.sellmair
0ae47fca51
[KPM] KotlinGra..onArtifactsContext: Remove ConfigurationPublications interface
...
This is done to prevent unintentional side effects from Gradle, which
might act hostile against third-party implementations of Gradle public
API interfaces.
2022-01-26 21:51:57 +00:00
sebastian.sellmair
49cfe42914
[KPM] Always set 'KotlinFragmentModuleCapability'
...
If the configuration is not published, it is expected to set
`isCanBeConsumed=false` so the Capability should not affect anything.
2022-01-26 21:51:57 +00:00
sebastian.sellmair
96ec6466c7
[KPM] Implement 'transitiveRuntimeOnly' dependency configuration
2022-01-26 21:51:57 +00:00
sebastian.sellmair
6720742b84
[KPM] Replace 'fun interface' in favor of factory functions
2022-01-26 21:51:56 +00:00
sebastian.sellmair
c684588ebb
[KPM] KotlinFragmentPlatformAttributes: Only set jvm environment on Gradle 7+
2022-01-26 21:51:56 +00:00
sebastian.sellmair
629f7a66d6
[KPM] Implement KotlinFragmentConfigurationDefinitionTest
2022-01-26 21:51:55 +00:00
sebastian.sellmair
2d8bcc11ae
[KPM] Split KotlinFragmentConfigurationDefinition source file
...
... and tweak names of extension functions to make them more coherent
with Gradle APIs
2022-01-26 21:51:55 +00:00
sebastian.sellmair
7aceda94ac
[KPM] Convert noop implementations from 'object' to 'val'
...
This is to avoid leaking the extension function defined
inside those objects to the global namespaces.
Using these extensions on the receiver outside the
noop object makes no sense.
2022-01-26 21:51:55 +00:00
sebastian.sellmair
dfac177d35
[KPM] Rename ConfigurationContextImpl to KotlinGradleFragmentConfigurationContextImpl
2022-01-26 21:51:54 +00:00
sebastian.sellmair
0c579ec9b6
[KPM] variantPublishing: Temporary workaround to only publish .aar
2022-01-26 21:51:54 +00:00
sebastian.sellmair
d5823a5f7b
[KPM] Implement kotlin-gradle-plugin-kpm-android module for prototyping
2022-01-26 21:51:53 +00:00
sebastian.sellmair
590bf6ed9a
[KPM] Implement preliminary 'ExternalVariantApi'
2022-01-26 21:51:53 +00:00
sebastian.sellmair
986cf1ae51
[KPM] Implement *ConfigurationDefinition and Kotlin*VariantConfig APIs
...
Those new APIs shall make it easier for external Variant authors
(Android) to reuse logic from KGP with more clear semantic.
2022-01-26 21:51:53 +00:00
sebastian.sellmair
47a1d2aec6
[Gradle] Fix wrong project path to :kotlin-test:kotlin-test-junit
2022-01-26 21:51:52 +00:00
Stanislav Erokhin
0347a737f6
Exclude the :compiler:cli-js from the kotlin-compiler-fe10-for-ide.jar
...
:compiler:cli already excluded and :compiler:cli-js have references
to the classes from :cli.
P.s. the excluded list for kotlin-compiler-for-ide artifact is way more
we need to review that and refactor
2022-01-27 00:29:11 +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
sebastian.sellmair
84caad7ba2
[Gradle][MPP] Remove duplicated dependencyProjectStructureMetadata input
...
This input is now tracked in the new `ChooseVisibleSourceSetProjection`
KT-50952
2022-01-26 17:18:17 +00:00
sebastian.sellmair
af61ea9cb7
[Gradle][MPP] Correctly rename test for KT-50952
2022-01-26 17:18:16 +00:00
sebastian.sellmair
abed5b98ac
[Gradle][MPP] Implement ChooseVisibleSourceSetProjection as nested task input
...
^KT-50952 Verification Pending
2022-01-26 17:18:16 +00:00
sebastian.sellmair
f7c3ed7888
[Gradle][MPP] Add MppCInteropDependencyTransformationIT test for KT-50952
2022-01-26 17:18:16 +00:00
Dmitry Petrov
e55f7459f4
JVM_IR drop StripTypeAliasDeclarationsLowering
2022-01-26 12:49:20 +00:00
Svyatoslav Scherbina
149e596bef
Native: support -Xoverride-konan-properties in generatePlatformLibraries
2022-01-26 12:43:41 +00:00