78 Commits

Author SHA1 Message Date
Tianyu Geng
d3dfb33f89 FIR: consolidate duplicated logic in FirOverrideChecker 2021-06-09 16:27:26 +03:00
Aleksei.Cherepanov
b5ef6c9316 Add tests for SAM conversions
Add tests for KT-45191 [JPS] Marking method as "default" in Java SAM interface doesn't affect dependencies, which was fixed in intlellij(212): cbad0d91 support kotlin-generated lambda usage

#KT-45191 Fixed
2021-04-17 03:36:17 +03:00
Ilya Chernikov
4a79f544f7 FIR: Mute IC test due to java tracking peculiarities
should be fixed after implementing proper java tracking for FIR
2021-03-24 21:24:20 +01:00
Ilya Chernikov
7e08820009 FIR: Mute IC tests with missing FIR diagnostics 2021-03-24 21:24:20 +01:00
Ilya Chernikov
14121a1d9a FIR: Disable java tracking in FIR IC
until it is properly implemented,
fixes some IC tests for now, making it less pecise
2021-03-24 21:24:19 +01:00
Aleksei.Cherepanov
07d11508a7 Generate JvmMultifileClass tests for Gradle 2021-02-26 11:31:17 +03:00
Aleksei.Cherepanov
aa683d3b2a JPS: Fix JvmMultifileClass processing for IR backend
#KT-44644 Fixed
2021-02-19 23:54:53 +03:00
Alexander Udalov
1deb317e0d Update and regenerate incremental compilation tests for 1.5
Set TargetBackend.JVM_IR for these tests by default; remove the
generated IR-based test and add a new old-backend-based test. This fixes
the issue where some (3) of these tests were not properly ignored
because of incorrect target backend used in the test generator.

Also update test data for some tests which use local functions, which
are not generated to separate anonymous classes in JVM IR.
2021-01-28 13:19:27 +03:00
Georgy Bronnikov
8e24256f95 JVM_IR: avoid descriptors when tracking inline properties
Preparing to use wrapped properties in InlineCodegen.
2020-07-02 12:46:58 +03:00
pyos
82899e6243 JVM_IR: reuse MethodNodes for inline functions in same module
This fixes the weird cases when a class gets overwritten by an imperfect
copy, reduces the number of classes in the output if an inline function
contains an inline call that causes it to have regenerated anonymous
objects, and makes inlining of same module functions a bit faster in
general. On the other hand, this may increase memory footprint a bit
because classes cannot be flushed to the output jar, as the inliner
would not be able to locate classes for anonymous objects if they have
already been unloaded from memory.
2020-04-08 07:04:16 +02:00
Pavel Kirpichenkov
6ed1cc5cd8 [JPS-TESTS] Update incremental compilation test for 1.4
Bug fix `NoConstantValueAttributeForNonConstVals` removes constant attribute from non-constant properties.
Code using such properties does not have to be recompiled, since its value is no longer inlined.
2020-02-18 18:31:47 +03:00
Steven Schäfer
76f8109ff6 JVM IR: Implement LookupLocation in IrSourceCompilerForInline
This is used when compiling calls to inline functions with a different
@JvmName for incremental compilation.
2020-02-13 14:46:35 +01:00
Alexey Tsvetkov
ef83431618 Recompile all dirty files in case of error 2020-01-21 16:36:36 +03:00
Pavel Kirpichenkov
0a1b3a8455 Clearify diagnostic messages that involve internal visibilities
KT-7354 Fixed

