Commit Graph

47058 Commits

Author SHA1 Message Date
Denis Zharkov 2c195555ad Minor. Reformat CoroutineCodegen.kt 2018-07-09 15:27:19 +03:00
Denis Zharkov 1ced127660 Minor. Move helpers for coroutines tests to kt-file 2018-07-09 15:27:19 +03:00
Roman Elizarov 3aa76c58fc Updated SuccessOrFailure class corresponding to KEEP-127 and docs. 2018-07-09 15:27:19 +03:00
Roman Elizarov 33f4a3fcbf Extracted BaseContinuationImpl 2018-07-09 15:27:19 +03:00
Roman Elizarov 38c17249b9 releaseInterceptedContinuation clarified and ref check in impl fixed 2018-07-09 15:27:19 +03:00
Roman Elizarov d33409ff8a Fixed boxing of SuccessOrFailure inside SafeContinuation impl 2018-07-09 15:27:19 +03:00
Roman Elizarov 0370fac0b6 Further design improvements for coroutines 1.3 APIs
* Documentation improvements and clarification
* Dropped legacy intrinsic functions
* Remove context parameter default from Continuation builder function
2018-07-09 15:27:19 +03:00
Roman Elizarov 719d45510a Continuation builder function 2018-07-09 15:27:19 +03:00
Roman Elizarov 0b17c619bc Fixed ContinuationImpl.intercepted 2018-07-09 15:27:19 +03:00
Roman Elizarov 7513557315 Unroll recursion in resumeWith
Fixes KT-18987
2018-07-09 15:27:19 +03:00
Roman Elizarov af9743709c Implement COROUTINE_SUSPENDED as a property with getter 2018-07-09 15:27:19 +03:00
Roman Elizarov aaabfa6382 Missing SinceKotlin declarations added for resume extensions 2018-07-09 15:27:19 +03:00
Roman Elizarov b06d626b21 releaseInterceptedContinuation and few other minor fixes 2018-07-09 15:27:19 +03:00
Roman Elizarov 8e2fae3322 More work on draft coroutines 1.3 ABI & API:
* SuspendFunction[01] interfaces removed, moved to RestrictedContinuationImpl
* validateContext introduced to check restricted coroutines
* Distinguish SuspendLambda as being lambda/coroutine and provide a separate
  toString implementation (draft) in its coroutine incarnation.
2018-07-09 15:27:19 +03:00
Roman Elizarov 29dcc4f18c Better support for mixed-version libs (override old method, too) 2018-07-09 15:27:19 +03:00
Roman Elizarov 8bbd78ca9a Draft Kotlin Coroutines 1.3 ABI & API:
* SuccessOrFailure inline class is introduced
* Continuation.resumeWith(SuccessOrFailure)
* createCoroutineUnintercepted
* [Restricted]ContinuationImpl as named suspending function base
* [Restricted]SuspendLambda as suspending lambda base
* SuspendFunction[01] interfaces for efficient createCoroutine
* Serializable coroutine classes
2018-07-09 15:27:19 +03:00
Alexander Podkhalyuzin fb5e11dfc6 simple public interface is Java, not Kotlin
#KT-22823 Fixed
2018-07-09 15:23:52 +03:00
Alexander Podkhalyuzin 04fd4ef9de Do not stop recursive visitor with return
#KT-23627 Fixed
2018-07-09 15:19:38 +03:00
Simon Ogorodnik 2d4cbc712d KT-25012: Use index to check is java file selected instead of traversing file tree
Add initial estimation via fileType index

 #KT-25012 fixed
2018-07-09 14:37:11 +03:00
Alexander Podkhalyuzin a92ce467a7 Fixed patchset branches 2018-07-06 18:31:21 +03:00
Alexander Podkhalyuzin 571fda0f45 Fixed deprecation of ConcurrentFactoryMap()
#KT-24892 Fixed
2018-07-06 17:20:46 +03:00
Mikhail Zarechenskiy 6dc36055b8 Make diagnostic about redundant spread in @Foo(s = *[A]) more clear 2018-07-06 15:54:23 +03:00
Mikhail Zarechenskiy 513b27f65f Make tests about varargs compatible with 1.2 and 1.3 versions 2018-07-06 15:23:33 +03:00
Mikhail Zarechenskiy c032a02373 Prohibit assigning single elements into varargs in named form
#KT-20588 Fixed
 #KT-20589 Fixed
