Commit Graph

6807 Commits

Author SHA1 Message Date
Pavel Punegov 8957e4e0b2 [K/N][test] Ignore test ^KT-42723 2022-01-10 09:01:02 +00:00
Pavel Punegov 5d50e02d6b [K/N][test] Ignore test ^KT-36880 2022-01-10 09:01:02 +00:00
Igor Yakovlev 82455c849d [WASM] Lazy properties initialization 2022-01-05 13:12:32 +01:00
Igor Yakovlev e58d4163ad [WASM] Add std methods for collections 2022-01-05 13:12:32 +01:00
Igor Yakovlev adee0f1cb0 [WASM] Add kotlin.math implementation 2022-01-05 13:12:32 +01:00
Igor Laevsky cfcbe9e1e2 [Wasm] Better preserve IR types after inlining 2022-01-01 20:04:44 +02:00
Xin Wang 9ae452e489 JVM_IR generate less bytecode for for-loops if possible(KT-22334). 2021-12-31 18:29:04 +03:00
Dmitry Petrov bcec952beb JVM_IR KT-50585 array constructor loop should end with IINC 2021-12-30 21:38:58 +03:00
Dmitry Petrov 1e5fc1c3aa JVM_IR KT-27427 use checkNotNull with message in checked casts
This would prevent extra branching in 'as <not-null-type>', which
usually would not be covered.
2021-12-30 13:41:21 +03:00
Dmitry Petrov 4ad6cfcf53 JVM_IR fix cast to not-null type
We can't rely on argument type nullability here, because it still can
hold an uninitialized value on JVM.

KT-50577 KT-35272 KT-27427
2021-12-30 13:41:17 +03:00
Alexander Udalov d5372521f1 Add tests for obsolete issues
#KT-12126
 #KT-12189
 #KT-23628
 #KT-24209
 #KT-34338
 #KT-47279
 #KT-48498
2021-12-29 17:07:03 +00:00
Dmitry Petrov 5946242d75 JVM_IR fix special bridges in mixed Java/Kotlin hierarchies
KT-50257 KT-50476
2021-12-29 13:29:19 +00:00
Ivan Kylchik 6fc56477bf Drop all tests that disable features for language version less than 3 2021-12-28 20:08:56 +03:00
Ilmir Usmanov 549ea1a3b9 If fun interface methods are already mangled, do not mangle them twice
There are two possible scenarios, when fun interface method with inline
class parameter can be compiled.

First is when we compile fun interface itself before SAM adapter. In
that case, fun interface is lowered before we lower SAM adapter. Thus,
its method is mangled and mangling in the second time is an error.

Second is when we compile SAM adapter before the fun interface. In that
case, fun interface is not lowered, and we have to mangle the method.

The only way to distinguish there two cases I can think of is to check
whether the overridden method is already mangled, in other words, check,
whether the overridden method's suffix is doubled.

 #KT-48499: Fixed
2021-12-28 17:35:12 +01:00
Alexander Udalov 92c80873ba Revert "JVM: remove support for disabling NoConstantValueAttributeForNonConstVals"
This is a partial revert of e857966edb.

Specifically, behavior is restored in the old backend, which will allow
to support language version 1.3, where this language feature was not
enabled yet. There are no changes in the JVM IR backend, because to
enable JVM IR with LV 1.3, you need to pass the compiler argument
`-Xuse-ir` which is not stable and we don't guarantee anything about it.

 #KT-50251
2021-12-28 13:21:18 +01:00
Evgeniy.Zhelenskiy 610429a278 [Tests] Move non-value class test to the corresponding folder 2021-12-24 00:26:18 +00:00
Mikhail Glukhikh f53cd22253 FIR: copy builder inference session when creating snapshot for locals
This commit fixes one builder inference case from KT-49925
2021-12-23 17:28:01 +03:00
Mikhael Bogdanov 3593e45b97 Rename 'RELEASE' fields into 'JDK_RELEASE' 2021-12-23 07:26:00 +00:00
Mikhael Bogdanov 409d36c911 Basic -Xrelease option support
#KT-29974 Fixed
2021-12-23 07:25:57 +00:00
Alexander Udalov 898c46c124 Minor, uncomment UInt in annotation instantiation test
KT-49998 is fixed so now it works.
2021-12-22 22:21:00 +01:00
Dmitry Petrov 915e949dbc JVM KT-49092 fix stack corruption in redundant boxing elimination 2021-12-22 05:32:26 +00:00
Xin Wang c74453d8d2 JVM_IR KT-48987 handle star projection arguments in smart casts 2021-12-22 00:48:15 +01:00
Xin Wang 944fa7e2f8 JVM IR: recover accidentally lost backingField (KT-49998) 2021-12-22 00:35:33 +01:00
Ivan Kochurkin 58dfe3d804 [FIR2IR] Reify type parameters for callee reference with vararg 2021-12-21 19:10:41 +03:00
Elena Lepilkina a4f7ed00cc [K/N] Disable test until don't fix inlining (KT-50281) 2021-12-21 12:50:07 +00:00
Dmitry Petrov 8905586cbb IR KT-50258 rewrite enum-based 'when' more carefully 2021-12-21 06:06:45 +00:00
Alexander Korepanov b82c306530 [JS IR] Add deep copying for callable reference
Perform a deep copy of callable reference adapter on inline lowering

