Commit Graph

93707 Commits

Author SHA1 Message Date
Ilya Kirillov d04bd320f9 [LL FIR] ignore test failing due to ^KT-53242 2022-07-19 17:17:35 +02:00
Ilya Kirillov 38c6d4b740 [LL FIR] correctly handle facade conflicts in module dependencies 2022-07-19 17:17:34 +02:00
Ilya Kirillov 237ce187ab [LL FIR] do not fail on cycle in module dependencies 2022-07-19 17:17:34 +02:00
Ilya Kirillov 22b8fd636f [Analysis API FIR] fix creating symbol for library declaration
the search scope for symbols is limited to the target module, so we can find only a single declaration
2022-07-19 17:17:34 +02:00
Ilya Kirillov f9126462ac [Analysis API FIR] search for deserialized declarations inside corresponding modules 2022-07-19 17:17:34 +02:00
Ilya Kirillov dd00062559 [analysis] introduce KtBuiltinsModule and remove hacks related to the stdlib module search 2022-07-19 17:17:33 +02:00
Ilya Kirillov dc4527462f [LL FIR] create separate library session for each library 2022-07-19 17:17:33 +02:00
Ilya Kirillov dbfeeae696 [fir] add more info to the error message in FirModuleData 2022-07-19 17:17:32 +02:00
Nikita Bobko 8e9269eee6 Add artifacts into compilerArtifactsForIde task
KTIJ-21822

Those artifacts are needed for `TestKotlinArtifacts` in intellij repo
2022-07-19 11:40:43 +00:00
Alexander Likhachev 172380279e [Gradle, JS] Remove redundant logging line 2022-07-19 12:20:53 +02:00
Yahor Berdnikau 93a0cdbf97 Improve warnings and errors emitted by compiler in Gradle build
Make warnings and errors location clickable by using file URI scheme.
In most terminals and code editors (including IDEA) clicking on such uri
will open file at given line and offset.

^KT-51923 Fixed
2022-07-19 09:30:36 +00:00
Pavel Kunyavskiy c7131a68ce [K/N] Support of collectReferenceFieldValues function 2022-07-19 08:40:14 +00:00
Pavel Kunyavskiy 3f1e06b32e [K/N] Performance infra fixes 2022-07-19 07:53:10 +00:00
Alexander Shabalin bfe0d4108b [K/N] Modernize CompileToBitcode
Merge-request: KT-MR-6367
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-07-19 06:54:12 +00:00
Kristoffer Andersen 8d79fab109 Change BACKING_FIELD_REQUIRED from SetSlice 2022-07-18 23:50:35 +02:00
Kristoffer Andersen f0bc021b5e Change VARIABLE_REASSIGNMENT slice so it composes properly 2022-07-18 23:50:35 +02:00
Dmitriy Dolovov 7bc0132cca [Native][tests] Don't fail tests on expected partial linkage warnings 2022-07-18 17:29:51 +02:00
Dmitriy Dolovov 532b9e2c5f [Native][IR] Partial linkage support for cached inline functions
- Support partial linkage for declarations from inline functions that are lazily deserialized from a KLIB with static cache
- Linker API: Split IrModuleDeserializer.deserializeIrSymbol() into deserializeIrSymbolOrFail() and tryDeserializeIrSymbol()
- Linker API: Refactor KotlinIrLinker.handleSignatureIdNotFoundInModuleWithDependencies() to deserializeOrReturnUnboundIrSymbolIfPartialLinkageEnabled()

^KT-52478
2022-07-18 17:29:50 +02:00
Dmitriy Dolovov 66de825508 [Native][tests] Unmute klibABI/remove[Property|Function] tests
This reverts commit d60c93c1f8.
2022-07-18 17:29:50 +02:00
Dmitriy Dolovov 8283537673 [Native][tests] Don't fail tests on partial linkage warnings 2022-07-18 17:29:50 +02:00
Dmitriy Dolovov 7c40fd31e3 [IR] Optimize SymbolTable.allUnbound 2022-07-18 17:29:50 +02:00
Dmitriy Dolovov 6a227236f8 [IR] Fix location in logging warnings about unlinked symbols 2022-07-18 17:29:50 +02:00
Dmitriy Dolovov f9d7f54838 [IR] Fix unlinked type for variables 2022-07-18 17:29:50 +02:00
Dmitriy Dolovov 2cf5d26edc [IR] JsIrLinker: Drop excessive maybeWrapWithBuiltInAndInit() function
^KT-52478
2022-07-18 17:29:50 +02:00
Dmitriy Dolovov 4cb6dfcec8 [IR] Relax condition in KonanIrLinker.tryDeserializeIrSymbol()
^KT-52478
2022-07-18 17:29:50 +02:00
Dmitriy Dolovov ce04a24b26 [IR][tests] Removal of class used as variable type and constructor call 2022-07-18 17:29:50 +02:00
Dmitriy Dolovov d5ded97ccb [IR][tests] Removal of inlined class case
^KT-52478
2022-07-18 17:29:50 +02:00
Dmitriy Dolovov 7b5e33b6ca [IR][tests] Add tests for removal-of-typealias case 2022-07-18 17:29:49 +02:00
Dmitriy Dolovov 89a188d199 [IR][tests] Add tests for remove-inlined-callable member case 2022-07-18 17:29:49 +02:00
Dmitriy Dolovov 9c1c712057 [IR][tests] Add tests for removal-of-overridden open callable case 2022-07-18 17:29:49 +02:00
Pavel Mikhailovskii 846537b367 KT-45375 Lightweight lambdas; KT-52817 introduce @JvmSerializableLambda 2022-07-18 17:10:07 +02:00
Artem Kobzar 1557f919f5 chore: split huge declarations.d.ts test on few smaller tests. 2022-07-18 12:59:21 +00:00
Alexander Udalov bd0fe2f146 Remove dependency of compiler tests on fir2ir tests
Compiler tests use the old test infrastructure, but fir2ir tests use the
new one (tests-common-new). Removing this dependency means that now the
two big modules, `:compiler:compileTestKotlin` and
`:compiler:tests-common-new:compileTestKotlin` can be compiled in
parallel, which improves the total build time.
2022-07-18 13:13:01 +02:00
Pavel Mikhailovskii fd5800e8b5 KT-53090 Support -Xlambdas=indy for anonymous functions 2022-07-18 08:18:05 +00:00
Sergey Bogolepov 2693a29ab6 [K/N] Disable constant inline phase until we fix macOS AArch 64.
This phase causes assertEquals(0x7FF80000_00000000L, Double.NaN.toBits())
to fail.
2022-07-16 06:09:12 +00:00
Alexander Udalov b50d2ff20a Revert "JVM IR: Move direct invoke optimization into a separate pass"
This reverts commit f0760e0550.

