Commit Graph

53 Commits

Author SHA1 Message Date
Steven Schäfer 05da65654e Parcelize: Enable warnings in tests 2021-10-26 17:06:18 +02:00
Steven Schäfer ca74b7becc AsmLikeInstructionListingTest: Handle remaining instructions
Adds argument printing for TypeInsnNode, IincInsnNode,
MultiANewArrayInsnNode, InvokeDynamicInsnNode,
TableSwitchInsnNode, and LookupSwitchInsnNode.
2021-10-26 16:50:12 +02:00
Dmitriy Novozhilov af0e40a0d2 [JS Test] Support RECOMPILE directive in js box tests in new infrastructure 2021-10-25 00:14:21 +03:00
Ivan Kylchik 225b064470 Implement new 'mix' test mode
This mode must be used when one configuration will run several tests
for different JUnit versions.
2021-10-25 00:14:20 +03:00
Dmitriy Novozhilov f0aba5e892 [Test] Update parcelize bytecode testdata 2021-10-12 10:30:13 +03:00
Dmitriy Novozhilov df47bffabb [Test] Migrate Parcelize tests to new test infrastructure 2021-10-07 13:08:45 +03:00
Dmitriy Novozhilov aab8870903 [Test] Migrate AbstractAsmLikeInstructionListingTest to new test infrastructure 2021-10-07 13:08:44 +03:00
Dmitriy Novozhilov bc7cc6b5a9 Move generated parcelize tests to tests-gen directory 2021-10-07 13:08:43 +03:00
Steven Schäfer 00134fddf9 Parcelize: Allow Parcelize annotation on sealed classes
See https://issuetracker.google.com/177856520
2021-09-28 22:16:33 +02:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Steven Schäfer cb46a56815 Parcelize: Support unsigned array types
See https://issuetracker.google.com/200774823
2021-09-22 13:42:04 +02:00
Steven Schäfer 2501013012 Parcelize: Support ShortArray
ShortArrays are broken in the Parcelize JVM backend, which caused a
frontend error on the JVM IR backend.
2021-09-22 13:42:04 +02:00
Steven Schäfer fc013c6b9f Parcelize: Add an intrinsic to access Parcelable CREATOR fields
Fixes KT-19853.

The CREATOR field is a static field on a Parcelable class which is not
visible from Kotlin since the necessary metadata would have to be in a
Companion object which may not exist.

This commit adds a [parcelableCreator] function to kotlinx.parcelize,
which is optimized to a direct field access whenever possible.
2021-09-21 15:09:39 +02:00
Steven Schäfer 897c09bf8d Parcelize: Use the class loader of the Parcelable class for reading
In `readBundle`, `readPersistableBundle`, and `readValue`.
2021-09-21 15:09:04 +02:00
Steven Schäfer dc568426bd Parcelize: Allow IgnoredOnParcel annotations on object properties 2021-09-18 00:26:16 +02:00
Steven Schäfer ae27be16eb AsmLikeInstructionListingTest: Print owner for FieldInsnNode 2021-09-18 00:25:58 +02:00
Dmitry Petrov bcafece28e Minor: update testData 2021-09-03 15:54:19 +03:00
Steven Schäfer b2e6e075ab Parcelize: Fix diagnostics for parcelable value classes 2021-08-31 02:48:03 +02:00
Steven Schäfer 9fd777cb7d Parcelize: Add support for unsigned types on the IR backend 2021-08-27 21:28:31 +02:00
Steven Schäfer 34a200bf09 Parcelize: Refactor AndroidSymbols 2021-08-27 21:28:31 +02:00
Steven Schäfer 2f7bc8ca79 Parcelize: Add tests for parcelable value classes 2021-08-27 21:26:46 +02:00
Steven Schäfer a743669bc9 Parcelize: Fix type signatures in parcelable creator objects
These objects are visible from annotation processors and should not
refer to the type parameters of enclosing parcelable classes.
2021-08-27 21:26:46 +02:00
Steven Schäfer 0bbb36e765 Parcelize: Add tests for obsolete issues 2021-08-27 21:26:46 +02:00
Steven Schäfer de9d2919a8 JVM Metadata: Add a bit to mark anonymous objects in inline functions
Anonymous objects in the scope of an inline functions are copied to
all call-sites. This makes them part of the public ABI of a Kotlin
library.

