Alexander Udalov
aa53fa7e15
Fix execution of simple .kts scripts on Java 9
2017-07-18 20:10:05 +03:00
Alexander Udalov
bc2c958a2e
Remove unused class GenericRepl
2017-07-18 20:10:05 +03:00
Alexander Udalov
36001ff931
Do not allow to access compiler internals in .kts scripts
...
Set parent class loader to null explicitly instead of the system class
loader
2017-07-18 20:10:05 +03:00
Alexander Udalov
d1603c4329
Minor, move deserializeToDescriptor to package kotlin.reflect.jvm.internal
...
To prevent binary-compatibility-validator from reporting it as a public
API; that happens because the signature is different after the
gradle-shadow-plugin is applied
2017-07-18 20:09:24 +03:00
Yan Zhulanow
00225b3de3
Use compiling evaluator only if there is non-inline lambda or a loop in the bytecode
2017-07-18 18:22:30 +03:00
Yan Zhulanow
a6925e0d0f
Minor: Fixes after review
2017-07-18 18:22:29 +03:00
Yan Zhulanow
904b693571
Pass byte array more efficiently
...
Filling byte[] values is especially slow on Android (>3000ms to fill a byte[3000] on emulator).
2017-07-18 18:22:28 +03:00
Yan Zhulanow
069579fd79
Debugger: Disable code interpreting by default in evaluator
...
Provide the compiled bytecode to debugger instead of interpreting the expression by default.
This significantly increases evaluation speed in numerous cases, e.g. `(1..10000).map { it.toString() }.count()`.
Leave interpreter mode as a fallback.
Android does not provide decent in-memory class loading support.
Moreover, we need to run dex on the compiled classes, and it required significant time.
So for now compiling evaluator for Android is available only in Android O, and only if there're any local classes or non-inline lambdas (evaluator didn't work for them before so we may consider this change as an improvement).
2017-07-18 18:22:28 +03:00
Yan Zhulanow
4851a83a83
Android Extensions: put new functionality under the flag
2017-07-18 18:10:30 +03:00
Yan Zhulanow
77eafb9716
Kapt: Map kaptGenerateStubsKotlin task classpath properly, ensure the destination for compileKotlin isn't in it (KT-18799)
2017-07-18 18:10:29 +03:00
Yan Zhulanow
83f9835e00
Android Exensions: Add kotlin-android-extensions-runtime dependency automatically in Gradle plugin
2017-07-18 18:10:28 +03:00
Yan Zhulanow
b303fa9caa
Android Extensions: Fixes after review
2017-07-18 18:10:27 +03:00
Yan Zhulanow
7b238e0b21
Android Extensions: Add SparseArray implementation for the View cache (KT-18250)
2017-07-18 18:10:26 +03:00
Yan Zhulanow
fbfd51e97e
Minor: Group plugin modules
2017-07-18 18:10:25 +03:00
Yan Zhulanow
820f914d35
Remove obsolete kapt2 implementation
2017-07-18 18:10:24 +03:00
Yan Zhulanow
423a09e46a
Android Extensions: Support LayoutContainer in code generation
2017-07-18 18:10:23 +03:00
Yan Zhulanow
a69f9729e0
Android Extensions: Use Activity and Fragment supertypes in INVOKE_VIRTUAL calls instead of the user implementation class names
2017-07-18 18:10:22 +03:00
Yan Zhulanow
d4b4bc71ee
Android Extensions: Support @ContainerOptions in compiler plugin
2017-07-18 18:10:21 +03:00
Yan Zhulanow
6e1dd08fbb
Android Extensions: Add runtime library with LayoutContainer and its options
2017-07-18 18:10:20 +03:00
Yan Zhulanow
1a1db5a6f1
Android Extensions: Support cache in custom Views
2017-07-18 18:10:19 +03:00
Yan Zhulanow
c9cd1a4d75
Minor: Android Extensions compiler plugin refactoring
2017-07-18 18:10:18 +03:00
Yan Zhulanow
0494862ce5
Minor: Move Android Extensions compiler plugin tests to some other package
2017-07-18 18:10:17 +03:00
Yan Zhulanow
303b246a49
Minor: Move AndroidExtensionsReportSubmitter to other KAE files
2017-07-18 18:10:16 +03:00
Yan Zhulanow
e037cafe18
Use descriptor modality in IDE inspections/intentions
...
This fixes KT-18160, KT-18194, KT-18195, KT-18197 ~
2017-07-18 18:10:15 +03:00
Yan Zhulanow
942fa7719a
Android Extensions: Add synthetic property highlighting
2017-07-18 18:08:33 +03:00
Yan Zhulanow
f7786a42ab
Android Extensions: Show warning on a dot-call of a reference which is missing in some configurations (KT-18012)
...
When more than one layout configuration is available, a particular resource (view or fragment) may be absent in some of them.
We should show a warning on such resource reference calls as the call may lead to NPE.
2017-07-18 18:08:32 +03:00
Yan Zhulanow
f4acf404ca
Android Extensions: Support Android variants and library dependencies (KT-14086, KT-16934)
2017-07-18 18:08:31 +03:00
Yan Zhulanow
8e9a62d553
Kapt: Add gradle warnings for Android projects
...
1. When the old kapt (aka kapt1) is used
2. (for Android projects) When Kotlin plugin is applied but annotationProcessor (Java-only) dependencies are found
2017-07-18 18:08:29 +03:00
Toshiaki Kameyama
865f9d4c7e
Wrong caption "Change to property access" for Quick Fix to convert class instantiation to object reference #KT-13870 Fixed ( #1189 )
2017-07-18 15:47:43 +02:00
Mikhail Glukhikh
987c7f5be8
Add "unnecessary local variable" inspection #KT-15958 Fixed
2017-07-18 16:37:47 +03:00
Dmitry Neverov
9d06a80519
Do not report "property can be private" on JvmField properties
...
So #KT-18970 Fixed
2017-07-18 15:48:10 +03:00
Nikolay Krasko
5281602381
Don't ignore filters in smart step over for inline calls
2017-07-18 14:39:55 +03:00
Nikolay Krasko
f664ffb06b
Check correspondent call on end token for better step over (KT-18949)
...
#KT-18949 Fixed
2017-07-18 14:39:54 +03:00
Nikolay Krasko
d282f14eac
Don't add double linenumber when return expression is absent (KT-18949)
...
#KT-18949 Fixed
2017-07-18 14:39:54 +03:00
Nikolay Krasko
a41c9d2476
Avoid state machine build for suspend function with single inline call
...
#KT-18949 Fixed
2017-07-18 14:39:54 +03:00
Nikolay Krasko
ce4f923ba0
Replace return with nop to avoid merging line instructions (KT-18949)
...
Dex ignores subsequent line numbers for same instructions and interprets
instruction after inline as if they were inlined. This makes debugger
behaves as if there's nowhere to stop on line with breakpoint.
This also makes stepping through inline function consistent with
non-inline analog. In both context debugger now stops on '}'.
#KT-18949 Fixed
#KT-17120 Fixed
2017-07-18 14:39:54 +03:00
Nikolay Krasko
fc685aa03f
Refactoring: extract common part to function
2017-07-18 14:39:54 +03:00
Nikolay Krasko
179ec84684
Refactoring: mark getTopmostElementAtOffset() as not-null
2017-07-18 14:39:54 +03:00
Mikhail Glukhikh
c0e1b3ef2d
CFG: fix label binding for last instruction of finally block
...
So #KT-18698 Fixed
2017-07-18 14:37:13 +03:00
Mikhail Glukhikh
ab0e734e7d
PseudocodeLabel: add slightly better exception diagnostics
2017-07-18 14:36:42 +03:00
Mikhail Glukhikh
9a5b5393f5
Code cleanup: CFG (several inspections applied)
2017-07-18 14:36:18 +03:00
Mikhail Glukhikh
43f9035d07
Minor test fix
2017-07-18 13:51:27 +03:00
Toshiaki Kameyama
f8cf0f2ab9
Misleading quick fix message for an 'open' modifier on an interface member #KT-18738 Fixed
2017-07-18 18:59:22 +09:00
Alexey Sedunov
d2dbc47454
Create from Usage: Remove extra space before type parameters list
...
#KT-16352 Fixed
2017-07-17 16:09:57 +03:00
Alexey Sedunov
e98af7bfc1
Create Class from Usage: Use type parameter bounds as supertypes
...
#KT-15242 Fixed
2017-07-17 16:09:55 +03:00
Alexey Sedunov
95769dc9d3
Create from Usage: Make property lateinit where possible
...
#KT-17651 Fixed
2017-07-17 16:09:54 +03:00
Alexey Sedunov
e9bf1d2ab8
Create from Usage: Add test for KT-17537
...
#KT-17537 Fixed
2017-07-17 16:09:53 +03:00
Alexey Sedunov
0365d3a3d6
Create from Usage: Do not create type parameter by constuctor reference
...
#KT-17353 Fixed
2017-07-17 16:09:52 +03:00
Alexey Sedunov
2e76a76088
Control Flow: Fix CFG usage info for double-colon expressions
...
#KT-12551 Fixed
#KT-17092 Fixed
2017-07-17 16:09:51 +03:00
Alexey Sedunov
216b28ec55
Implement Members: Do not generate 'header' keyword
...
#KT-18466 Fixed
2017-07-17 16:09:50 +03:00