Commit Graph

1466 Commits

Author SHA1 Message Date
pyos 4e55addc99 JVM_IR: keep offsets of const val reads when inlining them
Original commit: 3e67ff097e
2019-11-29 16:49:52 +01:00
Yan Zhulanow 1e588023f2 EA-216005: Do not request KotlinFacetSettingsProvider for dead projects
Original commit: 49bcb103ef
2019-11-25 17:26:28 +09:00
Pavel Kirpichenkov 96dcadf178 Add frontend checks for missing dependency supertypes
Call checker and declaration checker are used in order to preserve backward compatibility.
Attempt to use classifier usage checker was not good enouth,
since not all errors found with it would actually be reported before.
For example types and constructor calls don't cause supertypes to resolve,
so missing supertypes would not lead to errors in case they are the only use of class name.

Updated tests failing due to missing Java dependencies in superclasses.

Original commit: 8c52bb4212
2019-11-18 12:06:41 +03:00
Roman Artemev 427bea1108 [IC] Unmute IC klib tests
Original commit: 3e3cb8734b
2019-11-08 14:14:59 +03:00
Alexey Tsvetkov 28df6e463b Use Klib JS serializer protocol for IC
Original commit: d776e92111
2019-11-08 14:14:58 +03:00
Alexey Tsvetkov 81d78949c3 Fix proto comparison for fields mapped to type table
Original commit: 28e6219b0b
2019-11-08 14:14:58 +03:00
Nikolay Krasko f8d8f666c9 Mute IncrementalJsKlibCompilerRunnerTestGenerated tests (KT-34538)
#KT-34538 Fixed

Original commit: ebf5e4b590
2019-10-23 12:49:49 +03:00
Nikolay Krasko d7f92f56ff Regenerate tests with TargetBackend.ANY remove and using runTest with this
Original commit: 4ed64b0283
2019-10-23 12:49:48 +03:00
Yan Zhulanow bf23cca78c Make KotlinFacetSettingsProvider.getInstance() nullable
A module may not have a KotlinFacet.
It isn't correct to throw an exception in that case.

Original commit: 44b7a5cc36
2019-10-08 18:17:06 +09:00
Dmitry Savvinov bd153b0606 Refactor MPP versioning
- Use 'null' as indicator of non-MPP version. Consequently, remove
useless 'isMpp' method, and lift all methods to extensions (to be able
to call them on nullable 'facetSettings.mppVersion')

- Change semantics of extensions to check for exact equality rather than
for "at least specified version"

- Deprecate old MPP-versioning in favour of 'facetSettings.mppVersion'

Original commit: 958a7d9315
2019-10-02 16:52:39 +03:00
Dmitry Savvinov 022f9106b1 Minor: simplify condition in KotlinFacetSettings
Original commit: dbd352e2ba
2019-10-02 16:52:39 +03:00
Alexey Tsvetkov ba810b8098 Ensure all output roots exist after Kotlin is compiled in JPS
Original commit: 6c90279694
2019-09-30 09:03:49 +03:00
Andrey Uskov 588ff3a1da Importing test tasks and targets is implemented
Original commit: 715fad849d
2019-09-27 11:59:58 +03:00
Pavel Kirpichenkov 49d1c448d5 Clearify diagnostic messages that involve internal visibilities
KT-7354 Fixed

Visibility.displayText is deprecated with warning.
Diagnostics for java visibilities changed.

Original commit: 0a1b3a8455
2019-09-16 19:00:43 +03:00
Ilmir Usmanov 7af34497fb JVM_IR: Minor. Unmute tests
Original commit: 1951ff8054
2019-09-16 16:49:24 +03:00
Andrey Uskov 2464e6a08d Make platforms order reproducible in iml-files
#KT-33316 Fixed

Original commit: 48d666daea
2019-09-05 14:14:33 +03:00
Andrey Uskov b9e40ffaa1 Add list of modules available via dependsOn in FacetSettings
Original commit: 106452b5f0
2019-09-05 13:58:58 +03:00
Andrey Uskov 342a12666b Introduce versioning of multiplatform in KotlinFacetSettings
Original commit: 4642127c28
2019-09-05 13:58:51 +03:00
Roman Artemev 17650d1396 [JS KLIB IC] Implement incremental cache for IR
Original commit: 3753b75609
2019-09-03 14:21:32 +03:00
Nikolay Krasko 8c8a7bcc84 Remove 181 branch from build scripts
#KT-33536 Fixed

