Commit Graph

87184 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
Ilmir Usmanov 7ec9d608cc Use original instead of lowered suspend function
as a key to view. Otherwise, SAM conversions will break.
 #KT-49294 Fixed
2021-10-26 14:14:12 +00:00
Roman Golyshev 8e911b1e98 [FIR IDE] Add fast path to isImplicitFunctionCall and improve its kdoc 2021-10-26 16:48:00 +03:00
Pavel Kunyavskiy 4b49356a56 [K/N] Remove some descriptor usages from lowerings 2021-10-26 13:26:04 +00:00
Pavel Kunyavskiy 55ac3e78d2 [K/N] Remove some descriptor usages from Ir.kt 2021-10-26 13:26:03 +00:00
Jinseong Jeon d8df177b83 FIR LC: fix return type of suspend function 2021-10-26 14:12:29 +02:00
Jinseong Jeon 5ed9cac0cc FIR LC: populate continuation parameter for suspend function 2021-10-26 14:12:28 +02:00
Yahor Berdnikau 98791000bf Add @GradleWithJdkTest annotation.
Adding this annotation to the test will provide requested JDKs + Gradle
versions matrix as test parameter.

It is also possible to filter out supported by Gradle version JDKs.

^KT-45745 In Progress
2021-10-26 11:50:18 +00:00
Yahor Berdnikau ca3e1b18dc Add all supported Gradle versions.
^KT-45745 In Progress
2021-10-26 11:50:17 +00:00
Mikhail Glukhikh 37b95972db Uncomment warning about -Xopt-in deprecation 2021-10-26 13:38:40 +03:00
Mikhail Glukhikh 1fe7a1ebb3 Add FIR test for KT-35565 2021-10-26 13:38:35 +03:00
Mikhail Glukhikh 5deb96f679 Fix RENDER_CLASS_OR_OBJECT renderer for interface case #KT-38698 Fixed 2021-10-26 13:38:35 +03:00
Mikhail Glukhikh 9da7a24915 Fix error message for OPT_IN_IS_NOT_ENABLED #KT-45001 Fixed 2021-10-26 13:38:34 +03:00
Mikhail Glukhikh 994c51c3e9 Fix/add message for SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC
#KT-44975 Fixed
2021-10-26 13:38:32 +03:00
Svyatoslav Scherbina 99447a11c1 Native: fix ^KT-49384
Don't report errors for projections in nested type arguments of
SAM conversion target types.
2021-10-26 10:12:30 +00:00
Svyatoslav Scherbina 65bea27431 Native: add test for ^KT-48876
The issue itself was already fixed in 981a6ffe.
2021-10-26 10:10:26 +00:00
nataliya.valtman eec4ac644c KT-49159 Transform KotlinGradleBuildService to BuildService 2021-10-26 09:56:15 +00:00
Tianyu Geng e195f0426e FIR IDE: add KtExtensionReceiverSymbol
This symbol represents the extension receiver of a callable and
currently is used as the resolution target of `this` in a callable with
extension.
2021-10-26 08:50:38 +00:00
Tianyu Geng d3c91ee9be FIR IDE: align resolution behavior of super with FE1.0
That is, for a labeled `super`, the keyword should resolve to the super
type and the label should be resolved to the current type.
2021-10-26 08:50:37 +00:00
Tianyu Geng 0d966ec65a FIR IDE: resolve implicit invoke to callable property 2021-10-26 08:50:37 +00:00
Sergej Jaskiewicz b27b202c28 [IR] Deduplicate StringConcatenationLowering in K/N
The common lowering is updated based on
fac1cf189c
2021-10-26 08:44:52 +00:00
Mattia Iavarone c92e34ca9f [Native] Enable real Android Native executables (#4624)
* Add AndroidProgramType binary option, override entry point, fix linker flags

* Add Konan_main_standalone entry point to the Android runtime

* Add compiler warning

* Make standalone programs print to stdout

* Fix warning message and readability
2021-10-26 11:33:17 +07:00
Tianyu Geng 6a59dc7fa5 FIR: add bfs helper and use it
It's also used in Kotlin quickfixes in intellij repo
2021-10-26 00:42:09 +02:00
Ilya Kirillov a11cd74b28 Revert "FIR: add bfs helper and use it"
This reverts commit dbb0496d23.
2021-10-26 00:37:31 +02:00
Tianyu Geng dbb0496d23 FIR: add bfs helper and use it
It's also used in Kotlin quickfixes in intellij repo
2021-10-26 00:06:00 +02:00
Mattia Iavarone 64a0d492b9 Fix Arm32 atomics 2021-10-25 22:31:15 +03:00
Ivan Kochurkin 489c9ae11f [FIR2IR] Recognize postfix inc/dec blocks in sequence of statements 2021-10-25 21:21:45 +03:00
Ivan Kochurkin c13822a2c5 Optimize containsKey -> get pattern 2021-10-25 21:21:44 +03:00
Ivan Kochurkin 82591bb107 [FIR2IR] More accurate equals intrinsic for double/float types 2021-10-25 21:21:43 +03:00
Ivan Kochurkin b4fada82ae [FIR2IR] Fix conversion of loops with withIndex 2021-10-25 21:21:42 +03:00
Ivan Kochurkin a2ec99e38c [FIR2IR] Get rid of creating fake FirBlock in Fir2IrVisitor 2021-10-25 21:21:41 +03:00
Ivan Kochurkin 3210a2a950 [FIR2IR] Recognize postfix inc/dec pattern from block statements 2021-10-25 21:21:40 +03:00
Ivan Kochurkin 0d91e16a15 [FIR2IR] Fix considering of Contains intrinsic 2021-10-25 21:21:40 +03:00
Ivan Kochurkin 15d23f2a72 [FIR2IR] Fix applying of equals intrinsics 2021-10-25 21:21:39 +03:00
Ivan Kochurkin 31507e7e7e [FIR2IR] Fix origin for desugared blocks (to enable jvm optimization lowering)
Move getIrAssignmentOrigin to ConversionUtils
2021-10-25 21:21:37 +03:00
Ivan Kochurkin 4bafa8628e [FIR2IR] Fix generating of IINC instruction with FIR for inc/dec with constants 2021-10-25 21:21:35 +03:00
Ivan Kochurkin 98596eaa08 [FIR2IR] Fix generating of IINC instruction with FIR for inc/dec operations 2021-10-25 21:21:33 +03:00
Roman Golyshev 3148913e60 Fix test data
It is a follow-up commit for 9b3add0130,
where `CorrespondingProperty` property was added
2021-10-25 21:15:37 +03:00
Jinseong Jeon 9524825662 FIR LC: approximate local type only if it's necessary and out of scope 2021-10-25 20:24:48 +03:00
Jinseong Jeon 9ed2c9d371 FIR LC: add tests about type approximation in PsiType provider 2021-10-25 20:24:48 +03:00
Dmitry Petrov c441980c74 JVM_IR don't move inplace arguments with variable stores
KT-49370
KT-49407
2021-10-25 20:11:42 +03:00
Dmitry Petrov 45a4cea655 IR KT-49372 cache progression loop parameters if their values can change 2021-10-25 19:03:13 +03:00
Tianyu Geng 7fb82232cd FIR IDE: use correspondingProperty in ref shortener 2021-10-25 18:16:32 +03:00
Tianyu Geng 9b3add0130 FIR: add pointer from primary constructor param to correspondng property 2021-10-25 18:16:31 +03:00
Tianyu Geng 112f365414 FIR IDE: fix ref shortener on property in primary constructor
Currently the shortener ignores the created FirProperty, as a result,
any annotations declared on the getter or setter are ignored. The test
is added in Intellij repo.
2021-10-25 18:16:31 +03:00
Roman Artemev 9f52326d14 [JS IR] Fix default arguments in suspend functions
Don't forget to remap parameter references in default arg expressions

The issue originally discovered in kotlinx.coroutines tests.

 - add test
2021-10-25 12:56:16 +00:00
Roman Artemev 1d58fd159a [IR] Replace adhoc remappers to common one ValueRemapper 2021-10-25 12:56:16 +00:00
Roman Artemev 9490f9da43 [IR] Add ValueRemapper to avoid reimplementing it each time 2021-10-25 12:56:16 +00:00
Tianyu Geng 363b25504d FIR checker: report REDUNDANT_LABEL_WARNING
Since many labels are not present in the FIR tree, this checker is
implemented as a syntax checker. Comparing with FE1.0, this change
reports some REDUNDANT_LABEL_WARNING that FE1.0 has missed, especially
LHS of assignments.
2021-10-25 13:51:01 +03:00