Commit Graph

69271 Commits

Author SHA1 Message Date
Mikhail Glukhikh 104f088d4e FIR serializer: throw exception on getting ConeCapturedType
This commit assumes that captured types are forbidden
at the end of resolve, at least in public API
2020-09-23 09:00:56 +03:00
Georgy Bronnikov 83ee705c0a IR: make IrClassReference.classType mutable 2020-09-22 23:53:41 +03:00
Georgy Bronnikov 9d22ef948c IR: rework ScopeValidator 2020-09-22 23:53:41 +03:00
Georgy Bronnikov 377940a6ea IR: handle IrVararg.varargElementType in RemapTypes 2020-09-22 23:53:41 +03:00
Georgy Bronnikov a542bb6af7 IR: check IrClassReference.classType in ScopeValidator 2020-09-22 23:53:41 +03:00
Georgy Bronnikov 728c55973a IR: handle MemberAccessExpression type parameters in RemapTypes 2020-09-22 23:53:41 +03:00
Georgy Bronnikov 3041a2815c IR: handle varargElementType in LocalDeclarationsLowering 2020-09-22 23:53:41 +03:00
Georgy Bronnikov 8990344bb2 Varargs: add test 2020-09-22 23:53:41 +03:00
Georgy Bronnikov 67d7bf3269 IR: take care of supertypes when copying IrTypeParameters 2020-09-22 23:53:40 +03:00
Georgy Bronnikov 916d66c220 IR: add ScopeValidator 2020-09-22 23:53:40 +03:00
Georgy Bronnikov 382f423ab9 Mute a test under DCE 2020-09-22 23:53:40 +03:00
Georgy Bronnikov 33a2c69122 IR: remap types in LocalDeclarationsLowering 2020-09-22 23:53:40 +03:00
Georgy Bronnikov 1f3d344835 IR: add RemapTypes.kt 2020-09-22 23:53:39 +03:00
Georgy Bronnikov df1d9a0113 IR: make IrTypeParameter.superTypes persistent mutable field 2020-09-22 23:53:39 +03:00
Georgy Bronnikov a409976d28 IR: make IrValueParameter.varargElementType mutable 2020-09-22 23:53:39 +03:00
Georgy Bronnikov a3763e8276 IR: make IrTypeAlias.expandedType mutable 2020-09-22 23:53:39 +03:00
Georgy Bronnikov 78fc690f29 IR: make IrLocaldelegatedProperty.type mutable 2020-09-22 23:53:39 +03:00
Georgy Bronnikov 09a906cc9a IR: make IrTypeOperatorCall.typeOperand mutable 2020-09-22 23:53:39 +03:00
Georgy Bronnikov d9681e535d IR: make IrField.type mutable 2020-09-22 23:53:39 +03:00
Georgy Bronnikov 5065b1a4c6 Make IrValueDeclaration.type mutable 2020-09-22 23:53:38 +03:00
Georgy Bronnikov 1f37795e08 IR: make IrExpression.type mutable 2020-09-22 23:53:38 +03:00
Alexander Udalov fde7fc6951 JVM IR: use correct file for final test output check in debugger tests
Before this change, a test with incorrect .ir.out could pass if the test
execution result was equivalent to the main .out file, which was a bit
confusing.
2020-09-22 19:15:35 +02:00
Mads Ager 78483930bc [JVM_IR] Fix offsets in constant propagation optimization.
Loads of temporary variables that contain constants are replaced
with a copy of the constant. This avoids locals loads and stores.
However, the copy of the constant needs to have the offset of
the load and not of the original constant.