Original commit: 8ae4293a0f
2019-08-30 12:14:54 +03:00
Nikolay Krasko dab86e8269 Remove 182 support
#KT-33536 Fixed

Original commit: 4d0fc1dc22
2019-08-30 12:13:44 +03:00
Alexey Tsvetkov 9ed811485b Add test logs specific for IC with JS IR
Incremental inline will be handled during lowerings,
after all klibs are generated

Original commit: 8e6a80bed7
2019-08-15 15:11:52 +03:00
Alexander Udalov 1f92f41338 JVM IR: generate correct metadata for multi-file classes
Original commit: f01b0f6467
2019-08-05 21:27:21 +02:00
Alexander Udalov 84ccc672c5 JVM IR: support multi-file classes
Without the `-Xmultifile-parts-inherit` mode for now.

This is implemented as follows: FileClassLowering collects information
about multifile parts and the corresponding facades, which a later
GenerateMultifileFacades phase uses to generate new IrFile instances and
add it to the module fragment that's being compiled.

Note that GenerateMultifileFacades is in the end of lowering phases
because delegates in the facade should be generated for all additional
functions generated by certain lowerings (default arguments,
JvmOverloads, etc.). If GenerateMultifileFacades was right after
FileClassLowering, they would still be generated, but we'd then process
them in lowerings mentioned above, which would result in duplicated
logic in the bytecode. There's a new bytecode text test which checks
that this doesn't happen for functions with default arguments.

Original commit: 4be0e00071
2019-08-05 21:27:21 +02:00
Alexander Udalov d15ecc1500 JVM IR: generate tests on incremental compilation
Original commit: 73a671af7c
2019-08-05 21:27:21 +02:00
Alexey Tsvetkov 7752cdf972 Make KotlinJpsBuildTestBase abstract
Otherwise TeamCity warns that it does not contain any tests

Original commit: aff66b6a29
2019-07-26 15:09:47 +03:00
Vyacheslav Gerasimov bb57ff70dc as36: Add bunches for AS 3.6 C6 based on 192 platform
Original commit: 3b78ef9cb2
2019-07-25 20:50:02 +03:00
Alexey Tsvetkov 8b242465d5 Sort source to output mapping before writing to caches
#KT-32902 Fixed

Original commit: 4b9a852745
2019-07-25 20:30:56 +03:00
Alexey Tsvetkov f224628451 Rewrite test of relocatable JPS IC caches
* Caches are compared as files now. It is a more robust approach
than comparing strings with dumped contents. E.g previous test
ignored differences in keys ordering, because dumping caches to string
was added for comparing caches after incremental and non-incremental builds,
which cannot be compared without sorting keys (see KT-32674).
* Calling setUp/tearDown twice within the same test instance was
relatively hacky and fragile. Also it complicated adding new test cases.

Original commit: afa10cc125
2019-07-25 20:30:56 +03:00
Alexey Tsvetkov d4b7a7d12a Extract EnableICFixture
Original commit: 98aad3e00c
2019-07-25 20:30:56 +03:00
Alexey Tsvetkov b767adc66d Make lookup storage addAll order independent
Lookup storage output files could differ for projects
with different absolute paths.
This happened because, paths for lookups were
relativized only before writing to the underlying storage.
Storing absolute paths in a hash table could
result in different order of adding files to the lookup storage.
This commit fixes the issue by sorting lookups and files in
LookupStorage#addAll

    #KT-32674 Fixed

Original commit: a4c62d156f
2019-07-25 20:30:56 +03:00
Vadim Brilyantov 21487a7b5e #KT-27389 : Change JavaSourceRoot usages to Kotlin analogs
Original commit: 91d603292c
2019-07-17 15:53:58 +03:00
Andrey Uskov ad8101d92d Import list of pure kotlin source roots from gradle
in facet settings for inspections
#KT-32300 Fixed

