Commit Graph

31985 Commits

Author SHA1 Message Date
Ilya Chernikov d63b53886c Convert KotlinScriptDefinitionProvider to kotlin - phase 2 - convert; related fixes and refactorings 2016-06-07 21:11:26 +02:00
Ilya Chernikov b9836d8c87 Convert KotlinScriptDefinitionProvider to kotlin - phase 1 - rename 2016-06-07 21:11:25 +02:00
Ilya Chernikov e1ca45f360 Add support for script base class with parameters
including possibility to describe which script params to pass to superclass
2016-06-07 21:11:24 +02:00
Ilya Chernikov 3c1503564e Add possibility to specify supertypes for script, with tests 2016-06-07 21:11:23 +02:00
Ilya Chernikov 670627ac4e Add helpers, compilation function and tests for passing classes as a parameters to a script 2016-06-07 21:11:23 +02:00
Ilya Chernikov bd70481bea Convert ScriptTest to Kotlin - phase 2 - convert 2016-06-07 21:11:16 +02:00
Ilya Chernikov 0699293fb7 Convert ScriptTest to Kotlin - phase 1 - rename .java to .kt 2016-06-07 21:06:00 +02:00
Alexander Udalov e3164119c1 Inline PrintingMessageCollector#PLAIN_TEXT_TO_SYSTEM_ERR
Otherwise 'hasErrors' flags was not cleared between subsequent runs of tests
which were using this message collector
2016-06-07 21:12:24 +03:00
Nikolay Krasko c93d0f69ca Support Idea 163 branch 2016-06-07 19:18:55 +03:00
Kirill Rakhman 5c68681f96 Formatter: handle spaces before value arguments list (KT-12634)
#KT-12634 Fixed
2016-06-07 19:11:28 +03:00
Pavel V. Talanov 922dc85e11 Update changelog for 1.0.3 2016-06-07 17:08:13 +03:00
Alexey Tsvetkov 5e550a1280 Minor fixes of android test project 2016-06-07 16:51:17 +03:00
Jake Wharton c199fd25e6 Add support for the Android test plugin.
#KT-11767 fixed
2016-06-07 16:51:17 +03:00
Dmitry Jemerov 060c285715 search for Kotlin convention usages of Java methods
#KT-5960 Fixed
2016-06-07 14:50:16 +02:00
Dmitry Jemerov 7e2ce2d4e0 when finding usages of parameter of annotation class primary constructor, search also for light method generated from that parameter
#KT-9399 Fixed
2016-06-07 14:50:09 +02:00
Alexey Tsvetkov 5161b6bfe0 Shade in kotlin-build-common-test 2016-06-07 14:42:42 +03:00
Alexey Tsvetkov 5fead88ced Shade in kotlin-android-extensions 2016-06-07 14:42:39 +03:00
Alexey Tsvetkov 23353facca Shade in kotlin-compiler-embeddable
Now kotlin gradle plugin is compatible with android gradle plugin 2.2

     #KT-12478 fixed
     #KT-12431 fixed
     #KT-12406 fixed
2016-06-07 14:42:35 +03:00
Alexey Tsvetkov fd60ec4171 Set idea.io.use.nio2=true every build on windows
Otherwise (setting property once in static block) gradle daemon might clear system properties

     #KT-11770 fixed
2016-06-07 14:42:30 +03:00
Alexey Andreev 0e1dde022a KT-6942: in JS backed for value equalitity patterns in when generate structural equality check (i.e. Any.equals) instead of referential check (===).
(cherry picked from commit 97228e5)
2016-06-07 12:59:16 +03:00
Alexander Udalov 61290d1225 Temporarily disable inline for bound function references 2016-06-07 12:43:10 +03:00
Alexander Udalov b9e61f035f Support bound callable references in codegen 2016-06-07 12:43:09 +03:00
Alexander Udalov 526a64dc36 Pass data flow info from '::' expressions, fix expected type 2016-06-07 12:43:07 +03:00
Alexander Udalov d8db769823 Use empty list instead of ThrowingList in callable reference resolution
Clients of the call resolution do not expect to see a throwing list in call's
arguments, and it's wrong to make each of them check against the special case
that is the resolution of callable references

Fixes EA-69901
2016-06-07 12:42:45 +03:00
Alexander Udalov e2d6e0cbab Propagate control flow to bound double colon expressions
"Unused expression" should be reported on unused double colon expressions, this
is postponed

 #KT-12551 Open
