Commit Graph

42699 Commits

Author SHA1 Message Date
Alexey Andreev 7bee2ceac7 JS: add boxing/unboxing to default accessors of non-simple properties
See KT-21421
2017-11-27 17:01:19 +03:00
Alexey Andreev be4e2f96c2 JS: throw error from coroutine marker functions 2017-11-27 17:01:18 +03:00
Alexey Andreev 71b1591044 JS: replace suspend inline metadata after inlining
This fixes some issues on coroutine inlining, see tests
2017-11-27 17:01:18 +03:00
Alexey Andreev f8e7861ce6 JS: add partial tail-call optimization for suspend functions 2017-11-27 17:01:17 +03:00
Alexey Andreev 7c621488ad Remove unnecessary CONTAINS_NON_TAIL_SUSPEND_CALLS slice 2017-11-27 17:01:17 +03:00
Alexey Andreev 26843509c7 JS: disable suspend function tail-call optimization based on FE data
Partially fixes KT-21026
2017-11-27 17:01:16 +03:00
Alexey Andreev 6ab87ad66a Fix failing JS tests 2017-11-27 17:01:15 +03:00
Toshiaki Kameyama 2dd66225f3 Take into account vararg modifier in "Add type" quick fix
So #KT-20894 Fixed
2017-11-27 16:44:42 +03:00
Toshiaki Kameyama 4d93c08bd0 Do not propose to make local lateinit var immutable #KT-21104 Fixed 2017-11-27 16:44:04 +03:00
Alexander Udalov 938fd1a57e Use ResolvedCall for callable reference in KCallableNameProperty intrinsic
Instead of manually inspecting the DOUBLE_COLON_LHS slice, which is a
bit more error-prone. Note that new tests were passing before this
change
2017-11-27 12:46:56 +01:00
Alexander Udalov f4f5359725 Fix exception on inlining callable reference with implicit this in LHS
Use ResolvedCall to determine the receiver type in the JVM codegen,
instead of manually inspecting the PSI

 #KT-20821 Fixed
2017-11-27 12:46:55 +01:00
Alexey Sedunov 1ceb751061 Data Outflow: Allow for-loop variables
#KT-19018 Fixed
2017-11-27 14:36:09 +03:00
Alexey Sedunov fc307da383 Data Outflow: Show all reference expressions as separate steps
#KT-19012 Fixed
 #KT-19017 Fixed
 #KT-19036 Fixed
 #KT-19039 Fixed
 #KT-19104 Fixed
 #KT-19106 Fixed
2017-11-27 14:36:09 +03:00
Alexey Sedunov 0fc1c793fe Kotlin Facet: Support compileKotlinCommon tasks in Gradle importer
#KT-21187 Fixed
2017-11-27 14:36:09 +03:00
Alexey Sedunov 3f66d11624 Kotlin Facet: Fix language/API version initialization
#KT-21180 Fixed
2017-11-27 14:36:09 +03:00
Dmitry Jemerov 200d7f0718 Send API version instead of build number for plugin update checks
#KT-21263 Fixed
2017-11-24 19:39:22 +01:00
Alexey Tsvetkov a1939c093c Use isolated classloader for in-process compilation
#KT-20233 fixed
2017-11-24 16:17:13 +03:00
Alexey Tsvetkov 0077ab59d6 Remove custom cache version checks from Gradle
#KT-21009 fixed

Cache version could be changed only when compiler is changed.

@InputFiles on `AbstractKotlinCompileTool#computedCompilerClasspath`
ensures that non incremental build is performed when compiler is changed.
2017-11-24 16:17:13 +03:00
Nikolay Krasko 602ac3e816 Refactoring: GradleDependencyInspection -> DeprecatedGradleDependencyInspection 2017-11-24 14:29:03 +03:00
Nikolay Krasko bfb069b0c5 Warning and quick fix for using jre-artifacts in Maven (KT-20947)
#KT-20947 In Progress
2017-11-24 14:29:03 +03:00
Nikolay Krasko 99f7d605a7 Refactoring: move deprecation information to common place 2017-11-24 14:29:02 +03:00
Nikolay Krasko 0f1e169bd7 Introduce a quick fix for deprecated jre artifact in gradle (KT-20947)
#KT-20947 In Progress
2017-11-24 14:29:02 +03:00
Nikolay Krasko 23afa07e55 Inspection for using deprecated jre artifacts in Gradle (KT-20947)
#KT-20947 In Progress
2017-11-24 14:29:02 +03:00
Nikolay Krasko 4281b5e1b0 Refactoring: extract utility methods to separate class 2017-11-24 14:29:02 +03:00
Nikolay Krasko 64bb40869e Compare testData files with KotlinTestUtils.assertEqualsToFile 2017-11-24 14:29:02 +03:00
Nikolay Krasko 30d8875bdf Check file is valid before search in ScriptDependenciesCache
Otherwise search will fail.
2017-11-24 14:29:02 +03:00
Dmitry Jemerov 7625130b49 SOE protection when enumerating dependencies of common modules
#KT-20937 Fixed
2017-11-23 18:04:28 +01:00
Alexey Tsvetkov 2b708f67ee Add tests for explicit language/api version change in Gradle
Modifying language/api version should cause non-incremental build.
Implicit change (e.g. when versions are not specified, but the compiler
is updated 1.1->1.2) is handled by `AbstractKotlinCompileTool#computedCompilerClasspath`.
Explicit change is handled by `AbstractKotlinCompile#serializedCompilerArguments`.
2017-11-23 14:46:23 +03:00
Alexey Tsvetkov 913a997f24 Rebuild when language/api version is changed (JPS)
#KT-20757 fixed
2017-11-23 14:46:23 +03:00
Alexey Tsvetkov b1f0f87829 Fix default value for api version string in IC meta info file 2017-11-23 14:46:22 +03:00
Dmitry Savvinov b8447d6d97 Add test on smartcasts with reified types
This test introduces very special (for current implementation) case,
when we have smartcast indirectly, via some reified type parameter.