Original commit: c98ad923bd
2019-07-09 20:12:55 +03:00
Andrey Uskov ac345b52ad Facet serialization changed in order to keep compatibility with previous
versions of Kotlin plugin

Original commit: 404ce1a8c1
2019-07-02 22:46:46 +03:00
Andrey Uskov 9330f90002 HMPP: fix importing target platforms for case when JVM targets are involved
Original commit: 87e75bd4cc
2019-07-02 22:46:45 +03:00
Andrey Uskov d7bd959bd8 HMPP: import flag indicating that the project uses HMPP feature
Original commit: e791b9d3f7
2019-07-02 22:40:19 +03:00
Nikolay Krasko 96bcadbbba Modify dependencies for 192 branch: more dependencies to full java plugin
Original commit: b7c12014ee
2019-06-26 14:11:23 +03:00
Nikolay Krasko 9ab1814dd5 Update to 192.5118.30
Original commit: beb1bc09d4
2019-06-25 11:48:59 +03:00
Dmitry Gridin 47c3e16cf9 Cleanup: apply RemoveRedundantQualifierNameInspection to idea
Original commit: 8c84f885ac
2019-06-24 15:56:33 +07:00
Vyacheslav Gerasimov a6167fd77b Build: Fix intellij dependency leak from ir tree module
Original commit: 5a39c637c2
2019-06-13 21:03:55 +03:00
Andrey Uskov 8bb347a0ee Import of middle HMPP target platforms is supported
Original commit: c0bf5a6566
2019-06-13 18:30:01 +03:00
Dmitry Savvinov bca2342dfc [Misc] Get rid of IdePlatformKind.IDE_KINDS_BY_COMPILER_PLATFORM
It works incorrectly for cases of non-trivial common platforms (works
fine for 'JVM/JS/Native', but doesn't work for 'JVM/JS')

Original commit: d458821565
2019-06-10 13:34:27 +03:00
Alexey Tsvetkov 093d14bd2f Add experimental support for bytecode instrumentation with JPS
#KT-13563 Fixed

Original commit: 38a692abcf
2019-06-07 21:06:25 +03:00
Alexey Tsvetkov 144652dbaa Fix IC test for multifile part with property
Our JPS and Gradle plugins handle
recompilation of multifile classes differently.

JPS plugin delegates handling to the JPS itself,
which tracks dependencies via bytecode,
and marks classes as dirty when they are affected.
So in JPS other parts of multifile classes are recompiled only
when a part's signature is changed.

In Gradle plugin we handle recompilation ourselves in
simpler way: any change in any part leads to a recompilation
of all parts of the same multifile class.

In future we should improve our Gradle plugin, but for now
I'm changing the test so that both JPS and Gradle tests
recompile all parts.

Also the dummy function is added to make sure that we
don't blindly recompile everything when a part is changed.

Original commit: 7f1d30058a
2019-05-29 10:23:19 +02:00
Alexey Tsvetkov 4beeb8d657 Add test for KT-31131
Original commit: 56d5846ef1
2019-05-29 10:23:18 +02:00
Anton Bannykh e5df6447cb JS: cache metadata, grouped by package FQN
Original commit: c3170d1908
2019-05-28 23:33:17 +03:00
Dmitry Savvinov c1eb93ba14 Rename platform to targetPlatform in KotlinFacetSettings to avoid ambiguity in Java
Original commit: aeb7f8400a
2019-05-28 16:03:05 +03:00
Dmitry Savvinov 1d14c6e7e3 Introduce unspecifiedJvmPlatform for clients without jvmTarget
Previously, a lot of clients used JvmPlatform as platform-marker,
without thinking about jvmTarget.

For the sake of migration, this commits introduced so-called
UnspecifiedJvmPlatform, which can be used for a time being, but
generally, all usages should be removed in  future.

Original commit: 8997fa52df
2019-05-28 13:08:09 +03:00
Dmitry Savvinov 60b239b52d [Compatibility] Restore KotlinFacetSettings.getTargetPlatform()
Original commit: ef39e2a68f
2019-05-28 13:08:09 +03:00
Dmitry Savvinov 9be3d90cb6 [Compatibility] Restore KotlinProjectConfugirator.getTargetPlatform()
Original commit: 716e55d171
2019-05-28 13:08:09 +03:00