Denis Zharkov
4a73fbb70a
Reduce memory footprint of TypeSubstitutor
...
Avoid creating new instances if types remain unchanged
2017-07-20 10:53:09 +03:00
Denis Zharkov
4385ce8828
Reduce memory footprint for basic case of flexible types
...
The case is when we have a simple type constructor
(not array nor collection) and type is not raw:
A<T1, >..A<T1>?
Actually these types are almost equal besides of nullability,
but we create and resolve two different simple types,
they have different arguments' lists, etc.
The idea is to add NullableSimpleType subclass with delegate
to another simple type
It should help a lot both with common cases and with corner ones:
flexibles types in spark for Function22 having exponential size
because of its flexibility
#KT-14375 Fixed
#KT-14323 Fixed
2017-07-20 10:53:09 +03:00
Denis Zharkov
59f2ba98a6
Avoid creating SimpleType instances for default type
2017-07-20 10:53:09 +03:00
Denis Zharkov
8576054788
Use SmartList instead of SmartSet for overridden descriptors
...
SmartSet was used because it was the only lightweight collection
available in core, but now there is org.jetbrains.kotlin.utils.SmartList
2017-07-20 10:53:09 +03:00
Denis Zharkov
729f20ed81
Reduce memory size retained by LookupTrackerImpl
...
By default SmartList is used there for storing values of a multimap,
so a lot of duplicated items is stored there (file names are being
duplicated).
Even although there is a separate interner for these values,
retained memory size has been reduced for 30M when compiling `idea`
module in Kotlin project
2017-07-20 10:53:09 +03:00
Denis Zharkov
c7e6f200da
Use SmartList for storing annotations in binary classes
...
Looks like in the most cases there are <= 1 annotations
in real declarations
2017-07-20 10:53:09 +03:00
Simon Ogorodnik
36ab31f2f7
Minor: fix test after merge
2017-07-20 02:30:34 +03:00
Toshiaki Kameyama
fe599463ac
KT-18978 Intention Move to class body generates incorrect code for vararg val/var ( #1188 )
...
Intention Move to class body generates incorrect code for vararg val/var #KT-18978 Fixed
2017-07-20 01:29:56 +03:00
Dimach
a59021a25e
KT-18786: J2K should move all properties to top of class
...
#KT-18786 fixed
2017-07-20 01:15:15 +03:00
Simon Ogorodnik
ccfcfd8721
Add benchmark for local completion and improve benchmarking
2017-07-19 21:18:58 +03:00
Dmitry Jemerov
4df6db141c
Advance source stub version which wasn't advanced in 5d87276cf
...
#KT-19113 Fixed
2017-07-19 18:52:29 +02:00
Dmitry Petrov
891799c853
Generate 'Deprecated' annotation on invisible companion object field
...
Design decision: if the field for a companion object should have
non-public visibility, generate it with @Deprecated annotation in
language version 1.2.
TODO: generate it with proper visibility in 1.3 and later.
KT-11567 Companion object INSTANCE field more visible than companion object class itself
2017-07-19 17:38:17 +03:00
Dmitry Jemerov
951392005b
Add options for wrapping local variable and property annotations
...
#KT-14950 Fixed
2017-07-19 15:03:00 +02:00
Dmitry Jemerov
050ff03b07
Implement wrapping options for enum constants
...
#KT-14126 Fixed
2017-07-19 15:02:59 +02:00
Dmitry Jemerov
7555bb6c3c
Support formatting of 'where' clauses
...
#KT-14083 Fixed
2017-07-19 15:02:58 +02:00
Dmitry Jemerov
325e950bfe
Reformat expression body property accessors
...
#KT-17394 Fixed
2017-07-19 15:02:52 +02:00
Dmitry Jemerov
4db8639bf8
Consistent name for option controlling spaces around ..
2017-07-19 15:02:50 +02:00
Dmitry Jemerov
31840fa328
Fix GradleLanguageFeatureQuickFixTest on Windows
2017-07-19 13:56:00 +02:00
Toshiaki Kameyama
366b9d1d79
KT-12195 Quickfix @JvmStatic on main() method in an object ( #1192 )
...
* Quickfix @JvmStatic on main() method in an object #KT-12195 Fixed
* Fixed #KT-12195
2017-07-19 13:37:12 +02:00
Toshiaki Kameyama
a8da79a130
KT-12504 Intention to make open class with only private constructors sealed ( #1193 )
...
* Intention to make open class with only private constructors sealed #KT-12504 Fixed
* Fixed #KT-12504
2017-07-19 13:36:36 +02:00
Nikolay Krasko
dd2a87dbf7
Rewrite test class to make it work on Windows
...
Stop using dummy file and assert result with assertEqualsToFile().
Previous version didn't work on Windows because of `\r`.
2017-07-19 13:25:17 +03:00
Nikolay Krasko
4e76975a52
Force OOB in accessors for properties without explicit type (KT-19062)
...
#KT-19062 Fixed
2017-07-19 12:45:06 +03:00
Nikolay Krasko
bcbff98382
Check OOB stays the same for string in super type constructor call
2017-07-19 12:45:06 +03:00
Pavel V. Talanov
41276c950b
Update CodegenTestCase after rebasing on latest changes
2017-07-19 12:29:27 +03:00
Pavel V. Talanov
5faad493b4
Catch and report exceptions from DependenciesResolver
2017-07-19 12:29:25 +03:00
Pavel V. Talanov
eb5be038fa
ScriptDependenciesUpdater: compute script contents synchronously
2017-07-19 12:29:22 +03:00
Pavel V. Talanov
9eb8cec5cf
ScriptDependenciesUpdater: set job to null after processing result
...
Fix inconsistency introduced after extracting ScriptDependenciesUpdater
2017-07-19 12:29:20 +03:00
Pavel V. Talanov
537b1689b7
DependenciesCache: remove ad-hoc ScriptDependencies comparison
2017-07-19 12:29:17 +03:00
Pavel V. Talanov
b1ac451959
Make sure template classpath is always among script dependencies
2017-07-19 12:29:15 +03:00
Pavel V. Talanov
f84cc7fb5b
Offload legacy dependency resolver work to a separate thread pool
...
This is mainly to improve experience for kdsl users before gradle migrates to new API
2017-07-19 12:29:12 +03:00
Pavel V. Talanov
bc399444ab
Fix creating DependenciesResolver with default arguments
2017-07-19 12:29:09 +03:00
Pavel V. Talanov
7aee51fd77
Refactor ScriptDependenciesUpdater: improve readability a bit
2017-07-19 12:29:07 +03:00
Pavel V. Talanov
c0e08c61ee
Minor: extract ScriptContentLoader::getEnvironment
2017-07-19 12:29:04 +03:00
Pavel V. Talanov
42629d6f8d
ScriptDependenciesUpdater: use Job explicitly instead of futures
...
Cancel jobs without interrupting
2017-07-19 12:29:02 +03:00
Pavel V. Talanov
999c3c5e76
Rename services related to script dependencies
...
KotlinScriptConfigurationManager -> ScriptDependenciesManager
KotlinScriptExternalImportsProvider -> ScriptDependenciesProvider
2017-07-19 12:28:59 +03:00
Pavel V. Talanov
96db16a988
ScriptDependenciesUpdater, minor: improve isLastSentRequestCheck
2017-07-19 12:28:56 +03:00
Pavel V. Talanov
aacb9a437a
Rename: dependenciesClasspath -> templateClasspath
...
Clearer distinction from additionalResolverClasspath
2017-07-19 12:28:54 +03:00
Pavel V. Talanov
96d8f685e9
Refactor KotlinScriptConfigurationManager: extract parts
...
Introduce ScriptDependenciesUpdater, DependenciesCache and ScriptContentLoader
2017-07-19 12:28:51 +03:00
Pavel V. Talanov
1b42095dc1
Support @AcceptedAnnotations for different kinds of resolvers
2017-07-19 12:28:49 +03:00
Pavel V. Talanov
1c412b4068
AsyncDependenciesResolver: provide implementation for sync resolve
2017-07-19 12:28:46 +03:00
Pavel V. Talanov
008c27d547
Compiler build depends on kotlinx-coroutines-core
2017-07-19 12:28:43 +03:00
Pavel V. Talanov
ee70a64e1c
Minor, template providers: don't create classloader for empty classpath
2017-07-19 12:28:41 +03:00
Pavel V. Talanov
beb28a1c7d
Gradle Kotlin DSL uses compiler-embdeddable jar when loading resolver
2017-07-19 12:28:38 +03:00
Pavel V. Talanov
5c18ab750b
GradleScriptTemplateProvider: avoid duplicating template loading code
2017-07-19 12:28:36 +03:00
Pavel V. Talanov
6c3ce7adc1
ScriptTemplatesProvider: refactor dependency loading
...
Change dependenciesClasspath is of type List<File>
Add additionalResolverClasspath
2017-07-19 12:28:33 +03:00
Pavel V. Talanov
a77cd0ab09
Catch errors when instantiating script templates
...
If we throw from this code IDE becomes unusable
#KT-18945 Fixed
2017-07-19 12:28:31 +03:00
Pavel V. Talanov
8ac17400ae
ScriptDependenciesFileAttribute: fix TODOs
2017-07-19 12:28:28 +03:00
Pavel V. Talanov
75220e145b
Minor: suppress deprecation warning
2017-07-19 12:28:26 +03:00
Pavel V. Talanov
cf57e5a7a1
Script templates: search for parameterless constructor of resolver
2017-07-19 12:28:23 +03:00
Pavel V. Talanov
10e14103b6
Propagate reports from script dependency resolver
...
Compiler: show as compiler messages
IDE: annotate code in a separate highlighting pass
2017-07-19 12:28:20 +03:00