Commit Graph

40257 Commits

Author SHA1 Message Date
Pavel V. Talanov 96c2a589c0 Support legacy resolver interface 2017-07-19 12:28:18 +03:00
Pavel V. Talanov 65dba3615c Update project code to use new script.runtime APIs 2017-07-19 12:28:15 +03:00
Pavel V. Talanov 375b058a28 Add coroutines-jdk8 to project 2017-07-19 12:28:13 +03:00
Pavel V. Talanov 1012a24afc Refactor: move KotlinScriptExternalImportsProviderImpl to 'cli' module 2017-07-19 12:28:10 +03:00
Pavel V. Talanov b6a7d831bf Script IDE API: remove <TF: Any> 2017-07-19 12:28:08 +03:00
Pavel V. Talanov 581176fa90 AbstractScriptConfigurationTest: adapt to changes in API 2017-07-19 12:28:05 +03:00
Pavel V. Talanov 788eaf8a18 Refactor getting dependencies for script files API
Deprecate KotlinScriptDefinition#getDependenciesFor
Expose dependencyResolver as a property
KotlinScriptExternalImportsProvider is the component clients should be asking for dependencies
2017-07-19 12:28:02 +03:00
Pavel V. Talanov ff391628de KSCM: fix wrong update on null return from Template.getDependenciesFor 2017-07-19 12:28:00 +03:00
Pavel V. Talanov 1834721880 KSCM: persist script dependencies between idea launches 2017-07-19 12:27:55 +03:00
Pavel V. Talanov 930d502b12 KSCM: rework async requests 2017-07-19 12:27:53 +03:00
Pavel V. Talanov 3c511f3f40 KSCM: temporary workaround gradle returning results in unstable order 2017-07-19 12:27:50 +03:00
Pavel V. Talanov fb0e0e3767 Introduce ScriptDependenciesFileAttribute to persist script dependencies 2017-07-19 12:27:48 +03:00
Pavel V. Talanov a2aeda7b2c Support async script dependency updates for annotation based templates
Do not try to cache dependencies for every script on startup
Schedule cache updates upon request as opposed to updating them synchronously
2017-07-19 12:27:45 +03:00
Pavel V. Talanov b7fc909821 Split compiler and ide specific parts of script dependency caching
Move all caching logic to ide specific KotlinScriptConfigurationManager
Clean up apis
Remove logging when updating caches
2017-07-19 12:27:43 +03:00
Anton Bannykh e43a145614 fixup: updated EXPECTED_REACHABLE_NODES 2017-07-19 12:24:09 +03:00
Anton Bannykh 6ed7eaf546 JS tests: changes to kotlin.test + the way compiler tests are generated. 2017-07-19 12:24:09 +03:00
Alexey Sedunov eda747c0bf Minor: Fix tests 2017-07-19 11:34:30 +03:00
Roman Elizarov f2b5f37b22 Support inline suspend functions built with compiler version less than 1.1.4/1.2-M1
The error message is removed and is replaced with a code that adapts
inline suspend functions produced by the old compiler with the
suspension markers that new compiler expects.
2017-07-19 08:59:55 +03:00
Roman Elizarov 9f0810f723 Pull implementations up from AbstractCoroutineContextElemenet
Fixes KT-18671
2017-07-19 08:59:43 +03:00
Alexander Udalov c9b14c5a45 Reduce classpath for class loader in CodegenTestCase
There's no point in adding JDK (mock or full) roots to it, as well as
stdlib/reflect/test (they are loaded by the parent class loader, created
in ForTestCompileRuntime)
2017-07-18 20:10:07 +03:00
Alexander Udalov 743278d456 Fix ReplInterpreter on Java 9 2017-07-18 20:10:05 +03:00
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