Commit Graph

48566 Commits

Author SHA1 Message Date
Toshiaki Kameyama dc57887a4d Create function quick fix: fix visibility from inline method #KT-25228 Fixed 2018-09-04 19:01:22 +03:00
Toshiaki Kameyama e2945b1d12 Add quickfix for "Interface doesn't have constructors" #KT-17687 Fixed 2018-09-04 18:58:56 +03:00
Toshiaki Kameyama b5ba475696 "Redundant lambda arrow" inspection: Also report arrow with single underscore parameter #KT-24728 Fixed 2018-09-04 18:29:46 +03:00
Toshiaki Kameyama 20535feb31 "Remove parameter" quick fix: Remove unused type parameter used as type projection #KT-23511 2018-09-04 18:29:13 +03:00
Ilya Gorbunov 3e38bbcb07 Update generator template to match manually edited _URanges.kt file 2018-09-04 17:39:51 +03:00
Ilya Gorbunov 64996618b3 Suppress signed literals used as unsigned values in stdlib tests 2018-09-04 17:39:51 +03:00
Alexander Podkhalyuzin c36d0e5db5 Changed action group text
#KT-26501 Fixed
2018-09-04 16:47:54 +03:00
victor.petukhov 921fc263e1 Remove PSI spec tests generation 2018-09-04 15:54:04 +03:00
Yan Zhulanow 7398a8149d Do not use ApplicationExtensionDescriptor in JPS (KT-26542)
The 'ExtensionPointName' class that ApplicationExtensionDescriptor uses is missing in the JPS classpath.
Now we don't use it unless the IDEA Application is properly initialized.
2018-09-04 14:54:45 +03:00
Roman Artemev 0eba87b571 [JS IR BE] Mute temporary broken tests 2018-09-04 12:43:39 +03:00
Roman Artemev 6387cc45aa Update testIr.html 2018-09-04 12:43:39 +03:00
Roman Artemev a46b1cf126 [JS IR BE] Remove workaround to run coroutine tests 2018-09-04 12:43:39 +03:00
Roman Artemev 54e98fc014 [JS IR BE] Make coroutine compile separately from stdlib
* use accessors instead of direct field access
2018-09-04 12:43:39 +03:00
Alexander Udalov 4f803d03cf Minor, fix test data 2018-08-31 19:54:08 +02:00
Mikhail Zarechenskiy 9a978d2c8f Fix test data after daadba0927 2018-08-31 18:17:34 +03:00
Mikhail Zarechenskiy 6c747dcdb2 Don't use constant conversion from signed to unsigned in stdlib
After daadba0927
2018-08-31 18:17:09 +03:00
victor.petukhov 110bc7412d Fix name of 'controlflow' folder with contract tests 2018-08-31 17:27:51 +03:00
Nicolay Mitropolsky 7068992937 183: gson for 183 updated to 2.8.5 2018-08-31 17:20:54 +03:00
Nicolay Mitropolsky c13eac7507 183: AbstractHierarchyTest.doHierarchyTest signature update 2018-08-31 17:20:54 +03:00
Nicolay Mitropolsky d415ca9cf6 fixed nullability for various listeners update in 183 2018-08-31 17:20:54 +03:00
victor.petukhov d9473c0b6e Add parsing spec tests support 2018-08-31 17:16:19 +03:00
victor.petukhov f322aba768 Add gradle task to generate json tests map 2018-08-31 17:16:10 +03:00
victor.petukhov 88d8bb84ac Add not linked spec tests support in printSpecTestStatistic gradle task 2018-08-31 17:16:00 +03:00
victor.petukhov 8d91e5998d Add spec tests for contracts 2018-08-31 17:15:51 +03:00
victor.petukhov ecf8b88c4c Add 'not linked' kind of spec tests 2018-08-31 17:15:40 +03:00
Yan Zhulanow 841bb4f253 Minor: Update DataFlowValueRenderingTestGenerated 2018-08-31 18:56:57 +05:00
Natalia Selezneva 3979ad7a1d Use correct classpath for Ide Scripting Console files during highlighting
KT-25606
2018-08-31 15:55:59 +03:00
Georgy Bronnikov 2fccf6875f Mute tests involving Char.{MIN,MAX}_VALUE, analogously to other primitive types 2018-08-31 15:44:05 +03:00
Roman Artemev 8a871b3f0c Update tests 2018-08-31 15:34:18 +03:00
Mikhael Bogdanov e6b8ade096 JVM_IR. Reference fields 2018-08-31 15:34:18 +03:00
Mikhael Bogdanov 92ce50b22c JVM_IR. Cache defaultImpls function declarations 2018-08-31 15:34:18 +03:00
Mikhael Bogdanov 5c0cdac69f JVM_IR. Support generic constructors after "Roll back constructor type parameters" 2018-08-31 15:34:18 +03:00
Roman Artemev 0b926af203 Add KotlinType in WrappedClassDescriptor & WrappedTypeParameterDescriptor 2018-08-31 15:34:18 +03:00
Roman Artemev fec8065fd0 Fix code review
Minor fixes
Fix JVM IR BE
Fix NATIVE
2018-08-31 15:34:18 +03:00
romanart afcdcf8217 Partially reimplement KotlinType based util using IrType 2018-08-31 15:34:18 +03:00
Roman Artemev d1621b80cc Fake wrapped descriptors first working draft
get rid of descriptors in Bridge and Enum lowerings
Replace property accessors function type with IrSimpleFunction because they couldn't be constructors
get rid of descriptors in Callable reference lowering
refactored descriptor factory and inner class lowering
Add isReified property to IrTypeParameter declaration
keep getting rid of descriptors
Get rid of descriptors in Shared Variable Manager
LocalDeclarationLowering also uses no descriptors
Fix psi2ir
Fix nested classes names
Fix outer reference in inner classes
Fix name generator
get rid of descriptors in coroutines - something is working
Fix name generator
Fix unbound symbols in JVM BE
Rename DeclarationFactory members
2018-08-31 15:34:18 +03:00
Mikhail Zarechenskiy daadba0927 Postpone conversions from signed constants to unsigned ones
#KT-26071 Fixed
2018-08-31 15:22:43 +03:00
Ilya Chernikov d785b7e4c5 Extract urls from any classloader that has getUrls(): List<URL> method
via reflection, e.g. IDEA platform UrlClassloader. This fix allow
kotlin JSR223 host for IDEA to extract classpath from the environment
properly (with appropriate fix on IDEA side as well).
2018-08-31 15:18:56 +03:00
Ilya Chernikov fd0eb6ee34 Implement support for class literals as annotation arguments...
on deserialization and reflection
2018-08-31 15:17:51 +03:00
Mikhail Glukhikh 68da28edb9 Fix some tests bound to changed annotation formatting 2018-08-31 15:03:25 +03:00
Toshiaki Kameyama 53c10238d6 Introduce inspection for safe cast + return #KT-26230 Fixed 2018-08-31 15:03:25 +03:00
Toshiaki Kameyama 2c71b3873e Introduce "flatMap { it } -> flatten" inspection #KT-25969 Fixed 2018-08-31 15:03:24 +03:00
Sergey Rostov cdcc588a55 IC: Fix CacheVersionsManager IC flag set.
Previously flag was set before the IncrementalCompilation.isEnabledForJvm() system property was set.
This cases that the cache versions was not saved.
2018-08-31 14:55:35 +03:00
Alexander Udalov 5f18439442 Use correct module name when calling internal members from other module
This is needed to avoid using the same module name for test root as for
the main source root in the Gradle plugin, which is needed to fix
KT-18955
2018-08-31 13:42:57 +02:00
Nicolay Mitropolsky d1667483a5 ModuleRootListener.rootsChanged parameter made non-null in 183 2018-08-31 13:20:00 +03:00
Sergey Rostov 437fc9d749 JPS: Refactor cache compatibility checking and build targets loading/dependency analysis.
CacheVersion class refactoring:

