Commit Graph

91846 Commits

Author SHA1 Message Date
Ilya Chernikov 0df3fde37f FIR: implement computeOrigin for IR without accessing sources
fixes LT compilation too
2022-03-30 08:33:18 +00:00
Ilya Chernikov 973273c6c6 FIR CLI: count lines/files and report events to perfman 2022-03-30 08:33:11 +00:00
Ilya Chernikov 090a451902 FIR: implement proper exit on errors in new cli pipeline 2022-03-30 08:33:03 +00:00
Ilya Chernikov f89765eb33 Make JDK classpath roots configuration explicit...
instead of relying on the "configuration files" parameter.
(in the process of migration from KotlinCoreEnvironment).
2022-03-30 08:32:56 +00:00
Ilya Chernikov 9d2cadc908 [minor] scripting fixes in obsolete and test code...
relax acceptedAnnotations extraction rules for obsolete script template
handling code - the previous variant was failing on the typealias
comparison

also reduce warnings and possible exceptions on some test execution
paths
2022-03-30 08:32:48 +00:00
Ilya Chernikov 806bf8a735 IR [minor]: do not assume that ktfile is always accessible 2022-03-30 08:32:40 +00:00
Ilya Chernikov b27a223b98 IR: use jvm name annotations for package class naming for non-psi cases 2022-03-30 08:32:32 +00:00
Ilya Chernikov 5e007f9179 IR: fix FileClassInfo generation from source-based entry
assuming that it's name contains path, symmetrical to the PSI variant
2022-03-30 08:32:24 +00:00
Ilya Chernikov 5abdf93d3b IC: Add IC test with fix on rename file with only class inside
"fails" on JS and JPS tests - the IC logic there is less precise.
2022-03-30 08:32:17 +00:00
Ilya Chernikov 3220900abe FIR: add tests for IC with LT and new CLI pipeline 2022-03-30 08:32:10 +00:00
Ilya Chernikov a239f02a30 Add cli argumens for FIR "tight" IC and LightTree usage 2022-03-30 08:32:03 +00:00
Ilya Chernikov 9e32188938 FIR LT: add syntax error reporting to LT2Fir
use it in the new pipeline
2022-03-30 08:31:56 +00:00
Ilya Chernikov 2689ebf455 FIR: fix lookup tracking in conflicts checker for LT
since it relies on the correct context declaration
2022-03-30 08:31:47 +00:00
Ilya Chernikov 0446a21b46 FIR IC: remove unnecessary lookup tracking in retrun type calc 2022-03-30 08:31:40 +00:00
Ilya Chernikov 2aba465494 FIR IC: provide file sources to lookup where possible
because detecting file source by element source is possible for LT
only in some limited cases.
2022-03-30 08:31:33 +00:00
Ilya Chernikov 11d6dccf51 FIR IC: do not record lookup on const - builtin types are not recorded 2022-03-30 08:31:26 +00:00
Ilya Chernikov a8594e9ce8 Codegen: register i/o File instead of PSI for module mapping...
because there are no PSI files in FIR + LT, so missing mapping hurts IC
2022-03-30 08:31:18 +00:00
Ilya Chernikov 275135a1b2 FIR: extend cli pipeline with incremental compilation logic
use it in the IncrementalCompilationRunner
2022-03-30 08:31:10 +00:00
Ilya Chernikov 6b61488099 Implement IC caches changes detection logic over frontend metadata 2022-03-30 08:31:02 +00:00
Ilya Chernikov 3ca4fe5f9e Refactor metadata serialization for using after frontend
for "tight" IC cycle
2022-03-30 08:30:54 +00:00
Ilya Chernikov 5cca01a7d2 IR: remove unnecessary reliance on the PSI in inliner 2022-03-30 08:30:46 +00:00
Ilya Chernikov 17bbaf27ea Fix when expression with binary expression conversion in fir2ir for LT 2022-03-30 08:30:38 +00:00
Ilya Chernikov 2d7af0ce72 Fir2Ir: fix conversion for non-PSI source elements 2022-03-30 08:30:30 +00:00
Ilya Chernikov 5818f0786a Fix for loop variable detection in fir2ir for LT case 2022-03-30 08:30:24 +00:00
Ilya Chernikov 3ad0e2aff5 Fix lambda detection in fir2ir for LT case 2022-03-30 08:30:16 +00:00
Ilya Chernikov cf22400701 Introduce LT file abstraction in tests parallel to KtFile
allows to create a valid LT-based file with synthetic path important
for dumps comparisons in tests
2022-03-30 08:30:09 +00:00
Ilya Chernikov 20c50c6484 [minor] Pass minimally valid offsets on non-PSI ir file entry creation
allows to use e.g. `dumpTreesFromLineNumber` in tests on such files
without assertions
2022-03-30 08:30:02 +00:00
Ilya Chernikov 4b92d50775 FIR: Implement and use component to map lighttree-based sources to files 2022-03-30 08:29:54 +00:00
Ilya Chernikov 12d49c2cd8 FIR: new cli pipeline with LightTree support 2022-03-30 08:29:47 +00:00
Pavel Kunyavskiy 7ba4d9e1f0 Rework nullability in IR 2022-03-30 06:27:59 +00:00
Ilya Gorbunov 000165b12b Fix incorrect conversion of Long to String in base 36 in JS KT-48924 2022-03-30 06:13:51 +00:00
simon.ogorodnik 03bb482322 KT-45553. Hide declaration from star import if imported with alias 2022-03-29 23:38:42 +00:00
Svyatoslav Scherbina 8bb178e4a7 Native: ignore delegatedProperty/provideDelegate/kt39588.kt box test
It performs unchecked cast from `String` to `List<Any>`, which
legitimately fails when global optimizations are enabled.

