Vsevolod
2805371bdc
KT-16661 Provide fast-path for Strings#split with single delimiter
...
Optimize single delimiter split when no matches is found:
Return listOf() of single element instead of adding 'this' to result
because underlying array in ArrayList is created lazily and
by default its size is 16.
Pre-size resulting list in split when limit is known.
2018-01-23 13:29:05 +03:00
Dmitry Petrov
72ffbb9825
Add test for array modification within for-in-array-withIndex loop body
2018-01-23 10:55:24 +03:00
Dmitry Petrov
40d1925e19
Provide optimized code generation for for-in-withIndex for sequences
...
#KT-5177 In Progress
2018-01-23 10:55:24 +03:00
Dmitry Petrov
2399a39414
Provide optimized code generation for for-in-withIndex for CharSequences
...
#KT-5177 In Progress
2018-01-23 10:55:24 +03:00
Dmitry Petrov
9c9e507172
Provide optimized code generation for for-in-withIndex for iterables
...
#KT-5177 In Progress
2018-01-23 10:55:24 +03:00
Dmitry Petrov
08622b0953
Provide optimized code generation for for-in-withIndex for arrays
...
#KT-5177 In Progress
2018-01-23 10:55:24 +03:00
Dmitry Petrov
e07e9c0ea5
Refactor RangeCodegenUtil: introduce isTopLevelExtensionOnType
2018-01-23 10:55:24 +03:00
Dmitry Petrov
fb487b31ba
Minor: format code in RangeCodegenUtil
2018-01-23 10:55:24 +03:00
Dmitry Petrov
5c1321a29f
Minor: format code in org.jetbrains.kotlin.codegen.range
2018-01-23 10:55:24 +03:00
Alexey Tsvetkov
f77586574f
Always sort files in K2JSCompiler
...
Previously files were sorted only when IncrementalDataProvider
was not null to normalize js output in case of incremental compilation.
Because of that an output js file could be different after rebuild
in IC tests.
The issue could be reproduced anywhere, but the tests failed only on
Windows, and it seems tests were not run on Windows for some time.
2018-01-22 18:34:17 +03:00
Alexey Tsvetkov
21f2b68357
Fix BuildLogParserParametrizedTest on Windows: normalize line separators
2018-01-22 18:34:17 +03:00
Alexey Tsvetkov
6fc5c3325c
Minor: rename file to match class name
2018-01-22 18:34:17 +03:00
Alexey Sedunov
737d7dcc2f
Kotlin Facet: Use Kotlin SDK for non-JVM imported modules
2018-01-22 12:21:13 +03:00
Alexey Sedunov
70cb08bfdb
Misc: Update test data (new 'allopen' Spring annotations added)
2018-01-22 12:21:12 +03:00
Denis Zharkov
2e933a165a
Avoid retaining all protobuf objects in DeserializedMemberScope
...
Object model for deserialized protobuf isn't very cheap, so
loading just our stdlib's packages several times (as we do in the IDE)
might lead to ~ 96 MB of retained memory just by these objects.
While in fact many of them remain unused
#KT-21517 Fixed
2018-01-22 10:48:25 +03:00
Nikolay Krasko
b701117ffb
Minor: reformat, and warning fixes in outdated notification subsystem
2018-01-19 22:41:52 +03:00
Nikolay Krasko
2386cfbd07
Do not spell check overridden declaration names (KT-15000)
...
#KT-15000 Fixed
2018-01-19 22:41:51 +03:00
Anton Bannykh
ff00831109
JS: minor fixes in kotlin-test-js-it
...
Jasmine version 2.6.0 doesn't support Promise-based
asynchronous tests.
Also the error message for an unexpected test result was incorrect.
2018-01-19 20:16:31 +03:00
Ilmir Usmanov
f4ad5182b8
Fix OOM error in ReturnUnitMethodTransformer
...
#KT-22345: Fixed
2018-01-19 20:13:23 +03:00
Ilya Gorbunov
40aa2280a5
Replace .. with until or indices where appropriate
...
Replace indices.reversed() with lastIndex..0 as it is not optimized in JS yet
2018-01-19 19:53:09 +03:00
Alexander Udalov
513f50785e
Use processResources task to copy compiler.xml to IDEA plugin
...
This fixes tests broken in 4b2d281bba and 95f9884799
2018-01-19 17:26:33 +01:00
Alexander Udalov
4b2d281bba
Include META-INF/extensions/compiler.xml into IDEA plugin
...
This fixes tests and IDEA run configurations broken in 95f9884799
2018-01-19 15:13:40 +01:00
Mikhail Glukhikh
577c6cde82
KtInvokeFunctionReference: protect from KNPE in getLambdaExpression
...
So EA-114887 Fixed
2018-01-19 16:16:33 +03:00
Mikhail Glukhikh
26c1673da0
J2K: KtInvokeFunctionReference
2018-01-19 16:16:31 +03:00
Mikhail Glukhikh
117c5a29fb
KtInvokeFunctionReference.java -> kt
2018-01-19 16:16:22 +03:00
Mikhail Glukhikh
b1bff24cde
Move lambda inside: protect from KNPE in getLambdaExpression
...
So EA-114888 Fixed
2018-01-19 16:16:21 +03:00
Mikhail Glukhikh
f675d9fd81
Convert reference to lambda: protect from root fq name EA-114907 Fixed
2018-01-19 16:16:19 +03:00
Mikhail Glukhikh
3c19af3645
Convert reference to lambda: reformat
2018-01-19 16:16:18 +03:00
Mikhail Glukhikh
9d9b2b2a58
Fix stub inconsistency in "inline type parameter fix"
...
Fixes one quick-fix test
2018-01-19 16:16:17 +03:00
Mikhail Glukhikh
1924172189
Inline type parameter fix: reformat
2018-01-19 16:16:16 +03:00
Mikhail Glukhikh
ee3f89df87
Remove unused function parameter: delete empty constructor accurately
...
So #KT-22221 Fixed
Fixes also some quick-fix tests
2018-01-19 16:16:15 +03:00
Mikhail Glukhikh
c4ef95dbf7
Remove empty primary constructor: reformat
2018-01-19 16:16:13 +03:00
Mikhail Glukhikh
ac1c40c0e6
Add function to supertype fix: get rid of incorrect type comparator
...
So EA-100297 Fixed
2018-01-19 16:16:12 +03:00
Mikhail Glukhikh
7f947bed1e
Add function to supertype fix: reformat
2018-01-19 16:16:11 +03:00
Mikhail Glukhikh
925e4e0a67
KotlinUnusedImportInspection: use LocalQuickFixOnPsiElement
2018-01-19 16:16:10 +03:00
Mikhail Glukhikh
a3dda258c8
KotlinUnusedImportInspection (minor): specify platform type
2018-01-19 16:16:09 +03:00
Mikhail Glukhikh
dade8deea6
KotlinUnusedImportInspection: reformat
2018-01-19 16:16:07 +03:00
Mikhail Glukhikh
c54dd6385c
KotlinUnusedImportInspection: check for disposal of progress indicator
...
So #KT-22335 Fixed
2018-01-19 16:16:06 +03:00
Mikhail Glukhikh
c52fcdde70
Remove explicit type: reformat
2018-01-19 16:16:05 +03:00
Mikhail Glukhikh
512e287f3a
Remove setter parameter type: do not suggest if type is empty
...
So #KT-22339 Fixed
2018-01-19 16:16:04 +03:00
Mikhail Glukhikh
f0b172ca35
Remove setter parameter type: reformat
2018-01-19 16:16:02 +03:00
Sergey Igushkin
c8900d672f
Update Gradle plugins build instructions
2018-01-19 12:58:39 +03:00
Mikhael Bogdanov
4c1eb21805
Minor. Add assertion message
2018-01-19 10:42:02 +01:00
Nicolay Mitropolsky
2623ae714c
Uast: consistency updates for ULambdaExpression
2018-01-19 10:45:58 +03:00
Nicolay Mitropolsky
25cd54713b
Uast: consistency for imports-expressions
2018-01-19 10:45:58 +03:00
Nicolay Mitropolsky
d5d49c65b4
Uast: tests for UClass.uastSuperTypes
2018-01-19 10:45:58 +03:00
Mikhael Bogdanov
7b212c5650
Add support for android MPP
...
#KT-18462 Fixed
2018-01-18 15:21:19 +01:00
Toshiaki Kameyama
2a10d8e837
KT-15176 Remove "Create type alias" intention when called on java class
2018-01-18 16:23:40 +03:00
Dmitry Savvinov
44920f42d8
[NI] Fix unit coercion
...
Consider following case:
fun foo(): Unit = run { "hello" }
Previously, NI would analyze lambda body without expected type, because
it is a type variable 'R' from 'run', which hasn't been fixed yet. This
leads to treating "hello" as lambda-return argument and adding bogus
'String' constraint on 'R', and, consequently, type mismatch.
Now, we peek into current constraint system and check if return-type of
lambda is type variable with upper-Unit constraint (which is exactly
condition for its body to be Unit-coerced). If so, then we provide
expected Unit-type for body explicitly, and the rest will be done
automatically (in particular, in aforementioned example "hello" wouldn't
be treated as lambda return argument).
2018-01-18 15:13:45 +03:00
Alexander Udalov
b3eeb2f735
Remove unneeded members of ConstantValueFactory
2018-01-18 12:49:38 +01:00