Responsibilities of class CacheVersion are splitted into:
	- interface CacheAttributesManager<Attrs>, that should:
	    - load actual cache attribute values from FS
	    - provide expected attribute values (that is required for current build)
	    - checks when the existed cache (with actual attributes) values is suitable for current build (expected atribute values)
	    - write new values to FS for next build
	- CacheAttributesDiff is created by calling CacheAttributesManager.loadDiff extension method. This is just pair of actual and expected cache attributes values, with reference to manager. Result of loadDiff can be saved.

CacheAttributesDiff are designed to be used as facade of attributes operations: CacheAttributesDiff.status are calculated based on actual and expected attribute values. Based on that status system may perform required actions (i.e. rebuild something, clearing caches, etc...).

Methods of CacheAttributesManager other then loadDiff should be used only through CacheAttributesDiff.
Build system should work in this order:
    - get implementation of CacheAttributesManager for particular compiler and cache
    - call loadDiff __once__ and save it result
    - perform actions based on `diff.status`
    - save new cache attribute values by calling `diff.saveExpectedIfNeeded()`

There are 2 implementation of CacheAttributesManager:
    - CacheVersionManager that simple checks cache version number.
    - CompositeLookupsCacheAttributesManager - manager for global lookups cache that may contain lookups for several compilers (jvm, js).