Fixes KT-41963.
2020-09-22 19:12:06 +02:00
Alexander Udalov f273edeb8e Build: upgrade language to 1.3 in cli, compiler plugins and Gradle plugin
The language/API version restriction here is to make sure the code works
with Gradle of earlier versions, but all versions of Gradle that we
support already depend on Kotlin 1.3+.
2020-09-22 19:10:58 +02:00
Alexander Udalov 5755c32c84 Minor, fix appendln deprecation warnings in cli
Can't use appendLine yet because this module is compiled with API
version 1.3.
2020-09-22 19:10:58 +02:00
Toshiaki Kameyama f20a6b7fe1 Change function signature: add/change receiver type
#KT-21799 Fixed
2020-09-22 18:07:24 +02:00
Mads Ager 9f3ce099ee [JVM_IR] Fix line numbers for function reference invoke methods. 2020-09-22 16:59:46 +02:00
Ilya Goncharov 16b2379cd7 [Gradle, JS] Use new npm versions 2020-09-22 16:57:21 +03:00
Ilya Goncharov 9f9cb4f57e [Gradle, JS] Parallelize requests 2020-09-22 16:57:21 +03:00
Ilya Goncharov a86dd8b5ba [Gradle, JS] Refactor with coroutines 2020-09-22 16:57:21 +03:00
Ilya Goncharov 4986e8c9cc [Gradle, JS] Fetch NPM package versions in separate module 2020-09-22 16:57:21 +03:00
Ilya Goncharov db90c9cc88 [Gradle, JS] Move from NpmVersions 2020-09-22 16:57:21 +03:00
Mikhael Bogdanov 7d4a734791 Fix nullability of typePath parameter
#KT-41484 Fixed
2020-09-22 15:37:02 +02:00
Dmitry Petrov 0539b2b389 Mute some FIR->JVM_IR box tests
FIR generates delegated class members incorrectly (with non-substituted
signatures).
2020-09-22 16:32:27 +03:00
Dmitry Petrov c03573fc18 JVM_IR fix override equivalence check for collection stub generation
KT-42043 KT-42033
2020-09-22 15:26:34 +03:00
Pavel Kirpichenkov fdc134ff66 [NI] Use compatibility mode for KT-41934 2020-09-22 15:06:12 +03:00
Pavel Kirpichenkov 1465e10f12 Add language feature for inference compatibility mode
The feature is intended for updates in the inference algorithm
that change behaviour compared to the previous stable version.
2020-09-22 15:06:12 +03:00
Pavel Kirpichenkov 896fbbd1a3 [NI] Add extra ordering for ready-for-fixation variables
Helps fixing to more specific type in the following situations:
Type1 <: Var1
Var2 <: Var1
Var2 <: Type2

Type1 and Type2 may also be nullable and non-nullable versions of the same type.
Note that no additional constraints can be inferred from such constraints before fixation.
Resulting types for variables will always Type1 and Type2 may also be nullable and non-nullable versions of the same type.
Fixing Var1 first will make Var2's type more specific while fixing Var2 first
will make Var1's type less specific. The first is preferrable in general.
2020-09-22 15:06:12 +03:00
Kirill Shmakov ec8465859c Support rerun of MPP tests for jvm target 2020-09-22 14:44:22 +03:00
Kirill Shmakov 23642d2f86 Support rerun of common MPP tests
This is to fix #KT-36909
2020-09-22 14:44:19 +03:00
Toshiaki Kameyama c09c0468d4 Replace deprecated symbol usage: move named lambda argument outside parentheses
#KT-31523 Fixed
2020-09-22 10:51:36 +02:00
Toshiaki Kameyama d9cf4ee732 Add intention to evaluate compile time expression
#KT-40251 Fixed
2020-09-22 10:46:54 +02:00
Mark Punzalan 8cac3f654c [FIR] Handle pre/postfix dec/increment of labeled expression 2020-09-22 11:06:27 +03:00
Mark Punzalan f55ff8eb1b [FIR] Capture receiver for pre/postfix dec/increment of qualified access
This prevents double-evaluation of the receiver expression, which may
have side-effects. E.g.: a.b++
2020-09-22 10:20:46 +03:00
Mikhail Glukhikh 393189db8d FIR JVM serializer: fix compilation after rebase 2020-09-22 09:54:43 +03:00
pyos 6e143a2656 JVM_IR: collect free type parameters when serializing FIR metadata
The "free" in "createFreeFakeLambdaDescriptor" and such refers to the
fact that there are no references to type parameters from outside the
current declaration. This is necessary because at the point where the
metadata is written, the type parameters may not even be in scope (e.g.
local delegated properties are serialized at class level, but may refer
to function-scope type parameters).
2020-09-22 09:35:50 +03:00
pyos aa58ed9234 JVM_IR: partially implement FIR local delegated property reflection
Type parameter references are broken, just like for lambdas. Also, the
code is super ugly.
2020-09-22 09:35:45 +03:00
Alexander Udalov 6f622920e7 Minor, deduplicate matching JVM_OLD/JVM_IR duplicateJvmSignature tests 2020-09-21 18:49:36 +02:00
Mads Ager 05c662ec55 [JVM_IR] Remove line numbers from delegated member functions.
This fixes smart step into for delegated member functions.
Additionally, we align on the string "memberFunctionName(...)"
for expression non-null checks for both JVM_IR and JVM
backends.
2020-09-21 18:49:08 +02:00
Leonid Startsev eea4ff33a0 Adapt serialization exceptions constructor calls to signature change
(see https://github.com/Kotlin/kotlinx.serialization/pull/1054)
2020-09-21 17:10:12 +03:00