^KT-49844 Fixed
2021-12-20 14:02:11 +00:00
Dmitry Petrov 976998b56c PSI2IR KT-49526 function reference type approximation hack 2021-12-17 21:06:24 +00:00
Dmitry Petrov 0805916564 IR KT-47483 handle 'Nothing' in array constructor call 2021-12-17 13:43:59 +03:00
Dmitry Petrov 8c71e38c92 JVM_IR KT-49765 bridge for throwing stub should just throw UOE 2021-12-16 21:07:12 +03:00
Victor Petukhov e50e055eb4 [FE 1.0] Don't try to compute value parameters for variables while creating a flat signature for the overload resolution
^KT-50172 Fixed
2021-12-16 17:46:01 +03:00
Dmitry Petrov ab9747ed6d JVM_IR KT-50277 skip temporary var elimination on inline suspend lambda 2021-12-16 06:40:22 +00:00
Victor Petukhov b3943f5ab6 [FE 1.0] Process builder inference stub types with different nullability properly
^KT-49887 Fixed
2021-12-15 22:23:18 +03:00
Mikhail Glukhikh 2338281889 FIR: Add test for get class + let in delegation 2021-12-15 22:23:07 +03:00
Mikhail Glukhikh 9aced1c33d FIR: Update test-data (Delegate inference) 2021-12-15 22:23:04 +03:00
Mikhail Glukhikh 1e41ec7d22 FIR: replace ConeComposedSubstitutor with ChainedSubstitutor 2021-12-15 22:23:03 +03:00
Simon Ogorodnik 476a7727da FIR: Unmute passing black-box tests 2021-12-15 22:22:57 +03:00
Evgeniy.Zhelenskiy ec2e96f3e4 Regenerate inline class tests as 1 arg value classes 2021-12-15 17:14:22 +00:00
Leonid Startsev 2eac2ff3a2 Support Array<KClass> in instantiated annotations
#KT-47703 Fixed
2021-12-15 16:05:29 +00:00
Dmitry Petrov 9375f41936 JVM_IR KT-50073 inline callable reference adapter into 'invoke' 2021-12-14 14:35:12 +00:00
Dmitry Petrov 42dd8aa12d JVM_IR KT-50193 remove temporary variable in argument null check 2021-12-14 17:10:23 +03:00
Dmitry Petrov 34c70ea04e JVM_IR KT-50193 result of !! is non-null 2021-12-14 17:10:20 +03:00
Ilya Chernikov c1c94778ce Detect and report inner classes capturing script instance 2021-12-14 13:39:22 +03:00
Ilya Chernikov cb5e451e05 Implement script instance capturing in script lowering
for regular classes only. Reimplementing the main behavior of the
old BE and implementing few cases on top of it.
#KT-19423 fixed
2021-12-14 13:39:17 +03:00
Dmitry Petrov e47871f98b JVM_IR KT-50215 KT-50076 extra test 2021-12-13 20:34:57 +03:00
Ilya Goncharov 6adcbe081e [JS IR] Consider erasing type parameters in return type in js signatures 2021-12-13 16:16:59 +00:00
Ivan Kylchik b131c52889 Drop all usages of WITH_RUNTIME directive 2021-12-13 18:07:11 +03:00
Dmitry Petrov df460a842b JVM_IR KT-50076 avoid CHECKCAST on moved dispatch receiver parameter 2021-12-13 14:13:34 +00:00
Dmitry Petrov 6f148c594f Revert "JVM_IR KT-50076 avoid CHECKCAST on moved dispatch receiver parameter"
This reverts commit 627d838343.
2021-12-13 14:13:33 +00:00
Mikhail Glukhikh febf336d23 IrConstTransformer: transform constants also inside call children 2021-12-13 16:24:59 +03:00