Commit Graph

64863 Commits

Author SHA1 Message Date
Mikhail Glukhikh cd2f5895a6 FIR: add minor fix of super reference handling 2020-05-07 12:02:57 +03:00
Jinseong Jeon 7b01cf7b04 FIR: handle labeled super reference properly 2020-05-07 12:02:56 +03:00
Victor Petukhov 260683c20e NI: Improve postponed arguments analysis
Introduce seven stages:
1) Analyze postponed arguments with fixed parameter types
2) Collect parameter types from constraints and lambda parameters' declaration
3) Fix not postponed variables for parameter types of all postponed arguments
4) Create atoms with revised expected types if needed
5) Analyze the first ready postponed argument and rerun stages if it has been analyzed
6) Force fixation remaining type variables: fix if possible or report not enough information
7) Force analysis remaining not analyzed postponed arguments and rerun stages if there are

^KT-37952 Fixed
^KT-32156 Fixed
^KT-37249 Fixed
^KT-37341 Fixed
2020-05-07 11:42:00 +03:00
subroh0508 50151e0e01 [Gradle, JS]AbstractNpmDependencyExtension -> DefaultNpmDependencyExtension 2020-05-07 10:21:51 +03:00
subroh0508 abf942b928 [Gradle, JS]Add optionalNpm methods 2020-05-07 10:21:51 +03:00
subroh0508 34e8b11475 [Gradle, JS]Add directoryNpmDependency method 2020-05-07 10:21:51 +03:00
subroh0508 121897133e [Gradle, JS]Delete peerNpm method used by file argument 2020-05-07 10:21:51 +03:00
subroh0508 231324d119 [Gradle, JS]Add peerNpm method for peerDependencies to KotlinDependencyHandler 2020-05-07 10:21:51 +03:00
subroh0508 3e2feac4ea [Gradle, JS]Add devNpm method for devDependencies to KotlinDependencyHandler 2020-05-07 10:21:51 +03:00
Dmitriy Novozhilov 726a871c07 [FIR] Add dependency of :dist to :firAllTest 2020-05-07 09:42:21 +03:00
Dmitriy Novozhilov 41545cd2b4 [FIR] Initialize origin in all places with creating of declarations 2020-05-07 09:42:20 +03:00
Dmitriy Novozhilov e515b1c823 [FIR] Add origin field to FirDeclaration 2020-05-07 09:42:20 +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
Steven Schäfer 7cad2be329 IR: Add an extension point after IR construction
The existing IrGenerationExtension is in the middle of IR construction
and basically requires plugins to work with the (deprecated) descriptors.

Since there are plans to change the IR extension point it makes sense to
introduce a temporary work-around to allow pure IR plugins to be
developed now, which could be ported to a more permanent API later.
2020-05-06 22:51:12 +02:00
Nicolay Mitropolsky 6ae7d53a93 Uast: support extendsList for reified types (KT-38173) 2020-05-06 15:31:20 +03:00
Nicolay Mitropolsky 43549baf58 Revert "Uast: forcing kotlin.uast.force.uinjectionhost=true always"
This reverts commit e4b7c391
2020-05-06 15:31:20 +03:00
Nicolay Mitropolsky 00b44c1e68 Uast: making KotlinStringTemplateUPolyadicExpression.operands always non-empty (EA-231393) 2020-05-06 15:31:19 +03:00
Nicolay Mitropolsky b7e715045a Uast: skip KtWhenConditionWithExpression in UAST (KT-38521)
when building parents, because they are anyway ignored in converter
2020-05-06 15:31:19 +03:00
Nicolay Mitropolsky 903f35ce0c Uast: don't fall on empty when entries (EA-231339) 2020-05-06 15:31:19 +03:00
Dmitry Petrov 3143b15a17 Generate widening cast for Byte and Short to Int 2020-05-06 14:42:37 +03:00
Mikhail Glukhikh 427973fe48 FIR serializer: fix typo in finding argument name 2020-05-06 13:10:13 +03:00
Jinseong Jeon deb8e1f9db IR: cleanup unused implementation in WrappedDescriptors
This is partial revert of 08ca6f5, which set metadata field of IR
symbols during FIR2IR conversion, triggering some paths in IR
codegen to use wrapped descriptors copy builder and others to
serialize. Now FIR element-based metadata serialization is in,
those additions were not needed anymore.
2020-05-06 13:10:07 +03:00
Jinseong Jeon 0c7ed04260 FIR: make (K)SuspendFunctionX derived from (K)Function 2020-05-06 13:09:32 +03:00
Mikhail Glukhikh 9eee089740 FIR: regenerate diagnostic tests 2020-05-06 13:09:26 +03:00
Mikhail Glukhikh f7137fe860 Slightly polish FirAnnotationClassDeclarationChecker 2020-05-06 10:42:39 +03:00
Likholetov Mikhail aa706d322d [FIR] Support several annotation class diagnostics 2020-05-06 10:32:01 +03:00
Mikhail Zarechenskiy 1e8dff6a7c Fix bunch files after removing IDE option
Follow-up of c01a171d
2020-05-04 15:48:33 +03:00
Mikhail Zarechenskiy b2ca61e8a5 Fix compilation, remove import 2020-05-04 15:43:46 +03:00
Mikhail Zarechenskiy c01a171d4c Revert "Add option to enable new inference only for IDE analysis"
This reverts commit a3247b1b92.

 #KT-37378 Fixed
2020-05-04 15:14:43 +03:00
Mikhail Zarechenskiy d7dfe9e1e5 FUS Collector: remove metric about using new inference in IDE
Now it's not needed as new inference is enabled by default
2020-05-04 15:14:28 +03:00
Alexander Udalov 54f9f130e2 Do not generate references as adapted with -Xno-optimized-callable-references
The reason for this is that this flag is used right now in 'cli-common'
to workaround the problem that this module is compiled with API version
1.4, but runs with stdlib of version 1.3 (bundled to Gradle). The same
problem would appear with adapted function references, since we use
kotlin/jvm/internal/AdaptedFunctionReference in the bytecode, only
available since 1.4.

The fix is to generate adapted references in this case as subclasses of
the already existing kotlin/jvm/internal/FunctionReference. This can
change behavior in some extreme corner cases (because such references
can now be observed to have reflection capabilities), but it's an -X
argument anyway.

Another option would be to introduce another compiler argument
specifically for this, but it looks like it would only complicate things
without much benefit.
2020-05-04 13:24:53 +02:00
Mikhail Bogdanov 4f7599076c Postpone JvmDefault deprecation. Revert "Deprecate @JvmDefault"
This reverts commit c11f3868
2020-05-04 10:02:16 +02:00
Vladimir Dolzhenko 911dfde0fe Add highlighting perf test with empty profile 2020-05-04 09:48:17 +02:00
Dmitry Gridin 32be4c03ca ExtractSuperRefactoring: add quoteSegmentsIfNeeded() 2020-05-04 03:49:32 +00:00
Dmitry Gridin 86de734f26 KotlinExtractSuperclassDialog: cleanup code 2020-05-04 03:49:31 +00:00
Dmitry Gridin ccfea97390 CopyKotlinDeclarationsHandler: fix for package with backticks
#KT-38543 Fixed
2020-05-04 03:49:30 +00:00
Dmitry Gridin b058dc12df packageUtils: cleanup code 2020-05-04 03:49:30 +00:00