Commit Graph

60438 Commits

Author SHA1 Message Date
Mikhail Glukhikh 6b4e5bc2f0 [FIR] Cleanup code and fix type check in SAM resolution 2020-01-10 10:23:53 +03:00
Juan Chen c464322b3a [FIR2IR] Fix translation of library func parameters with default values
In the existing implementation, the information that a library function
parameter has a default value is lost during Fir2Ir translation,
and thus later on,
calls to such functions are not converted to the corresponding stubs.

Test cases such as kt5844, which calls kotlin.test.assertEquals,
fail with messages like "java.lang.IllegalArgumentException:
Null argument in ExpressionCodegen for parameter VALUE_PARAMETER
name:message index:2 type:kotlin.String?",
due to nonnull checks in ExpressionCodegen.visitFunctionAccess
(ExpressionCodegen.kt:421)

Functions defined in the code to be compiled don't have this problem,
only those from deserializing jars.

This commit sets default values in IrValueParameterImpl
for such parameters during Fir2Ir translation.
Now kt5844 passes the nonnull check in
ExpressionCodegen.visitFunctionAccess but still fails in a later stage
(java.lang.ClassNotFoundException: kotlin.internal.ir.Intrinsic).
2020-01-10 10:23:53 +03:00
Juan Chen 7eaac0bf2a [FIR]: allow char comparison in Fir2Ir 2020-01-10 10:23:53 +03:00
Juan Chen d407663734 Add another binding for wrapped parameter descriptors. 2020-01-10 10:23:53 +03:00
Juan Chen d3b21aed8a [FIR]: add missed bindings for WrappedReceiverParameterDescriptor. 2020-01-10 10:23:53 +03:00
Mikhail Glukhikh ea267d9ef4 [FIR IDE]: support enum entry search properly 2020-01-10 10:23:52 +03:00
Mikhail Glukhikh 2f6a48f70c Handle phase for FirEnumEntry correctly 2020-01-10 10:23:52 +03:00
Mikhail Glukhikh 05ee6fdd77 Add problematic enum test 2020-01-10 10:23:52 +03:00
Mikhail Glukhikh 7e946c6f5b Forbid manual phase updates during FIR compilation (non-IDE mode) 2020-01-10 10:23:52 +03:00
simon.ogorodnik 961037506a FIR2IR: support FirEnumEntry 2020-01-10 10:23:51 +03:00
Mikhail Glukhikh 3671c8489f FirEnumEntry: set correct child class name 2020-01-10 10:23:51 +03:00
Mikhail Glukhikh 97670e5036 [Raw FIR] Fix PSI consistency test (enum entry) + some cleanup 2020-01-10 10:23:51 +03:00
Mikhail Glukhikh 2b05320ae9 [Raw FIR] Synchronize enum entry building in PSI / light AST modes 2020-01-10 10:23:51 +03:00
simon.ogorodnik 65a44e2e20 Migrate to FirEnumEntry 2020-01-10 10:23:50 +03:00
simon.ogorodnik 5b5a5292b7 Support FirEnumEntry in FirRenderer 2020-01-10 10:23:50 +03:00
simon.ogorodnik c6e28537ff Create node for FirEnumEntry 2020-01-10 10:23:50 +03:00
Simon Ogorodnik 13132e69a3 [FIR] Start enum entries reworking 2020-01-10 10:23:50 +03:00
Ilya Matveev 68d64f1b5c IDEA plugin: Don't create iOS test in the share lib project template
Since 1.3.70 an iOS simulator test task is created by the MPP Gradle
plugin out of the box. So we stop creating such a task manually in
the shared library project template.

Issue #KT-35560 Fixed.
2020-01-10 11:52:34 +07:00
Ilya Gorbunov c084dfa1d7 [JS IR] stdlib: use 'base' plugin instead of kotlin("jvm")
'base' plugin is enough in this case, given that a couple of tasks is registered and configured manually.

