Commit Graph

250 Commits

Author SHA1 Message Date
Dmitriy Novozhilov d1fd1da56f Rename Visibility to DescriptorVisibility 2020-09-04 11:07:42 +03:00
Alexander Udalov a810dbb41b IR: fix compiler warnings 2020-08-18 10:33:25 +02:00
Alexander Udalov 9607414cf1 IR: make allOverridden return Set instead of Sequence, move to IrUtils
This doesn't hurt performance, but improves stack traces, in particular
in JVM's BridgeLowering.
2020-08-14 21:55:37 +02:00
Georgy Bronnikov 18ae665d41 IR: make IrCall take IrSimpleFunctionSymbol 2020-08-12 16:31:31 +03:00
Georgy Bronnikov 04d93dfbce IR: move containerSource from descriptor to IrFunction, IrProperty 2020-08-10 10:16:23 +03:00
Alexander Udalov cce55f1609 IR: add module ir.tree.impl, move main IR implementation there 2020-07-28 19:04:44 +02:00
Alexander Udalov d1dc938a5d IR: use IrFactory in IR builders 2020-07-28 12:05:24 +02:00
Alexander Udalov e674226a3b IR: do not use Ir*Impl elements where it's not necessary 2020-07-10 16:17:06 +02:00
Alexander Udalov dbad81473e IR: make IrMetadataSourceOwner.metadata mutable
To avoid casting to specific Ir*Impl elements at call sites.