^KT-48749 Declined
2022-03-29 13:27:44 +00:00
Dmitriy Novozhilov f24a8db6b8 Advance bootstrap to 1.7.0-dev-3025 2022-03-29 12:57:16 +00:00
Sergey Bogolepov 027c51653d [K/N] Fix -Ptest_compile_only for iosArm64 target
We don't need to configure Xcode or disable some tests when running
tests in compile-only mode.
2022-03-29 12:25:22 +00:00
Dmitriy Dolovov 0bc6885b2c [Native][tests] W/A: Generate test suites for included KLIB with tests
Relates to KT-51375
2022-03-29 14:55:57 +03:00
Sergey Bogolepov f635e450df [K/N] Add trivial test for RemoveRedundantSafepoints phase 2022-03-29 11:52:26 +00:00
Sergey Bogolepov f90a56c131 [K/N] Introduce RemoveRedundantSafepointsPass
Since we do not inline Kotlin_mm_* functions on watchos_arm32 and
ios_arm32 targets, there are a lot of unnecessary subsequent safepoints.
To reduce binary size and avoid unnecessary safepoints we apply a simple
optimization: remove all calls to Kotlin_mm_safePointFunctionPrologue in
a basic block except the first one.

^KT-51737 fixed.
2022-03-29 11:52:25 +00:00
Hung Nguyen bd8f49c5d6 KT-45777: Count cache misses when loading classpath snapshot
to get more insights into the build performance of that step.

^KT-45777 In Progress
2022-03-29 11:36:41 +00:00
Hung Nguyen f23e66a6e2 KT-45777: Replace EmptyICReporter with DoNothingICReporter
to be more consistent (every *Reporter has a DoNothing*Reporter).

^KT-45777 In Progress
2022-03-29 11:36:41 +00:00
Hung Nguyen d70dbf3146 KT-45777: Add debug log messages for classpath snapshot feature
Also clean up classpath snapshot shrinking a bit to make it clearer.

^KT-45777 In Progress
2022-03-29 11:36:40 +00:00
Hung Nguyen 1d1c6d5e0b KT-45777: Change classpath-snapshot directory location
Incremental states for Kotlin compilation are stored inside the
`<project>/build/kotlin/<task-name>` directory. Previously, that
directory was @LocalState, so we had to keep the `classpath-snapshot`
@OutputDirectory outside it.

Now, that directory has been made a parent containing @OutputDirectory's
@LocalState's, so we can safely move the `classpath-snapshot` directory
to it.

Test: Existing tests should pass (location change has no functional impact)

^KT-45777 In Progress
2022-03-29 11:36:39 +00:00
Artem Kobzar ba37851490 fix: external declarations in implicit export. 2022-03-29 10:07:25 +00:00
Sergey Bogolepov 30006b5143 [K/N] Add CMakeLists.txt to simplify work with libllvmext
Also moved functions that have nothing to do with code coverage
into a separate file.
2022-03-29 09:42:46 +00:00
Sergey Bogolepov 7dc48b3837 [K/N] Rename llvmCoverageMappingC to libllvmext
This subproject covers much wider scope now than code coverage,
so it makes sense to rename it to reflex that.
2022-03-29 09:42:45 +00:00
Sergey Bogolepov d7386dc315 [K/N] enable RuntimeLinkageStrategy.LinkAndOptimize for debug by default 2022-03-29 09:40:03 +00:00
Sergey Bogolepov 3723e2af52 [K/N] Allow to optimize runtime bitcode separately
Since runtime is split into several LLVM modules there is no LTO
optimizations between them during debug compilation because the latter
performs almost no optimizations to preserve debug info.
Of course, it affects runtime performance of debug binaries. To improve
it, we can link and aggressively optimize runtime modules and then link
optimized module into unoptimized Kotlin LLVM module.
This commit also introduces `linkRuntime` binary option that forces the
way we link runtime modules.
2022-03-29 09:40:02 +00:00
Sergej Jaskiewicz e0dcb0975a [JS IR] Enable line number tests for JS IR 2022-03-28 21:47:43 +00:00
Sergej Jaskiewicz dc9652e9ce [JS] Migrate the line number tests to the new testing infrastructure 2022-03-28 21:47:42 +00:00
Dmitriy Novozhilov 60eff871dc [FE] Make message of SAFE_CALL_WILL_CHANGE_NULLABILITY warning more clear
^KT-46860
2022-03-28 12:37:26 +00:00