Commit Graph

47754 Commits

Author SHA1 Message Date
Denis Zharkov d20e5ce673 Cache hashCode for DataFlowValue in another field
It's necessary because DataFlowValue instances are commonly
used as keys in maps

 #KT-24657 Fixed
2018-08-10 15:40:50 +07:00
Denis Zharkov e5507108ed Get rid of affectReceiver parameter in DelegatingDataFlow::putNullabilityAndTypeInfo
The only non-default argument was inside "assign" method
And it can be replaced with simple map instantiation
2018-08-10 15:40:50 +07:00
Denis Zharkov 851d760ac1 Minor. Extract common parts from DelegatingDataFlow::equate/disequate 2018-08-10 15:40:50 +07:00
Denis Zharkov bf1f94c185 Rewrite DelegatingDataFlowInfo using immutable collections from javaslang
It may be useful because data-flow info is mostly the same for
neighbouring expressions and changes between them should be minor.

Thus, it should help to avoid making copies of huge maps and reusing
them instead
2018-08-10 15:40:50 +07:00
Denis Zharkov f61686fcbf Minor. Convert loop to 'mapTo' call 2018-08-10 15:40:50 +07:00
Denis Zharkov 5bfa409da6 Get rid of DelegatingDataFlowInfo::parent property
It's been used to bring immutability to DelegatingDataFlowInfo
But in case of statements sequence like:
x = 1
...
x = 1

it would lead to huge DelegatingDataFlowInfo where each of
getCollectedNullability call works for O(n) where n is amount
of assignments

The solution is to get rid of reference to parent and to update
relevant maps properly

In next commits immutable maps will be used instead of making copies each
time
2018-08-10 15:40:50 +07:00
Dmitry Petrov 4f6aa50417 Fix == for inline classes with boxes
TODO generalize code generating object vs primitive equality

 #KT-25914 Fixed
 #KT-25981 Fixed
 #KT-25983 Fixed
2018-08-10 10:34:57 +03:00
Alexander Udalov cd12772bc5 Remove unneeded bunch files related to PsiJavaModule
PSI for modules and related classes are already available in AS3.1
2018-08-10 00:10:37 +02:00
Roman Artemev 6c8e30eb05 Fix test failures
* add metadata
 * unmute working tests
 * mute temporary broken ones