Also inherit from IrMetadataSourceOwner only where it's needed: class,
file, function, property. Previously this field was always null and took
some space for things like value parameters, type parameters, etc.
2020-07-10 16:17:05 +02:00
Mikhail Bogdanov 929bb0e8d1 Move common logic from CodegenTestCase to KotlinBaseTest 2020-06-19 11:57:36 +02:00
Mikhail Glukhikh ab5cb13dae Rename: DescriptorBasedIr -> ObsoleteDescriptorBasedAPI 2020-06-16 19:17:14 +03:00
Mikhail Glukhikh cbbb497edf Make descriptor-based API in ir:tree more granular 2020-06-16 19:17:12 +03:00
Jinseong Jeon b93868c30b IR: migrate IrType utils about array element type. 2020-05-27 11:38:32 +03:00
Steven Schäfer 9b7a95b05c Parcelize: Fix test code
On Android, we would need to call `setDataPosition(0)` after
unmarshalling a parcel. The reason why the test code is currently
working is purely because the Robolectric test framework is more
permissive.
2020-05-27 02:39:29 +09:00
Steven Schäfer d93e5d3dc0 Parcelize: Enable ParcelableDeclarationChecker with the parcelize plugin
Previously, the ParcelableDeclarationChecker was only enabled as part of
the view extensions. In particular, the checker was not enabled for the
parcelize test suite.
2020-05-27 02:39:29 +09:00
Steven Schäfer f93749ae6a Parcelize: Fall back to readValue/writeValue if no other serializers are available 2020-05-27 02:39:28 +09:00
Steven Schäfer 8d364a8a1a Parcelize: Resolve parcel serializers on demand 2020-05-27 02:39:28 +09:00
Steven Schäfer cfe168021a Parcelize: Remap functions in overridden symbols and callable references 2020-05-27 02:39:28 +09:00
rbares b39a65305d Fix Parcelize codegen tests following rebase 2020-05-27 02:38:45 +09:00
rbares 8a9610d3af Update Parcelize codegen tests 2020-05-27 02:38:45 +09:00
rbares 00ec50ff73 Fix Parcelize annotation implementing Parcelable.Creator<T> 2020-05-27 02:38:45 +09:00
Roman Artemev 6f2972ee8b [ANDROID] Move Parcelize plugin to general IrGenerationExtension API 2020-05-26 14:38:18 +03:00
Mikhail Glukhikh b05a1bb1a2 [IR] Extract IrExternalPackageFragmentImpl.createEmptyExternalPackageFragment 2020-05-25 15:40:37 +03:00
Roman Artemev 19e352a1b5 [ANDROID] Simplify parcelize ir plugin code
- avoid direct usages of CommonBackendContext & Backend Symbols
2020-05-12 14:29:55 +03:00
Roman Artemev c20aa297f1 [ANDROID] Fix Parcelize reslove extension plugin
- make it provide its synthetic members names
2020-05-12 14:29:55 +03:00
Alexander Udalov 7a369b3a6a Mark PureIrGenerationExtension as deprecated to prevent more usages
The IR plugin extension mechanism is being reworked and in the new
scheme, this new extension point won't be necessary.
2020-05-06 22:51:32 +02:00
Steven Schäfer 9fc210224d Parcelize: Fix IBinderIInterface test 2020-05-06 22:51:12 +02:00
Steven Schäfer 518c7a32b8 Parcelize: Add a test for efficient Parcelable serialization within the same module 2020-05-06 22:51:12 +02:00
Steven Schäfer a4e6dbb0d7 Parcelize: Add test for TypeParceler scoping behavior 2020-05-06 22:51:12 +02:00
Steven Schäfer b35e8e208a Parcelize: Add a test for Parcelize with persistable bundles 2020-05-06 22:51:12 +02:00
Steven Schäfer 43bccff135 Parcelize: Add a test for parcelize of IBinder and IInterface 2020-05-06 22:51:12 +02:00
Steven Schäfer 6cf3e0e38e Parcelize: Add a test for exceptions in parcels (KT-31830) 2020-05-06 22:51:12 +02:00
Steven Schäfer 21637c828e Parcelize: Add a test for Java interop (KT-25807) 2020-05-06 22:51:12 +02:00
Steven Schäfer aa0eeba327 Parcelize: Add a test for KT-36658 2020-05-06 22:51:12 +02:00
Steven Schäfer 01ea2a641f Parcelize: Add test for KT-26221 2020-05-06 22:51:12 +02:00
Steven Schäfer 1552e55474 Parcelize: Add an exhaustive test for primitive types 2020-05-06 22:51:12 +02:00
Steven Schäfer 1f97486fdd Parcelize: Improve testing infrarstructure
- Support newer android versions
- Allow testing against Java files using android APIs
- Update test expectations
- Auto-generate ParcelBoxTests
- Create tests for the JVM IR backend
2020-05-06 22:51:12 +02:00
Steven Schäfer d62b353ab5 Parcelize: Fix metadata and remap synthetic descriptor stubs 2020-05-06 22:51:12 +02:00
Steven Schäfer 779133e71e Parcelize: Implement support for the JVM IR backend. 2020-05-06 22:51:12 +02:00
pyos 9b68e4fe56 Android/IR: handle nulls from getView/getContainerView
Turns out it's possible to create an IR builder without a backend
context
2020-03-03 14:19:47 +09:00
Stanislav Erokhin 453008e488 Deprecated reportFromPlugin way to report diagnostics from plugin
Originally reportFromPlugin method was introduced to address the problem
with loading of DefaultErrorMessages.Extension vis ServiceLoader.
For some cases this extension was not loaded by ServiceLoader because
classes was loaded via different class loader, common scenario here is
compiler plugins. Ideally we should load such extension point via
getService approach, but unfortunately to do that we need project and
DefaultErrorMessages.render is static method for now.
Also with reportFromPlugin approach is a problem -- all diagnostics
reported via this method has the same id: PLUGIN_[WARNING|ERROR|INFO]
and it isn't possible to suppress only one particular diagnostic.
To bypass this problem the new method
initializeFactoryNamesAndDefaultErrorMessages was introduced.
It basically store DiagnosticRenderer inside DiagnosticFactory.
It is not ideal, because one DiagnosticFactory could have different
renderers for different scenarios -- for compiler and for IDE, but
I think that it is better than reportByPlugin approach.
2020-02-26 12:12:31 +03:00
pyos ca3c1d04c5 Add an IR version of Android Extensions blackbox tests 2020-01-24 18:12:21 +09:00
pyos 4094841dc6 Add a basic IR extension to the Android plugin
Only supports uncached findViewById/findFragmentById for now; other
features are experimental and the cache only affects performance, so
this should probably be fine for testing Android apps with -Xuse-ir.
2020-01-24 18:12:21 +09:00
Alexander Udalov 8a4510c21b Regenerate tests 2020-01-02 10:31:00 +01:00
Dmitriy Novozhilov e7f8c8e155 [TEST] Regenerate tests after previous commit 2019-12-12 16:11:45 +03:00
Vyacheslav Gerasimov 3b088818a5 Build: Add sources and javadocs to Kotlin Plugin publication 2019-11-01 16:22:42 +03:00
Vyacheslav Gerasimov 38ea5a85a3 Build: Add maven publication for Kotlin plugin artifacts 2019-10-24 17:06:19 +03:00
Nikolay Krasko 4ed64b0283 Regenerate tests with TargetBackend.ANY remove and using runTest with this 2019-10-23 12:49:48 +03:00
Nikolay Krasko 2c0ce40f75 Refactoring: extract test dummy traces 2019-10-23 12:49:47 +03:00
Igor Yakovlev 3f9bffcc5f Move UL compiler plugin support to separate extension point 2019-10-18 23:22:47 +03:00