Ilya Gorbunov
9f303ed06e
Migrate to new coroutines API, rename Iterator implementation, annotate new API with SinceKotlin.
2017-01-14 20:14:06 +03:00
Ilya Gorbunov
ffb183a2f3
Move a bit of bytecode out of next()
2017-01-14 20:14:05 +03:00
Ilya Gorbunov
560c184fd4
Merge AbstractIterator and SequenceBuilder, remove hasNext call from next.
2017-01-14 20:14:03 +03:00
Ilya Gorbunov
141ad43039
Introduce buildSequence and buildIterator functions based on coroutines.
2017-01-14 20:14:01 +03:00
Ilya Gorbunov
3225ec8935
Provide headers for coroutine building blocks
2017-01-14 20:14:00 +03:00
Denis Zharkov
14f942aca7
Refine ABI for coroutine lambdas
...
Make their invoke work in the same way as any other suspend function:
it should return SUSPENDED_MARKER iff. it indeed became suspended
2017-01-14 19:51:05 +03:00
Denis Zharkov
85a3fefcc6
Get rid of SuspendFunctionX interfaces
...
Use a pair of effectively abstract methods in CoroutineImpl instead
2017-01-14 15:13:37 +03:00
Denis Zharkov
d346cbbe61
Update test data for light-analysis/coroutines
2017-01-14 15:13:37 +03:00
Denis Zharkov
c7f76d7ec8
Minor. Fix tests after CoroutineContext introduction
2017-01-14 15:13:36 +03:00
Denis Zharkov
6a1ad3a279
Get rid of unnecessary additional declarations in tests
2017-01-14 13:24:53 +03:00
Ilya Gorbunov
2dfcb490a5
Fix CoroutineContext tests, update public API dump
2017-01-14 13:24:53 +03:00
Roman Elizarov
8d6a913cee
CoroutineContext and ContinuationInterceptor (instead of dispatcher)
2017-01-14 13:24:53 +03:00
Denis Zharkov
f611e39a69
Fix return keyword completetion tests
...
Now suspendOrReturn is toplevel, so we should explicitly choose "return" item
2017-01-14 13:24:53 +03:00
Denis Zharkov
f56d9cfb26
Ignore failing coroutine related tests on JS
2017-01-14 13:24:53 +03:00
Denis Zharkov
10e67a9b4e
Minor. Run Generate tests
2017-01-14 13:24:53 +03:00
Denis Zharkov
c479aa7d65
JS: simplify how suspend functions inlined
2017-01-14 13:24:53 +03:00
Denis Zharkov
2fcc2bbae0
JS: allow to call suspend function from any position within another suspend function
2017-01-14 13:24:53 +03:00
Denis Zharkov
1f0d0028b2
Minor. Simplify coroutine related code in ExpressionCodegen
...
After previous change (treating suspend function as they return j/l/Object)
most of existing hacks concerning suspend functions' return type
became unnecessary
2017-01-14 13:24:53 +03:00
Denis Zharkov
2286027bed
Fix verify error with 'return when/if/try' in suspend function
...
The problem appears for tail-optimized suspend functions,
we erroneously assumed that when/if/try expressions in tail-call
position have simple types like `I` while actually, they can return SUSPENDED
object, i.e. must have `java/lang/Object` as return type.
But this only concerns branching operations in tail-call position,
so we have to make an additional analysis for remembering whether
a given expression is in a tail-call position.
Also, it's important here that we now assume
the return type of the current function as `java/lang/Object`
that is necessary to avoid wrong checkcasts.
#KT-15364 Fixed
2017-01-14 13:24:53 +03:00
Denis Zharkov
de9c41c412
Fix overridability rules for suspend functions
...
Treat suspend and non-suspend functions as conflicting
#KT-15413 Fixed
2017-01-14 13:24:53 +03:00
Denis Zharkov
978f53414f
Prohibit local suspend functions
...
#KT-15392 Fixed
2017-01-14 13:24:53 +03:00
Denis Zharkov
d43a4199f8
Prohibit suspend function type in supertype list
...
#KT-15391 Fixed
2017-01-14 13:24:53 +03:00
Denis Zharkov
f12409504f
Prohibit callable references to suspend functions
...
#KT-15662 Fixed
2017-01-14 13:24:53 +03:00
Denis Zharkov
695b6d9e67
Minor. Add test on local vars of suspend function type
2017-01-14 13:24:53 +03:00
Denis Zharkov
7837d736f7
Merge RestrictedCoroutineImpl into CoroutineImpl
2017-01-14 13:24:53 +03:00
Denis Zharkov
d487c1ef0f
Refine dispatching convention
...
Dispatching happens only via `suspendWithCurrentContinuation` calls
instead of each `resume` call
#KT-15657 Fixed
2017-01-14 13:24:53 +03:00
Denis Zharkov
0240ab0738
Support non-tail suspend calls in JVM back-end
...
#KT-15597 In Progress
2017-01-14 13:24:53 +03:00
Denis Zharkov
a048dde7a5
Support non-tail suspend calls in front-end
...
#KT-15597 In Progress
2017-01-14 13:24:53 +03:00
Denis Zharkov
2cb9d3a8ad
Move coroutine intrinsics to kotlin.coroutine.intrinsics package
...
Also rename val SUSPENDED to SUSPENDED_MARKER
#KT-15698 Fixed
2017-01-14 13:24:53 +03:00
Alexey Tsvetkov
e0fa11b0c1
Fix handling OUTPUT message from daemon in JPS client
2017-01-13 22:17:41 +03:00
SuperVlad
5edb872224
Fix for KT-9594 J2K: null cast incorrect conversion.
...
#KT-9594 fixed
2017-01-13 22:03:24 +03:00
Mikhael Bogdanov
e5b8943d41
Added 'languageVersion' parameter to DiagnosticTestLanguageVersionSettings
2017-01-13 18:01:05 +01:00
Mikhael Bogdanov
b88a9025e0
Don't check DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE when compiling to 1.0
2017-01-13 18:01:05 +01:00
Ilya Gorbunov
80f2efb625
joinTo/joinToString: Do not call toString on elements that are already CharSequence or Char.
...
#KT-15557
2017-01-13 19:49:57 +03:00
Ilya Gorbunov
0c27e07e8c
Improve headers of Appendable and StringBuilder
2017-01-13 19:41:59 +03:00
Ilya Gorbunov
afdc7b94da
Add headers for print and println.
...
#KT-15458 fixed
2017-01-13 19:41:59 +03:00
Ilya Gorbunov
be95f66b13
Minor: remove unnecessary header.
2017-01-13 19:41:59 +03:00
Ilya Gorbunov
cdfb72ab76
Provide protected toArray implementation in AbstractCollection.
...
Relates to #KT-13898
2017-01-13 19:38:28 +03:00
Mikhael Bogdanov
bbf61664ea
Test fix
2017-01-13 14:30:01 +01:00
Mikhael Bogdanov
d8b7c7bc34
Added run configuration for Java 8 test on jdk 9
2017-01-13 13:52:58 +01:00
Mikhael Bogdanov
09eeb414fe
New test for jvm8 nondefaults target
2017-01-13 13:52:57 +01:00
Mikhael Bogdanov
d278a5c6d5
Move java 8+defaults tests to separate folder
2017-01-13 13:52:57 +01:00
Mikhael Bogdanov
0a363fd1a5
Introduced test flag: JVM8_TARGET_WITH_DEFAULTS
2017-01-13 13:52:56 +01:00
Mikhael Bogdanov
7f8acbb759
Use proper flag for interface method invocation
2017-01-13 13:52:55 +01:00
Mikhael Bogdanov
0f2139f27d
InstructionAdapter.invokeX updated to non-deprecated ones
2017-01-13 13:52:55 +01:00
Mikhael Bogdanov
62514e126d
Enable jvm 1.8 platform in cli
2017-01-13 13:52:54 +01:00
Mikhael Bogdanov
b6bf53f96f
Revert ' Temporary remove JVM_1_8 target from facet settings'
2017-01-13 13:52:54 +01:00
Sergey Mashkov
a3f5d8e68a
KT-15673 Couldn't use header function in 3rd module
2017-01-13 15:34:14 +03:00
Sergey Mashkov
39ad8fb22c
Maven: tests support for multiplatform projects
2017-01-13 15:34:13 +03:00
Alexey Sedunov
a9645e1ae9
Extract Superclass: Drop inapplicable modifiers when converting property-parameter to ordinary parameter
...
#KT-15674 Fixed
2017-01-13 15:17:45 +03:00