It covers recursive call inSmartCastManager.checkAndRecordPossibleCast(),
which wasn't previously covered by any test in testbase.
2017-11-23 12:45:10 +03:00
Dmitry Savvinov 440b6d9934 Add -Xeffect-system CLI argument which enables Effect System 2017-11-23 12:35:51 +03:00
Leonid Startsev 44d232a83c Extension point for synthetic function names contributions 2017-11-23 12:21:47 +03:00
Leonid Startsev d6e5551237 More entry points for compiler plugins
* In Kotlin/JS JPS compilation
* In kotlin-common CLI compiler
* In kotlin-common gradle build
2017-11-23 12:12:01 +03:00
Nicolay Mitropolsky 07601b2ec4 KtLightAnnotationForSourceEntry: varargs handling improved (KT-21335, EA-107118) 2017-11-23 10:37:24 +03:00
Nicolay Mitropolsky 23344783a5 KtLightAnnotationForSourceEntry: made more verbose with errors in arrays in params (KT-21335, EA-107118) 2017-11-23 10:37:24 +03:00
Alexander Udalov e43bf90b9c Use CompilerDeserializationConfiguration in JS IC package fragment
This is more correct because it'll allow the incremental package
fragment to be deserialized with the same analysis flags as the changed
sources. Currently it doesn't seem possible to add a reasonable test for
this fix because there are no flags relevant for JS except for
skipMetadataVersionCheck, which is experimental and thus doesn't require
a test
2017-11-22 18:33:04 +01:00
Dmitry Jemerov fd763bde17 Reorder imports to avoid merge conflict
(cherry picked from commit 4286cce)
2017-11-22 18:30:34 +01:00
Dmitry Jemerov 6586228c15 Logging to catch KT-20937 2017-11-22 16:42:01 +01:00
Mikhail Glukhikh 078c27efa3 Add fallback flag for legacy var smart casts after try #KT-21377 Fixed 2017-11-22 18:31:04 +03:00
Mikhail Glukhikh 8b6e63dc18 Add forgotten new inference to JS 2017-11-22 18:31:03 +03:00
Dmitry Jemerov dfe5eb65f9 Don't pack any kotlin stdlib classes into kotlin-plugin.jar
#KT-21395 Fixed

(cherry picked from commit 3fbc5ab)
2017-11-22 14:44:01 +01:00
Dmitry Jemerov e00cc5ab3d Don't crash with old versions of Android Gradle plugin
#KT-21383 Fixed
2017-11-22 14:14:26 +01:00
Simon Ogorodnik 236ba1d2f2 Refactor PerModulePackageCacheService to fix various problems
Original issue here - structure of VfsEvents,
when directory gets deleted, we receive only VFileDeleteEvent
for directory, but not it's content, so we should invalidate
all modules in which sources this directory located, and all
modules that located in such directory

Second problem - When VirtualFile was deleted it is impossible to
get ModuleInfo for it using getModuleInfoByVirtualFile

Third problem - stale references in cache, due cycle dependency

 #KT-20987 Fixed
2017-11-22 16:07:34 +03:00
Mikhail Zarechenskiy bee7ed1431 [NI] Fix mapping of type arguments to parameters for inner classes 2017-11-22 10:22:41 +03:00
Mikhail Zarechenskiy e526a87d54 [NI] Make model more robust: remove diagnostics from resolution atoms
Currently there are two major phases in NI that report diagnostics: resolution parts and completion. They connected in method `KotlinCallCompleter.runCompletion` and previously diagnostics were collected in several places, from resolution atoms, partly from constraint system and partly from `CallResolutionResult`, some of them were lost.

 To mitigate this problem, now diagnostics are not bind to the intermediate candidate, only to the result resolution candidate (overloaded or usual one). And all diagnostics are now collected in method `runCompletion`
2017-11-22 10:22:39 +03:00
Nikolay Krasko 6e51c4d5db Disable script dependency updater in AddRequireModuleTest 2017-11-21 18:55:42 +03:00
Nikolay Krasko a530163074 Add sources for 'reflect' and 'test' libs during JPS config (KT-20956)
#KT-20956 Fixed
2017-11-21 18:55:42 +03:00
Alexey Andreev ec8adfe7c4 JS: fix referencing outer class from secondary constructor
See KT-21041
2017-11-21 12:22:10 +03:00
Alexey Andreev 88441da131 JS: cache PropertyMetadata objects in property delegates
Also, remove unused PropertyMetadata instances

See KT-20737, KT-20738
2017-11-21 12:21:22 +03:00