We introduce a flag to mark all classes in the scope of an inline
function. When compiling with assertions enabled, we check that
this flag is set whenever we inline an anonymous object from another
module.
2021-08-23 18:25:33 +02:00
Ilya Chernikov dee0487185 IR: Refactor IrBuiltIns to abstract it from descriptors 2021-07-16 02:24:18 +03:00
Nikolay Krasko 48a4d7d418 Build: drop maven publication for Kotlin plugin artifacts 2021-06-09 17:43:54 +03:00
Steven Schäfer bf7db84451 Parcelize: Handle class hierarchies of Parcelers (KT-46567) 2021-05-18 18:52:15 +02:00
Yan Zhulanow cc4c61d2b3 Remove dependency on parcelize-runtime in the Parcelize compiler plugin 2021-05-14 01:06:39 +09:00
Nikolay Krasko f30980806f Read process streams to avoid hanging on Windows in parcelize tests
Could be reproduced with ParcelizeBoxTestGenerated.testKt36658 test.
2021-05-12 12:58:02 +03:00
Nikolay Krasko 818bbbbb83 Don't print to log in successful parcelize tests 2021-05-12 12:58:01 +03:00
Vyacheslav Gerasimov f2a892a972 Cleanup 201 and as41 bunch files 2021-03-30 14:23:43 +03:00
Alexander Likhachev 6bd44df861 [Build] Fix configuration cache issues (part 6)
Make DexMethodCountStats task class, tasks :examples:kotlin-jsr223-daemon-local-eval-example:test,:idea:idea-fir:test, :idea:idea-fir-performance-tests:test, :idea:idea-frontend-fir:test, :idea:idea-frontend-fir:idea-fir-low-level-api:test, :kotlin-compiler-client-embeddable:test, :kotlin-compiler-embeddable:test, :kotlin-stdlib-js-ir:compileTestKotlinJs, :plugins:android-extensions-compiler:test, :plugins:parcelize:parcelize-compiler:test, :compiler:test compatible with configuration cache
Relates to #KT-44611
2021-03-11 14:12:36 +03:00
Alexander Udalov 566f97ae3e JVM IR: remove dependency of 'backend.jvm' on 'psi2ir', 'ir.serialization.jvm'
Add a new module 'backend.jvm.entrypoint' which depends on psi2ir and
contains code that runs psi2ir + JVM IR backend with serialization
implementations.

Hopefully this will allow to compile these modules in parallel and
reduce the build time.
2021-03-05 20:46:33 +01:00
Andrey Zinovyev 95140f35f8 [parcelize] Fix codegen for generic classes
Replace type arguments with star projection in static methods
Fix IR function generation

^KT-42652  Fixed
2021-02-04 15:11:51 +03:00
Mads Ager ef36b81c67 [JVM_IR] Reduce the amount of super suffixes on accesibility bridges.
The super suffix was used for any static field/method that needed
an accessor. We should only use it when that field or method is
inherited.
2021-01-22 13:20:25 +01:00
Alexander Udalov ed9a0e514d Regenerate tests and fir-tree 2021-01-03 14:53:41 +01:00
Dmitriy Novozhilov bc7e18fb8a [TEST] Regenerate tests after previous commit 2020-12-16 19:52:28 +03:00
Dmitriy Novozhilov c8f3a4802e [TEST] Introduce test-infrastructure-utils module and extract common test utilities here 2020-12-16 19:52:22 +03:00
Denis.Zharkov 2d8a8d252b Add 201 bunch files for JavaClass implementations
In 201, there's an old ASM version and PSI doesn't have record-related API
2020-12-09 16:47:25 +03:00
Denis.Zharkov 26d525fa3c Prepare ClassBuilder for record components
^KT-43677 In Progress
2020-12-09 16:29:04 +03:00
Dmitriy Novozhilov e251a9be14 Build: fix finding layout-api jar in parcelize box test due to platform change 2020-11-28 14:25:57 +03:00
Ilmir Usmanov 2cd9016016 IC mangling: Replace compiler hack with configuration flag 2020-11-19 17:39:30 +01:00
Yan Zhulanow 7b98876475 Parcelize: Fix typo in diagnostic message (KT-43290) 2020-11-13 17:37:21 +09:00
Yan Zhulanow 5f7d7ff9c7 Parcelize: Activate checkers only when the plugin is enabled for module (KT-43291) 2020-11-12 05:38:27 +09:00
Yan Zhulanow e83a3c3f27 Parcelize: Use @Parcelize annotations from Android Extensions instead of the copied&deprecated ones (KT-42342, KT-43150)
Dex can't merge class files from both android-extensions-runtime and parcelize-runtime, so we have to keep only one copy of each class.
Instead of @Deprecated annotations, there are new diagnostics (without quick-fixes yet).
The goal is to allow simple usages (@Parcelize alone) but forbid kotlinx.android.synthetic.Parceler usage.
2020-11-11 04:25:07 +09:00
Alexander Udalov e5d5c20473 Minor, suppress deprecation warnings in parcelize plugin 2020-11-03 14:00:53 +01:00
Georgy Bronnikov b7a07fdf03 Review fix: unify irTemporary variants 2020-10-22 18:31:23 +03:00
Mads Ager af0999ec6f [IR] Support isAssignable in builders and serialization. 2020-10-06 21:47:29 +02:00
Steven Schäfer 714d17ac63 Parcelize, JVM IR: Handle star projected and nullable arrays. 2020-10-06 17:42:35 +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