Denis Zharkov
3e37995004
FIR: Get rid of FirCallableSymbol::isFakeOverride and isIntersectionOverride
2020-11-06 11:32:39 +03:00
Alexander Udalov
b3e79d36df
Fix compiler warnings and some inspections
2020-11-03 14:00:53 +01:00
Alexander Udalov
e5d5c20473
Minor, suppress deprecation warnings in parcelize plugin
2020-11-03 14:00:53 +01:00
Alexander Udalov
f87e46b599
Kx-serialization: generate wrapper type for reference array serializer
2020-10-30 17:47:29 +01:00
Alexander Udalov
42aef01d79
Kx-serialization: support SerialInfo annotations from dependencies in JVM IR
...
Also handle call sites correctly, by generating an instance of the Impl
class instead of trying to create the annotation.
#KT-42976 Fixed
2020-10-30 17:47:29 +01:00
Alexander Udalov
51ded98c4b
Kx-serialization: support SerialInfo for JVM IR
...
No tests added because this is going to be checked by the upcoming build
of kotlinx-serialization runtime with JVM IR.
#KT-42976 In Progress
2020-10-30 17:45:25 +01:00
Ilya Chernikov
7572b50385
Expose script parameters from descriptor explicitly...
...
and universally as ValueParameterDescriptors;
update implementation accordingly
2020-10-30 12:57:43 +01:00
Ilya Chernikov
af7102a586
Enable IR backend in script compiler
2020-10-30 12:57:42 +01:00
Ilya Chernikov
d7112a4500
Implement JVM IR support for scripts
2020-10-30 12:57:42 +01:00
Yan Zhulanow
eb9b5da82b
Kapt: Never mark static methods 'default' (KT-42915)
2020-10-28 21:03:26 +09:00
Denis Zharkov
4d9ef4d414
FIR: Get rid of CallableId::classId usages
...
Use dispatchReceiverType or containingClassAttr instead
2020-10-28 11:43:25 +03:00
Yan Zhulanow
9faf91f55d
Fix Parcelize settings serialization (KT-42958)
2020-10-28 00:43:20 +09:00
Mikhail Zarechenskiy
bb2e9e2d56
Extract new method from the publicly used interface for compatibility
...
Note that we can't just use ``@JvmDefault` annotation as the main change
is in the `core` module which targets Java 6
#KT-42259 Fixed
2020-10-27 14:14:39 +03:00
Igor Chevdar
1a9e516dc0
[ir-plugin] Referenced binary operators with the new API
2020-10-23 14:58:33 +05:00
Georgy Bronnikov
b7a07fdf03
Review fix: unify irTemporary variants
2020-10-22 18:31:23 +03:00
Georgy Bronnikov
e5cf7a1be7
Remove descriptor usage from Scope.kt
2020-10-22 18:26:46 +03:00
Leonid Startsev
8d999a2c13
Disable kx.ser plugin inside descriptors serialization in the IDE
...
Since IDE does not perform any serialization of descriptors, and
metadata written to the 'serializationDescriptorSerializer'
deleted only on call to DescriptorSerializer,
enabling this extension in the IDE effectively causes memory leaks.
#KT-39624 Fixed
Pass SerializationDescriptorSerializerPlugin to other extensions directly
instead of using static val in companion.
2020-10-22 17:14:06 +03:00
Leonid Startsev
4ec90b18bc
Rework DescriptorSerializerPlugin to be a part of Project's extensions
...
instead of statically registering it.
Static registering can cause subtle errors when plugin implementation
(e.g. SerializationDescriptorPluginForKotlinxSerialization) is registered
from multiple classloaders: in multi-module with daemon compilation scenario
#KT-41857 Fixed
2020-10-22 17:04:35 +03:00
Georgy Bronnikov
14b3beefb3
IR: IrDelegatingConstructorCall.fromSymbolDescriptor
2020-10-19 12:21:12 +03:00
Georgy Bronnikov
b28c85f5ea
IR: IrCall.fromSymbolDescriptor
2020-10-19 12:21:12 +03:00
Leonid Startsev
0616f948c7
Use actual form of decodeSerializableElement function in 'decodeSequentially'
...
code path in deserialize.
Old 3-argument form is deprecated and should be removed.
2020-10-16 15:24:12 +03:00
Mads Ager
af0999ec6f
[IR] Support isAssignable in builders and serialization.
2020-10-06 21:47:29 +02:00
Mads Ager
1f2ca606a5
[IR] Add isAssignable property to IrValueParameter.
...
Use it to check that only the value parameters that are explicitly
marked assignable are assigned.
Currently, the only parameters marked assignable are those for
default argument stubs.
2020-10-06 21:47:29 +02:00
Mads Ager
8d791ca98e
[IR] Update naming, but not binary format for IrSetValue.
2020-10-06 21:47:29 +02:00
Mads Ager
9a93bb3f09
[IR] Add IR support for setting parameters.
...
Use it in the JVM_IR backend for default values code. The parameter
local has to be overwritten for the inliner to work.
2020-10-06 21:47:29 +02:00
Ilya Chernikov
db23460fd5
Implement proper script runtime exception rendering with tests
...
#KT-42335 fixed
2020-10-06 21:43:11 +02:00
Yan Zhulanow
0dc243d74c
Parcelize: Don't activate both 'kotlin-parcelize' and 'kotlin-android-extensions' in IDE (KT-42267)
...
The actual problem is a lack of plugin activation check in ParcelableUltraLightClassModifierExtension (see how it should be done in ParcelizeUltraLightClassModifierExtension). However, ParcelableUltraLightClassModifierExtension lays inside ADT sources, and it's impossible to make an fast&easy fix from our side. However, we control the compiler plugin on which the IDE support is based, so the check is added there.
There should be no troubles if the application with 'kotlin-android-extensions' includes an Android library with 'kotlin-parcelize' or vise-versa, as runtime libraries of both plugins are attached to the 'implementation' Gradle configuration since AGP 2.5.
2020-10-07 04:11:02 +09:00
Steven Schäfer
714d17ac63
Parcelize, JVM IR: Handle star projected and nullable arrays.
2020-10-06 17:42:35 +02:00
Georgy Bronnikov
80b7194799
IR: remove KotlinType usage from Ir.kt
2020-10-05 11:02:12 +03:00
Ilya Chernikov
5ab822be36
Import scope of the imported script
...
#KT-34178
2020-10-02 18:53:31 +02:00
Leonid Startsev
bdbf8d7980
Use correct class type when creating class references
...
(for e.g. PolymorphicSerializer)
Former class reference may had type arguments in it, which lead to bugs
in JS IR.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1072
2020-10-02 19:11:25 +03:00
Leonid Startsev
d4bdb0eedc
Remove requirement on 'Serializable class must have single primary constructor'
...
#KT-38868 Fixed
#KT-41627 Fixed
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/396
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1049
2020-10-02 19:11:25 +03:00
Ilya Chernikov
d88e87aaac
Fix ScriptDefinition subtyping after earlier refactorings
...
#KT-41905 fixed
(may also fix other yet undetected or not analyzed problems with script
definitions)
2020-10-02 12:38:21 +02:00
Vladimir Dolzhenko
3c380faeb5
Added deprecated PackageFragmentProvider#getPackageFragments for BWC
...
Relates to ^KT-33394
^KT-42259 Fixed
2020-09-29 19:14:44 +00:00
Yan Zhulanow
cfd90c85cb
Kapt: Re-enable JDK 9/11 tests disabled by occasion
2020-09-30 00:31:08 +09:00
Yan Zhulanow
dba1b50aed
Parcelize: Don't write Parcelize model if the Parcelize plugin is disabled
2020-09-29 23:58:30 +09:00
Yan Zhulanow
9cdd6e9a8f
Kapt: Support new @JvmDefault functionality (KT-25960)
2020-09-29 23:58:30 +09:00
Yan Zhulanow
a44fd964cf
Kapt: Don't convert field initializers for enum fields inside companion objects (KT-37732)
...
For classes with companion objects, Kotlin compiler generates a 'Companion' static accessor field.
Java prioritizes fields over inner types (apparently, Scala does this as well, KT-29864), so the generated initializer doesn't compile.
As a workaround, initializer generatation is disabled for enum fields inside companion objects. Certainly, it's not a proper fix, however it does fix the regression.
2020-09-29 23:58:29 +09:00
Yan Zhulanow
db140b2815
Fix Pill debug IDEA run configurations
2020-09-29 23:58:25 +09:00
Yan Zhulanow
62affd8e0d
Kapt: Allow to strip @Metadata annotation from stubs (KT-36667)
2020-09-29 23:58:24 +09:00
Nikolay Krasko
99b9bc83a1
as42: Fix assertEqualsToFile usage
2020-09-29 15:32:34 +03:00
Nikolay Krasko
2df030f583
as42: Apply 201 <-> AS41 diff
2020-09-29 15:32:32 +03:00
Yan Zhulanow
af1ed77d15
Parcelize: Fix NPE on availability check
2020-09-29 02:37:44 +09:00
Mikhael Bogdanov
31ed5430ee
Minor. Update test data
2020-09-25 15:45:56 +02:00
Mads Ager
4e518e77ca
[JVM_IR] Fix expectations for parcelize tests.
...
The generated bridges now have line numbers as for the JVM
backend. There are some extra (irrelevant) labels in the JVM_IR
bytecode listing compared to JVM so expectations can still not
be shared even though they are closer.
2020-09-24 20:52:22 +02:00
Dmitriy Novozhilov
7380abac13
Split AsmUtils to descriptors dependent and independent parts
2020-09-24 16:51:05 +03:00
Dmitriy Novozhilov
d215c413cc
Move TypeMappingMode to :core:compiler.common.jvm
2020-09-24 16:51:05 +03:00
Yan Zhulanow
2d158ffebd
Parcelize: Add tests for deprecated (kotlinx.android.parcel) annotations
2020-09-24 15:50:59 +09:00
Yan Zhulanow
1d5ab192f5
Parcelize: Support old (kotlinx.android.parcel) annotations in Parcelize plugin
2020-09-24 15:50:59 +09:00
Yan Zhulanow
f0b93bf352
Parcelize: Move back annotations from kotlinx.android.parcel, deprecate them
2020-09-24 15:50:59 +09:00