Commit Graph

50988 Commits

Author SHA1 Message Date
Mikhael Bogdanov 1a0c3dfaa6 Use last ASM version to read binaries
#KT-28798 Fixed
2018-12-17 12:18:52 +01:00
Alexey Tsvetkov 0ea7716eb1 Test that javac is loaded once when worker is reused 2018-12-16 04:28:44 +03:00
Ting-Yuan Huang 6c627fa5c1 Cache classloaders for tools.jar and kapt in Gradle workers
#KT-28852 fixed

The loaders and hence some classes were repeatedly loaded and
jit-compiled everytime when KaptExecution were dispatched. Those
classes, like JavaCompiler, can be very large and therefore created a
significant overhead. In some projects, the overhead accounted for more
than 40% of total CPU time of annotation processing.

This change tries to cache the classloaders so that they won't be
reloaded and re-jitted.
2018-12-16 04:28:44 +03:00
Alexey Tsvetkov 1ba6d5361b Run in-process compiler in separate thread
The compiler uses thread local values,
so when the compiler runs Gradle's thread,
it leaks classes preventing
a compiler's classloader from being collected.

    #KT-28037 fixed
2018-12-15 23:39:06 +03:00
Alexey Tsvetkov a6fca47871 Minor: remove unused util 2018-12-15 23:39:06 +03:00
Alexey Tsvetkov cab32f0e43 Print stacktrace to Gradle logger instead of writing directly to stderr 2018-12-15 23:39:06 +03:00
Vadim Brilyantov bc08c966a8 fix RenameKotlinFileProcessor for 173 bunch 2018-12-14 20:20:57 +03:00
Vadim Brilyantov 1fcf8a5587 add 173 bunch for build_gradle_kts of usage-statistics 2018-12-14 20:19:23 +03:00
Vadim Brilyantov fb12de8ff6 fix stats reporters (dummies) Rename Handlers for 181 bunch files
fix bunch files again

fix RenameBackingFieldReferenceHandler for 181 bunch

fix RenameKotlinImplicitLambdaParameter for 181 bunch
2018-12-14 20:19:22 +03:00
Vadim Brilyantov 65982bbee8 disable statistics for 181 as FUS is only available since 182 2018-12-14 20:19:22 +03:00
Vadim Brilyantov 15fec50a0f remove intensions and quickfixes triggers (already present in Idea) 2018-12-14 20:19:20 +03:00
Vadim Brilyantov 93d93cd40e fix report kotlin targets for android case 2018-12-14 20:19:19 +03:00
Vadim Brilyantov df5ec5c218 report stats for pullUp/pushDown refactorings
tmp
2018-12-14 20:19:19 +03:00
Vadim Brilyantov 37239cbcd7 report stats for all renaming refactorings 2018-12-14 20:19:18 +03:00
Vadim Brilyantov 00f630b31d add target reporting 2018-12-14 20:19:17 +03:00
Vadim Brilyantov c307d07b47 fix build for idea plugin with usage statistics 2018-12-14 20:19:16 +03:00
Vadim Brilyantov ae9f16d964 trigger intentions, inspections and some of rename refactorings 2018-12-14 20:19:15 +03:00
Vadim Brilyantov 1b716ea2ee create usage-statistics module 2018-12-14 20:19:14 +03:00
Shagen Ogandzhanian 714b4f25c0 Introduce better typing for on[event-name] attributes from idl
see https://upsource.jetbrains.com/kotlin/review/KOTLIN-CR-2548
2018-12-14 13:17:41 +01:00
victor.petukhov 8c0ad321e2 Add black box tests for objects inheritance problem (KT-25289) 2018-12-14 14:36:17 +03:00
victor.petukhov fc381e25c8 Remove diagnostic tags from black box spec tests for annotations 2018-12-14 14:36:17 +03:00
victor.petukhov f3774b8e19 Add black box spec tests validation 2018-12-14 14:36:16 +03:00
Denis Zharkov a422db91b2 Transform KotlinClassFinder::findKotlinClass to extension 2018-12-13 20:38:25 +03:00
Denis Zharkov f153d97f40 Avoid multiple subsequent reading of the same class-file in front-end
^KT-23466 Fixed
2018-12-13 20:38:24 +03:00
Denis Zharkov bc61e5a3bc Minor. Reformat BinaryJavaClass 2018-12-13 20:37:46 +03:00
Denis Zharkov e59d9bf9e4 Convert JavaClassFinder.java to kotlin 2018-12-13 20:37:46 +03:00
Denis Zharkov 9ddee565e0 Convert JavaClassFinder.java to kotlin: rename file 2018-12-13 20:37:46 +03:00
Denis Zharkov 0a70a957e9 Minor. Reformat LazyJavaPackageScope.kt 2018-12-13 20:37:46 +03:00
Ilya Chernikov 77a4505ec2 [minor] get rid of obsolete "environment" wording 2018-12-13 18:00:12 +01:00
Ilya Chernikov 0b9770f8d1 Refactor scripting - rename env vars to provided properties everywhere 2018-12-13 18:00:12 +01:00
Ilya Chernikov 9e5d04b836 Add generic interfaces to dependency resolvers 2018-12-13 18:00:11 +01:00
Ilya Chernikov e0a542234f Add script config refinement before compilation into API 2018-12-13 18:00:10 +01:00
Ilya Chernikov 3fe324bbb4 Add UrlScriptSource 2018-12-13 18:00:08 +01:00
Ilya Chernikov fb929c290d [minor] copy utility fun to reduce dependencies 2018-12-13 18:00:08 +01:00
Ilya Chernikov 5602bcf9e1 Fix vararg argument mapping for generic args convertor 2018-12-13 18:00:07 +01:00
Ivan Gavrilovic 6b20ef0208 Complete Java usage tracker if analysis extension finishes (KT-27487)
In cases when kapt compiler plugin runs in stubs generation mode,
Java usage tracker was not completed. This caused issues with
the incremental compilation if Java files changed.