2018-08-09 20:55:50 +03:00
Dmitry Savvinov 447c127036 Fix unsound smartcast from loop condition on assigned vars
^KT-22379 Fixed
2018-08-09 19:56:23 +03:00
Mikhael Bogdanov a7d706f693 Unmute jvm ir-tests 2018-08-09 16:30:32 +03:00
Mikhael Bogdanov 3c5a146c1f Support captured parameters in callable references 2018-08-09 16:30:28 +03:00
Zalim Bashorov 3c765e3625 [JS BE] Support val in when subject
#KT-25014 Fixed
2018-08-09 16:22:25 +03:00
Zalim Bashorov 289ff845c4 Minor: remove extra slash from a testdata file 2018-08-09 16:22:25 +03:00
Leonid Startsev c9cb5a975c Support for multiple origins in irEquals builder
to preserve correct origin when it's called from irNotEquals
2018-08-09 16:16:10 +03:00
Leonid Startsev 28319a76df Access to ir and external symbol table 2018-08-09 16:16:10 +03:00
Leonid Startsev 87da6e2226 Add ir generation plugins to JS and JVM BE 2018-08-09 16:16:10 +03:00
Leonid Startsev 5d669ff671 Additional helpers in IR builders 2018-08-09 16:16:10 +03:00
Leonid Startsev ba9b7547b0 Generate IR for synthetic nested classes directly in class generator 2018-08-09 16:16:09 +03:00
Leonid Startsev c3f66cda65 Lowering extension point 2018-08-09 16:16:09 +03:00
Denis Vnukov 65c79ecfe9 Primitive support for LocalVariables for function parameters 2018-08-09 16:13:21 +03:00
Denis Vnukov 1a56af9bb0 Adding missing SourceFile attribute to classes generated with IR 2018-08-09 16:13:17 +03:00
Simon Ogorodnik fca82c8e28 Cleanup dependencies of module :compiler:backend, :plugins:import-dumper 2018-08-09 16:04:31 +03:00
Toshiaki Kameyama f2fec6b078 Fix messages #KT-25177 2018-08-09 15:24:20 +03:00
Toshiaki Kameyama 605736b6ba Introduce "redundant asDynamic" inspection #KT-25177 Fixed 2018-08-09 15:24:20 +03:00
Anton Bannykh 2c4e21ca36 JS box tests via Mocha: respect the ignoreTestFailures flag 2018-08-09 15:00:54 +03:00
Mikhael Bogdanov bbc5fa4705 Perform InnerClassLowerings after CallableReferenceLowering 2018-08-09 14:22:51 +03:00
Mikhael Bogdanov 357359b1dd Unmute ir-tests after CR support 2018-08-09 14:22:50 +03:00
Mikhael Bogdanov 6b5b9fbde4 Temporary use special container mapping logic for IR backend 2018-08-09 14:22:47 +03:00
Mikhael Bogdanov 813e1ffa39 Initial support of function callable references 2018-08-09 14:22:46 +03:00
Mikhael Bogdanov 06b16a6459 Unmute ir-tests after prev commit 2018-08-09 14:22:46 +03:00
Mikhael Bogdanov da34299064 Temporary set public constructor visibility for lowered local declarations
Allow to support callable reference in next commits
2018-08-09 14:22:45 +03:00
Alexey Sedunov fdc15b053d Minor: Remove unnecessary checks in new test 2018-08-09 13:36:57 +03:00
Mikhail Glukhikh 87d81a75f3 Fix secondary constructor deletion in "sealed class -> object" 2018-08-09 13:33:03 +03:00
Mikhail Glukhikh 0fb8dd2f75 Handle constructor usage for actual class as usage of expect class
#KT-25498 Fixed
2018-08-09 13:00:47 +03:00
Mikhail Glukhikh f4d048334f Fix test for "Remove abstract function body"
Formatting rules (probably) was slightly changed in 182 branch,
so I have to introduce bunch file for 181/173/AS here
2018-08-09 13:00:34 +03:00
Mikhail Glukhikh 87b5fca094 Fix test for "Suppress unused if annotated"
Quick-fix test was changed in 182 branch,
so I have to introduce bunch files for 181/173/AS here
2018-08-09 13:00:00 +03:00
Mikhail Glukhikh db787c78d6 Implement members: don't add 'actual' modifier for fake overrides
#KT-25044 Fixed
2018-08-09 12:59:58 +03:00
Mikhail Glukhikh ed5791ed9e Introduce "remove actual" fix for ACTUAL_WITHOUT_EXPECT
Related to KT-25044
2018-08-09 12:59:57 +03:00
Mikhail Glukhikh a91442cd3b Enable "add () fix" for expect base class without constructors
Related to KT-24597
2018-08-09 12:59:55 +03:00
Mikhail Glukhikh 79abf90916 Introduce "add default constructor for expect class" fix
Related to KT-24597
2018-08-09 12:59:54 +03:00
Nikolay Krasko 3dd99ce4cb Register gradle extension to run GradleWrongPluginVersion inspection
Gradle plugin isn't fully registered in tests in 182.
2018-08-09 12:25:50 +03:00
Nikolay Krasko 71bdda0980 Do not use Kotlin in Java files in find usages tests 2018-08-09 12:25:50 +03:00
Nikolay Krasko fce21d1082 Make GradleClassFinder optional in tests for known class finder
Since 182 Gradle plugin is not fully loaded in tests and GradleClassFinder
is absent in the list.
2018-08-09 12:25:50 +03:00
Alexey Sedunov 465e11c473 Minor: Add missing import for 173 bunch 2018-08-09 12:08:40 +03:00
Alexey Sedunov 1b15ce3ddc Move: Fix top-level declaration detection for scripts
#KT-25858 Fixed
2018-08-09 10:06:31 +03:00
Alexey Sedunov 1797a50fc9 Move: Fix "whole file" mode detection for scripts
#KT-25857 Fixed
2018-08-09 10:06:31 +03:00
Alexey Sedunov 40a5bf0355 Gradle: Support Gradle test runner for TestNG tests
#KT-22732 Fixed
2018-08-09 10:06:31 +03:00
Alexey Sedunov 73bdbbc697 Configuration: Do not show -Xfriend-paths in additional arguments
#KT-25945 Fixed
2018-08-09 10:06:31 +03:00
Alexey Sedunov cd61633b5d Configuration: Support external storage for imported facets
#KT-25913 Fixed
2018-08-09 10:06:30 +03:00