The reason is that it leads to KT-53202.
2022-07-15 18:29:07 +02:00
Rick Clephas 497bb9a05c Add wrapped function test 2022-07-15 19:14:11 +03:00
Rick Clephas 85d4e3071c Include mainFile header for modules def file 2022-07-15 19:14:11 +03:00
Rick Clephas fd22add3ca Create test 2022-07-15 19:14:11 +03:00
Vsevolod Tolstopyatov 59ac756f22 Initial implementation of EnumEntries
KT-53152


Merge-request: KT-MR-6656
Merged-by: Vsevolod Tolstopyatov <vsevolod.tolstopyatov@jetbrains.com>
2022-07-15 14:26:50 +00:00
Pavel Kirpichenkov 3051c36780 [MPP] add extension for non-HMPP common KLIBs
Add an analysis parameter that can be used to create a
package fragment provider for a common KLIB library
when composite analysis aka HMPP support in IDE is disabled.
Such KLIBs can appear since 1.6.20, when hierarchical
project structure was enabled by default. This means, that even
if HMPP is explicitly disabled in KGP via the Gradle property,
common code is still represented by KLIBs and not by
.kotlin_metadata as it used to be. IDE can't resolve
agains common KLIB dependencies without a corresponding
package fragment provider that can read KLIB libraries.

KT-53164
2022-07-15 12:37:50 +00:00
Vladimir Sukharev 2b7ae20ac1 Don't create unnecessary temp vals during monomorphic callsite devirtualization
Merge-request: KT-MR-6633
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-07-15 10:52:45 +00:00
Hung Nguyen 5b6afef67d Rename ICReporter.report/reportVerbose to info/debug
to make it clear what severity levels they are mapped to.

^KT-52839 Fixed
2022-07-15 10:48:34 +00:00
Hung Nguyen e01c2bc651 Warn in Gradle log when incremental compilation fails
When incremental compilation fails, we currently log it at the `debug`
level (and fall back to non-incremental compilation). This commit will
change it to `warning` so that we can get more user reports, which will
allow us to fix the root cause.

Also make sure the warning includes a stack trace.

Additionally, let ReportSeverity.fromCode() return a non-null value
or throw an exception otherwise as that case is not expected.

^KT-52839 In Progress
2022-07-15 10:48:34 +00:00
Mikhail Glukhikh 623f832bfd FIR: fix private-to-this corner case with outer class type parameter
Related to KT-49875
2022-07-15 07:57:42 +00:00
Mikhail Glukhikh d16e5e5e50 FIR: Support checking PRIVATE_TO_THIS visibility #KT-49875 Fixed 2022-07-15 07:57:41 +00:00
Mikhail Glukhikh 83200f8774 FIR: Support inferring PRIVATE_TO_THIS visibility see KT-49875 2022-07-15 07:57:41 +00:00
Alexander Udalov 3b613b3745 Fix some tests related to direct invoke optimization
- Fix test data of light class tests
  (SymbolLightClassesForLibraryTestGenerated).
- Revert the changes in kt8666.kt because they fail on JS IR, and it
  seems that this test is mostly needed for JS anyway.
- Use 'invoke(' as the pattern in bytecode text tests because plain
  'invoke' is used when these tests are run on JDK 11, where indy string
  concatenation is enabled by default and therefore we reference
  `java/lang/invoke/StringConcatFactory`.
2022-07-15 02:29:01 +02:00
Steven Schäfer 8014712569 JVM IR: Check that we generate callable references in tests 2022-07-14 23:24:18 +02:00
Steven Schäfer 2acfb3a41f JVM IR: Avoid direct lambda invokes in inline tests 2022-07-14 23:24:18 +02:00