Mikhail Glukhikh
8fdb611e3b
Do not try to inline properties from decompiled files
...
This removes GUI freeze for library properties #KT-17234 Fixed
2017-04-19 18:27:29 +03:00
Mikhail Glukhikh
6571a573f1
Use correct callElement for variable invoke in replacer
...
Check only 'status.isSuccess' before inlining, no descriptor check
Add two tests and fixes two other
2017-04-19 18:27:27 +03:00
Mikhail Glukhikh
4ef0096d46
Refactoring: inline val / fun now use the common inliner
...
This prevents their inconsistent work in some situations
NB: breaks three tests if used alone
2017-04-19 18:27:26 +03:00
Mikhail Glukhikh
e6fa7356e1
Inline: support compound case without containing block #KT-17296 Fixed
2017-04-19 18:27:25 +03:00
Mikhail Glukhikh
91f7f19902
ExpressionReplacementPerformer: handle string templates accurately
2017-04-19 13:12:59 +03:00
Mikhail Glukhikh
815a367978
ReplacementPerformer: always copy statement to insert #KT-17273 Fixed
2017-04-19 13:12:58 +03:00
Mikhail Glukhikh
0f6b9473e9
Inliner: don't take into account nonexistent PSI to keep parameter
...
So #KT-17272 Fixed
2017-04-19 13:12:57 +03:00
Mikhail Glukhikh
b8cc7c2ca6
Add type arguments more accurately during inlining
2017-04-19 13:12:56 +03:00
Mikhail Glukhikh
f8e1f5e613
Inliner: specify explicit lambda signature for calls with lambdas
...
So #KT-17213 Fixed
So #KT-17395 Fixed
2017-04-19 13:12:55 +03:00
Mikhail Glukhikh
6453e10d44
If necessary, add parameter types while inlining lambda
2017-04-19 13:12:52 +03:00
Mikhail Glukhikh
8cfcd7e5a6
Inline function: add extra tests taken from intellij-community
2017-03-30 19:42:22 +03:00
Mikhail Glukhikh
091e875551
Inline function: process usages in children-first order
2017-03-30 19:42:19 +03:00
Mikhail Glukhikh
93b624fdbe
Inline function: handle callable references through lambdas
2017-03-30 19:42:16 +03:00
Mikhail Glukhikh
75bb599991
Inline function: handle recursive calls
2017-03-30 19:42:14 +03:00
Mikhail Glukhikh
b6803af746
KT-6159: generate Unit while code inlining when needed
2017-03-30 19:42:11 +03:00
Mikhail Glukhikh
081caadec1
Fix code inlining for expression body with multiple occurrences
...
So #KT-17022 Fixed
2017-03-30 19:42:09 +03:00
Mikhail Glukhikh
77888349cd
KT-6159: rename duplicates met
2017-03-30 19:42:06 +03:00
Mikhail Glukhikh
de861066bf
KT-6159: allow local / private functions inlining
2017-03-30 19:42:03 +03:00
Mikhail Glukhikh
127b7c80df
Some inline tests that do not work
2017-03-30 19:42:02 +03:00
Valentin Kipyatkov
85e1e53354
Checking for unsupported return's
2016-11-08 12:46:45 +03:00
Valentin Kipyatkov
4c4c85e37a
Supported unit return type functions
2016-11-08 12:46:45 +03:00
Valentin Kipyatkov
08c6a21ac1
Handling safe calls of multi-statement function
2016-11-08 12:46:43 +03:00
Valentin Kipyatkov
330d3a255a
introduceValue() always adds statement before except for safe call case
2016-11-08 12:46:42 +03:00
Valentin Kipyatkov
8f9f2027f2
Adding block to control structure when needed
2016-11-08 12:46:42 +03:00
Valentin Kipyatkov
a4aa9bab8d
Very basic version of inline function for block body
2016-11-08 12:46:42 +03:00
Valentin Kipyatkov
3b97a3feb1
Supported case when explicit function type is used
2016-11-08 12:46:41 +03:00
Valentin Kipyatkov
57411b4d5e
Supported inline function for expression body case
2016-11-08 12:46:39 +03:00
Alexey Sedunov
8a5628cde5
Pull Up/Extract Super: Support members declared in the companion object of the original class
2016-09-27 21:26:28 +03:00
Alexey Sedunov
ccfca0e3dd
Inline Type Alias
...
#KT-12903 Fixed
2016-07-19 15:44:35 +03:00
Alexey Sedunov
7773a1c4e0
Inline Variable/Property: Move test data
2016-07-19 15:42:15 +03:00
Alexey Sedunov
4e36edb5d6
Inline Variable: Remove invalid imports and perform reference lengthening/shortening when inlining non-local declaration
...
#KT-8884 Fixed
2015-12-18 15:05:23 +03:00
Alexey Sedunov
ffb382e3bc
PSI: Delete succeeding semicolon along with KtElement
...
#KT-5487 Fixed
2015-12-15 13:31:33 +03:00
Alexey Sedunov
e82e4bcfc8
Inline Variable: Show error message on attempt to inline unused declaration
2015-12-08 16:21:08 +03:00
Alexey Sedunov
5c88a1c63e
Inline Variable: Parenthesize arguments of the form "e1 < e2" if the next argument has the form "e1 > e2"
...
#KT-8261 Fixed
2015-12-08 16:21:07 +03:00
Alexey Sedunov
b2bdb8ed02
Inline Variable: Inline string template entries
...
#KT-7654 Fixed
2015-12-08 16:21:05 +03:00
Alexey Sedunov
6dd58ad197
Inline: Fix inlining of if-expressions into qualified expressions
...
#KT-8008 Fixed
2015-11-02 15:15:29 +03:00
Dmitry Jemerov
a63d3f5a0f
fix more compilation errors and some tests
2015-10-12 11:11:29 +02:00
Alexey Sedunov
e3d8d819da
Inline Variable: Var support
...
#KT-5169 Fixed
2015-10-01 17:35:22 +03:00
Alexey Sedunov
8c9863e759
PSI: Add parentheses around non-trivial callee expressions
...
#KT-8232 Fixed
2015-06-27 13:58:02 +03:00
Pavel V. Talanov
06916d98c6
default -> companion: replace all mentions of default and default object
2015-03-17 15:47:39 +03:00
Pavel V. Talanov
59f192ef90
Replace 'class object' with 'default object' in renderers and test data
...
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Mikhael Bogdanov
625efe1be1
Update to idea 132.425
2013-09-30 12:39:40 +04:00
Evgeny Gerashchenko
a13092e525
Supported inlining constant properties.
2013-07-24 16:03:01 +04:00
Evgeny Gerashchenko
5aa4672d32
Adding parameter types for functions if necessary.
...
#KT-2637 in progress
2013-07-23 21:43:05 +04:00
Evgeny Gerashchenko
0367f1836d
Adding type arguments if necessary.
...
#KT-2637 in progress
2013-07-23 21:43:05 +04:00
Evgeny Gerashchenko
c22f54055e
Supported vals initialized after.
...
#KT-2637 in progress
2013-07-23 21:43:05 +04:00
Evgeny Gerashchenko
72ed74ab9a
Adding {} in string template if necessary.
...
#KT-2637 in progress
2013-07-23 21:43:05 +04:00
Evgeny Gerashchenko
55b221776b
Inline adds parentheses when it is necessary.
...
Test data for Remove Unnecessary Parentheses was updated, since parentheses in foo && (bar && baz) is not "unnecessary": removing it changes program semantics.
#KT-2637 in progress
2013-07-23 21:43:04 +04:00
Evgeny Gerashchenko
a9a960fd38
Basic local val inlining support.
...
#KT-2637 in progress
2013-07-23 21:43:04 +04:00