2018-07-06 15:23:31 +03:00
Alexander Udalov 959c2f4843 Get rid of split packages in descriptors, descriptors.jvm, deserialization
Also move some other files to related packages and reformat moved files
2018-07-06 14:08:35 +02:00
Natalia Selezneva 4b1ce15619 Run script dependencies update on editor focus change
^KT-24588 Fixed
2018-07-06 11:58:35 +03:00
Sergey Rostov 7408504356 Fix StringIndexOutOfBoundsException in KotlinConsoleFilterProvider.kt (EA-118757) 2018-07-06 11:35:26 +03:00
Denis Zharkov 0d00eb7de3 Add postfix template for listOf/setOf/etc
#KT-25239 Fixed
2018-07-06 10:06:56 +03:00
Denis Zharkov 4ab97e8454 Minor. Reformat org.jetbrains.kotlin.idea.codeInsight.postfix 2018-07-06 10:06:56 +03:00
Denis Zharkov 6f4aa2296d Implement quickfix wrapping elements in collection literal calls
#KT-25238 Fixed
2018-07-06 10:06:56 +03:00
Nikolay Krasko 189260c013 Remove old code style settings files 2018-07-05 16:15:37 +03:00
Nikolay Krasko 36933a52ec Remove code style settings irrelevant for Kotlin project 2018-07-05 16:15:36 +03:00
Ilmir Usmanov bc8295b137 Minor: regenerate tests 2018-07-05 15:09:13 +03:00
Ilmir Usmanov 4ec82cad90 Minor: add test to call callable references from Java 2018-07-05 15:09:06 +03:00
Ilmir Usmanov 4e8cc53962 Minor: pass suspend flag to lambda's copy 2018-07-05 15:09:00 +03:00
Ilmir Usmanov 28ad498956 Use AnonymousFunctionDescriptor for suspend callable references
Also use it for local suspend functions, which allows us to remove hack
with dropSuspend.

Regenerate tests.
2018-07-05 15:08:49 +03:00
Ilmir Usmanov eea95441c5 Add diagnostics tests. Forbid callable reference to coroutineContext
#KT-16908: Fixed
2018-07-05 15:08:42 +03:00
Ilmir Usmanov f94b579d19 Implement callable references to suspend functions
In FE they have type KSuspendFunctionN
In BE they are treated like normal callable references with additional
parameter in invoke function.
2018-07-05 15:08:34 +03:00
Mikhail Zarechenskiy 5869274ff1 Disable errors in mod/rem tests that depend on language feature
Otherwise these tests will fail with LV=1.3
2018-07-05 12:59:43 +03:00
Mikhail Zarechenskiy 2939d9c8c6 Use correct lhs KotlinType & AsmType for is check generation
There were two problems:
  - For asm type `OBJECT_TYPE` was used, which can be wrong in case of
  inline classes, because it can be an underlying value of some inline class
  - For KotlinType, type from rhs was used
2018-07-05 12:55:43 +03:00
Mikhail Zarechenskiy 4f490ac264 Fix generation of checkcast instructions for inline classes
Normalize LHS and RHS types to use only boxed ones and then let bytecode
 optmizer reduce redundant boxing
2018-07-05 12:55:39 +03:00
Dmitry Savvinov 8eb7eab535 Make tests on -XXLanguage more tolerant to 1.2 -> 1.3 transition 2018-07-05 10:42:50 +03:00
Dmitry Savvinov 5cb949ad7f Fix language features in tests for gradual migration to 1.3 (part 2)
In 1.3, due to changes in language, testdata for some tests can be
different from 1.2

We want to simlultaneously test both versions, so instead of fixing
language version in such tests, we split them into two: one with fixed
1.2, another with fixed 1.3
2018-07-05 10:42:49 +03:00
Dmitry Savvinov 6d733ff7b9 Disable ContracsDSL in 1.3 2018-07-05 10:42:38 +03:00
Dmitry Savvinov 984ef9c3b1 Parse testing directives in AbstractLoadJavaTest 2018-07-05 10:41:41 +03:00
Ilya Gorbunov 1266ba682c Opt-in to use experimental unsigned types in tests
The opt-in is required to avoid side diagnostics about the experimentality.
2018-07-04 19:13:30 +03:00
Ilya Gorbunov b5fabf3f72 Make unsigned types experimental (with warning if not opted-in) 2018-07-04 19:12:11 +03:00
Nikolay Krasko 71292bd681 Disable formatting inspection for unmodified files 2018-07-04 17:31:14 +03:00
Nikolay Krasko 370608d12f Ignore more methods from stdlib in argument name hints (KT-18350)
#KT-18350 Fixed
2018-07-04 17:31:13 +03:00
Nikolay Krasko dcc6579dcb Modification trackers increment highlighting test 2018-07-04 17:31:10 +03:00