2016-06-07 12:42:42 +03:00
Alexander Udalov 0ce6bd9999 Ignore resolution to function without arguments on LHS of '::'
In the expression "Runnable::run" we were resolving the left-hand side to the
SAM constructor of Runnable. Now we detect this situation, ignore the result of
such resolution, and continue resolving the LHS as a type
2016-06-07 12:42:19 +03:00
Alexander Udalov 04c190231a Support bound references to objects and companion objects
Tweak member extension detection a little bit to prohibit extensions imported
from objects (they don't have one of the receiver parameters)
2016-06-07 12:41:30 +03:00
Alexander Udalov d90b40c661 Use LanguageFeatureSettings instead of custom option for bound callable references 2016-06-07 12:41:29 +03:00
Alexey Andreev 7240a8df6c JS/Inliner: fix build 2016-06-07 12:18:23 +03:00
Alexey Andreev b1fcad6dcc JS/Inlining: in RedundantStatementElimination remove unnecessary side effect check for binary expressions 2016-06-07 11:54:48 +03:00
Alexey Andreev f0e64f8e38 JS/Inlining: rename IneffectiveStatementElimination to RedundantStatementElimination 2016-06-07 11:54:45 +03:00
Alexey Andreev 07d5a4506c JS/Inlining: minor improvements and clarifications after code review. Test whether expression without side effect does not prevent to relocate another expressions 2016-06-07 11:54:41 +03:00
Alexey Andreev 6b99d4e1c5 JS/Inlining: change sideEffects metadata to take three values: producing side effect, dependding on side effect and purity 2016-06-07 11:54:41 +03:00
Alexey Andreev 774efa4e70 JS/Inlining: improve test for removal of binary expresions without side effect, add tests for removal of a reference to a function parameter 2016-06-07 11:54:34 +03:00
Alexey Andreev b395d40e97 JS/Inlining: refactor TemporaryVariableElimination 2016-06-07 11:54:31 +03:00
Alexey Andreev 0c0fc81e5f JS/Inlining: refactor IneffectiveStatementElimination 2016-06-07 11:54:28 +03:00
Alexey Andreev d829bf4914 JS/Inlining: clarify why it's necessary to remove expression statements like a[b] 2016-06-07 11:54:23 +03:00
Alexey Andreev 57ac23a606 JS/Inlining: in temporary variable elimination don't treat FQN without side effects as trivial, i.e. disable moving these vars freely across function body 2016-06-07 11:54:20 +03:00
Alexey Andreev 878e95e040 JS/Inlining: minor simplifications after code review 2016-06-07 11:54:19 +03:00
Alexey Andreev a26c09ae81 JS/Inlining: refactor TemporaryAssignmentElimination, add more tests 2016-06-07 11:54:12 +03:00
Alexey Andreev b8b6999afc JS/Inlining: add test case for KT-10931 2016-06-07 11:54:12 +03:00
Alexey Andreev 5fdf7cbac9 JS/Inlining: minor code style fixes 2016-06-07 11:54:03 +03:00
Alexey Andreev 4783c9b612 JS/Inlining: in function call like fn() extract fn to a local variable, since fn can be access to property with side effects. Add tests to prove that evaluation order became proper in certain cases. Fix KT-11711, KT-7674, KT-7043 2016-06-07 11:54:02 +03:00
Alexey Andreev c3d0fca92b JS/Inlining: mark closure constructors as free from side effects 2016-06-07 11:54:02 +03:00
Alexey Andreev 47cb0cde01 JS/Inlining: in temporary variable elimination improve moving of some expressions which are provably pure 2016-06-07 11:54:01 +03:00
Alexey Andreev 50aa1b271f JS/Inlining: when generating expression for default property accessor, mark this expression as side effect free, so optimizer has opportunity to move it 2016-06-07 11:53:56 +03:00
Alexey Andreev 96532f1fc2 JS/Inlining: fix broken evaluation order after applying temporary variable elimination 2016-06-07 11:52:58 +03:00
Alexey Andreev ee6483b7ec JS/Inlining: in expression like f(g()), where *f* is inline, don't treat g() as a lambda constructor 2016-06-07 11:52:57 +03:00
Alexey Andreev 65876c36eb JS/Inlining: introduce removal of expression statements without side effects 2016-06-07 11:52:57 +03:00
Alexey Andreev 551ed28d84 JS/Inlining: introduce removal of unused variables 2016-06-07 11:52:56 +03:00