Fix kotlin-reflect dependency to be a project dependency.
2020-01-09 22:57:50 +03:00
Ilya Gorbunov a9fec21178 [JS IR] stdlib: switch between artifacts rather than artifact content
The switch `includeStdlibJsIr` now affects which artifact is published:
the one with IR or the one without. Previously it affected
whether or not IR was bundled into the artifact "with IR".
2020-01-09 22:57:45 +03:00
Ilya Gorbunov 372a4009bd Fix coreLibsInstall composite task again
See the commit f0e67f8397 for details
2020-01-09 22:54:57 +03:00
Georgy Bronnikov 8d0ffa1444 IR: copy type parameters for local functions in LocalDeclarationLowering
Local functions raised in LocalDeclarationLowering continue to refer to
type parameters that are no longer visible to them.
This commit only adds new type parameters to their declarations, which
makes JVM accept those declarations. The generated IR is still
semantically incorrect (needs further fix), but code generation seems
to proceed nevertheless.
2020-01-09 22:10:27 +03:00
Georgy Bronnikov 01da7f289b JVM_IR: rework type parameters in AddContinuationLowering 2020-01-09 22:10:27 +03:00
Georgy Bronnikov d81231fdf7 JVM_IR: fix type arguments in inline callable references 2020-01-09 22:10:27 +03:00
Georgy Bronnikov a67df82b1e IR: modify IrTypeParametersContainer.copyTypeParameters() 2020-01-09 22:10:27 +03:00
Pavel Kirpichenkov 96c1b96f3a [NI] Report "not enough information" on callable references in lambdas
^KT-34314 Fixed
2020-01-09 20:43:15 +03:00
Mads Ager 4e4e57f60a JVM_IR: deal with inline class default values in AddContinuationLowering.
Whenever we want the default 0/null value for a type we need to
check if it is a non-nullable inline class type and produce
the right value for the underlying type.
2020-01-09 18:05:28 +01:00
Mark Punzalan 31ba2d64db [JVM IR] Mangle variable names for anonymous parameters in lambdas. 2020-01-09 17:57:50 +01:00
pyos 88cac53d88 JVM_IR: skip synthetic enum parameters in signatures 2020-01-09 15:58:59 +01:00
anastasiia.spaseeva 94c008872e [Spec tests] Fix tests 2020-01-09 17:16:13 +03:00
anastasiia.spaseeva 7dc469b32d [Spec tests] Minor changes of TestInfoParser and Generated files 2020-01-09 17:16:13 +03:00
anastasiia.spaseeva e0743f2268 [Spec tests] Add fixed tests for expressions section, fix linkage for reference-equality-expressions section 2020-01-09 17:16:12 +03:00
anastasiia.spaseeva 9e3ecbd902 [Spec tests] Add codegen tests for indexing-expression (paragraph 3) 2020-01-09 17:16:12 +03:00
anastasiia.spaseeva 0a1b8a928c [Spec tests] Add tests for not-null-assertion-expression 2020-01-09 17:16:12 +03:00
anastasiia.spaseeva e4d12593be [Spec tests] Add tests for postfix-expressions, postfix-decrement-expression && postfix-increment 2020-01-09 17:16:12 +03:00
anastasiia.spaseeva 7980db8613 [Spec tests] Add tests for prefix-expressions, logical-not--expression 2020-01-09 17:16:12 +03:00
anastasiia.spaseeva e5a9a58d65 [Spec tests] Add tests for prefix-expressions, unary-minus-expression and unary-minus-expression 2020-01-09 17:16:12 +03:00
anastasiia.spaseeva a8af3dc3c9 [Spec tests] Add tests for prefix-decrement-expression 2020-01-09 17:16:12 +03:00
anastasiia.spaseeva 01a4562076 [Spec tests] Add tests for additive-expression and Multiplicative expression 2020-01-09 17:16:12 +03:00
anastasiia.spaseeva 72358aa52a [Spec tests] Add tests for range-expression 2020-01-09 17:16:12 +03:00
anastasiia.spaseeva 84cf4c5049 [Spec tests] Add tests for elvis-expression 2020-01-09 17:16:11 +03:00
anastasiia.spaseeva 479fa0e7b8 [Spec tests] Add tests for containment-checking-expression 2020-01-09 17:16:11 +03:00
anastasiia.spaseeva 4a94ffa5dd [Spec tests] Add tests for type-checking-expression 2020-01-09 17:16:11 +03:00
anastasiia.spaseeva 2a1e084f03 [Spec tests] Add tests for comparison-expression 2020-01-09 17:16:11 +03:00
anastasiia.spaseeva 5e42a20575 [Spec tests] Add tests for value-equality-expressions (paragraph 2-3) 2020-01-09 17:16:11 +03:00
anastasiia.spaseeva 3bb5ddb224 [Spec tests] Add tests for reference-equality-expressions (paragraph 3) 2020-01-09 17:16:11 +03:00
anastasiia.spaseeva 15b561195f [Spec tests] Add tests for logical-conjunction-expression 2020-01-09 17:16:11 +03:00
anastasiia.spaseeva 6da8ccb9eb [Spec tests] Add tests for logical-disjunction-expression (paragraph 2) 2020-01-09 17:16:11 +03:00
anastasiia.spaseeva d4a83d535c [Spec tests] Add tests for KT_35565 (local-property-declaration) 2020-01-09 17:16:10 +03:00
anastasiia.spaseeva 31df799103 [Spec tests] Add codegen tests for logical-disjunction-expression (paragraph 1) 2020-01-09 17:16:10 +03:00