Visibility.displayText is deprecated with warning.
Diagnostics for java visibilities changed.
2019-09-16 19:00:43 +03:00
Alexander Udalov
f01b0f6467 JVM IR: generate correct metadata for multi-file classes 2019-08-05 21:27:21 +02:00
Alexander Udalov
4be0e00071 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.
2019-08-05 21:27:21 +02:00
Alexander Udalov
73a671af7c JVM IR: generate tests on incremental compilation 2019-08-05 21:27:21 +02:00
Alexey Tsvetkov
7f1d30058a 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.
2019-05-29 10:23:19 +02:00
Alexey Tsvetkov
56d5846ef1 Add test for KT-31131 2019-05-29 10:23:18 +02:00
Alexey Tsvetkov
5760b8cf8b Register kotlin_module as output of all files
Previously kotlin_module was registered as output
only for files containing top-level declarations
2018-07-09 15:48:11 +03:00
Alexey Tsvetkov
3eb968807e Invalidate usages of removed classes before round
#KT-23165 fixed
2018-04-03 21:11:12 +03:00
Alexey Tsvetkov
67a5cab343 Fix IC test data
Test data was broken starting from 0954d1ab1b
2018-02-14 16:09:07 +03:00
Nikolay Krasko
f05e926670 Update idea to 173.3.4 (173.4548.28) 2018-02-03 00:15:45 +03:00
Alexey Tsvetkov
ee94a64718 Explicitly request rebuild when untracked java file is removed
Previously a rebuild was happenning because FileNotFoundException
was thrown when getting psiFile of removed file.
2017-12-22 16:12:20 +03:00
Alexey Tsvetkov
50bf74b909 Turn off class redeclaration test for JS IC temporarily
So the tests could be run on TC.
Turn on after KT-19846 is fixed.
2017-12-22 16:12:20 +03:00
Alexey Tsvetkov
0fee7883ed Recompile only files from last iteration after compile error 2017-12-22 16:12:20 +03:00
Alexey Tsvetkov
7712044146 Fix IC test build log diverged from JPS
JPS marks dirty direct usages of removed classes since 172.* before a build.
Generic IC also marks dirty all subclasses and their usages.
That is necessary because a method from a removed class could be used
through a subclass.
JPS and generic IC logs diverged in 172 branch, but non-JPS tests
were not run on CI.
2017-12-22 16:12:20 +03:00
Denis Zharkov
df533053f9 Record special name lookup when trying use interface as a SAM
It was already working in JPS, because it see our synthetic classes
as subclasses for SAM's, but with non-JPS build we have to manually
tracking places that should be recompiled after SAM members are changed
2017-12-12 16:17:58 +03:00
Denis Zharkov
ae6421476d Refine dirty files computation in case of Java source changes
#KT-17621 In Progress
2017-12-12 16:17:58 +03:00
Alexey Tsvetkov
18261838b6 Avoid deserializing .kotlin_module as class proto
#KT-20184 fixed
2017-11-16 14:47:59 +03:00
Alexey Tsvetkov
b73d5cbe1f Mock constant search in JPS tests 2017-08-29 04:28:06 +03:00
Alexey Tsvetkov
2312013c41 Move JVM specific IC tests to separate dir 2017-08-29 04:28:06 +03:00
Alexey Tsvetkov
0a5fe3ef7c Move JVM specific IC tests with class hierarchy changes 2017-08-29 02:24:38 +03:00
Alexey Tsvetkov
166883d847 Move JVM specific IC test data to separate dir 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
7810da7018 Add IC compiler tests with Java 2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
5af9d29cbe Remove old IC: remove experimental-ic-build.log
This commit moves each experimental-ic-build.log
into a corresponding build.log file.
2017-07-31 19:34:58 +03:00
Nikolay Krasko
1d29c81346 ! (TODO) Update build test data in 171 2017-03-20 18:45:40 +01:00
Alexey Tsvetkov
05f278ce20 JPS: implement tracking of null annotations
#KT-12933 fixed
    #KT-14266 fixed
2017-03-20 18:45:21 +01:00
Stanislav Erokhin
bebc75c8ef Set reference target and report custom error instead unresolved reference for cases: interface, generic parameter, object + invoke, class without companion.
#KT-2787 Fixed.
2016-09-01 18:01:55 +03:00
Michael Bogdanov
3b419e8ba3 Fix for KT-11964: No TABLESWITCH in when on enum bytecode if enum constant is imported
#KT-11964 Fixed
2016-06-29 09:32:45 +03:00
Zalim Bashorov
51c6abdbed IC: take into account added and removed classes when calculate affected names 2016-04-11 19:26:18 +03:00
Nikolay Krasko
46a1028494 Temporary ad-hock jps-tests enable with testdata modification 2016-04-06 21:46:00 +03:00
Alexey Tsvetkov
61814eb23f Test: override build.log in gradle IC tests 2016-03-30 03:40:53 +03:00
Alexey Tsvetkov
9523a8b88d Add missing enum entry added/removed tests
#KT-6200 fixed
2016-03-04 14:43:52 +03:00
Alexey Tsvetkov
402436f3eb Add dummy files to fix gradle incremental tests
Gradle won't call kotlin task if source directory is empty

KT-8487
2016-03-03 16:45:19 +03:00
Zalim Bashorov
d832a3d290 KotlinBuilder: use proper API to update Java mappings 2016-02-19 19:11:10 +03:00
Zalim Bashorov
e33e31ad16 KotlinBuilder: don't request additional round when it's unnecessary & fix warnings 2016-02-10 21:37:12 +03:00
Zalim Bashorov
f6e7f8c3c0 Introduce TestingContext to pass data between tests and KotlinBuilder; introduce BuildLogger to log build events (build finished, files marked as dirty) in KotlinBuilder 2016-02-09 23:27:25 +03:00
Michael Bogdanov
e116cc3206 Private visibility for non-const, non-jvmField class companion property backing field 2015-12-29 16:45:22 +03:00
Zalim Bashorov
d9b67ae0ef Minor: use ".touch" extension instead of ".new" in incremental compilation tests when it possible 2015-12-17 19:41:24 +03:00