E.g. if a constant defined in Java source file changed, stubs
would not be recompiled because the Java usage tracker would
not report changed type. This commit fixes that issue.
2018-12-13 17:12:08 +03:00
Pavel V. Talanov dec2da8247 dumbUtils: remove console spam 2018-12-13 14:35:05 +01:00
Pavel V. Talanov 1d7a74bfcd Minor: fix exception message 2018-12-13 14:35:04 +01:00
Alexander Udalov 8c74312cf6 Fix isInitialized for companion lateinit properties
Instead of trying to access a missing field `Foo.foo`, call the
synthetic accessor `Foo.access$getFoo$cp` which, as per previous commit,
no longer contains the lateinit assertion

 #KT-21862 Fixed
2018-12-13 14:12:33 +01:00
Alexander Udalov 43413fcc44 Move lateinit assertion for companion property to companion object
Previously, for a property named `x` in the companion object of a class
named `Foo`, we generated:
- `Foo.access$getX$cp`, consisting of `GETFIELD Foo.x` and lateinit
  assertion
- `Foo.Companion.getX`, consisting of `INVOKEVIRTUAL Foo.access$getX$cp`

Now, we generate:
- `Foo.access$getX$cp`, consisting of `GETFIELD Foo.x`
- `Foo.Companion.getX`, consisting of `INVOKEVIRTUAL Foo.access$getX$cp`
  and lateinit assertion

The reason is that this way we can avoid generating another accessor and
reuse `Foo.access$getX$cp` in case `isInitialized` is called on a
lateinit property from companion.

For private properties, getX is not generated, but instead the assertion
is generated on each access to the field (which can be improved, see
KT-28331). The same happens for access to non-private properties from
inside the same context where they're declared.

 #KT-21862 In Progress
2018-12-13 14:12:33 +01:00
Alexander Udalov 8617365983 Minor, reformat & fix warnings in intermediateValueForProperty 2018-12-13 14:12:32 +01:00
Alexey Tsvetkov 8aa069a774 Make AbstractJvmAbiContentTest system independent 2018-12-13 15:39:39 +03:00
Alexey Tsvetkov 7953a9154c Register classpath as inputs of SmartJavaExec tasks 2018-12-13 15:39:39 +03:00
Alexander Udalov bbc7edf9d1 Fix incorrect character replacement in ClassName.jvmInternalName
#KT-28682 Fixed
2018-12-13 13:23:45 +01:00
victor.petukhov 725832a281 Fix incomplete printing of exceptions (of the all types) in tests 2018-12-13 12:50:10 +03:00
Nikolay Krasko 0a8e29838f Add file comparison feature to surround with tests 2018-12-13 12:36:02 +03:00
Nikolay Krasko 0482fe9414 Move check with selection tags to base check 2018-12-13 12:36:02 +03:00
shiraji 06dad5f45b Surround with try/catch should generate more Kotlin-style code (KT-5435)
#KT-5435 Fixed
2018-12-13 12:36:02 +03:00
Nikolay Krasko c7c51a3d6b Refactoring: drop MoveDeclarationsOutHelper object 2018-12-13 12:36:02 +03:00
Nikolay Krasko 8dd02126d9 Convert MoveDeclarationsOutHelper to Kotlin and minor improvements 2018-12-13 12:36:02 +03:00