Commit Graph

31952 Commits

Author SHA1 Message Date
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
Alexey Andreev 776c7447b1 JS/Inlining: in temporary variable elimination introduce better recognition of FQNs without side effects 2016-06-07 11:52:56 +03:00
Alexey Andreev c08e2e8ca0 JS/Inlining: always create temporary variables to alias expressions in following cases:
* when decomposing expression that contains inline calls, alias all subexpressions
* when substituting arguments to inline call
* for value returned from inline function.

Instead, rely on dedicated optimization pass. Improve lookup of function to inline, since the old one relied on immediate optimizations. Give more hints to optimizer.

This should make inlining more stable in different hard-to-reproduce corner cases with evaluation order.
2016-06-07 11:52:55 +03:00
Alexey Andreev c11f2fe2d6 JS/Inlining: fix bug in temporary assignment elimination which causes excess removal of assignment statement. When there is a set of temporary variables that receive same value in different execution branches, remove them carefully so that at least one (and, preferably, at most) remains in each branch. 2016-06-07 11:52:55 +03:00
Dmitry Petrov 48c417285c LazyImportScope: accept TypeAliasDescriptor 2016-06-07 09:47:54 +03:00
Alexey Sedunov fe01035e3c Rename: Do not rename ambiguous references in import directives
#KT-6363 Fixed
2016-06-06 21:29:23 +03:00
Alexey Sedunov 8ba1aff7e6 Rename: Show more detailed element descriptions in Rename dialog
#KT-8544 Fixed
2016-06-06 21:29:19 +03:00
Alexey Sedunov 9692c210fd Rename: Copy default values if function to be renamed inherits default values from some base function which is excluded from rename
#KT-9446 Fixed
2016-06-06 21:29:15 +03:00
Alexey Sedunov 188531017a Rename: Implement automatic renamer for test classes
#KT-8512 Fixed
2016-06-06 21:29:11 +03:00
Alexey Sedunov 42b71ae90c Rename: Do not show 'Rename overloads' options if target function has no
overloads. Consider extensions and members overloads if they have the same
recever class
 #KT-8541 Fixed
 #KT-8786 Fixed
2016-06-06 21:29:07 +03:00
Dmitry Petrov 9e7222906d Generate (possibly empty) file classes for files with type aliases. 2016-06-06 13:50:37 +03:00
Dmitry Petrov 872b3e8a52 DeclarationsChecker runs checks on type alias declarations.
TYPEALIAS_SHOULD_EXPAND_TO_CLASS diagnostics
(implemented for type aliases expanded to type parameters).
2016-06-06 13:50:37 +03:00
Dmitry Petrov ea249244c5 'where' clause in type alias declaration is a syntax error
(type alias parameters can't have bounds)
2016-06-06 13:50:37 +03:00
Alexander Udalov 390b78b7f7 Minor, make CapturedParamInfo#skipInConstructor immutable 2016-06-06 13:26:31 +03:00
Alexander Udalov b370ac0b37 Minor, delete CapturedParamOwner 2016-06-06 13:26:29 +03:00
Alexander Udalov e148dcdee7 Cleanup inline codegen classes
Fix warnings, typos, formatting, break long lines, remove unused, add
nullability annotations, inline small methods used only once
2016-06-06 13:26:10 +03:00
Dmitry Jemerov 6a1ffc865d don't quote empty package name 2016-06-03 16:24:24 +02:00
Dmitry Petrov 7e64054af7 typeConstraintAdditionalResolve:
do not throw CCE for incorrect code with type parameter bounds on type alias parameters
2016-06-03 16:07:21 +03:00
Dmitry Petrov aede318fd5 Protobuf diff: do not throw exception on TYPE_ALIAS_LIST 2016-06-03 16:07:21 +03:00
Dmitry Petrov 772fe5badb Treat unsupported or malformed type alias as a type alias with error types. 2016-06-03 16:07:20 +03:00
Dmitry Petrov 3500f5a96b Type alias: resolve type alias RHS during force-resolve. 2016-06-03 16:07:20 +03:00
Dmitry Petrov df335b9e8d Type aliases: do not reparse RHS of type alias declaration in expanded type resolution 2016-06-03 16:07:20 +03:00
Dmitry Petrov 79ce614591 KT-11588 Type aliases: Fix EA-1117340 2016-06-03 16:07:20 +03:00
Dmitry Jemerov 8b30e7ef4e change implementation of 'new file' action to support escaping the package name and creating directory/package hierarchy
#KT-8362 Fixed
 #KT-11328 Fixed
2016-06-03 14:18:11 +02:00
Dmitry Jemerov 5f89274259 de-i18n 2016-06-03 14:18:11 +02:00
Dmitry Jemerov 28100be46b NewKotlinFileAction: J2K 2016-06-03 14:18:11 +02:00
Dmitry Jemerov 2ee03a71f9 NewKotlinFileAction: rename to .kt 2016-06-03 14:18:11 +02:00
Dmitry Jemerov 349376c4ec show new icon for Kotlin annotations in structure view (KT-12516) 2016-06-03 14:18:11 +02:00
Dmitry Jemerov 987b48dcfd can't close contents in Kotlin Bytecode toolwindow (KT-9797) 2016-06-03 14:18:11 +02:00
Mikhail Glukhikh 31cdc917d7 Source code cleanup: leaking this quick fixes applied 2016-06-03 14:46:11 +03:00
Mikhail Glukhikh de3fbe38f1 KT-12152: quick fix "make final" for member / containing class 2016-06-03 14:46:07 +03:00
Mikhail Glukhikh a22e7d3bcf KT-12152 : leaking this inspection: accessing non-final member / this in non-final class 2016-06-03 14:45:58 +03:00
Mikhail Glukhikh 3d6bd81933 KT-12152 : constructor consistency: non-final function calls 2016-06-03 09:45:52 +03:00
Mikhail Glukhikh be40cf8138 KT-12152 : constructor consistency: distinguish properties with and w/o backing fields, with default / custom accessors 2016-06-03 09:45:49 +03:00