Gradle:

Usages of CacheVersion in gradle are kept as is. For compatibility this methods are added: CacheAttributesManager.saveIfNeeded, CacheAttributesManager.clean. This methods should not be used in new code.

JPS:

All JPS logic that was responsible for cache version checking completely rewritten.

To write proper implementation for version checking, this things also changed:
	- KotlinCompileContext introduced. This context lives between first calling build of kotlin target until build finish. As of now all kotlin targets are loaded on KotlinCompileContext initialization. This is required to collect kotlin target types used in this build (jvm/js). Also all build-wide logic are moved from KotlinBuilder to KotlinCompileContext. Chunk dependency calculation also moved to build start which improves performance for big projects #KT-26113
	- Kotlin bindings to JPS build targets also stored in KotlinCompileContext, and binding is fixed. Previously it is stored in local Context and reacreated for each chunk, now they stored in KotlinCompileContext which is binded by GlobalContextKey with this exception: source roots are calculated for each round, since temporary source roots with groovy stubs are created at build time and visible only in local compile context.
	- KotlinChunk introduced. All chunk-wide logic are moved from KotlinModuleBuildTarget (i.e compiler, language, cache version checking and dependent cache loading)
	- Fix legacy MPP common dependent modules

Cache version checking logic now works as following:
- At first chunk building all targets are loaded and used platforms are collected. Lookups cache manger is created based on this set. Actual cache attributes are loaded from FS. Based on CacheAttributesDiff.status this actions are performed: if cache is invalid all kotlin will be rebuilt. If cache is not required anymore it will be cleaned.
- Before build of each chunk local chunk cache attributes will be checked. If cache is invalid, chunk will be rebuilt. If cache is not required anymore it will be cleaned.

#KT-26113 Fixed
#KT-26072 Fixed
2018-08-31 11:13:18 +03:00
Denis Zharkov 3bdfd811e8 Add some new String methods in JDK 11 to built-ins mapping blacklist
These three methods are conflicting with existing extensions,
thus the behavior might be changed when switching to JDK 11

Probably, it's worth revisiting our strategy here,
e.g. by blacklisting all new methods in

 #KT-24974 Fixed
2018-08-31 10:33:09 +03:00
Dmitry Petrov 00aa6158c8 Fix IR tests for 1.3 2018-08-31 09:19:13 +03:00
Dmitry Petrov 4cf98fd3ce Fix IR generation for '!is' pattern 2018-08-31 09:12:44 +03:00
Ilya Gorbunov 623adbfe4a Do not use JVM-specific annotations in pure-JS generated sources 2018-08-31 04:17:42 +03:00