Commit Graph

92607 Commits

Author SHA1 Message Date
Georgy Bronnikov c87748209d Fir2Ir: use lazy declarations for imported toplevel functions and properties 2022-05-19 12:02:41 +02:00
Georgy Bronnikov c32d0f3852 Fir2Ir: add FirIrProvider 2022-05-19 12:02:41 +02:00
Georgy Bronnikov 320ba3db75 JVM_IR, FIR: add FIR tests for IR serialization 2022-05-19 12:02:41 +02:00
Dmitriy Novozhilov 89b1307e16 [FE 1.0] Don't report UNUSED_* warnings on local properties with delegate
^KT-25527 Fixed
2022-05-19 07:14:23 +00:00
Dmitriy Novozhilov 4d5a4ccd6b [FE 1.0] Don't fail on calls of functions with contracts from object
^KT-51704 Fixed
2022-05-19 07:14:22 +00:00
Dmitriy Novozhilov 993021a71d [Build] Use 1.8 target version instead of 1.6 while using JPS build 2022-05-19 07:14:21 +00:00
Ivan Kylchik 73a571ef7f Report warning from backend if constant expression cannot be evaluated 2022-05-18 21:20:04 +03:00
Ivan Kylchik f3252334b2 Move most of ir utils from backend.common to ir.tree 2022-05-18 21:20:03 +03:00
Ivan Kylchik 40d224d5fe Change error message of EXCEPTION_IN_CONST_VAL_INITIALIZER 2022-05-18 21:20:03 +03:00
Ivan Kylchik 001ecaa9b2 Support RENDER_DIAGNOSTICS_FULL_TEXT directive in new test infra 2022-05-18 21:20:03 +03:00
Ivan Kylchik 20d0a531df Add new tests to check evaluation of intrinsic сonsts 2022-05-18 21:20:02 +03:00
Ivan Kylchik dca22d745a Drop excessive lowerings that are replaced by ConstEvaluationLowering 2022-05-18 21:20:02 +03:00
Ivan Kylchik 0f0b48f87b Move reporting of interpreter's backend errors tests to fir module 2022-05-18 21:20:01 +03:00
Ivan Kylchik 44cf64a00c Convert const values in ranges without explicit cast 2022-05-18 21:20:01 +03:00
Ivan Kylchik 0b22cf6cb9 Rewrite ir interpreter's dump tests to box
Box tests will check the correctness of interpreter, meantime
by dumped ir we can understand that expression was folded.
2022-05-18 21:20:01 +03:00
Ivan Kylchik fac98b7787 Add possibility to dump lowered ir in tests before lowering execution 2022-05-18 21:20:00 +03:00
Ivan Kylchik 592baf134e Change ir const checker to match new rules of IntrinsicConstEvaluation 2022-05-18 21:20:00 +03:00
Ivan Kylchik 1431d4b356 Add jvm diagnostic tests to check report of exceptions from interpreter 2022-05-18 21:20:00 +03:00
Ivan Kylchik 20d8e6607d Add new diagnostic tests to check new rules for const modifier 2022-05-18 21:19:59 +03:00
Ivan Kylchik df7be06558 Add tests to check constant evaluation for intrinsic const declarations 2022-05-18 21:19:58 +03:00
Ivan Kylchik 2dcfe219be Move string concat folding into FlattenStringConcatenationLowering
Originally `FoldConstantLowering` is responsible for this, but it can
be removed in the future.
2022-05-18 21:19:58 +03:00
Ivan Kylchik 23f9e97a5f Create getInnerDeclarations function to extract statements from parent
This function is needed to be able to work with files and scripts
2022-05-18 21:19:58 +03:00
Ivan Kylchik 51ccc32a3f Update test data after introducing IntrinsicConstEvaluation annotation 2022-05-18 21:19:57 +03:00
Ivan Kylchik d0ab01ad24 Add lowering that will evaluate all intrinsic const expressions 2022-05-18 21:19:56 +03:00
Ivan Kylchik 6a0802a1be Allow interpreting code extension property 2022-05-18 21:19:56 +03:00
Ivan Kylchik 7113523e34 Support interpretation of trimMargin and trimIndent 2022-05-18 21:19:56 +03:00
Ivan Kylchik 3bf678a011 Add ONLY_INTRINSIC_CONST evaluation mode 2022-05-18 21:19:55 +03:00
Ivan Kylchik 761424b131 Add IntrinsicConstEvaluation annotation to some ir builtins functions 2022-05-18 21:19:55 +03:00
Ivan Kylchik a993939127 [FIR] Allow constant values for IntrinsicConstEvaluation declarations 2022-05-18 21:19:55 +03:00
Ivan Kylchik 4ddbb89103 [JS] Manually change receiver's type of Char's equals method
Char's equals method in js doesn't work properly because now equals
method is not fake override in Char, but it is actual override and so
when we call equals for some char in js, it will not be boxed. To fix
it we need to get correct receiver's type.
2022-05-18 21:19:54 +03:00
Ivan Kylchik 1564f2c549 Mark all declarations that will be evaluated with ir interpreter 2022-05-18 21:19:54 +03:00
Ivan Kylchik 1ccd5d1a3a Add new internal annotation IntrinsicConstEvaluation to kotlin-native 2022-05-18 21:19:53 +03:00
Iven Krall ba5c85d6f2 KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing 2022-05-18 17:23:40 +00:00
Dmitriy Dolovov 8de4eb798c [IR] Fix removal-of-abstract-fun IR linkage case
^KT-50771
2022-05-18 18:05:09 +03:00
Dmitriy Dolovov deb9039b0f [IR][tests] Add tests for IR linkage issues related to properties 2022-05-18 18:05:05 +03:00
Dmitriy Dolovov 8e8ecc48ad [IR][tests] Add tests for removal-of-abstract-fun IR linkage case
^KT-50771
2022-05-18 18:04:26 +03:00
Dmitriy Dolovov df909abaf5 [IR][tests] More precise IrLinkageError checks 2022-05-18 18:03:53 +03:00
Alexander Shabalin 49f80b207a [K/N] Disable some tests in GC aggressive mode 2022-05-18 13:48:52 +00:00
Ilya Matveev 77b9923c38 [K/N] Fix tests failing in GC aggressive mode 2022-05-18 13:48:52 +00:00
Ilya Matveev 8493b955cc [K/N][runtime] Add a lock on finalizer thread creation
The finalizer thread can be created from the GC thread or from
any application thread during runtime shutdown. This may cause
a rare race when the GC starts the finalizer thread during runtime
shutdown. In this case two finalizer threads may be created and
the app will crash on attempt to assign the finalizerThread_ field
in FinalizerProcessor.
2022-05-18 13:48:50 +00:00
Ilya Matveev 78d179e9ab [K/N][runtime] Track safepoints in aggressive GC
Issue #KT-49188 Fixed
2022-05-18 13:48:49 +00:00
Dmitriy Dolovov ec155653f0 [Native][tests] Log memory usage in Gradle build 2022-05-18 09:44:28 +00:00
Pavel Punegov 7bd7c09c4a Revert "[K/N] Add build-tools as a module for IDEA"
This reverts commit c545fd5ef8.
2022-05-18 10:58:47 +03:00
Pavel Punegov 3f10ab919f Revert "[K/N] Add SAM with receiver plugin"
This reverts commit a58e2459c6.
2022-05-18 10:58:47 +03:00
Ilya Muradyan 00819c421f [REPL] Report script codegen errors in advance 2022-05-18 10:02:58 +03:00
Xin Wang eb1d7110ec FE: Fix null assertion error when left is CollectionLiteral
#KT-49961 fixed
2022-05-18 08:57:16 +02:00
Anton Lakotka bd299ed12c [Test] Rename gcc* to configCache* variable to avoid ambiguity
^KT-51947
2022-05-18 05:48:42 +00:00
Anton Lakotka 1c65ef28f8 [Test] Update warning message for tasks that disables GCC
cherry-picked from 26b4c946e67b25b7206c37ba56a79e5ffeb04dd6

^KT-51947
2022-05-18 05:48:41 +00:00
Anton Lakotka dfd89a45f7 [Test] Disable Configuration Cache for native tasks
cherry-picked from 538cb41a320df93ca85a194b8566ea44457187ca

^KT-43293
2022-05-18 05:48:40 +00:00
Anton Lakotka d2c6489de9 [Gradle] Mark tasks that not compatible with configuration cache
Gradle 7.4 offers new API that allow to exclude task configuration
from being stored in Configuration Cache.

GCC should be supported in further releases.
* KotlinNativeCompile -- KT-43293
* GenerateProjectStructureMetadata
 and TransformKotlinGranularMetadata -- KT-49933

cherry-picked from 7bdde5f4c025f2f55c0038a8d58e0ea78a0ff151

^KT-51946 Verification Pending
2022-05-18 05:48:40 +00:00