@glandais/vcyclist-engine 2.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +110 -25
- package/fit-kotlin-sdk.js +13575 -0
- package/fit-kotlin-sdk.js.map +1 -0
- package/kotlin-kotlin-stdlib.js +2975 -2174
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -1
- package/kotlinx-atomicfu.js +22 -22
- package/kotlinx-atomicfu.js.map +1 -1
- package/kotlinx-browser.js.map +1 -1
- package/kotlinx-coroutines-core.js +1224 -1224
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/package.json +7 -8
- package/vcyclist-elevation.js +1035 -972
- package/vcyclist-elevation.js.map +1 -1
- package/vcyclist-engine.d.ts +8 -3
- package/vcyclist-engine.js +913 -761
- package/vcyclist-engine.js.map +1 -1
- package/vcyclist-fit.js +563 -376
- package/vcyclist-fit.js.map +1 -1
- package/vcyclist-gpx.js +1360 -1119
- package/vcyclist-gpx.js.map +1 -1
- package/xmlutil-core.js +2983 -2950
- package/xmlutil-core.js.map +1 -1
- package/xmlutil-serialization.js.map +1 -1
|
@@ -16,99 +16,99 @@
|
|
|
16
16
|
'use strict';
|
|
17
17
|
//region block: imports
|
|
18
18
|
var imul = Math.imul;
|
|
19
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
20
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
21
|
-
var Element = kotlin_kotlin.$_$.
|
|
22
|
-
var Continuation = kotlin_kotlin.$_$.
|
|
23
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
19
|
+
var Unit_instance = kotlin_kotlin.$_$.f1;
|
|
20
|
+
var protoOf = kotlin_kotlin.$_$.t6;
|
|
21
|
+
var Element = kotlin_kotlin.$_$.q4;
|
|
22
|
+
var Continuation = kotlin_kotlin.$_$.m4;
|
|
23
|
+
var initMetadataForClass = kotlin_kotlin.$_$.e6;
|
|
24
24
|
var VOID = kotlin_kotlin.$_$.a;
|
|
25
|
-
var toString = kotlin_kotlin.$_$.
|
|
25
|
+
var toString = kotlin_kotlin.$_$.w6;
|
|
26
26
|
var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
|
|
27
|
-
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.
|
|
28
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.
|
|
29
|
-
var Companion_instance = kotlin_kotlin.$_$.
|
|
27
|
+
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.v4;
|
|
28
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h1;
|
|
29
|
+
var Companion_instance = kotlin_kotlin.$_$.e1;
|
|
30
30
|
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.h;
|
|
31
31
|
var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
|
|
32
|
-
var intercepted = kotlin_kotlin.$_$.
|
|
33
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
34
|
-
var copyToArray = kotlin_kotlin.$_$.
|
|
35
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
36
|
-
var emptyList = kotlin_kotlin.$_$.
|
|
37
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
38
|
-
var EmptyCoroutineContext_getInstance = kotlin_kotlin.$_$.
|
|
39
|
-
var createCoroutineUnintercepted = kotlin_kotlin.$_$.
|
|
40
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
41
|
-
var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.
|
|
42
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
43
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
44
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.
|
|
45
|
-
var toString_0 = kotlin_kotlin.$_$.
|
|
46
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
47
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
48
|
-
var equals = kotlin_kotlin.$_$.
|
|
49
|
-
var CancellationException_init_$Create$ = kotlin_kotlin.$_$.
|
|
32
|
+
var intercepted = kotlin_kotlin.$_$.f4;
|
|
33
|
+
var CoroutineImpl = kotlin_kotlin.$_$.s4;
|
|
34
|
+
var copyToArray = kotlin_kotlin.$_$.b3;
|
|
35
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.d4;
|
|
36
|
+
var emptyList = kotlin_kotlin.$_$.c3;
|
|
37
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.g6;
|
|
38
|
+
var EmptyCoroutineContext_getInstance = kotlin_kotlin.$_$.x;
|
|
39
|
+
var createCoroutineUnintercepted = kotlin_kotlin.$_$.e4;
|
|
40
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.i6;
|
|
41
|
+
var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.j2;
|
|
42
|
+
var isInterface = kotlin_kotlin.$_$.m6;
|
|
43
|
+
var THROW_CCE = kotlin_kotlin.$_$.e9;
|
|
44
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.a2;
|
|
45
|
+
var toString_0 = kotlin_kotlin.$_$.w9;
|
|
46
|
+
var initMetadataForObject = kotlin_kotlin.$_$.k6;
|
|
47
|
+
var hashCode = kotlin_kotlin.$_$.d6;
|
|
48
|
+
var equals = kotlin_kotlin.$_$.x5;
|
|
49
|
+
var CancellationException_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
50
50
|
var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.b;
|
|
51
51
|
var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.i;
|
|
52
52
|
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.l;
|
|
53
|
-
var createFailure = kotlin_kotlin.$_$.
|
|
54
|
-
var AbstractCoroutineContextKey = kotlin_kotlin.$_$.
|
|
55
|
-
var Key_instance = kotlin_kotlin.$_$.
|
|
56
|
-
var AbstractCoroutineContextElement = kotlin_kotlin.$_$.
|
|
57
|
-
var get = kotlin_kotlin.$_$.
|
|
58
|
-
var minusKey = kotlin_kotlin.$_$.
|
|
59
|
-
var ContinuationInterceptor = kotlin_kotlin.$_$.
|
|
60
|
-
var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.
|
|
61
|
-
var addSuppressed = kotlin_kotlin.$_$.
|
|
62
|
-
var Enum = kotlin_kotlin.$_$.
|
|
63
|
-
var startCoroutine = kotlin_kotlin.$_$.
|
|
64
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
65
|
-
var Long = kotlin_kotlin.$_$.
|
|
66
|
-
var ArrayDeque_init_$Create$ = kotlin_kotlin.$_$.
|
|
67
|
-
var compare = kotlin_kotlin.$_$.
|
|
68
|
-
var add = kotlin_kotlin.$_$.
|
|
69
|
-
var subtract = kotlin_kotlin.$_$.
|
|
70
|
-
var RuntimeException = kotlin_kotlin.$_$.
|
|
71
|
-
var RuntimeException_init_$Init$ = kotlin_kotlin.$_$.
|
|
72
|
-
var captureStack = kotlin_kotlin.$_$.
|
|
73
|
-
var Error_0 = kotlin_kotlin.$_$.
|
|
74
|
-
var Error_init_$Init$ = kotlin_kotlin.$_$.
|
|
75
|
-
var CancellationException = kotlin_kotlin.$_$.
|
|
76
|
-
var ArrayList = kotlin_kotlin.$_$.
|
|
77
|
-
var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
78
|
-
var plus = kotlin_kotlin.$_$.
|
|
79
|
-
var get_0 = kotlin_kotlin.$_$.
|
|
80
|
-
var fold = kotlin_kotlin.$_$.
|
|
81
|
-
var minusKey_0 = kotlin_kotlin.$_$.
|
|
82
|
-
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.
|
|
83
|
-
var anyToString = kotlin_kotlin.$_$.
|
|
84
|
-
var constructCallableReference = kotlin_kotlin.$_$.
|
|
85
|
-
var UnsupportedOperationException = kotlin_kotlin.$_$.
|
|
86
|
-
var ensureNotNull = kotlin_kotlin.$_$.
|
|
87
|
-
var fromInt = kotlin_kotlin.$_$.
|
|
88
|
-
var Exception = kotlin_kotlin.$_$.
|
|
89
|
-
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.
|
|
90
|
-
var Exception_init_$Init$ = kotlin_kotlin.$_$.
|
|
91
|
-
var defineProp = kotlin_kotlin.$_$.
|
|
92
|
-
var convertToInt = kotlin_kotlin.$_$.
|
|
93
|
-
var toLongOrNull = kotlin_kotlin.$_$.
|
|
94
|
-
var startCoroutineUninterceptedOrReturnNonGeneratorVersion = kotlin_kotlin.$_$.
|
|
95
|
-
var Unit = kotlin_kotlin.$_$.
|
|
96
|
-
var divide = kotlin_kotlin.$_$.
|
|
97
|
-
var modulo = kotlin_kotlin.$_$.
|
|
53
|
+
var createFailure = kotlin_kotlin.$_$.m9;
|
|
54
|
+
var AbstractCoroutineContextKey = kotlin_kotlin.$_$.i4;
|
|
55
|
+
var Key_instance = kotlin_kotlin.$_$.w;
|
|
56
|
+
var AbstractCoroutineContextElement = kotlin_kotlin.$_$.h4;
|
|
57
|
+
var get = kotlin_kotlin.$_$.j4;
|
|
58
|
+
var minusKey = kotlin_kotlin.$_$.k4;
|
|
59
|
+
var ContinuationInterceptor = kotlin_kotlin.$_$.l4;
|
|
60
|
+
var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.i2;
|
|
61
|
+
var addSuppressed = kotlin_kotlin.$_$.l9;
|
|
62
|
+
var Enum = kotlin_kotlin.$_$.v8;
|
|
63
|
+
var startCoroutine = kotlin_kotlin.$_$.t4;
|
|
64
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.r9;
|
|
65
|
+
var Long = kotlin_kotlin.$_$.z8;
|
|
66
|
+
var ArrayDeque_init_$Create$ = kotlin_kotlin.$_$.g1;
|
|
67
|
+
var compare = kotlin_kotlin.$_$.z4;
|
|
68
|
+
var add = kotlin_kotlin.$_$.x4;
|
|
69
|
+
var subtract = kotlin_kotlin.$_$.j5;
|
|
70
|
+
var RuntimeException = kotlin_kotlin.$_$.d9;
|
|
71
|
+
var RuntimeException_init_$Init$ = kotlin_kotlin.$_$.h2;
|
|
72
|
+
var captureStack = kotlin_kotlin.$_$.o5;
|
|
73
|
+
var Error_0 = kotlin_kotlin.$_$.w8;
|
|
74
|
+
var Error_init_$Init$ = kotlin_kotlin.$_$.t1;
|
|
75
|
+
var CancellationException = kotlin_kotlin.$_$.c4;
|
|
76
|
+
var ArrayList = kotlin_kotlin.$_$.k2;
|
|
77
|
+
var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.b2;
|
|
78
|
+
var plus = kotlin_kotlin.$_$.r4;
|
|
79
|
+
var get_0 = kotlin_kotlin.$_$.o4;
|
|
80
|
+
var fold = kotlin_kotlin.$_$.n4;
|
|
81
|
+
var minusKey_0 = kotlin_kotlin.$_$.p4;
|
|
82
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.s1;
|
|
83
|
+
var anyToString = kotlin_kotlin.$_$.m5;
|
|
84
|
+
var constructCallableReference = kotlin_kotlin.$_$.u5;
|
|
85
|
+
var UnsupportedOperationException = kotlin_kotlin.$_$.k9;
|
|
86
|
+
var ensureNotNull = kotlin_kotlin.$_$.n9;
|
|
87
|
+
var fromInt = kotlin_kotlin.$_$.e5;
|
|
88
|
+
var Exception = kotlin_kotlin.$_$.x8;
|
|
89
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.y1;
|
|
90
|
+
var Exception_init_$Init$ = kotlin_kotlin.$_$.x1;
|
|
91
|
+
var defineProp = kotlin_kotlin.$_$.v5;
|
|
92
|
+
var convertToInt = kotlin_kotlin.$_$.b5;
|
|
93
|
+
var toLongOrNull = kotlin_kotlin.$_$.n8;
|
|
94
|
+
var startCoroutineUninterceptedOrReturnNonGeneratorVersion = kotlin_kotlin.$_$.g4;
|
|
95
|
+
var Unit = kotlin_kotlin.$_$.j9;
|
|
96
|
+
var divide = kotlin_kotlin.$_$.c5;
|
|
97
|
+
var modulo = kotlin_kotlin.$_$.f5;
|
|
98
98
|
var atomic$long$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.c;
|
|
99
99
|
var atomicfu$AtomicRefArray$ofNulls = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.a;
|
|
100
|
-
var getKClassFromExpression = kotlin_kotlin.$_$.
|
|
101
|
-
var Exception_init_$Create$ = kotlin_kotlin.$_$.
|
|
102
|
-
var CancellationException_init_$Init$ = kotlin_kotlin.$_$.
|
|
103
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
104
|
-
var HashSet_init_$Create$ = kotlin_kotlin.$_$.
|
|
105
|
-
var RuntimeException_init_$Init$_0 = kotlin_kotlin.$_$.
|
|
106
|
-
var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.
|
|
107
|
-
var stackTraceToString = kotlin_kotlin.$_$.
|
|
108
|
-
var removeFirstOrNull = kotlin_kotlin.$_$.
|
|
109
|
-
var
|
|
110
|
-
var
|
|
111
|
-
var
|
|
100
|
+
var getKClassFromExpression = kotlin_kotlin.$_$.j7;
|
|
101
|
+
var Exception_init_$Create$ = kotlin_kotlin.$_$.w1;
|
|
102
|
+
var CancellationException_init_$Init$ = kotlin_kotlin.$_$.q1;
|
|
103
|
+
var getStringHashCode = kotlin_kotlin.$_$.c6;
|
|
104
|
+
var HashSet_init_$Create$ = kotlin_kotlin.$_$.k1;
|
|
105
|
+
var RuntimeException_init_$Init$_0 = kotlin_kotlin.$_$.g2;
|
|
106
|
+
var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.o1;
|
|
107
|
+
var stackTraceToString = kotlin_kotlin.$_$.t9;
|
|
108
|
+
var removeFirstOrNull = kotlin_kotlin.$_$.q3;
|
|
109
|
+
var MutableIterable = kotlin_kotlin.$_$.o2;
|
|
110
|
+
var KtList = kotlin_kotlin.$_$.m2;
|
|
111
|
+
var Collection = kotlin_kotlin.$_$.l2;
|
|
112
112
|
//endregion
|
|
113
113
|
//region block: pre-declaration
|
|
114
114
|
initMetadataForInterface(ParentJob, 'ParentJob', VOID, VOID, [Element], [0]);
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
initMetadataForClass(SemaphoreSegment, 'SemaphoreSegment', VOID, Segment);
|
|
185
185
|
initMetadataForClass(SetTimeoutBasedDispatcher, 'SetTimeoutBasedDispatcher', VOID, CoroutineDispatcher, VOID, [1]);
|
|
186
186
|
initMetadataForObject(NodeDispatcher, 'NodeDispatcher', VOID, SetTimeoutBasedDispatcher, VOID, [1]);
|
|
187
|
-
initMetadataForClass(MessageQueue, 'MessageQueue', VOID, VOID, [
|
|
187
|
+
initMetadataForClass(MessageQueue, 'MessageQueue', VOID, VOID, [MutableIterable, KtList, Collection]);
|
|
188
188
|
initMetadataForClass(ScheduledMessageQueue, 'ScheduledMessageQueue', VOID, MessageQueue);
|
|
189
189
|
initMetadataForClass(WindowMessageQueue, 'WindowMessageQueue', VOID, MessageQueue);
|
|
190
190
|
initMetadataForObject(Dispatchers, 'Dispatchers');
|
|
@@ -200,125 +200,125 @@
|
|
|
200
200
|
function AbstractCoroutine(parentContext, initParentJob, active) {
|
|
201
201
|
JobSupport.call(this, active);
|
|
202
202
|
if (initParentJob) {
|
|
203
|
-
this.
|
|
203
|
+
this.initParentJob_jbhsg3_k$(parentContext.get_y2st91_k$(Key_instance_2));
|
|
204
204
|
}
|
|
205
|
-
this.
|
|
205
|
+
this.context_1 = parentContext.plus_s13ygv_k$(this);
|
|
206
206
|
}
|
|
207
|
-
protoOf(AbstractCoroutine).
|
|
208
|
-
return this.
|
|
207
|
+
protoOf(AbstractCoroutine).get_context_h02k06_k$ = function () {
|
|
208
|
+
return this.context_1;
|
|
209
209
|
};
|
|
210
|
-
protoOf(AbstractCoroutine).
|
|
211
|
-
return this.
|
|
210
|
+
protoOf(AbstractCoroutine).get_coroutineContext_115oqo_k$ = function () {
|
|
211
|
+
return this.context_1;
|
|
212
212
|
};
|
|
213
|
-
protoOf(AbstractCoroutine).
|
|
214
|
-
return protoOf(JobSupport).
|
|
213
|
+
protoOf(AbstractCoroutine).get_isActive_quafmh_k$ = function () {
|
|
214
|
+
return protoOf(JobSupport).get_isActive_quafmh_k$.call(this);
|
|
215
215
|
};
|
|
216
|
-
protoOf(AbstractCoroutine).
|
|
216
|
+
protoOf(AbstractCoroutine).onCompleted_whnx9v_k$ = function (value) {
|
|
217
217
|
};
|
|
218
|
-
protoOf(AbstractCoroutine).
|
|
218
|
+
protoOf(AbstractCoroutine).onCancelled_gb68wi_k$ = function (cause, handled) {
|
|
219
219
|
};
|
|
220
|
-
protoOf(AbstractCoroutine).
|
|
220
|
+
protoOf(AbstractCoroutine).cancellationExceptionMessage_a64063_k$ = function () {
|
|
221
221
|
return get_classSimpleName(this) + ' was cancelled';
|
|
222
222
|
};
|
|
223
|
-
protoOf(AbstractCoroutine).
|
|
223
|
+
protoOf(AbstractCoroutine).onCompletionInternal_38s8uv_k$ = function (state) {
|
|
224
224
|
if (state instanceof CompletedExceptionally) {
|
|
225
|
-
this.
|
|
225
|
+
this.onCancelled_gb68wi_k$(state.cause_1, state.get_handled_cq14k3_k$());
|
|
226
226
|
} else {
|
|
227
|
-
this.
|
|
227
|
+
this.onCompleted_whnx9v_k$(state);
|
|
228
228
|
}
|
|
229
229
|
};
|
|
230
|
-
protoOf(AbstractCoroutine).
|
|
231
|
-
var state = this.
|
|
230
|
+
protoOf(AbstractCoroutine).resumeWith_rk9gbt_k$ = function (result) {
|
|
231
|
+
var state = this.makeCompletingOnce_m8ggg9_k$(toState_0(result));
|
|
232
232
|
if (state === get_COMPLETING_WAITING_CHILDREN())
|
|
233
233
|
return Unit_instance;
|
|
234
|
-
this.
|
|
234
|
+
this.afterResume_ugh2hm_k$(state);
|
|
235
235
|
};
|
|
236
|
-
protoOf(AbstractCoroutine).
|
|
237
|
-
return this.
|
|
236
|
+
protoOf(AbstractCoroutine).afterResume_ugh2hm_k$ = function (state) {
|
|
237
|
+
return this.afterCompletion_2p0irt_k$(state);
|
|
238
238
|
};
|
|
239
|
-
protoOf(AbstractCoroutine).
|
|
240
|
-
handleCoroutineException(this.
|
|
239
|
+
protoOf(AbstractCoroutine).handleOnCompletionException_l1g6ri_k$ = function (exception) {
|
|
240
|
+
handleCoroutineException(this.context_1, exception);
|
|
241
241
|
};
|
|
242
|
-
protoOf(AbstractCoroutine).
|
|
243
|
-
var tmp0_elvis_lhs = get_coroutineName(this.
|
|
242
|
+
protoOf(AbstractCoroutine).nameString_4rfuxd_k$ = function () {
|
|
243
|
+
var tmp0_elvis_lhs = get_coroutineName(this.context_1);
|
|
244
244
|
var tmp;
|
|
245
245
|
if (tmp0_elvis_lhs == null) {
|
|
246
|
-
return protoOf(JobSupport).
|
|
246
|
+
return protoOf(JobSupport).nameString_4rfuxd_k$.call(this);
|
|
247
247
|
} else {
|
|
248
248
|
tmp = tmp0_elvis_lhs;
|
|
249
249
|
}
|
|
250
250
|
var coroutineName = tmp;
|
|
251
|
-
return '"' + coroutineName + '":' + protoOf(JobSupport).
|
|
251
|
+
return '"' + coroutineName + '":' + protoOf(JobSupport).nameString_4rfuxd_k$.call(this);
|
|
252
252
|
};
|
|
253
|
-
protoOf(AbstractCoroutine).
|
|
254
|
-
start.
|
|
253
|
+
protoOf(AbstractCoroutine).start_50fwcj_k$ = function (start, receiver, block) {
|
|
254
|
+
start.invoke_neaz0o_k$(block, receiver, this);
|
|
255
255
|
};
|
|
256
256
|
function awaitAll(_this__u8e3s4, $completion) {
|
|
257
257
|
var tmp = new $awaitAllCOROUTINE$(_this__u8e3s4, $completion);
|
|
258
|
-
tmp.
|
|
259
|
-
tmp.
|
|
260
|
-
return tmp.
|
|
258
|
+
tmp.result_1 = Unit_instance;
|
|
259
|
+
tmp.exception_1 = null;
|
|
260
|
+
return tmp.doResume_5yljmg_k$();
|
|
261
261
|
}
|
|
262
262
|
function DisposeHandlersOnCancel($outer, nodes) {
|
|
263
|
-
this
|
|
264
|
-
this.
|
|
263
|
+
this.$this_1 = $outer;
|
|
264
|
+
this.nodes_1 = nodes;
|
|
265
265
|
}
|
|
266
|
-
protoOf(DisposeHandlersOnCancel).
|
|
266
|
+
protoOf(DisposeHandlersOnCancel).disposeAll_hpz7bi_k$ = function () {
|
|
267
267
|
// Inline function 'kotlin.collections.forEach' call
|
|
268
|
-
var indexedObject = this.
|
|
268
|
+
var indexedObject = this.nodes_1;
|
|
269
269
|
var inductionVariable = 0;
|
|
270
270
|
var last = indexedObject.length;
|
|
271
271
|
while (inductionVariable < last) {
|
|
272
272
|
var element = indexedObject[inductionVariable];
|
|
273
273
|
inductionVariable = inductionVariable + 1 | 0;
|
|
274
|
-
element.
|
|
274
|
+
element.get_handle_e5p7ht_k$().dispose_3nnxhr_k$();
|
|
275
275
|
}
|
|
276
276
|
};
|
|
277
|
-
protoOf(DisposeHandlersOnCancel).
|
|
278
|
-
this.
|
|
277
|
+
protoOf(DisposeHandlersOnCancel).invoke_py2q9a_k$ = function (cause) {
|
|
278
|
+
this.disposeAll_hpz7bi_k$();
|
|
279
279
|
};
|
|
280
280
|
protoOf(DisposeHandlersOnCancel).toString = function () {
|
|
281
|
-
return 'DisposeHandlersOnCancel[' + toString(this.
|
|
281
|
+
return 'DisposeHandlersOnCancel[' + toString(this.nodes_1) + ']';
|
|
282
282
|
};
|
|
283
283
|
function AwaitAllNode($outer, continuation) {
|
|
284
|
-
this
|
|
284
|
+
this.$this_1 = $outer;
|
|
285
285
|
JobNode.call(this);
|
|
286
|
-
this.
|
|
287
|
-
this.
|
|
286
|
+
this.continuation_1 = continuation;
|
|
287
|
+
this._disposer_1 = atomic$ref$1(null);
|
|
288
288
|
}
|
|
289
|
-
protoOf(AwaitAllNode).
|
|
290
|
-
var tmp = this.
|
|
289
|
+
protoOf(AwaitAllNode).get_handle_e5p7ht_k$ = function () {
|
|
290
|
+
var tmp = this.handle_1;
|
|
291
291
|
if (!(tmp == null))
|
|
292
292
|
return tmp;
|
|
293
293
|
else {
|
|
294
294
|
throwUninitializedPropertyAccessException('handle');
|
|
295
295
|
}
|
|
296
296
|
};
|
|
297
|
-
protoOf(AwaitAllNode).
|
|
298
|
-
this.
|
|
297
|
+
protoOf(AwaitAllNode).set_disposer_qhnkga_k$ = function (value) {
|
|
298
|
+
this._disposer_1.kotlinx$atomicfu$value = value;
|
|
299
299
|
};
|
|
300
|
-
protoOf(AwaitAllNode).
|
|
301
|
-
return this.
|
|
300
|
+
protoOf(AwaitAllNode).get_disposer_r356h0_k$ = function () {
|
|
301
|
+
return this._disposer_1.kotlinx$atomicfu$value;
|
|
302
302
|
};
|
|
303
|
-
protoOf(AwaitAllNode).
|
|
303
|
+
protoOf(AwaitAllNode).get_onCancelling_k07uns_k$ = function () {
|
|
304
304
|
return false;
|
|
305
305
|
};
|
|
306
|
-
protoOf(AwaitAllNode).
|
|
306
|
+
protoOf(AwaitAllNode).invoke_py2q9a_k$ = function (cause) {
|
|
307
307
|
if (!(cause == null)) {
|
|
308
|
-
var token = this.
|
|
308
|
+
var token = this.continuation_1.tryResumeWithException_4drsj6_k$(cause);
|
|
309
309
|
if (!(token == null)) {
|
|
310
|
-
this.
|
|
311
|
-
var tmp0_safe_receiver = this.
|
|
310
|
+
this.continuation_1.completeResume_fabtk_k$(token);
|
|
311
|
+
var tmp0_safe_receiver = this.get_disposer_r356h0_k$();
|
|
312
312
|
if (tmp0_safe_receiver == null)
|
|
313
313
|
null;
|
|
314
314
|
else {
|
|
315
|
-
tmp0_safe_receiver.
|
|
315
|
+
tmp0_safe_receiver.disposeAll_hpz7bi_k$();
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
} else if (this.
|
|
319
|
-
var tmp0 = this.
|
|
318
|
+
} else if (this.$this_1.notCompletedCount_1.atomicfu$decrementAndGet() === 0) {
|
|
319
|
+
var tmp0 = this.continuation_1;
|
|
320
320
|
// Inline function 'kotlin.collections.map' call
|
|
321
|
-
var this_0 = this.
|
|
321
|
+
var this_0 = this.$this_1.deferreds_1;
|
|
322
322
|
// Inline function 'kotlin.collections.mapTo' call
|
|
323
323
|
var destination = ArrayList_init_$Create$(this_0.length);
|
|
324
324
|
var inductionVariable = 0;
|
|
@@ -326,33 +326,33 @@
|
|
|
326
326
|
while (inductionVariable < last) {
|
|
327
327
|
var item = this_0[inductionVariable];
|
|
328
328
|
inductionVariable = inductionVariable + 1 | 0;
|
|
329
|
-
var tmp$ret$2 = item.
|
|
330
|
-
destination.
|
|
329
|
+
var tmp$ret$2 = item.getCompleted_nczk2z_k$();
|
|
330
|
+
destination.add_utx5q5_k$(tmp$ret$2);
|
|
331
331
|
}
|
|
332
332
|
// Inline function 'kotlin.coroutines.resume' call
|
|
333
333
|
// Inline function 'kotlin.Companion.success' call
|
|
334
334
|
var tmp$ret$4 = _Result___init__impl__xyqfz8(destination);
|
|
335
|
-
tmp0.
|
|
335
|
+
tmp0.resumeWith_rk9gbt_k$(tmp$ret$4);
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
338
|
function AwaitAll(deferreds) {
|
|
339
|
-
this.
|
|
340
|
-
this.
|
|
339
|
+
this.deferreds_1 = deferreds;
|
|
340
|
+
this.notCompletedCount_1 = atomic$int$1(this.deferreds_1.length);
|
|
341
341
|
}
|
|
342
|
-
protoOf(AwaitAll).
|
|
342
|
+
protoOf(AwaitAll).await_63ppyd_k$ = function ($completion) {
|
|
343
343
|
var cancellable = new CancellableContinuationImpl(intercepted($completion), 1);
|
|
344
|
-
cancellable.
|
|
344
|
+
cancellable.initCancellability_shqc60_k$();
|
|
345
345
|
var tmp = 0;
|
|
346
|
-
var tmp_0 = this.
|
|
346
|
+
var tmp_0 = this.deferreds_1.length;
|
|
347
347
|
// Inline function 'kotlin.arrayOfNulls' call
|
|
348
348
|
var tmp_1 = Array(tmp_0);
|
|
349
349
|
while (tmp < tmp_0) {
|
|
350
350
|
var tmp_2 = tmp;
|
|
351
|
-
var deferred = this.
|
|
352
|
-
deferred.
|
|
351
|
+
var deferred = this.deferreds_1[tmp_2];
|
|
352
|
+
deferred.start_1tchgi_k$();
|
|
353
353
|
// Inline function 'kotlin.apply' call
|
|
354
354
|
var this_0 = new AwaitAllNode(this, cancellable);
|
|
355
|
-
this_0.
|
|
355
|
+
this_0.handle_1 = invokeOnCompletion(deferred, VOID, this_0);
|
|
356
356
|
tmp_1[tmp_2] = this_0;
|
|
357
357
|
tmp = tmp + 1 | 0;
|
|
358
358
|
}
|
|
@@ -364,35 +364,35 @@
|
|
|
364
364
|
while (inductionVariable < last) {
|
|
365
365
|
var element = nodes[inductionVariable];
|
|
366
366
|
inductionVariable = inductionVariable + 1 | 0;
|
|
367
|
-
element.
|
|
367
|
+
element.set_disposer_qhnkga_k$(disposer);
|
|
368
368
|
}
|
|
369
|
-
if (cancellable.
|
|
370
|
-
disposer.
|
|
369
|
+
if (cancellable.get_isCompleted_a6j6c8_k$()) {
|
|
370
|
+
disposer.disposeAll_hpz7bi_k$();
|
|
371
371
|
} else {
|
|
372
372
|
invokeOnCancellation(cancellable, disposer);
|
|
373
373
|
}
|
|
374
|
-
return cancellable.
|
|
374
|
+
return cancellable.getResult_fck196_k$();
|
|
375
375
|
};
|
|
376
376
|
function $awaitAllCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
377
377
|
CoroutineImpl.call(this, resultContinuation);
|
|
378
|
-
this.
|
|
378
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
379
379
|
}
|
|
380
|
-
protoOf($awaitAllCOROUTINE$).
|
|
381
|
-
var suspendResult = this.
|
|
380
|
+
protoOf($awaitAllCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
381
|
+
var suspendResult = this.result_1;
|
|
382
382
|
$sm: do
|
|
383
383
|
try {
|
|
384
|
-
var tmp = this.
|
|
384
|
+
var tmp = this.state_1;
|
|
385
385
|
switch (tmp) {
|
|
386
386
|
case 0:
|
|
387
|
-
this.
|
|
388
|
-
if (this.
|
|
389
|
-
this.
|
|
390
|
-
this.
|
|
387
|
+
this.exceptionState_1 = 3;
|
|
388
|
+
if (this._this__u8e3s4__1.isEmpty_y1axqb_k$()) {
|
|
389
|
+
this.WHEN_RESULT0__1 = emptyList();
|
|
390
|
+
this.state_1 = 2;
|
|
391
391
|
continue $sm;
|
|
392
392
|
} else {
|
|
393
|
-
this.
|
|
394
|
-
var this_0 = this.
|
|
395
|
-
suspendResult = (new AwaitAll(copyToArray(this_0))).
|
|
393
|
+
this.state_1 = 1;
|
|
394
|
+
var this_0 = this._this__u8e3s4__1;
|
|
395
|
+
suspendResult = (new AwaitAll(copyToArray(this_0))).await_63ppyd_k$(this);
|
|
396
396
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
397
397
|
return suspendResult;
|
|
398
398
|
}
|
|
@@ -400,21 +400,21 @@
|
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
case 1:
|
|
403
|
-
this.
|
|
404
|
-
this.
|
|
403
|
+
this.WHEN_RESULT0__1 = suspendResult;
|
|
404
|
+
this.state_1 = 2;
|
|
405
405
|
continue $sm;
|
|
406
406
|
case 2:
|
|
407
|
-
return this.
|
|
407
|
+
return this.WHEN_RESULT0__1;
|
|
408
408
|
case 3:
|
|
409
|
-
throw this.
|
|
409
|
+
throw this.exception_1;
|
|
410
410
|
}
|
|
411
411
|
} catch ($p) {
|
|
412
412
|
var e = $p;
|
|
413
|
-
if (this.
|
|
413
|
+
if (this.exceptionState_1 === 3) {
|
|
414
414
|
throw e;
|
|
415
415
|
} else {
|
|
416
|
-
this.
|
|
417
|
-
this.
|
|
416
|
+
this.state_1 = this.exceptionState_1;
|
|
417
|
+
this.exception_1 = e;
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
while (true);
|
|
@@ -423,24 +423,24 @@
|
|
|
423
423
|
context = context === VOID ? EmptyCoroutineContext_getInstance() : context;
|
|
424
424
|
start = start === VOID ? CoroutineStart_DEFAULT_getInstance() : start;
|
|
425
425
|
var newContext = newCoroutineContext(_this__u8e3s4, context);
|
|
426
|
-
var coroutine = start.
|
|
427
|
-
coroutine.
|
|
426
|
+
var coroutine = start.get_isLazy_ew1d53_k$() ? new LazyDeferredCoroutine(newContext, block) : new DeferredCoroutine(newContext, true);
|
|
427
|
+
coroutine.start_50fwcj_k$(start, coroutine, block);
|
|
428
428
|
return coroutine;
|
|
429
429
|
}
|
|
430
430
|
function $awaitCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
431
431
|
CoroutineImpl.call(this, resultContinuation);
|
|
432
|
-
this.
|
|
432
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
433
433
|
}
|
|
434
|
-
protoOf($awaitCOROUTINE$).
|
|
435
|
-
var suspendResult = this.
|
|
434
|
+
protoOf($awaitCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
435
|
+
var suspendResult = this.result_1;
|
|
436
436
|
$sm: do
|
|
437
437
|
try {
|
|
438
|
-
var tmp = this.
|
|
438
|
+
var tmp = this.state_1;
|
|
439
439
|
switch (tmp) {
|
|
440
440
|
case 0:
|
|
441
|
-
this.
|
|
442
|
-
this.
|
|
443
|
-
suspendResult = this.
|
|
441
|
+
this.exceptionState_1 = 2;
|
|
442
|
+
this.state_1 = 1;
|
|
443
|
+
suspendResult = this._this__u8e3s4__1.awaitInternal_5d94r6_k$(this);
|
|
444
444
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
445
445
|
return suspendResult;
|
|
446
446
|
}
|
|
@@ -449,15 +449,15 @@
|
|
|
449
449
|
case 1:
|
|
450
450
|
return suspendResult;
|
|
451
451
|
case 2:
|
|
452
|
-
throw this.
|
|
452
|
+
throw this.exception_1;
|
|
453
453
|
}
|
|
454
454
|
} catch ($p) {
|
|
455
455
|
var e = $p;
|
|
456
|
-
if (this.
|
|
456
|
+
if (this.exceptionState_1 === 2) {
|
|
457
457
|
throw e;
|
|
458
458
|
} else {
|
|
459
|
-
this.
|
|
460
|
-
this.
|
|
459
|
+
this.state_1 = this.exceptionState_1;
|
|
460
|
+
this.exception_1 = e;
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
while (true);
|
|
@@ -465,28 +465,28 @@
|
|
|
465
465
|
function DeferredCoroutine(parentContext, active) {
|
|
466
466
|
AbstractCoroutine.call(this, parentContext, true, active);
|
|
467
467
|
}
|
|
468
|
-
protoOf(DeferredCoroutine).
|
|
469
|
-
return this.
|
|
468
|
+
protoOf(DeferredCoroutine).getCompleted_nczk2z_k$ = function () {
|
|
469
|
+
return this.getCompletedInternal_tfzdln_k$();
|
|
470
470
|
};
|
|
471
|
-
protoOf(DeferredCoroutine).
|
|
471
|
+
protoOf(DeferredCoroutine).await_4rdzbx_k$ = function ($completion) {
|
|
472
472
|
var tmp = new $awaitCOROUTINE$(this, $completion);
|
|
473
|
-
tmp.
|
|
474
|
-
tmp.
|
|
475
|
-
return tmp.
|
|
473
|
+
tmp.result_1 = Unit_instance;
|
|
474
|
+
tmp.exception_1 = null;
|
|
475
|
+
return tmp.doResume_5yljmg_k$();
|
|
476
476
|
};
|
|
477
477
|
function LazyDeferredCoroutine(parentContext, block) {
|
|
478
478
|
DeferredCoroutine.call(this, parentContext, false);
|
|
479
|
-
this.
|
|
479
|
+
this.continuation_1 = createCoroutineUnintercepted(block, this, this);
|
|
480
480
|
}
|
|
481
|
-
protoOf(LazyDeferredCoroutine).
|
|
482
|
-
startCoroutineCancellable(this.
|
|
481
|
+
protoOf(LazyDeferredCoroutine).onStart_qsx7gt_k$ = function () {
|
|
482
|
+
startCoroutineCancellable(this.continuation_1, this);
|
|
483
483
|
};
|
|
484
484
|
function CancellableContinuation() {
|
|
485
485
|
}
|
|
486
486
|
function invokeOnCancellation(_this__u8e3s4, handler) {
|
|
487
487
|
var tmp;
|
|
488
488
|
if (_this__u8e3s4 instanceof CancellableContinuationImpl) {
|
|
489
|
-
_this__u8e3s4.
|
|
489
|
+
_this__u8e3s4.invokeOnCancellationInternal_vx7l43_k$(handler);
|
|
490
490
|
tmp = Unit_instance;
|
|
491
491
|
} else {
|
|
492
492
|
throw UnsupportedOperationException_init_$Create$('third-party implementation of CancellableContinuation is not supported');
|
|
@@ -497,26 +497,26 @@
|
|
|
497
497
|
return invokeOnCancellation(_this__u8e3s4, new DisposeOnCancel(handle));
|
|
498
498
|
}
|
|
499
499
|
function DisposeOnCancel(handle) {
|
|
500
|
-
this.
|
|
500
|
+
this.handle_1 = handle;
|
|
501
501
|
}
|
|
502
|
-
protoOf(DisposeOnCancel).
|
|
503
|
-
return this.
|
|
502
|
+
protoOf(DisposeOnCancel).invoke_py2q9a_k$ = function (cause) {
|
|
503
|
+
return this.handle_1.dispose_3nnxhr_k$();
|
|
504
504
|
};
|
|
505
505
|
protoOf(DisposeOnCancel).toString = function () {
|
|
506
|
-
return 'DisposeOnCancel[' + toString(this.
|
|
506
|
+
return 'DisposeOnCancel[' + toString(this.handle_1) + ']';
|
|
507
507
|
};
|
|
508
508
|
function getOrCreateCancellableContinuation(delegate) {
|
|
509
509
|
if (!(delegate instanceof DispatchedContinuation)) {
|
|
510
510
|
return new CancellableContinuationImpl(delegate, 1);
|
|
511
511
|
}
|
|
512
|
-
var tmp0_safe_receiver = delegate.
|
|
512
|
+
var tmp0_safe_receiver = delegate.claimReusableCancellableContinuation_924qwh_k$();
|
|
513
513
|
var tmp;
|
|
514
514
|
if (tmp0_safe_receiver == null) {
|
|
515
515
|
tmp = null;
|
|
516
516
|
} else {
|
|
517
517
|
// Inline function 'kotlin.takeIf' call
|
|
518
518
|
var tmp_0;
|
|
519
|
-
if (tmp0_safe_receiver.
|
|
519
|
+
if (tmp0_safe_receiver.resetStateReusable_ptatgg_k$()) {
|
|
520
520
|
tmp_0 = tmp0_safe_receiver;
|
|
521
521
|
} else {
|
|
522
522
|
tmp_0 = null;
|
|
@@ -540,10 +540,10 @@
|
|
|
540
540
|
function CancelHandler() {
|
|
541
541
|
}
|
|
542
542
|
function _get_parentHandle__f8dcex($this) {
|
|
543
|
-
return $this.
|
|
543
|
+
return $this._parentHandle_1.kotlinx$atomicfu$value;
|
|
544
544
|
}
|
|
545
545
|
function _get_stateDebugRepresentation__bf18u4($this) {
|
|
546
|
-
var tmp0_subject = $this.
|
|
546
|
+
var tmp0_subject = $this.get_state_2t6sbp_k$();
|
|
547
547
|
var tmp;
|
|
548
548
|
if (!(tmp0_subject == null) ? isInterface(tmp0_subject, NotCompleted) : false) {
|
|
549
549
|
tmp = 'Active';
|
|
@@ -558,9 +558,9 @@
|
|
|
558
558
|
}
|
|
559
559
|
function isReusable($this) {
|
|
560
560
|
var tmp;
|
|
561
|
-
if (get_isReusableMode($this.
|
|
562
|
-
var tmp_0 = $this.
|
|
563
|
-
tmp = (tmp_0 instanceof DispatchedContinuation ? tmp_0 : THROW_CCE()).
|
|
561
|
+
if (get_isReusableMode($this.resumeMode_1)) {
|
|
562
|
+
var tmp_0 = $this.delegate_1;
|
|
563
|
+
tmp = (tmp_0 instanceof DispatchedContinuation ? tmp_0 : THROW_CCE()).isReusable_asltyw_k$();
|
|
564
564
|
} else {
|
|
565
565
|
tmp = false;
|
|
566
566
|
}
|
|
@@ -569,13 +569,13 @@
|
|
|
569
569
|
function cancelLater($this, cause) {
|
|
570
570
|
if (!isReusable($this))
|
|
571
571
|
return false;
|
|
572
|
-
var tmp = $this.
|
|
572
|
+
var tmp = $this.delegate_1;
|
|
573
573
|
var dispatched = tmp instanceof DispatchedContinuation ? tmp : THROW_CCE();
|
|
574
|
-
return dispatched.
|
|
574
|
+
return dispatched.postponeCancellation_hjv3hh_k$(cause);
|
|
575
575
|
}
|
|
576
576
|
function callSegmentOnCancellation($this, segment, cause) {
|
|
577
577
|
// Inline function 'kotlinx.coroutines.index' call
|
|
578
|
-
var index = $this.
|
|
578
|
+
var index = $this._decisionAndIndex_1.kotlinx$atomicfu$value & 536870911;
|
|
579
579
|
// Inline function 'kotlin.check' call
|
|
580
580
|
if (!!(index === 536870911)) {
|
|
581
581
|
var message = 'The index for Segment.onCancellation(..) is broken';
|
|
@@ -583,11 +583,11 @@
|
|
|
583
583
|
}
|
|
584
584
|
// Inline function 'kotlinx.coroutines.CancellableContinuationImpl.callCancelHandlerSafely' call
|
|
585
585
|
try {
|
|
586
|
-
segment.
|
|
586
|
+
segment.onCancellation_4jec3b_k$(index, cause, $this.get_context_h02k06_k$());
|
|
587
587
|
} catch ($p) {
|
|
588
588
|
if ($p instanceof Error) {
|
|
589
589
|
var ex = $p;
|
|
590
|
-
handleCoroutineException($this.
|
|
590
|
+
handleCoroutineException($this.get_context_h02k06_k$(), new CompletionHandlerException('Exception in invokeOnCancellation handler for ' + $this.toString(), ex));
|
|
591
591
|
} else {
|
|
592
592
|
throw $p;
|
|
593
593
|
}
|
|
@@ -595,7 +595,7 @@
|
|
|
595
595
|
}
|
|
596
596
|
function trySuspend($this) {
|
|
597
597
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
598
|
-
var this_0 = $this.
|
|
598
|
+
var this_0 = $this._decisionAndIndex_1;
|
|
599
599
|
while (true) {
|
|
600
600
|
var cur = this_0.kotlinx$atomicfu$value;
|
|
601
601
|
// Inline function 'kotlinx.coroutines.decision' call
|
|
@@ -606,7 +606,7 @@
|
|
|
606
606
|
// Inline function 'kotlinx.coroutines.decisionAndIndex' call
|
|
607
607
|
|
|
608
608
|
var tmp$ret$4 = (1 << 29) + (cur & 536870911) | 0;
|
|
609
|
-
if ($this.
|
|
609
|
+
if ($this._decisionAndIndex_1.atomicfu$compareAndSet(cur, tmp$ret$4))
|
|
610
610
|
return true;
|
|
611
611
|
break;
|
|
612
612
|
case 2:
|
|
@@ -621,7 +621,7 @@
|
|
|
621
621
|
}
|
|
622
622
|
function tryResume($this) {
|
|
623
623
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
624
|
-
var this_0 = $this.
|
|
624
|
+
var this_0 = $this._decisionAndIndex_1;
|
|
625
625
|
while (true) {
|
|
626
626
|
var cur = this_0.kotlinx$atomicfu$value;
|
|
627
627
|
// Inline function 'kotlinx.coroutines.decision' call
|
|
@@ -632,7 +632,7 @@
|
|
|
632
632
|
// Inline function 'kotlinx.coroutines.decisionAndIndex' call
|
|
633
633
|
|
|
634
634
|
var tmp$ret$4 = (2 << 29) + (cur & 536870911) | 0;
|
|
635
|
-
if ($this.
|
|
635
|
+
if ($this._decisionAndIndex_1.atomicfu$compareAndSet(cur, tmp$ret$4))
|
|
636
636
|
return true;
|
|
637
637
|
break;
|
|
638
638
|
case 1:
|
|
@@ -646,7 +646,7 @@
|
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
648
|
function installParentHandle($this) {
|
|
649
|
-
var tmp0_elvis_lhs = $this.
|
|
649
|
+
var tmp0_elvis_lhs = $this.get_context_h02k06_k$().get_y2st91_k$(Key_instance_2);
|
|
650
650
|
var tmp;
|
|
651
651
|
if (tmp0_elvis_lhs == null) {
|
|
652
652
|
return null;
|
|
@@ -655,17 +655,17 @@
|
|
|
655
655
|
}
|
|
656
656
|
var parent = tmp;
|
|
657
657
|
var handle = invokeOnCompletion(parent, VOID, new ChildContinuation($this));
|
|
658
|
-
$this.
|
|
658
|
+
$this._parentHandle_1.atomicfu$compareAndSet(null, handle);
|
|
659
659
|
return handle;
|
|
660
660
|
}
|
|
661
661
|
function invokeOnCancellationImpl($this, handler) {
|
|
662
662
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
663
663
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
664
|
-
var this_0 = $this.
|
|
664
|
+
var this_0 = $this._state_1;
|
|
665
665
|
while (true) {
|
|
666
666
|
var state = this_0.kotlinx$atomicfu$value;
|
|
667
667
|
if (state instanceof Active) {
|
|
668
|
-
if ($this.
|
|
668
|
+
if ($this._state_1.atomicfu$compareAndSet(state, handler))
|
|
669
669
|
return Unit_instance;
|
|
670
670
|
} else {
|
|
671
671
|
var tmp;
|
|
@@ -678,14 +678,14 @@
|
|
|
678
678
|
multipleHandlersError($this, handler, state);
|
|
679
679
|
} else {
|
|
680
680
|
if (state instanceof CompletedExceptionally) {
|
|
681
|
-
if (!state.
|
|
681
|
+
if (!state.makeHandled_ws9oq6_k$()) {
|
|
682
682
|
multipleHandlersError($this, handler, state);
|
|
683
683
|
}
|
|
684
684
|
if (state instanceof CancelledContinuation) {
|
|
685
685
|
var tmp1_safe_receiver = state instanceof CompletedExceptionally ? state : null;
|
|
686
|
-
var cause = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
686
|
+
var cause = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.cause_1;
|
|
687
687
|
if (isInterface(handler, CancelHandler)) {
|
|
688
|
-
$this.
|
|
688
|
+
$this.callCancelHandler_e6l0np_k$(handler, cause);
|
|
689
689
|
} else {
|
|
690
690
|
var segment = handler instanceof Segment ? handler : THROW_CCE();
|
|
691
691
|
callSegmentOnCancellation($this, segment, cause);
|
|
@@ -694,19 +694,19 @@
|
|
|
694
694
|
return Unit_instance;
|
|
695
695
|
} else {
|
|
696
696
|
if (state instanceof CompletedContinuation) {
|
|
697
|
-
if (!(state.
|
|
697
|
+
if (!(state.cancelHandler_1 == null)) {
|
|
698
698
|
multipleHandlersError($this, handler, state);
|
|
699
699
|
}
|
|
700
700
|
if (handler instanceof Segment)
|
|
701
701
|
return Unit_instance;
|
|
702
702
|
if (!isInterface(handler, CancelHandler))
|
|
703
703
|
THROW_CCE();
|
|
704
|
-
if (state.
|
|
705
|
-
$this.
|
|
704
|
+
if (state.get_cancelled_ge9r54_k$()) {
|
|
705
|
+
$this.callCancelHandler_e6l0np_k$(handler, state.cancelCause_1);
|
|
706
706
|
return Unit_instance;
|
|
707
707
|
}
|
|
708
|
-
var update = state.
|
|
709
|
-
if ($this.
|
|
708
|
+
var update = state.copy$default_uedmwo_k$(VOID, handler);
|
|
709
|
+
if ($this._state_1.atomicfu$compareAndSet(state, update))
|
|
710
710
|
return Unit_instance;
|
|
711
711
|
} else {
|
|
712
712
|
if (handler instanceof Segment)
|
|
@@ -714,7 +714,7 @@
|
|
|
714
714
|
if (!isInterface(handler, CancelHandler))
|
|
715
715
|
THROW_CCE();
|
|
716
716
|
var update_0 = new CompletedContinuation(state, handler);
|
|
717
|
-
if ($this.
|
|
717
|
+
if ($this._state_1.atomicfu$compareAndSet(state, update_0))
|
|
718
718
|
return Unit_instance;
|
|
719
719
|
}
|
|
720
720
|
}
|
|
@@ -765,13 +765,13 @@
|
|
|
765
765
|
}
|
|
766
766
|
function tryResumeImpl($this, proposedUpdate, idempotent, onCancellation) {
|
|
767
767
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
768
|
-
var this_0 = $this.
|
|
768
|
+
var this_0 = $this._state_1;
|
|
769
769
|
while (true) {
|
|
770
770
|
var tmp0 = this_0.kotlinx$atomicfu$value;
|
|
771
771
|
$l$block: {
|
|
772
772
|
if (!(tmp0 == null) ? isInterface(tmp0, NotCompleted) : false) {
|
|
773
|
-
var update = resumedState($this, tmp0, proposedUpdate, $this.
|
|
774
|
-
if (!$this.
|
|
773
|
+
var update = resumedState($this, tmp0, proposedUpdate, $this.resumeMode_1, onCancellation, idempotent);
|
|
774
|
+
if (!$this._state_1.atomicfu$compareAndSet(tmp0, update)) {
|
|
775
775
|
break $l$block;
|
|
776
776
|
}
|
|
777
777
|
detachChildIfNonReusable($this);
|
|
@@ -779,7 +779,7 @@
|
|
|
779
779
|
} else {
|
|
780
780
|
if (tmp0 instanceof CompletedContinuation) {
|
|
781
781
|
var tmp;
|
|
782
|
-
if (!(idempotent == null) && tmp0.
|
|
782
|
+
if (!(idempotent == null) && tmp0.idempotentResume_1 === idempotent) {
|
|
783
783
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
784
784
|
tmp = get_RESUME_TOKEN();
|
|
785
785
|
} else {
|
|
@@ -800,7 +800,7 @@
|
|
|
800
800
|
}
|
|
801
801
|
function detachChildIfNonReusable($this) {
|
|
802
802
|
if (!isReusable($this)) {
|
|
803
|
-
$this.
|
|
803
|
+
$this.detachChild_85lap8_k$();
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
806
|
function CancellableContinuationImpl$resume$lambda($onCancellation) {
|
|
@@ -811,30 +811,30 @@
|
|
|
811
811
|
}
|
|
812
812
|
function CancellableContinuationImpl(delegate, resumeMode) {
|
|
813
813
|
DispatchedTask.call(this, resumeMode);
|
|
814
|
-
this.
|
|
814
|
+
this.delegate_1 = delegate;
|
|
815
815
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
816
|
-
this.
|
|
816
|
+
this.context_1 = this.delegate_1.get_context_h02k06_k$();
|
|
817
817
|
var tmp = this;
|
|
818
818
|
// Inline function 'kotlinx.coroutines.decisionAndIndex' call
|
|
819
819
|
var tmp$ret$1 = (0 << 29) + 536870911 | 0;
|
|
820
|
-
tmp.
|
|
821
|
-
this.
|
|
822
|
-
this.
|
|
820
|
+
tmp._decisionAndIndex_1 = atomic$int$1(tmp$ret$1);
|
|
821
|
+
this._state_1 = atomic$ref$1(Active_instance);
|
|
822
|
+
this._parentHandle_1 = atomic$ref$1(null);
|
|
823
823
|
}
|
|
824
|
-
protoOf(CancellableContinuationImpl).
|
|
825
|
-
return this.
|
|
824
|
+
protoOf(CancellableContinuationImpl).get_delegate_hasf9b_k$ = function () {
|
|
825
|
+
return this.delegate_1;
|
|
826
826
|
};
|
|
827
|
-
protoOf(CancellableContinuationImpl).
|
|
828
|
-
return this.
|
|
827
|
+
protoOf(CancellableContinuationImpl).get_context_h02k06_k$ = function () {
|
|
828
|
+
return this.context_1;
|
|
829
829
|
};
|
|
830
|
-
protoOf(CancellableContinuationImpl).
|
|
831
|
-
return this.
|
|
830
|
+
protoOf(CancellableContinuationImpl).get_state_2t6sbp_k$ = function () {
|
|
831
|
+
return this._state_1.kotlinx$atomicfu$value;
|
|
832
832
|
};
|
|
833
|
-
protoOf(CancellableContinuationImpl).
|
|
834
|
-
var tmp = this.
|
|
833
|
+
protoOf(CancellableContinuationImpl).get_isCompleted_a6j6c8_k$ = function () {
|
|
834
|
+
var tmp = this.get_state_2t6sbp_k$();
|
|
835
835
|
return !(!(tmp == null) ? isInterface(tmp, NotCompleted) : false);
|
|
836
836
|
};
|
|
837
|
-
protoOf(CancellableContinuationImpl).
|
|
837
|
+
protoOf(CancellableContinuationImpl).initCancellability_shqc60_k$ = function () {
|
|
838
838
|
var tmp0_elvis_lhs = installParentHandle(this);
|
|
839
839
|
var tmp;
|
|
840
840
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -843,39 +843,39 @@
|
|
|
843
843
|
tmp = tmp0_elvis_lhs;
|
|
844
844
|
}
|
|
845
845
|
var handle = tmp;
|
|
846
|
-
if (this.
|
|
847
|
-
handle.
|
|
848
|
-
this.
|
|
846
|
+
if (this.get_isCompleted_a6j6c8_k$()) {
|
|
847
|
+
handle.dispose_3nnxhr_k$();
|
|
848
|
+
this._parentHandle_1.kotlinx$atomicfu$value = NonDisposableHandle_instance;
|
|
849
849
|
}
|
|
850
850
|
};
|
|
851
|
-
protoOf(CancellableContinuationImpl).
|
|
851
|
+
protoOf(CancellableContinuationImpl).resetStateReusable_ptatgg_k$ = function () {
|
|
852
852
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
853
853
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
854
|
-
var state = this.
|
|
854
|
+
var state = this._state_1.kotlinx$atomicfu$value;
|
|
855
855
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
856
856
|
var tmp;
|
|
857
857
|
if (state instanceof CompletedContinuation) {
|
|
858
|
-
tmp = !(state.
|
|
858
|
+
tmp = !(state.idempotentResume_1 == null);
|
|
859
859
|
} else {
|
|
860
860
|
tmp = false;
|
|
861
861
|
}
|
|
862
862
|
if (tmp) {
|
|
863
|
-
this.
|
|
863
|
+
this.detachChild_85lap8_k$();
|
|
864
864
|
return false;
|
|
865
865
|
}
|
|
866
|
-
var tmp_0 = this.
|
|
866
|
+
var tmp_0 = this._decisionAndIndex_1;
|
|
867
867
|
// Inline function 'kotlinx.coroutines.decisionAndIndex' call
|
|
868
868
|
tmp_0.kotlinx$atomicfu$value = (0 << 29) + 536870911 | 0;
|
|
869
|
-
this.
|
|
869
|
+
this._state_1.kotlinx$atomicfu$value = Active_instance;
|
|
870
870
|
return true;
|
|
871
871
|
};
|
|
872
|
-
protoOf(CancellableContinuationImpl).
|
|
873
|
-
return this.
|
|
872
|
+
protoOf(CancellableContinuationImpl).takeState_a1bv3x_k$ = function () {
|
|
873
|
+
return this.get_state_2t6sbp_k$();
|
|
874
874
|
};
|
|
875
|
-
protoOf(CancellableContinuationImpl).
|
|
875
|
+
protoOf(CancellableContinuationImpl).cancelCompletedResult_pnx7en_k$ = function (takenState, cause) {
|
|
876
876
|
var tmp$ret$0;
|
|
877
877
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
878
|
-
var this_0 = this.
|
|
878
|
+
var this_0 = this._state_1;
|
|
879
879
|
while (true) {
|
|
880
880
|
var state = this_0.kotlinx$atomicfu$value;
|
|
881
881
|
if (!(state == null) ? isInterface(state, NotCompleted) : false) {
|
|
@@ -888,17 +888,17 @@
|
|
|
888
888
|
else {
|
|
889
889
|
if (state instanceof CompletedContinuation) {
|
|
890
890
|
// Inline function 'kotlin.check' call
|
|
891
|
-
if (!!state.
|
|
891
|
+
if (!!state.get_cancelled_ge9r54_k$()) {
|
|
892
892
|
var message_0 = 'Must be called at most once';
|
|
893
893
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
894
894
|
}
|
|
895
|
-
var update = state.
|
|
896
|
-
if (this.
|
|
897
|
-
state.
|
|
895
|
+
var update = state.copy$default_uedmwo_k$(VOID, VOID, VOID, VOID, cause);
|
|
896
|
+
if (this._state_1.atomicfu$compareAndSet(state, update)) {
|
|
897
|
+
state.invokeHandlers_8qkat_k$(this, cause);
|
|
898
898
|
return Unit_instance;
|
|
899
899
|
}
|
|
900
900
|
} else {
|
|
901
|
-
if (this.
|
|
901
|
+
if (this._state_1.atomicfu$compareAndSet(state, new CompletedContinuation(state, VOID, VOID, VOID, cause))) {
|
|
902
902
|
return Unit_instance;
|
|
903
903
|
}
|
|
904
904
|
}
|
|
@@ -907,9 +907,9 @@
|
|
|
907
907
|
}
|
|
908
908
|
return tmp$ret$0;
|
|
909
909
|
};
|
|
910
|
-
protoOf(CancellableContinuationImpl).
|
|
910
|
+
protoOf(CancellableContinuationImpl).cancel_e74who_k$ = function (cause) {
|
|
911
911
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
912
|
-
var this_0 = this.
|
|
912
|
+
var this_0 = this._state_1;
|
|
913
913
|
while (true) {
|
|
914
914
|
var tmp0 = this_0.kotlinx$atomicfu$value;
|
|
915
915
|
$l$block: {
|
|
@@ -922,88 +922,88 @@
|
|
|
922
922
|
tmp = tmp0 instanceof Segment;
|
|
923
923
|
}
|
|
924
924
|
var update = new CancelledContinuation(this, cause, tmp);
|
|
925
|
-
if (!this.
|
|
925
|
+
if (!this._state_1.atomicfu$compareAndSet(tmp0, update)) {
|
|
926
926
|
break $l$block;
|
|
927
927
|
}
|
|
928
928
|
if (isInterface(tmp0, CancelHandler)) {
|
|
929
|
-
this.
|
|
929
|
+
this.callCancelHandler_e6l0np_k$(tmp0, cause);
|
|
930
930
|
} else {
|
|
931
931
|
if (tmp0 instanceof Segment) {
|
|
932
932
|
callSegmentOnCancellation(this, tmp0, cause);
|
|
933
933
|
}
|
|
934
934
|
}
|
|
935
935
|
detachChildIfNonReusable(this);
|
|
936
|
-
dispatchResume(this, this.
|
|
936
|
+
dispatchResume(this, this.resumeMode_1);
|
|
937
937
|
return true;
|
|
938
938
|
}
|
|
939
939
|
}
|
|
940
940
|
};
|
|
941
|
-
protoOf(CancellableContinuationImpl).
|
|
941
|
+
protoOf(CancellableContinuationImpl).parentCancelled_jw71o9_k$ = function (cause) {
|
|
942
942
|
if (cancelLater(this, cause))
|
|
943
943
|
return Unit_instance;
|
|
944
|
-
this.
|
|
944
|
+
this.cancel_e74who_k$(cause);
|
|
945
945
|
detachChildIfNonReusable(this);
|
|
946
946
|
};
|
|
947
|
-
protoOf(CancellableContinuationImpl).
|
|
947
|
+
protoOf(CancellableContinuationImpl).callCancelHandler_e6l0np_k$ = function (handler, cause) {
|
|
948
948
|
// Inline function 'kotlinx.coroutines.CancellableContinuationImpl.callCancelHandlerSafely' call
|
|
949
949
|
try {
|
|
950
|
-
handler.
|
|
950
|
+
handler.invoke_py2q9a_k$(cause);
|
|
951
951
|
} catch ($p) {
|
|
952
952
|
if ($p instanceof Error) {
|
|
953
953
|
var ex = $p;
|
|
954
|
-
handleCoroutineException(this.
|
|
954
|
+
handleCoroutineException(this.get_context_h02k06_k$(), new CompletionHandlerException('Exception in invokeOnCancellation handler for ' + this.toString(), ex));
|
|
955
955
|
} else {
|
|
956
956
|
throw $p;
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
959
|
return Unit_instance;
|
|
960
960
|
};
|
|
961
|
-
protoOf(CancellableContinuationImpl).
|
|
961
|
+
protoOf(CancellableContinuationImpl).callOnCancellation_n8igin_k$ = function (onCancellation, cause, value) {
|
|
962
962
|
try {
|
|
963
|
-
onCancellation(cause, value, this.
|
|
963
|
+
onCancellation(cause, value, this.get_context_h02k06_k$());
|
|
964
964
|
} catch ($p) {
|
|
965
965
|
if ($p instanceof Error) {
|
|
966
966
|
var ex = $p;
|
|
967
|
-
handleCoroutineException(this.
|
|
967
|
+
handleCoroutineException(this.get_context_h02k06_k$(), new CompletionHandlerException('Exception in resume onCancellation handler for ' + this.toString(), ex));
|
|
968
968
|
} else {
|
|
969
969
|
throw $p;
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
972
|
};
|
|
973
|
-
protoOf(CancellableContinuationImpl).
|
|
974
|
-
return parent.
|
|
973
|
+
protoOf(CancellableContinuationImpl).getContinuationCancellationCause_3nurbc_k$ = function (parent) {
|
|
974
|
+
return parent.getCancellationException_8i1q6u_k$();
|
|
975
975
|
};
|
|
976
|
-
protoOf(CancellableContinuationImpl).
|
|
976
|
+
protoOf(CancellableContinuationImpl).getResult_fck196_k$ = function () {
|
|
977
977
|
var isReusable_0 = isReusable(this);
|
|
978
978
|
if (trySuspend(this)) {
|
|
979
979
|
if (_get_parentHandle__f8dcex(this) == null) {
|
|
980
980
|
installParentHandle(this);
|
|
981
981
|
}
|
|
982
982
|
if (isReusable_0) {
|
|
983
|
-
this.
|
|
983
|
+
this.releaseClaimedReusableContinuation_mdg0s9_k$();
|
|
984
984
|
}
|
|
985
985
|
return get_COROUTINE_SUSPENDED();
|
|
986
986
|
}
|
|
987
987
|
if (isReusable_0) {
|
|
988
|
-
this.
|
|
988
|
+
this.releaseClaimedReusableContinuation_mdg0s9_k$();
|
|
989
989
|
}
|
|
990
|
-
var state = this.
|
|
990
|
+
var state = this.get_state_2t6sbp_k$();
|
|
991
991
|
if (state instanceof CompletedExceptionally)
|
|
992
|
-
throw recoverStackTrace(state.
|
|
993
|
-
if (get_isCancellableMode(this.
|
|
994
|
-
var job = this.
|
|
995
|
-
if (!(job == null) && !job.
|
|
996
|
-
var cause = job.
|
|
997
|
-
this.
|
|
992
|
+
throw recoverStackTrace(state.cause_1, this);
|
|
993
|
+
if (get_isCancellableMode(this.resumeMode_1)) {
|
|
994
|
+
var job = this.get_context_h02k06_k$().get_y2st91_k$(Key_instance_2);
|
|
995
|
+
if (!(job == null) && !job.get_isActive_quafmh_k$()) {
|
|
996
|
+
var cause = job.getCancellationException_8i1q6u_k$();
|
|
997
|
+
this.cancelCompletedResult_pnx7en_k$(state, cause);
|
|
998
998
|
throw recoverStackTrace(cause, this);
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
|
-
return this.
|
|
1001
|
+
return this.getSuccessfulResult_4uqe9r_k$(state);
|
|
1002
1002
|
};
|
|
1003
|
-
protoOf(CancellableContinuationImpl).
|
|
1004
|
-
var tmp = this.
|
|
1003
|
+
protoOf(CancellableContinuationImpl).releaseClaimedReusableContinuation_mdg0s9_k$ = function () {
|
|
1004
|
+
var tmp = this.delegate_1;
|
|
1005
1005
|
var tmp0_safe_receiver = tmp instanceof DispatchedContinuation ? tmp : null;
|
|
1006
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1006
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tryReleaseClaimedContinuation_ko810q_k$(this);
|
|
1007
1007
|
var tmp_0;
|
|
1008
1008
|
if (tmp1_elvis_lhs == null) {
|
|
1009
1009
|
return Unit_instance;
|
|
@@ -1011,14 +1011,14 @@
|
|
|
1011
1011
|
tmp_0 = tmp1_elvis_lhs;
|
|
1012
1012
|
}
|
|
1013
1013
|
var cancellationCause = tmp_0;
|
|
1014
|
-
this.
|
|
1015
|
-
this.
|
|
1014
|
+
this.detachChild_85lap8_k$();
|
|
1015
|
+
this.cancel_e74who_k$(cancellationCause);
|
|
1016
1016
|
};
|
|
1017
|
-
protoOf(CancellableContinuationImpl).
|
|
1018
|
-
return this.
|
|
1017
|
+
protoOf(CancellableContinuationImpl).resumeWith_rk9gbt_k$ = function (result) {
|
|
1018
|
+
return this.resumeImpl$default_sev3sz_k$(toState(result, this), this.resumeMode_1);
|
|
1019
1019
|
};
|
|
1020
|
-
protoOf(CancellableContinuationImpl).
|
|
1021
|
-
var tmp = this.
|
|
1020
|
+
protoOf(CancellableContinuationImpl).resume_a4kjl1_k$ = function (value, onCancellation) {
|
|
1021
|
+
var tmp = this.resumeMode_1;
|
|
1022
1022
|
var tmp_0;
|
|
1023
1023
|
if (onCancellation == null) {
|
|
1024
1024
|
tmp_0 = null;
|
|
@@ -1026,13 +1026,13 @@
|
|
|
1026
1026
|
// Inline function 'kotlin.let' call
|
|
1027
1027
|
tmp_0 = CancellableContinuationImpl$resume$lambda(onCancellation);
|
|
1028
1028
|
}
|
|
1029
|
-
return this.
|
|
1029
|
+
return this.resumeImpl_fj866n_k$(value, tmp, tmp_0);
|
|
1030
1030
|
};
|
|
1031
|
-
protoOf(CancellableContinuationImpl).
|
|
1032
|
-
return this.
|
|
1031
|
+
protoOf(CancellableContinuationImpl).resume_nf5g9e_k$ = function (value, onCancellation) {
|
|
1032
|
+
return this.resumeImpl_fj866n_k$(value, this.resumeMode_1, onCancellation);
|
|
1033
1033
|
};
|
|
1034
|
-
protoOf(CancellableContinuationImpl).
|
|
1035
|
-
var tmp0 = this.
|
|
1034
|
+
protoOf(CancellableContinuationImpl).invokeOnCancellation_effrxe_k$ = function (segment, index) {
|
|
1035
|
+
var tmp0 = this._decisionAndIndex_1;
|
|
1036
1036
|
$l$block: {
|
|
1037
1037
|
// Inline function 'kotlinx.atomicfu.update' call
|
|
1038
1038
|
while (true) {
|
|
@@ -1053,18 +1053,18 @@
|
|
|
1053
1053
|
}
|
|
1054
1054
|
invokeOnCancellationImpl(this, segment);
|
|
1055
1055
|
};
|
|
1056
|
-
protoOf(CancellableContinuationImpl).
|
|
1056
|
+
protoOf(CancellableContinuationImpl).invokeOnCancellationInternal_vx7l43_k$ = function (handler) {
|
|
1057
1057
|
return invokeOnCancellationImpl(this, handler);
|
|
1058
1058
|
};
|
|
1059
|
-
protoOf(CancellableContinuationImpl).
|
|
1059
|
+
protoOf(CancellableContinuationImpl).resumeImpl_fj866n_k$ = function (proposedUpdate, resumeMode, onCancellation) {
|
|
1060
1060
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
1061
|
-
var this_0 = this.
|
|
1061
|
+
var this_0 = this._state_1;
|
|
1062
1062
|
while (true) {
|
|
1063
1063
|
var tmp0 = this_0.kotlinx$atomicfu$value;
|
|
1064
1064
|
$l$block: {
|
|
1065
1065
|
if (!(tmp0 == null) ? isInterface(tmp0, NotCompleted) : false) {
|
|
1066
1066
|
var update = resumedState(this, tmp0, proposedUpdate, resumeMode, onCancellation, null);
|
|
1067
|
-
if (!this.
|
|
1067
|
+
if (!this._state_1.atomicfu$compareAndSet(tmp0, update)) {
|
|
1068
1068
|
break $l$block;
|
|
1069
1069
|
}
|
|
1070
1070
|
detachChildIfNonReusable(this);
|
|
@@ -1072,12 +1072,12 @@
|
|
|
1072
1072
|
return Unit_instance;
|
|
1073
1073
|
} else {
|
|
1074
1074
|
if (tmp0 instanceof CancelledContinuation) {
|
|
1075
|
-
if (tmp0.
|
|
1075
|
+
if (tmp0.makeResumed_vjvawn_k$()) {
|
|
1076
1076
|
if (onCancellation == null)
|
|
1077
1077
|
null;
|
|
1078
1078
|
else {
|
|
1079
1079
|
// Inline function 'kotlin.let' call
|
|
1080
|
-
this.
|
|
1080
|
+
this.callOnCancellation_n8igin_k$(onCancellation, tmp0.cause_1, proposedUpdate);
|
|
1081
1081
|
}
|
|
1082
1082
|
return Unit_instance;
|
|
1083
1083
|
}
|
|
@@ -1087,18 +1087,18 @@
|
|
|
1087
1087
|
}
|
|
1088
1088
|
}
|
|
1089
1089
|
};
|
|
1090
|
-
protoOf(CancellableContinuationImpl).
|
|
1090
|
+
protoOf(CancellableContinuationImpl).resumeImpl$default_sev3sz_k$ = function (proposedUpdate, resumeMode, onCancellation, $super) {
|
|
1091
1091
|
onCancellation = onCancellation === VOID ? null : onCancellation;
|
|
1092
1092
|
var tmp;
|
|
1093
1093
|
if ($super === VOID) {
|
|
1094
|
-
this.
|
|
1094
|
+
this.resumeImpl_fj866n_k$(proposedUpdate, resumeMode, onCancellation);
|
|
1095
1095
|
tmp = Unit_instance;
|
|
1096
1096
|
} else {
|
|
1097
|
-
tmp = $super.
|
|
1097
|
+
tmp = $super.resumeImpl_fj866n_k$.call(this, proposedUpdate, resumeMode, onCancellation);
|
|
1098
1098
|
}
|
|
1099
1099
|
return tmp;
|
|
1100
1100
|
};
|
|
1101
|
-
protoOf(CancellableContinuationImpl).
|
|
1101
|
+
protoOf(CancellableContinuationImpl).detachChild_85lap8_k$ = function () {
|
|
1102
1102
|
var tmp0_elvis_lhs = _get_parentHandle__f8dcex(this);
|
|
1103
1103
|
var tmp;
|
|
1104
1104
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -1107,43 +1107,43 @@
|
|
|
1107
1107
|
tmp = tmp0_elvis_lhs;
|
|
1108
1108
|
}
|
|
1109
1109
|
var handle = tmp;
|
|
1110
|
-
handle.
|
|
1111
|
-
this.
|
|
1110
|
+
handle.dispose_3nnxhr_k$();
|
|
1111
|
+
this._parentHandle_1.kotlinx$atomicfu$value = NonDisposableHandle_instance;
|
|
1112
1112
|
};
|
|
1113
|
-
protoOf(CancellableContinuationImpl).
|
|
1113
|
+
protoOf(CancellableContinuationImpl).tryResume_gmd8sc_k$ = function (value, idempotent, onCancellation) {
|
|
1114
1114
|
return tryResumeImpl(this, value, idempotent, onCancellation);
|
|
1115
1115
|
};
|
|
1116
|
-
protoOf(CancellableContinuationImpl).
|
|
1116
|
+
protoOf(CancellableContinuationImpl).tryResumeWithException_4drsj6_k$ = function (exception) {
|
|
1117
1117
|
return tryResumeImpl(this, new CompletedExceptionally(exception), null, null);
|
|
1118
1118
|
};
|
|
1119
|
-
protoOf(CancellableContinuationImpl).
|
|
1119
|
+
protoOf(CancellableContinuationImpl).completeResume_fabtk_k$ = function (token) {
|
|
1120
1120
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1121
|
-
dispatchResume(this, this.
|
|
1121
|
+
dispatchResume(this, this.resumeMode_1);
|
|
1122
1122
|
};
|
|
1123
|
-
protoOf(CancellableContinuationImpl).
|
|
1123
|
+
protoOf(CancellableContinuationImpl).getSuccessfulResult_4uqe9r_k$ = function (state) {
|
|
1124
1124
|
var tmp;
|
|
1125
1125
|
if (state instanceof CompletedContinuation) {
|
|
1126
|
-
tmp = state.
|
|
1126
|
+
tmp = state.result_1;
|
|
1127
1127
|
} else {
|
|
1128
1128
|
tmp = state;
|
|
1129
1129
|
}
|
|
1130
1130
|
return tmp;
|
|
1131
1131
|
};
|
|
1132
|
-
protoOf(CancellableContinuationImpl).
|
|
1133
|
-
var tmp0_safe_receiver = protoOf(DispatchedTask).
|
|
1132
|
+
protoOf(CancellableContinuationImpl).getExceptionalResult_i3cs19_k$ = function (state) {
|
|
1133
|
+
var tmp0_safe_receiver = protoOf(DispatchedTask).getExceptionalResult_i3cs19_k$.call(this, state);
|
|
1134
1134
|
var tmp;
|
|
1135
1135
|
if (tmp0_safe_receiver == null) {
|
|
1136
1136
|
tmp = null;
|
|
1137
1137
|
} else {
|
|
1138
1138
|
// Inline function 'kotlin.let' call
|
|
1139
|
-
tmp = recoverStackTrace(tmp0_safe_receiver, this.
|
|
1139
|
+
tmp = recoverStackTrace(tmp0_safe_receiver, this.delegate_1);
|
|
1140
1140
|
}
|
|
1141
1141
|
return tmp;
|
|
1142
1142
|
};
|
|
1143
1143
|
protoOf(CancellableContinuationImpl).toString = function () {
|
|
1144
|
-
return this.
|
|
1144
|
+
return this.nameString_cd9e9w_k$() + '(' + toDebugString(this.delegate_1) + '){' + _get_stateDebugRepresentation__bf18u4(this) + '}@' + get_hexAddress(this);
|
|
1145
1145
|
};
|
|
1146
|
-
protoOf(CancellableContinuationImpl).
|
|
1146
|
+
protoOf(CancellableContinuationImpl).nameString_cd9e9w_k$ = function () {
|
|
1147
1147
|
return 'CancellableContinuation';
|
|
1148
1148
|
};
|
|
1149
1149
|
function NotCompleted() {
|
|
@@ -1162,51 +1162,51 @@
|
|
|
1162
1162
|
onCancellation = onCancellation === VOID ? null : onCancellation;
|
|
1163
1163
|
idempotentResume = idempotentResume === VOID ? null : idempotentResume;
|
|
1164
1164
|
cancelCause = cancelCause === VOID ? null : cancelCause;
|
|
1165
|
-
this.
|
|
1166
|
-
this.
|
|
1167
|
-
this.
|
|
1168
|
-
this.
|
|
1169
|
-
this.
|
|
1165
|
+
this.result_1 = result;
|
|
1166
|
+
this.cancelHandler_1 = cancelHandler;
|
|
1167
|
+
this.onCancellation_1 = onCancellation;
|
|
1168
|
+
this.idempotentResume_1 = idempotentResume;
|
|
1169
|
+
this.cancelCause_1 = cancelCause;
|
|
1170
1170
|
}
|
|
1171
|
-
protoOf(CompletedContinuation).
|
|
1172
|
-
return !(this.
|
|
1171
|
+
protoOf(CompletedContinuation).get_cancelled_ge9r54_k$ = function () {
|
|
1172
|
+
return !(this.cancelCause_1 == null);
|
|
1173
1173
|
};
|
|
1174
|
-
protoOf(CompletedContinuation).
|
|
1175
|
-
var tmp0_safe_receiver = this.
|
|
1174
|
+
protoOf(CompletedContinuation).invokeHandlers_8qkat_k$ = function (cont, cause) {
|
|
1175
|
+
var tmp0_safe_receiver = this.cancelHandler_1;
|
|
1176
1176
|
if (tmp0_safe_receiver == null)
|
|
1177
1177
|
null;
|
|
1178
1178
|
else {
|
|
1179
1179
|
// Inline function 'kotlin.let' call
|
|
1180
|
-
cont.
|
|
1180
|
+
cont.callCancelHandler_e6l0np_k$(tmp0_safe_receiver, cause);
|
|
1181
1181
|
}
|
|
1182
|
-
var tmp1_safe_receiver = this.
|
|
1182
|
+
var tmp1_safe_receiver = this.onCancellation_1;
|
|
1183
1183
|
if (tmp1_safe_receiver == null)
|
|
1184
1184
|
null;
|
|
1185
1185
|
else {
|
|
1186
1186
|
// Inline function 'kotlin.let' call
|
|
1187
|
-
cont.
|
|
1187
|
+
cont.callOnCancellation_n8igin_k$(tmp1_safe_receiver, cause, this.result_1);
|
|
1188
1188
|
}
|
|
1189
1189
|
};
|
|
1190
|
-
protoOf(CompletedContinuation).
|
|
1190
|
+
protoOf(CompletedContinuation).copy_umt5fl_k$ = function (result, cancelHandler, onCancellation, idempotentResume, cancelCause) {
|
|
1191
1191
|
return new CompletedContinuation(result, cancelHandler, onCancellation, idempotentResume, cancelCause);
|
|
1192
1192
|
};
|
|
1193
|
-
protoOf(CompletedContinuation).
|
|
1194
|
-
result = result === VOID ? this.
|
|
1195
|
-
cancelHandler = cancelHandler === VOID ? this.
|
|
1196
|
-
onCancellation = onCancellation === VOID ? this.
|
|
1197
|
-
idempotentResume = idempotentResume === VOID ? this.
|
|
1198
|
-
cancelCause = cancelCause === VOID ? this.
|
|
1199
|
-
return $super === VOID ? this.
|
|
1193
|
+
protoOf(CompletedContinuation).copy$default_uedmwo_k$ = function (result, cancelHandler, onCancellation, idempotentResume, cancelCause, $super) {
|
|
1194
|
+
result = result === VOID ? this.result_1 : result;
|
|
1195
|
+
cancelHandler = cancelHandler === VOID ? this.cancelHandler_1 : cancelHandler;
|
|
1196
|
+
onCancellation = onCancellation === VOID ? this.onCancellation_1 : onCancellation;
|
|
1197
|
+
idempotentResume = idempotentResume === VOID ? this.idempotentResume_1 : idempotentResume;
|
|
1198
|
+
cancelCause = cancelCause === VOID ? this.cancelCause_1 : cancelCause;
|
|
1199
|
+
return $super === VOID ? this.copy_umt5fl_k$(result, cancelHandler, onCancellation, idempotentResume, cancelCause) : $super.copy_umt5fl_k$.call(this, result, cancelHandler, onCancellation, idempotentResume, cancelCause);
|
|
1200
1200
|
};
|
|
1201
1201
|
protoOf(CompletedContinuation).toString = function () {
|
|
1202
|
-
return 'CompletedContinuation(result=' + toString_0(this.
|
|
1202
|
+
return 'CompletedContinuation(result=' + toString_0(this.result_1) + ', cancelHandler=' + toString_0(this.cancelHandler_1) + ', onCancellation=' + toString_0(this.onCancellation_1) + ', idempotentResume=' + toString_0(this.idempotentResume_1) + ', cancelCause=' + toString_0(this.cancelCause_1) + ')';
|
|
1203
1203
|
};
|
|
1204
1204
|
protoOf(CompletedContinuation).hashCode = function () {
|
|
1205
|
-
var result = this.
|
|
1206
|
-
result = imul(result, 31) + (this.
|
|
1207
|
-
result = imul(result, 31) + (this.
|
|
1208
|
-
result = imul(result, 31) + (this.
|
|
1209
|
-
result = imul(result, 31) + (this.
|
|
1205
|
+
var result = this.result_1 == null ? 0 : hashCode(this.result_1);
|
|
1206
|
+
result = imul(result, 31) + (this.cancelHandler_1 == null ? 0 : hashCode(this.cancelHandler_1)) | 0;
|
|
1207
|
+
result = imul(result, 31) + (this.onCancellation_1 == null ? 0 : hashCode(this.onCancellation_1)) | 0;
|
|
1208
|
+
result = imul(result, 31) + (this.idempotentResume_1 == null ? 0 : hashCode(this.idempotentResume_1)) | 0;
|
|
1209
|
+
result = imul(result, 31) + (this.cancelCause_1 == null ? 0 : hashCode(this.cancelCause_1)) | 0;
|
|
1210
1210
|
return result;
|
|
1211
1211
|
};
|
|
1212
1212
|
protoOf(CompletedContinuation).equals = function (other) {
|
|
@@ -1214,27 +1214,27 @@
|
|
|
1214
1214
|
return true;
|
|
1215
1215
|
if (!(other instanceof CompletedContinuation))
|
|
1216
1216
|
return false;
|
|
1217
|
-
if (!equals(this.
|
|
1217
|
+
if (!equals(this.result_1, other.result_1))
|
|
1218
1218
|
return false;
|
|
1219
|
-
if (!equals(this.
|
|
1219
|
+
if (!equals(this.cancelHandler_1, other.cancelHandler_1))
|
|
1220
1220
|
return false;
|
|
1221
|
-
if (!equals(this.
|
|
1221
|
+
if (!equals(this.onCancellation_1, other.onCancellation_1))
|
|
1222
1222
|
return false;
|
|
1223
|
-
if (!equals(this.
|
|
1223
|
+
if (!equals(this.idempotentResume_1, other.idempotentResume_1))
|
|
1224
1224
|
return false;
|
|
1225
|
-
if (!equals(this.
|
|
1225
|
+
if (!equals(this.cancelCause_1, other.cancelCause_1))
|
|
1226
1226
|
return false;
|
|
1227
1227
|
return true;
|
|
1228
1228
|
};
|
|
1229
1229
|
function ChildContinuation(child) {
|
|
1230
1230
|
JobNode.call(this);
|
|
1231
|
-
this.
|
|
1231
|
+
this.child_1 = child;
|
|
1232
1232
|
}
|
|
1233
|
-
protoOf(ChildContinuation).
|
|
1233
|
+
protoOf(ChildContinuation).get_onCancelling_k07uns_k$ = function () {
|
|
1234
1234
|
return true;
|
|
1235
1235
|
};
|
|
1236
|
-
protoOf(ChildContinuation).
|
|
1237
|
-
this.
|
|
1236
|
+
protoOf(ChildContinuation).invoke_py2q9a_k$ = function (cause) {
|
|
1237
|
+
this.child_1.parentCancelled_jw71o9_k$(this.child_1.getContinuationCancellationCause_3nurbc_k$(this.get_job_18j2r0_k$()));
|
|
1238
1238
|
};
|
|
1239
1239
|
var properties_initialized_CancellableContinuationImpl_kt_xtzb03;
|
|
1240
1240
|
function _init_properties_CancellableContinuationImpl_kt__6rrtdd() {
|
|
@@ -1249,18 +1249,18 @@
|
|
|
1249
1249
|
}
|
|
1250
1250
|
function $awaitCOROUTINE$_0(_this__u8e3s4, resultContinuation) {
|
|
1251
1251
|
CoroutineImpl.call(this, resultContinuation);
|
|
1252
|
-
this.
|
|
1252
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1253
1253
|
}
|
|
1254
|
-
protoOf($awaitCOROUTINE$_0).
|
|
1255
|
-
var suspendResult = this.
|
|
1254
|
+
protoOf($awaitCOROUTINE$_0).doResume_5yljmg_k$ = function () {
|
|
1255
|
+
var suspendResult = this.result_1;
|
|
1256
1256
|
$sm: do
|
|
1257
1257
|
try {
|
|
1258
|
-
var tmp = this.
|
|
1258
|
+
var tmp = this.state_1;
|
|
1259
1259
|
switch (tmp) {
|
|
1260
1260
|
case 0:
|
|
1261
|
-
this.
|
|
1262
|
-
this.
|
|
1263
|
-
suspendResult = this.
|
|
1261
|
+
this.exceptionState_1 = 2;
|
|
1262
|
+
this.state_1 = 1;
|
|
1263
|
+
suspendResult = this._this__u8e3s4__1.awaitInternal_5d94r6_k$(this);
|
|
1264
1264
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1265
1265
|
return suspendResult;
|
|
1266
1266
|
}
|
|
@@ -1269,61 +1269,61 @@
|
|
|
1269
1269
|
case 1:
|
|
1270
1270
|
return suspendResult;
|
|
1271
1271
|
case 2:
|
|
1272
|
-
throw this.
|
|
1272
|
+
throw this.exception_1;
|
|
1273
1273
|
}
|
|
1274
1274
|
} catch ($p) {
|
|
1275
1275
|
var e = $p;
|
|
1276
|
-
if (this.
|
|
1276
|
+
if (this.exceptionState_1 === 2) {
|
|
1277
1277
|
throw e;
|
|
1278
1278
|
} else {
|
|
1279
|
-
this.
|
|
1280
|
-
this.
|
|
1279
|
+
this.state_1 = this.exceptionState_1;
|
|
1280
|
+
this.exception_1 = e;
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
1283
|
while (true);
|
|
1284
1284
|
};
|
|
1285
1285
|
function CompletableDeferredImpl(parent) {
|
|
1286
1286
|
JobSupport.call(this, true);
|
|
1287
|
-
this.
|
|
1287
|
+
this.initParentJob_jbhsg3_k$(parent);
|
|
1288
1288
|
}
|
|
1289
|
-
protoOf(CompletableDeferredImpl).
|
|
1289
|
+
protoOf(CompletableDeferredImpl).get_onCancelComplete_jew0sy_k$ = function () {
|
|
1290
1290
|
return true;
|
|
1291
1291
|
};
|
|
1292
|
-
protoOf(CompletableDeferredImpl).
|
|
1293
|
-
return this.
|
|
1292
|
+
protoOf(CompletableDeferredImpl).getCompleted_nczk2z_k$ = function () {
|
|
1293
|
+
return this.getCompletedInternal_tfzdln_k$();
|
|
1294
1294
|
};
|
|
1295
|
-
protoOf(CompletableDeferredImpl).
|
|
1295
|
+
protoOf(CompletableDeferredImpl).await_4rdzbx_k$ = function ($completion) {
|
|
1296
1296
|
var tmp = new $awaitCOROUTINE$_0(this, $completion);
|
|
1297
|
-
tmp.
|
|
1298
|
-
tmp.
|
|
1299
|
-
return tmp.
|
|
1297
|
+
tmp.result_1 = Unit_instance;
|
|
1298
|
+
tmp.exception_1 = null;
|
|
1299
|
+
return tmp.doResume_5yljmg_k$();
|
|
1300
1300
|
};
|
|
1301
|
-
protoOf(CompletableDeferredImpl).
|
|
1302
|
-
return this.
|
|
1301
|
+
protoOf(CompletableDeferredImpl).complete_ixf84q_k$ = function (value) {
|
|
1302
|
+
return this.makeCompleting_fohkwa_k$(value);
|
|
1303
1303
|
};
|
|
1304
|
-
protoOf(CompletableDeferredImpl).
|
|
1305
|
-
return this.
|
|
1304
|
+
protoOf(CompletableDeferredImpl).completeExceptionally_xyzekf_k$ = function (exception) {
|
|
1305
|
+
return this.makeCompleting_fohkwa_k$(new CompletedExceptionally(exception));
|
|
1306
1306
|
};
|
|
1307
1307
|
function CancelledContinuation(continuation, cause, handled) {
|
|
1308
1308
|
CompletedExceptionally.call(this, cause == null ? CancellationException_init_$Create$('Continuation ' + toString(continuation) + ' was cancelled normally') : cause, handled);
|
|
1309
|
-
this.
|
|
1309
|
+
this._resumed_1 = atomic$boolean$1(false);
|
|
1310
1310
|
}
|
|
1311
|
-
protoOf(CancelledContinuation).
|
|
1312
|
-
return this.
|
|
1311
|
+
protoOf(CancelledContinuation).makeResumed_vjvawn_k$ = function () {
|
|
1312
|
+
return this._resumed_1.atomicfu$compareAndSet(false, true);
|
|
1313
1313
|
};
|
|
1314
1314
|
function CompletedExceptionally(cause, handled) {
|
|
1315
1315
|
handled = handled === VOID ? false : handled;
|
|
1316
|
-
this.
|
|
1317
|
-
this.
|
|
1316
|
+
this.cause_1 = cause;
|
|
1317
|
+
this._handled_1 = atomic$boolean$1(handled);
|
|
1318
1318
|
}
|
|
1319
|
-
protoOf(CompletedExceptionally).
|
|
1320
|
-
return this.
|
|
1319
|
+
protoOf(CompletedExceptionally).get_handled_cq14k3_k$ = function () {
|
|
1320
|
+
return this._handled_1.kotlinx$atomicfu$value;
|
|
1321
1321
|
};
|
|
1322
|
-
protoOf(CompletedExceptionally).
|
|
1323
|
-
return this.
|
|
1322
|
+
protoOf(CompletedExceptionally).makeHandled_ws9oq6_k$ = function () {
|
|
1323
|
+
return this._handled_1.atomicfu$compareAndSet(false, true);
|
|
1324
1324
|
};
|
|
1325
1325
|
protoOf(CompletedExceptionally).toString = function () {
|
|
1326
|
-
return get_classSimpleName(this) + '[' + this.
|
|
1326
|
+
return get_classSimpleName(this) + '[' + this.cause_1.toString() + ']';
|
|
1327
1327
|
};
|
|
1328
1328
|
function toState(_this__u8e3s4, caller) {
|
|
1329
1329
|
// Inline function 'kotlin.getOrElse' call
|
|
@@ -1351,7 +1351,7 @@
|
|
|
1351
1351
|
var tmp;
|
|
1352
1352
|
if (state instanceof CompletedExceptionally) {
|
|
1353
1353
|
// Inline function 'kotlin.Companion.failure' call
|
|
1354
|
-
var exception = recoverStackTrace(state.
|
|
1354
|
+
var exception = recoverStackTrace(state.cause_1, uCont);
|
|
1355
1355
|
tmp = _Result___init__impl__xyqfz8(createFailure(exception));
|
|
1356
1356
|
} else {
|
|
1357
1357
|
// Inline function 'kotlin.Companion.success' call
|
|
@@ -1377,15 +1377,15 @@
|
|
|
1377
1377
|
Key_getInstance();
|
|
1378
1378
|
AbstractCoroutineContextElement.call(this, Key_instance);
|
|
1379
1379
|
}
|
|
1380
|
-
protoOf(CoroutineDispatcher).
|
|
1380
|
+
protoOf(CoroutineDispatcher).isDispatchNeeded_ft82v4_k$ = function (context) {
|
|
1381
1381
|
return true;
|
|
1382
1382
|
};
|
|
1383
|
-
protoOf(CoroutineDispatcher).
|
|
1383
|
+
protoOf(CoroutineDispatcher).interceptContinuation_3dnmlu_k$ = function (continuation) {
|
|
1384
1384
|
return new DispatchedContinuation(this, continuation);
|
|
1385
1385
|
};
|
|
1386
|
-
protoOf(CoroutineDispatcher).
|
|
1386
|
+
protoOf(CoroutineDispatcher).releaseInterceptedContinuation_rgafzi_k$ = function (continuation) {
|
|
1387
1387
|
var dispatched = continuation instanceof DispatchedContinuation ? continuation : THROW_CCE();
|
|
1388
|
-
dispatched.
|
|
1388
|
+
dispatched.release_8sql92_k$();
|
|
1389
1389
|
};
|
|
1390
1390
|
protoOf(CoroutineDispatcher).toString = function () {
|
|
1391
1391
|
return get_classSimpleName(this) + '@' + get_hexAddress(this);
|
|
@@ -1393,18 +1393,18 @@
|
|
|
1393
1393
|
function handleCoroutineException(context, exception) {
|
|
1394
1394
|
var tmp;
|
|
1395
1395
|
if (exception instanceof DispatchException) {
|
|
1396
|
-
tmp = exception.
|
|
1396
|
+
tmp = exception.cause_1;
|
|
1397
1397
|
} else {
|
|
1398
1398
|
tmp = exception;
|
|
1399
1399
|
}
|
|
1400
1400
|
var reportException = tmp;
|
|
1401
1401
|
try {
|
|
1402
|
-
var tmp0_safe_receiver = context.
|
|
1402
|
+
var tmp0_safe_receiver = context.get_y2st91_k$(Key_instance_1);
|
|
1403
1403
|
if (tmp0_safe_receiver == null)
|
|
1404
1404
|
null;
|
|
1405
1405
|
else {
|
|
1406
1406
|
// Inline function 'kotlin.let' call
|
|
1407
|
-
tmp0_safe_receiver.
|
|
1407
|
+
tmp0_safe_receiver.handleException_e679jj_k$(context, reportException);
|
|
1408
1408
|
return Unit_instance;
|
|
1409
1409
|
}
|
|
1410
1410
|
} catch ($p) {
|
|
@@ -1434,7 +1434,7 @@
|
|
|
1434
1434
|
}
|
|
1435
1435
|
function GlobalScope() {
|
|
1436
1436
|
}
|
|
1437
|
-
protoOf(GlobalScope).
|
|
1437
|
+
protoOf(GlobalScope).get_coroutineContext_115oqo_k$ = function () {
|
|
1438
1438
|
return EmptyCoroutineContext_getInstance();
|
|
1439
1439
|
};
|
|
1440
1440
|
var GlobalScope_instance;
|
|
@@ -1444,29 +1444,29 @@
|
|
|
1444
1444
|
function CoroutineScope() {
|
|
1445
1445
|
}
|
|
1446
1446
|
function coroutineScope(block, $completion) {
|
|
1447
|
-
var coroutine = new ScopeCoroutine($completion.
|
|
1447
|
+
var coroutine = new ScopeCoroutine($completion.get_context_h02k06_k$(), $completion);
|
|
1448
1448
|
return startUndispatchedOrReturn(coroutine, coroutine, block);
|
|
1449
1449
|
}
|
|
1450
|
-
var
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
var CoroutineStart_UNDISPATCHED_instance;
|
|
1454
|
-
var CoroutineStart_entriesInitialized;
|
|
1455
|
-
function CoroutineStart_initEntries() {
|
|
1456
|
-
if (CoroutineStart_entriesInitialized)
|
|
1450
|
+
var static_init_called;
|
|
1451
|
+
function static_init() {
|
|
1452
|
+
if (static_init_called)
|
|
1457
1453
|
return Unit_instance;
|
|
1458
|
-
|
|
1454
|
+
static_init_called = true;
|
|
1459
1455
|
CoroutineStart_DEFAULT_instance = new CoroutineStart('DEFAULT', 0);
|
|
1460
1456
|
CoroutineStart_LAZY_instance = new CoroutineStart('LAZY', 1);
|
|
1461
1457
|
CoroutineStart_ATOMIC_instance = new CoroutineStart('ATOMIC', 2);
|
|
1462
1458
|
CoroutineStart_UNDISPATCHED_instance = new CoroutineStart('UNDISPATCHED', 3);
|
|
1463
1459
|
}
|
|
1460
|
+
var CoroutineStart_DEFAULT_instance;
|
|
1461
|
+
var CoroutineStart_LAZY_instance;
|
|
1462
|
+
var CoroutineStart_ATOMIC_instance;
|
|
1463
|
+
var CoroutineStart_UNDISPATCHED_instance;
|
|
1464
1464
|
function CoroutineStart(name, ordinal) {
|
|
1465
1465
|
Enum.call(this, name, ordinal);
|
|
1466
1466
|
}
|
|
1467
|
-
protoOf(CoroutineStart).
|
|
1467
|
+
protoOf(CoroutineStart).invoke_neaz0o_k$ = function (block, receiver, completion) {
|
|
1468
1468
|
var tmp;
|
|
1469
|
-
switch (this.
|
|
1469
|
+
switch (this.ordinal_1) {
|
|
1470
1470
|
case 0:
|
|
1471
1471
|
startCoroutineCancellable_0(block, receiver, completion);
|
|
1472
1472
|
tmp = Unit_instance;
|
|
@@ -1488,15 +1488,15 @@
|
|
|
1488
1488
|
}
|
|
1489
1489
|
return tmp;
|
|
1490
1490
|
};
|
|
1491
|
-
protoOf(CoroutineStart).
|
|
1491
|
+
protoOf(CoroutineStart).get_isLazy_ew1d53_k$ = function () {
|
|
1492
1492
|
return this === CoroutineStart_LAZY_getInstance();
|
|
1493
1493
|
};
|
|
1494
1494
|
function CoroutineStart_DEFAULT_getInstance() {
|
|
1495
|
-
|
|
1495
|
+
static_init();
|
|
1496
1496
|
return CoroutineStart_DEFAULT_instance;
|
|
1497
1497
|
}
|
|
1498
1498
|
function CoroutineStart_LAZY_getInstance() {
|
|
1499
|
-
|
|
1499
|
+
static_init();
|
|
1500
1500
|
return CoroutineStart_LAZY_instance;
|
|
1501
1501
|
}
|
|
1502
1502
|
function delta($this, unconfined) {
|
|
@@ -1504,12 +1504,12 @@
|
|
|
1504
1504
|
}
|
|
1505
1505
|
function EventLoop() {
|
|
1506
1506
|
CoroutineDispatcher.call(this);
|
|
1507
|
-
this.
|
|
1508
|
-
this.
|
|
1509
|
-
this.
|
|
1507
|
+
this.useCount_1 = new Long(0, 0);
|
|
1508
|
+
this.shared_1 = false;
|
|
1509
|
+
this.unconfinedQueue_1 = null;
|
|
1510
1510
|
}
|
|
1511
|
-
protoOf(EventLoop).
|
|
1512
|
-
var tmp0_elvis_lhs = this.
|
|
1511
|
+
protoOf(EventLoop).processUnconfinedEvent_mypjl6_k$ = function () {
|
|
1512
|
+
var tmp0_elvis_lhs = this.unconfinedQueue_1;
|
|
1513
1513
|
var tmp;
|
|
1514
1514
|
if (tmp0_elvis_lhs == null) {
|
|
1515
1515
|
return false;
|
|
@@ -1517,7 +1517,7 @@
|
|
|
1517
1517
|
tmp = tmp0_elvis_lhs;
|
|
1518
1518
|
}
|
|
1519
1519
|
var queue = tmp;
|
|
1520
|
-
var tmp1_elvis_lhs = queue.
|
|
1520
|
+
var tmp1_elvis_lhs = queue.removeFirstOrNull_eges3a_k$();
|
|
1521
1521
|
var tmp_0;
|
|
1522
1522
|
if (tmp1_elvis_lhs == null) {
|
|
1523
1523
|
return false;
|
|
@@ -1525,58 +1525,58 @@
|
|
|
1525
1525
|
tmp_0 = tmp1_elvis_lhs;
|
|
1526
1526
|
}
|
|
1527
1527
|
var task = tmp_0;
|
|
1528
|
-
task.
|
|
1528
|
+
task.run_mvkpxh_k$();
|
|
1529
1529
|
return true;
|
|
1530
1530
|
};
|
|
1531
|
-
protoOf(EventLoop).
|
|
1532
|
-
var tmp0_elvis_lhs = this.
|
|
1531
|
+
protoOf(EventLoop).dispatchUnconfined_o79kaq_k$ = function (task) {
|
|
1532
|
+
var tmp0_elvis_lhs = this.unconfinedQueue_1;
|
|
1533
1533
|
var tmp;
|
|
1534
1534
|
if (tmp0_elvis_lhs == null) {
|
|
1535
1535
|
// Inline function 'kotlin.also' call
|
|
1536
1536
|
var this_0 = ArrayDeque_init_$Create$();
|
|
1537
|
-
this.
|
|
1537
|
+
this.unconfinedQueue_1 = this_0;
|
|
1538
1538
|
tmp = this_0;
|
|
1539
1539
|
} else {
|
|
1540
1540
|
tmp = tmp0_elvis_lhs;
|
|
1541
1541
|
}
|
|
1542
1542
|
var queue = tmp;
|
|
1543
|
-
queue.
|
|
1543
|
+
queue.addLast_gaaijb_k$(task);
|
|
1544
1544
|
};
|
|
1545
|
-
protoOf(EventLoop).
|
|
1546
|
-
return compare(this.
|
|
1545
|
+
protoOf(EventLoop).get_isUnconfinedLoopActive_g78ri6_k$ = function () {
|
|
1546
|
+
return compare(this.useCount_1, delta(this, true)) >= 0;
|
|
1547
1547
|
};
|
|
1548
|
-
protoOf(EventLoop).
|
|
1549
|
-
var tmp0_safe_receiver = this.
|
|
1550
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1548
|
+
protoOf(EventLoop).get_isUnconfinedQueueEmpty_mi405s_k$ = function () {
|
|
1549
|
+
var tmp0_safe_receiver = this.unconfinedQueue_1;
|
|
1550
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.isEmpty_y1axqb_k$();
|
|
1551
1551
|
return tmp1_elvis_lhs == null ? true : tmp1_elvis_lhs;
|
|
1552
1552
|
};
|
|
1553
|
-
protoOf(EventLoop).
|
|
1554
|
-
this.
|
|
1553
|
+
protoOf(EventLoop).incrementUseCount_jadqvy_k$ = function (unconfined) {
|
|
1554
|
+
this.useCount_1 = add(this.useCount_1, delta(this, unconfined));
|
|
1555
1555
|
if (!unconfined)
|
|
1556
|
-
this.
|
|
1556
|
+
this.shared_1 = true;
|
|
1557
1557
|
};
|
|
1558
|
-
protoOf(EventLoop).
|
|
1559
|
-
this.
|
|
1560
|
-
if (compare(this.
|
|
1558
|
+
protoOf(EventLoop).decrementUseCount_x8i8ca_k$ = function (unconfined) {
|
|
1559
|
+
this.useCount_1 = subtract(this.useCount_1, delta(this, unconfined));
|
|
1560
|
+
if (compare(this.useCount_1, new Long(0, 0)) > 0)
|
|
1561
1561
|
return Unit_instance;
|
|
1562
1562
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1563
|
-
if (this.
|
|
1564
|
-
this.
|
|
1563
|
+
if (this.shared_1) {
|
|
1564
|
+
this.shutdown_cplwmy_k$();
|
|
1565
1565
|
}
|
|
1566
1566
|
};
|
|
1567
|
-
protoOf(EventLoop).
|
|
1567
|
+
protoOf(EventLoop).shutdown_cplwmy_k$ = function () {
|
|
1568
1568
|
};
|
|
1569
1569
|
function ThreadLocalEventLoop() {
|
|
1570
1570
|
ThreadLocalEventLoop_instance = this;
|
|
1571
|
-
this.
|
|
1571
|
+
this.ref_1 = commonThreadLocal(new Symbol('ThreadLocalEventLoop'));
|
|
1572
1572
|
}
|
|
1573
|
-
protoOf(ThreadLocalEventLoop).
|
|
1574
|
-
var tmp0_elvis_lhs = this.
|
|
1573
|
+
protoOf(ThreadLocalEventLoop).get_eventLoop_wo5hfs_k$ = function () {
|
|
1574
|
+
var tmp0_elvis_lhs = this.ref_1.get_26vq_k$();
|
|
1575
1575
|
var tmp;
|
|
1576
1576
|
if (tmp0_elvis_lhs == null) {
|
|
1577
1577
|
// Inline function 'kotlin.also' call
|
|
1578
1578
|
var this_0 = createEventLoop();
|
|
1579
|
-
ThreadLocalEventLoop_getInstance().
|
|
1579
|
+
ThreadLocalEventLoop_getInstance().ref_1.set_tg4fwj_k$(this_0);
|
|
1580
1580
|
tmp = this_0;
|
|
1581
1581
|
} else {
|
|
1582
1582
|
tmp = tmp0_elvis_lhs;
|
|
@@ -1601,18 +1601,18 @@
|
|
|
1601
1601
|
invokeImmediately = invokeImmediately === VOID ? true : invokeImmediately;
|
|
1602
1602
|
var tmp;
|
|
1603
1603
|
if (_this__u8e3s4 instanceof JobSupport) {
|
|
1604
|
-
tmp = _this__u8e3s4.
|
|
1604
|
+
tmp = _this__u8e3s4.invokeOnCompletionInternal_5jxuhy_k$(invokeImmediately, handler);
|
|
1605
1605
|
} else {
|
|
1606
|
-
var tmp_0 = handler.
|
|
1607
|
-
tmp = _this__u8e3s4.
|
|
1606
|
+
var tmp_0 = handler.get_onCancelling_k07uns_k$();
|
|
1607
|
+
tmp = _this__u8e3s4.invokeOnCompletion_sct3wq_k$(tmp_0, invokeImmediately, JobNode$invoke$ref(handler));
|
|
1608
1608
|
}
|
|
1609
1609
|
return tmp;
|
|
1610
1610
|
}
|
|
1611
1611
|
function NonDisposableHandle() {
|
|
1612
1612
|
}
|
|
1613
|
-
protoOf(NonDisposableHandle).
|
|
1613
|
+
protoOf(NonDisposableHandle).dispose_3nnxhr_k$ = function () {
|
|
1614
1614
|
};
|
|
1615
|
-
protoOf(NonDisposableHandle).
|
|
1615
|
+
protoOf(NonDisposableHandle).childCancelled_hsnipy_k$ = function (cause) {
|
|
1616
1616
|
return false;
|
|
1617
1617
|
};
|
|
1618
1618
|
protoOf(NonDisposableHandle).toString = function () {
|
|
@@ -1668,31 +1668,31 @@
|
|
|
1668
1668
|
function JobNode() {
|
|
1669
1669
|
LockFreeLinkedListNode.call(this);
|
|
1670
1670
|
}
|
|
1671
|
-
protoOf(JobNode).
|
|
1672
|
-
var tmp = this.
|
|
1671
|
+
protoOf(JobNode).get_job_18j2r0_k$ = function () {
|
|
1672
|
+
var tmp = this.job_1;
|
|
1673
1673
|
if (!(tmp == null))
|
|
1674
1674
|
return tmp;
|
|
1675
1675
|
else {
|
|
1676
1676
|
throwUninitializedPropertyAccessException('job');
|
|
1677
1677
|
}
|
|
1678
1678
|
};
|
|
1679
|
-
protoOf(JobNode).
|
|
1679
|
+
protoOf(JobNode).get_isActive_quafmh_k$ = function () {
|
|
1680
1680
|
return true;
|
|
1681
1681
|
};
|
|
1682
|
-
protoOf(JobNode).
|
|
1682
|
+
protoOf(JobNode).get_list_wopuqv_k$ = function () {
|
|
1683
1683
|
return null;
|
|
1684
1684
|
};
|
|
1685
|
-
protoOf(JobNode).
|
|
1686
|
-
return this.
|
|
1685
|
+
protoOf(JobNode).dispose_3nnxhr_k$ = function () {
|
|
1686
|
+
return this.get_job_18j2r0_k$().removeNode_qrwaz_k$(this);
|
|
1687
1687
|
};
|
|
1688
1688
|
protoOf(JobNode).toString = function () {
|
|
1689
|
-
return get_classSimpleName(this) + '@' + get_hexAddress(this) + '[job@' + get_hexAddress(this.
|
|
1689
|
+
return get_classSimpleName(this) + '@' + get_hexAddress(this) + '[job@' + get_hexAddress(this.get_job_18j2r0_k$()) + ']';
|
|
1690
1690
|
};
|
|
1691
1691
|
function _set_exceptionsHolder__tqm22h($this, value) {
|
|
1692
|
-
$this.
|
|
1692
|
+
$this._exceptionsHolder_1.kotlinx$atomicfu$value = value;
|
|
1693
1693
|
}
|
|
1694
1694
|
function _get_exceptionsHolder__nhszp($this) {
|
|
1695
|
-
return $this.
|
|
1695
|
+
return $this._exceptionsHolder_1.kotlinx$atomicfu$value;
|
|
1696
1696
|
}
|
|
1697
1697
|
function allocateList($this) {
|
|
1698
1698
|
return ArrayList_init_$Create$(4);
|
|
@@ -1702,12 +1702,12 @@
|
|
|
1702
1702
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1703
1703
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1704
1704
|
var tmp0_safe_receiver = proposedUpdate instanceof CompletedExceptionally ? proposedUpdate : null;
|
|
1705
|
-
var proposedException = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1705
|
+
var proposedException = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cause_1;
|
|
1706
1706
|
var wasCancelling;
|
|
1707
1707
|
// Inline function 'kotlinx.coroutines.internal.synchronized' call
|
|
1708
1708
|
// Inline function 'kotlinx.coroutines.internal.synchronizedImpl' call
|
|
1709
|
-
wasCancelling = state.
|
|
1710
|
-
var exceptions = state.
|
|
1709
|
+
wasCancelling = state.get_isCancelling_o1apv_k$();
|
|
1710
|
+
var exceptions = state.sealLocked_m2r6b3_k$(proposedException);
|
|
1711
1711
|
var finalCause = getFinalRootCause($this, state, exceptions);
|
|
1712
1712
|
if (!(finalCause == null)) {
|
|
1713
1713
|
addSuppressedExceptions($this, finalCause, exceptions);
|
|
@@ -1715,34 +1715,34 @@
|
|
|
1715
1715
|
var finalException = finalCause;
|
|
1716
1716
|
var finalState = finalException == null ? proposedUpdate : finalException === proposedException ? proposedUpdate : new CompletedExceptionally(finalException);
|
|
1717
1717
|
if (!(finalException == null)) {
|
|
1718
|
-
var handled = cancelParent($this, finalException) || $this.
|
|
1718
|
+
var handled = cancelParent($this, finalException) || $this.handleJobException_9fdet1_k$(finalException);
|
|
1719
1719
|
if (handled) {
|
|
1720
|
-
(finalState instanceof CompletedExceptionally ? finalState : THROW_CCE()).
|
|
1720
|
+
(finalState instanceof CompletedExceptionally ? finalState : THROW_CCE()).makeHandled_ws9oq6_k$();
|
|
1721
1721
|
}
|
|
1722
1722
|
}
|
|
1723
1723
|
if (!wasCancelling) {
|
|
1724
|
-
$this.
|
|
1724
|
+
$this.onCancelling_aqzbl5_k$(finalException);
|
|
1725
1725
|
}
|
|
1726
|
-
$this.
|
|
1727
|
-
var casSuccess = $this.
|
|
1726
|
+
$this.onCompletionInternal_38s8uv_k$(finalState);
|
|
1727
|
+
var casSuccess = $this._state_1.atomicfu$compareAndSet(state, boxIncomplete(finalState));
|
|
1728
1728
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1729
1729
|
completeStateFinalization($this, state, finalState);
|
|
1730
1730
|
return finalState;
|
|
1731
1731
|
}
|
|
1732
1732
|
function getFinalRootCause($this, state, exceptions) {
|
|
1733
|
-
if (exceptions.
|
|
1734
|
-
if (state.
|
|
1733
|
+
if (exceptions.isEmpty_y1axqb_k$()) {
|
|
1734
|
+
if (state.get_isCancelling_o1apv_k$()) {
|
|
1735
1735
|
// Inline function 'kotlinx.coroutines.JobSupport.defaultCancellationException' call
|
|
1736
|
-
return new JobCancellationException(null == null ? $this.
|
|
1736
|
+
return new JobCancellationException(null == null ? $this.cancellationExceptionMessage_a64063_k$() : null, null, $this);
|
|
1737
1737
|
}
|
|
1738
1738
|
return null;
|
|
1739
1739
|
}
|
|
1740
1740
|
var tmp$ret$1;
|
|
1741
1741
|
$l$block: {
|
|
1742
1742
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
1743
|
-
var _iterator__ex2g4s = exceptions.
|
|
1744
|
-
while (_iterator__ex2g4s.
|
|
1745
|
-
var element = _iterator__ex2g4s.
|
|
1743
|
+
var _iterator__ex2g4s = exceptions.iterator_jk1svi_k$();
|
|
1744
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
1745
|
+
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
1746
1746
|
if (!(element instanceof CancellationException)) {
|
|
1747
1747
|
tmp$ret$1 = element;
|
|
1748
1748
|
break $l$block;
|
|
@@ -1753,14 +1753,14 @@
|
|
|
1753
1753
|
var firstNonCancellation = tmp$ret$1;
|
|
1754
1754
|
if (!(firstNonCancellation == null))
|
|
1755
1755
|
return firstNonCancellation;
|
|
1756
|
-
var first = exceptions.
|
|
1756
|
+
var first = exceptions.get_c1px32_k$(0);
|
|
1757
1757
|
if (first instanceof TimeoutCancellationException) {
|
|
1758
1758
|
var tmp$ret$3;
|
|
1759
1759
|
$l$block_0: {
|
|
1760
1760
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
1761
|
-
var _iterator__ex2g4s_0 = exceptions.
|
|
1762
|
-
while (_iterator__ex2g4s_0.
|
|
1763
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
1761
|
+
var _iterator__ex2g4s_0 = exceptions.iterator_jk1svi_k$();
|
|
1762
|
+
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
1763
|
+
var element_0 = _iterator__ex2g4s_0.next_20eer_k$();
|
|
1764
1764
|
var tmp;
|
|
1765
1765
|
if (!(element_0 === first)) {
|
|
1766
1766
|
tmp = element_0 instanceof TimeoutCancellationException;
|
|
@@ -1781,13 +1781,13 @@
|
|
|
1781
1781
|
return first;
|
|
1782
1782
|
}
|
|
1783
1783
|
function addSuppressedExceptions($this, rootCause, exceptions) {
|
|
1784
|
-
if (exceptions.
|
|
1784
|
+
if (exceptions.get_size_woubt6_k$() <= 1)
|
|
1785
1785
|
return Unit_instance;
|
|
1786
|
-
var seenExceptions = identitySet(exceptions.
|
|
1786
|
+
var seenExceptions = identitySet(exceptions.get_size_woubt6_k$());
|
|
1787
1787
|
var unwrappedCause = unwrap(rootCause);
|
|
1788
|
-
var _iterator__ex2g4s = exceptions.
|
|
1789
|
-
while (_iterator__ex2g4s.
|
|
1790
|
-
var exception = _iterator__ex2g4s.
|
|
1788
|
+
var _iterator__ex2g4s = exceptions.iterator_jk1svi_k$();
|
|
1789
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
1790
|
+
var exception = _iterator__ex2g4s.next_20eer_k$();
|
|
1791
1791
|
var unwrapped = unwrap(exception);
|
|
1792
1792
|
var tmp;
|
|
1793
1793
|
var tmp_0;
|
|
@@ -1797,7 +1797,7 @@
|
|
|
1797
1797
|
tmp_0 = false;
|
|
1798
1798
|
}
|
|
1799
1799
|
if (tmp_0) {
|
|
1800
|
-
tmp = seenExceptions.
|
|
1800
|
+
tmp = seenExceptions.add_utx5q5_k$(unwrapped);
|
|
1801
1801
|
} else {
|
|
1802
1802
|
tmp = false;
|
|
1803
1803
|
}
|
|
@@ -1809,37 +1809,37 @@
|
|
|
1809
1809
|
function tryFinalizeSimpleState($this, state, update) {
|
|
1810
1810
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1811
1811
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1812
|
-
if (!$this.
|
|
1812
|
+
if (!$this._state_1.atomicfu$compareAndSet(state, boxIncomplete(update)))
|
|
1813
1813
|
return false;
|
|
1814
|
-
$this.
|
|
1815
|
-
$this.
|
|
1814
|
+
$this.onCancelling_aqzbl5_k$(null);
|
|
1815
|
+
$this.onCompletionInternal_38s8uv_k$(update);
|
|
1816
1816
|
completeStateFinalization($this, state, update);
|
|
1817
1817
|
return true;
|
|
1818
1818
|
}
|
|
1819
1819
|
function completeStateFinalization($this, state, update) {
|
|
1820
|
-
var tmp0_safe_receiver = $this.
|
|
1820
|
+
var tmp0_safe_receiver = $this.get_parentHandle_h80e5u_k$();
|
|
1821
1821
|
if (tmp0_safe_receiver == null)
|
|
1822
1822
|
null;
|
|
1823
1823
|
else {
|
|
1824
1824
|
// Inline function 'kotlin.let' call
|
|
1825
|
-
tmp0_safe_receiver.
|
|
1826
|
-
$this.
|
|
1825
|
+
tmp0_safe_receiver.dispose_3nnxhr_k$();
|
|
1826
|
+
$this.set_parentHandle_knepiy_k$(NonDisposableHandle_instance);
|
|
1827
1827
|
}
|
|
1828
1828
|
var tmp1_safe_receiver = update instanceof CompletedExceptionally ? update : null;
|
|
1829
|
-
var cause = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1829
|
+
var cause = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.cause_1;
|
|
1830
1830
|
if (state instanceof JobNode) {
|
|
1831
1831
|
try {
|
|
1832
|
-
state.
|
|
1832
|
+
state.invoke_py2q9a_k$(cause);
|
|
1833
1833
|
} catch ($p) {
|
|
1834
1834
|
if ($p instanceof Error) {
|
|
1835
1835
|
var ex = $p;
|
|
1836
|
-
$this.
|
|
1836
|
+
$this.handleOnCompletionException_l1g6ri_k$(new CompletionHandlerException('Exception in completion handler ' + state.toString() + ' for ' + $this.toString(), ex));
|
|
1837
1837
|
} else {
|
|
1838
1838
|
throw $p;
|
|
1839
1839
|
}
|
|
1840
1840
|
}
|
|
1841
1841
|
} else {
|
|
1842
|
-
var tmp2_safe_receiver = state.
|
|
1842
|
+
var tmp2_safe_receiver = state.get_list_wopuqv_k$();
|
|
1843
1843
|
if (tmp2_safe_receiver == null)
|
|
1844
1844
|
null;
|
|
1845
1845
|
else {
|
|
@@ -1848,23 +1848,23 @@
|
|
|
1848
1848
|
}
|
|
1849
1849
|
}
|
|
1850
1850
|
function notifyCancelling($this, list, cause) {
|
|
1851
|
-
$this.
|
|
1852
|
-
list.
|
|
1851
|
+
$this.onCancelling_aqzbl5_k$(cause);
|
|
1852
|
+
list.close_ari2z4_k$(4);
|
|
1853
1853
|
// Inline function 'kotlinx.coroutines.JobSupport.notifyHandlers' call
|
|
1854
1854
|
var exception = null;
|
|
1855
1855
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListHead.forEach' call
|
|
1856
|
-
var cur = list.
|
|
1856
|
+
var cur = list._next_1;
|
|
1857
1857
|
while (!equals(cur, list)) {
|
|
1858
1858
|
var node = cur;
|
|
1859
1859
|
var tmp;
|
|
1860
1860
|
if (node instanceof JobNode) {
|
|
1861
|
-
tmp = node.
|
|
1861
|
+
tmp = node.get_onCancelling_k07uns_k$();
|
|
1862
1862
|
} else {
|
|
1863
1863
|
tmp = false;
|
|
1864
1864
|
}
|
|
1865
1865
|
if (tmp) {
|
|
1866
1866
|
try {
|
|
1867
|
-
node.
|
|
1867
|
+
node.invoke_py2q9a_k$(cause);
|
|
1868
1868
|
} catch ($p) {
|
|
1869
1869
|
if ($p instanceof Error) {
|
|
1870
1870
|
var ex = $p;
|
|
@@ -1886,33 +1886,33 @@
|
|
|
1886
1886
|
}
|
|
1887
1887
|
}
|
|
1888
1888
|
}
|
|
1889
|
-
cur = cur.
|
|
1889
|
+
cur = cur._next_1;
|
|
1890
1890
|
}
|
|
1891
1891
|
var tmp0_safe_receiver_0 = exception;
|
|
1892
1892
|
if (tmp0_safe_receiver_0 == null)
|
|
1893
1893
|
null;
|
|
1894
1894
|
else {
|
|
1895
1895
|
// Inline function 'kotlin.let' call
|
|
1896
|
-
$this.
|
|
1896
|
+
$this.handleOnCompletionException_l1g6ri_k$(tmp0_safe_receiver_0);
|
|
1897
1897
|
}
|
|
1898
1898
|
cancelParent($this, cause);
|
|
1899
1899
|
}
|
|
1900
1900
|
function cancelParent($this, cause) {
|
|
1901
|
-
if ($this.
|
|
1901
|
+
if ($this.get_isScopedCoroutine_rwmmff_k$())
|
|
1902
1902
|
return true;
|
|
1903
1903
|
var isCancellation = cause instanceof CancellationException;
|
|
1904
|
-
var parent = $this.
|
|
1904
|
+
var parent = $this.get_parentHandle_h80e5u_k$();
|
|
1905
1905
|
if (parent === null || parent === NonDisposableHandle_instance) {
|
|
1906
1906
|
return isCancellation;
|
|
1907
1907
|
}
|
|
1908
|
-
return parent.
|
|
1908
|
+
return parent.childCancelled_hsnipy_k$(cause) || isCancellation;
|
|
1909
1909
|
}
|
|
1910
1910
|
function notifyCompletion($this, $receiver, cause) {
|
|
1911
|
-
$receiver.
|
|
1911
|
+
$receiver.close_ari2z4_k$(1);
|
|
1912
1912
|
// Inline function 'kotlinx.coroutines.JobSupport.notifyHandlers' call
|
|
1913
1913
|
var exception = null;
|
|
1914
1914
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListHead.forEach' call
|
|
1915
|
-
var cur = $receiver.
|
|
1915
|
+
var cur = $receiver._next_1;
|
|
1916
1916
|
while (!equals(cur, $receiver)) {
|
|
1917
1917
|
var node = cur;
|
|
1918
1918
|
var tmp;
|
|
@@ -1923,7 +1923,7 @@
|
|
|
1923
1923
|
}
|
|
1924
1924
|
if (tmp) {
|
|
1925
1925
|
try {
|
|
1926
|
-
node.
|
|
1926
|
+
node.invoke_py2q9a_k$(cause);
|
|
1927
1927
|
} catch ($p) {
|
|
1928
1928
|
if ($p instanceof Error) {
|
|
1929
1929
|
var ex = $p;
|
|
@@ -1945,29 +1945,29 @@
|
|
|
1945
1945
|
}
|
|
1946
1946
|
}
|
|
1947
1947
|
}
|
|
1948
|
-
cur = cur.
|
|
1948
|
+
cur = cur._next_1;
|
|
1949
1949
|
}
|
|
1950
1950
|
var tmp0_safe_receiver_0 = exception;
|
|
1951
1951
|
if (tmp0_safe_receiver_0 == null)
|
|
1952
1952
|
null;
|
|
1953
1953
|
else {
|
|
1954
1954
|
// Inline function 'kotlin.let' call
|
|
1955
|
-
$this.
|
|
1955
|
+
$this.handleOnCompletionException_l1g6ri_k$(tmp0_safe_receiver_0);
|
|
1956
1956
|
}
|
|
1957
1957
|
}
|
|
1958
1958
|
function startInternal($this, state) {
|
|
1959
1959
|
if (state instanceof Empty) {
|
|
1960
|
-
if (state.
|
|
1960
|
+
if (state.isActive_1)
|
|
1961
1961
|
return 0;
|
|
1962
|
-
if (!$this.
|
|
1962
|
+
if (!$this._state_1.atomicfu$compareAndSet(state, get_EMPTY_ACTIVE()))
|
|
1963
1963
|
return -1;
|
|
1964
|
-
$this.
|
|
1964
|
+
$this.onStart_qsx7gt_k$();
|
|
1965
1965
|
return 1;
|
|
1966
1966
|
} else {
|
|
1967
1967
|
if (state instanceof InactiveNodeList) {
|
|
1968
|
-
if (!$this.
|
|
1968
|
+
if (!$this._state_1.atomicfu$compareAndSet(state, state.list_1))
|
|
1969
1969
|
return -1;
|
|
1970
|
-
$this.
|
|
1970
|
+
$this.onStart_qsx7gt_k$();
|
|
1971
1971
|
return 1;
|
|
1972
1972
|
} else {
|
|
1973
1973
|
return 0;
|
|
@@ -1976,26 +1976,26 @@
|
|
|
1976
1976
|
}
|
|
1977
1977
|
function promoteEmptyToNodeList($this, state) {
|
|
1978
1978
|
var list = new NodeList();
|
|
1979
|
-
var update = state.
|
|
1980
|
-
$this.
|
|
1979
|
+
var update = state.isActive_1 ? list : new InactiveNodeList(list);
|
|
1980
|
+
$this._state_1.atomicfu$compareAndSet(state, update);
|
|
1981
1981
|
}
|
|
1982
1982
|
function promoteSingleToNodeList($this, state) {
|
|
1983
|
-
state.
|
|
1983
|
+
state.addOneIfEmpty_2jwoix_k$(new NodeList());
|
|
1984
1984
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.nextNode' call
|
|
1985
|
-
var list = state.
|
|
1986
|
-
$this.
|
|
1985
|
+
var list = state._next_1;
|
|
1986
|
+
$this._state_1.atomicfu$compareAndSet(state, list);
|
|
1987
1987
|
}
|
|
1988
1988
|
function cancelMakeCompleting($this, cause) {
|
|
1989
1989
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
1990
1990
|
while (true) {
|
|
1991
|
-
var state = $this.
|
|
1991
|
+
var state = $this.get_state_2t6sbp_k$();
|
|
1992
1992
|
var tmp;
|
|
1993
1993
|
if (!(!(state == null) ? isInterface(state, Incomplete) : false)) {
|
|
1994
1994
|
tmp = true;
|
|
1995
1995
|
} else {
|
|
1996
1996
|
var tmp_0;
|
|
1997
1997
|
if (state instanceof Finishing) {
|
|
1998
|
-
tmp_0 = state.
|
|
1998
|
+
tmp_0 = state.get_isCompleting_vi2bwp_k$();
|
|
1999
1999
|
} else {
|
|
2000
2000
|
tmp_0 = false;
|
|
2001
2001
|
}
|
|
@@ -2016,13 +2016,13 @@
|
|
|
2016
2016
|
var tmp_0;
|
|
2017
2017
|
if (cause == null) {
|
|
2018
2018
|
// Inline function 'kotlinx.coroutines.JobSupport.defaultCancellationException' call
|
|
2019
|
-
tmp_0 = new JobCancellationException(null == null ? $this.
|
|
2019
|
+
tmp_0 = new JobCancellationException(null == null ? $this.cancellationExceptionMessage_a64063_k$() : null, null, $this);
|
|
2020
2020
|
} else {
|
|
2021
2021
|
tmp_0 = cause;
|
|
2022
2022
|
}
|
|
2023
2023
|
tmp = tmp_0;
|
|
2024
2024
|
} else {
|
|
2025
|
-
tmp = (isInterface(cause, ParentJob) ? cause : THROW_CCE()).
|
|
2025
|
+
tmp = (isInterface(cause, ParentJob) ? cause : THROW_CCE()).getChildJobCancellationCause_wx9uoh_k$();
|
|
2026
2026
|
}
|
|
2027
2027
|
return tmp;
|
|
2028
2028
|
}
|
|
@@ -2030,14 +2030,14 @@
|
|
|
2030
2030
|
var causeExceptionCache = null;
|
|
2031
2031
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2032
2032
|
while (true) {
|
|
2033
|
-
var tmp0 = $this.
|
|
2033
|
+
var tmp0 = $this.get_state_2t6sbp_k$();
|
|
2034
2034
|
$l$block: {
|
|
2035
2035
|
if (tmp0 instanceof Finishing) {
|
|
2036
2036
|
// Inline function 'kotlinx.coroutines.internal.synchronized' call
|
|
2037
2037
|
// Inline function 'kotlinx.coroutines.internal.synchronizedImpl' call
|
|
2038
|
-
if (tmp0.
|
|
2038
|
+
if (tmp0.get_isSealed_zdv4z3_k$())
|
|
2039
2039
|
return get_TOO_LATE_TO_CANCEL();
|
|
2040
|
-
var wasCancelling = tmp0.
|
|
2040
|
+
var wasCancelling = tmp0.get_isCancelling_o1apv_k$();
|
|
2041
2041
|
if (!(cause == null) || !wasCancelling) {
|
|
2042
2042
|
var tmp0_elvis_lhs = causeExceptionCache;
|
|
2043
2043
|
var tmp;
|
|
@@ -2050,10 +2050,10 @@
|
|
|
2050
2050
|
tmp = tmp0_elvis_lhs;
|
|
2051
2051
|
}
|
|
2052
2052
|
var causeException = tmp;
|
|
2053
|
-
tmp0.
|
|
2053
|
+
tmp0.addExceptionLocked_hjqo7b_k$(causeException);
|
|
2054
2054
|
}
|
|
2055
2055
|
// Inline function 'kotlin.takeIf' call
|
|
2056
|
-
var this_1 = tmp0.
|
|
2056
|
+
var this_1 = tmp0.get_rootCause_69dwxu_k$();
|
|
2057
2057
|
var tmp_0;
|
|
2058
2058
|
if (!wasCancelling) {
|
|
2059
2059
|
tmp_0 = this_1;
|
|
@@ -2065,7 +2065,7 @@
|
|
|
2065
2065
|
null;
|
|
2066
2066
|
else {
|
|
2067
2067
|
// Inline function 'kotlin.let' call
|
|
2068
|
-
notifyCancelling($this, tmp0.
|
|
2068
|
+
notifyCancelling($this, tmp0.list_1, notifyRootCause);
|
|
2069
2069
|
}
|
|
2070
2070
|
return get_COMPLETING_ALREADY();
|
|
2071
2071
|
} else {
|
|
@@ -2081,7 +2081,7 @@
|
|
|
2081
2081
|
tmp_1 = tmp2_elvis_lhs;
|
|
2082
2082
|
}
|
|
2083
2083
|
var causeException_0 = tmp_1;
|
|
2084
|
-
if (tmp0.
|
|
2084
|
+
if (tmp0.get_isActive_quafmh_k$()) {
|
|
2085
2085
|
if (tryMakeCancelling($this, tmp0, causeException_0))
|
|
2086
2086
|
return get_COMPLETING_ALREADY();
|
|
2087
2087
|
} else {
|
|
@@ -2103,7 +2103,7 @@
|
|
|
2103
2103
|
}
|
|
2104
2104
|
}
|
|
2105
2105
|
function getOrPromoteCancellingList($this, state) {
|
|
2106
|
-
var tmp0_elvis_lhs = state.
|
|
2106
|
+
var tmp0_elvis_lhs = state.get_list_wopuqv_k$();
|
|
2107
2107
|
var tmp;
|
|
2108
2108
|
if (tmp0_elvis_lhs == null) {
|
|
2109
2109
|
var tmp_0;
|
|
@@ -2137,7 +2137,7 @@
|
|
|
2137
2137
|
}
|
|
2138
2138
|
var list = tmp;
|
|
2139
2139
|
var cancelling = new Finishing(list, false, rootCause);
|
|
2140
|
-
if (!$this.
|
|
2140
|
+
if (!$this._state_1.atomicfu$compareAndSet(state, cancelling))
|
|
2141
2141
|
return false;
|
|
2142
2142
|
notifyCancelling($this, list, rootCause);
|
|
2143
2143
|
return true;
|
|
@@ -2185,24 +2185,24 @@
|
|
|
2185
2185
|
var notifyRootCause;
|
|
2186
2186
|
// Inline function 'kotlinx.coroutines.internal.synchronized' call
|
|
2187
2187
|
// Inline function 'kotlinx.coroutines.internal.synchronizedImpl' call
|
|
2188
|
-
if (finishing.
|
|
2188
|
+
if (finishing.get_isCompleting_vi2bwp_k$())
|
|
2189
2189
|
return get_COMPLETING_ALREADY();
|
|
2190
|
-
finishing.
|
|
2190
|
+
finishing.set_isCompleting_1h5iw_k$(true);
|
|
2191
2191
|
if (!(finishing === state)) {
|
|
2192
|
-
if (!$this.
|
|
2192
|
+
if (!$this._state_1.atomicfu$compareAndSet(state, finishing))
|
|
2193
2193
|
return get_COMPLETING_RETRY();
|
|
2194
2194
|
}
|
|
2195
2195
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
2196
|
-
var wasCancelling = finishing.
|
|
2196
|
+
var wasCancelling = finishing.get_isCancelling_o1apv_k$();
|
|
2197
2197
|
var tmp0_safe_receiver = proposedUpdate instanceof CompletedExceptionally ? proposedUpdate : null;
|
|
2198
2198
|
if (tmp0_safe_receiver == null)
|
|
2199
2199
|
null;
|
|
2200
2200
|
else {
|
|
2201
2201
|
// Inline function 'kotlin.let' call
|
|
2202
|
-
finishing.
|
|
2202
|
+
finishing.addExceptionLocked_hjqo7b_k$(tmp0_safe_receiver.cause_1);
|
|
2203
2203
|
}
|
|
2204
2204
|
// Inline function 'kotlin.takeIf' call
|
|
2205
|
-
var this_0 = finishing.
|
|
2205
|
+
var this_0 = finishing.get_rootCause_69dwxu_k$();
|
|
2206
2206
|
var tmp_0;
|
|
2207
2207
|
if (!wasCancelling) {
|
|
2208
2208
|
tmp_0 = this_0;
|
|
@@ -2219,7 +2219,7 @@
|
|
|
2219
2219
|
var child = nextChild($this, list);
|
|
2220
2220
|
if (!(child == null) && tryWaitForChild($this, finishing, child, proposedUpdate))
|
|
2221
2221
|
return get_COMPLETING_WAITING_CHILDREN();
|
|
2222
|
-
list.
|
|
2222
|
+
list.close_ari2z4_k$(2);
|
|
2223
2223
|
var anotherChild = nextChild($this, list);
|
|
2224
2224
|
if (!(anotherChild == null) && tryWaitForChild($this, finishing, anotherChild, proposedUpdate))
|
|
2225
2225
|
return get_COMPLETING_WAITING_CHILDREN();
|
|
@@ -2227,7 +2227,7 @@
|
|
|
2227
2227
|
}
|
|
2228
2228
|
function _get_exceptionOrNull__b3j7js($this, $receiver) {
|
|
2229
2229
|
var tmp0_safe_receiver = $receiver instanceof CompletedExceptionally ? $receiver : null;
|
|
2230
|
-
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2230
|
+
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cause_1;
|
|
2231
2231
|
}
|
|
2232
2232
|
function tryWaitForChild($this, state, child, proposedUpdate) {
|
|
2233
2233
|
var $this_0 = $this;
|
|
@@ -2236,7 +2236,7 @@
|
|
|
2236
2236
|
var proposedUpdate_0 = proposedUpdate;
|
|
2237
2237
|
$l$1: do {
|
|
2238
2238
|
$l$0: do {
|
|
2239
|
-
var handle = invokeOnCompletion(child_0.
|
|
2239
|
+
var handle = invokeOnCompletion(child_0.childJob_1, false, new ChildCompletion($this_0, state_0, child_0, proposedUpdate_0));
|
|
2240
2240
|
if (!(handle === NonDisposableHandle_instance))
|
|
2241
2241
|
return true;
|
|
2242
2242
|
var tmp0_elvis_lhs = nextChild($this_0, child_0);
|
|
@@ -2265,29 +2265,29 @@
|
|
|
2265
2265
|
var waitChild = nextChild($this, lastChild);
|
|
2266
2266
|
if (!(waitChild == null) && tryWaitForChild($this, state, waitChild, proposedUpdate))
|
|
2267
2267
|
return Unit_instance;
|
|
2268
|
-
state.
|
|
2268
|
+
state.list_1.close_ari2z4_k$(2);
|
|
2269
2269
|
var waitChildAgain = nextChild($this, lastChild);
|
|
2270
2270
|
if (!(waitChildAgain == null) && tryWaitForChild($this, state, waitChildAgain, proposedUpdate)) {
|
|
2271
2271
|
return Unit_instance;
|
|
2272
2272
|
}
|
|
2273
2273
|
var finalState = finalizeFinishingState($this, state, proposedUpdate);
|
|
2274
|
-
$this.
|
|
2274
|
+
$this.afterCompletion_2p0irt_k$(finalState);
|
|
2275
2275
|
}
|
|
2276
2276
|
function nextChild($this, $receiver) {
|
|
2277
2277
|
var cur = $receiver;
|
|
2278
2278
|
$l$loop: while (true) {
|
|
2279
2279
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.isRemoved' call
|
|
2280
|
-
if (!cur.
|
|
2280
|
+
if (!cur._removed_1) {
|
|
2281
2281
|
break $l$loop;
|
|
2282
2282
|
}
|
|
2283
2283
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.prevNode' call
|
|
2284
|
-
cur = cur.
|
|
2284
|
+
cur = cur._prev_1;
|
|
2285
2285
|
}
|
|
2286
2286
|
$l$loop_0: while (true) {
|
|
2287
2287
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.nextNode' call
|
|
2288
|
-
cur = cur.
|
|
2288
|
+
cur = cur._next_1;
|
|
2289
2289
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.isRemoved' call
|
|
2290
|
-
if (cur.
|
|
2290
|
+
if (cur._removed_1)
|
|
2291
2291
|
continue $l$loop_0;
|
|
2292
2292
|
if (cur instanceof ChildHandleNode)
|
|
2293
2293
|
return cur;
|
|
@@ -2298,10 +2298,10 @@
|
|
|
2298
2298
|
function stateString($this, state) {
|
|
2299
2299
|
var tmp;
|
|
2300
2300
|
if (state instanceof Finishing) {
|
|
2301
|
-
tmp = state.
|
|
2301
|
+
tmp = state.get_isCancelling_o1apv_k$() ? 'Cancelling' : state.get_isCompleting_vi2bwp_k$() ? 'Completing' : 'Active';
|
|
2302
2302
|
} else {
|
|
2303
2303
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2304
|
-
tmp = state.
|
|
2304
|
+
tmp = state.get_isActive_quafmh_k$() ? 'Active' : 'New';
|
|
2305
2305
|
} else {
|
|
2306
2306
|
if (state instanceof CompletedExceptionally) {
|
|
2307
2307
|
tmp = 'Cancelled';
|
|
@@ -2314,36 +2314,36 @@
|
|
|
2314
2314
|
}
|
|
2315
2315
|
function Finishing(list, isCompleting, rootCause) {
|
|
2316
2316
|
SynchronizedObject.call(this);
|
|
2317
|
-
this.
|
|
2318
|
-
this.
|
|
2319
|
-
this.
|
|
2320
|
-
this.
|
|
2317
|
+
this.list_1 = list;
|
|
2318
|
+
this._isCompleting_1 = atomic$boolean$1(isCompleting);
|
|
2319
|
+
this._rootCause_1 = atomic$ref$1(rootCause);
|
|
2320
|
+
this._exceptionsHolder_1 = atomic$ref$1(null);
|
|
2321
2321
|
}
|
|
2322
|
-
protoOf(Finishing).
|
|
2323
|
-
return this.
|
|
2322
|
+
protoOf(Finishing).get_list_wopuqv_k$ = function () {
|
|
2323
|
+
return this.list_1;
|
|
2324
2324
|
};
|
|
2325
|
-
protoOf(Finishing).
|
|
2326
|
-
this.
|
|
2325
|
+
protoOf(Finishing).set_isCompleting_1h5iw_k$ = function (value) {
|
|
2326
|
+
this._isCompleting_1.kotlinx$atomicfu$value = value;
|
|
2327
2327
|
};
|
|
2328
|
-
protoOf(Finishing).
|
|
2329
|
-
return this.
|
|
2328
|
+
protoOf(Finishing).get_isCompleting_vi2bwp_k$ = function () {
|
|
2329
|
+
return this._isCompleting_1.kotlinx$atomicfu$value;
|
|
2330
2330
|
};
|
|
2331
|
-
protoOf(Finishing).
|
|
2332
|
-
this.
|
|
2331
|
+
protoOf(Finishing).set_rootCause_zflycc_k$ = function (value) {
|
|
2332
|
+
this._rootCause_1.kotlinx$atomicfu$value = value;
|
|
2333
2333
|
};
|
|
2334
|
-
protoOf(Finishing).
|
|
2335
|
-
return this.
|
|
2334
|
+
protoOf(Finishing).get_rootCause_69dwxu_k$ = function () {
|
|
2335
|
+
return this._rootCause_1.kotlinx$atomicfu$value;
|
|
2336
2336
|
};
|
|
2337
|
-
protoOf(Finishing).
|
|
2337
|
+
protoOf(Finishing).get_isSealed_zdv4z3_k$ = function () {
|
|
2338
2338
|
return _get_exceptionsHolder__nhszp(this) === get_SEALED();
|
|
2339
2339
|
};
|
|
2340
|
-
protoOf(Finishing).
|
|
2341
|
-
return !(this.
|
|
2340
|
+
protoOf(Finishing).get_isCancelling_o1apv_k$ = function () {
|
|
2341
|
+
return !(this.get_rootCause_69dwxu_k$() == null);
|
|
2342
2342
|
};
|
|
2343
|
-
protoOf(Finishing).
|
|
2344
|
-
return this.
|
|
2343
|
+
protoOf(Finishing).get_isActive_quafmh_k$ = function () {
|
|
2344
|
+
return this.get_rootCause_69dwxu_k$() == null;
|
|
2345
2345
|
};
|
|
2346
|
-
protoOf(Finishing).
|
|
2346
|
+
protoOf(Finishing).sealLocked_m2r6b3_k$ = function (proposedException) {
|
|
2347
2347
|
var eh = _get_exceptionsHolder__nhszp(this);
|
|
2348
2348
|
var tmp;
|
|
2349
2349
|
if (eh == null) {
|
|
@@ -2352,7 +2352,7 @@
|
|
|
2352
2352
|
if (eh instanceof Error) {
|
|
2353
2353
|
// Inline function 'kotlin.also' call
|
|
2354
2354
|
var this_0 = allocateList(this);
|
|
2355
|
-
this_0.
|
|
2355
|
+
this_0.add_utx5q5_k$(eh);
|
|
2356
2356
|
tmp = this_0;
|
|
2357
2357
|
} else {
|
|
2358
2358
|
if (eh instanceof ArrayList) {
|
|
@@ -2365,23 +2365,23 @@
|
|
|
2365
2365
|
}
|
|
2366
2366
|
}
|
|
2367
2367
|
var list = tmp;
|
|
2368
|
-
var rootCause = this.
|
|
2368
|
+
var rootCause = this.get_rootCause_69dwxu_k$();
|
|
2369
2369
|
if (rootCause == null)
|
|
2370
2370
|
null;
|
|
2371
2371
|
else {
|
|
2372
2372
|
// Inline function 'kotlin.let' call
|
|
2373
|
-
list.
|
|
2373
|
+
list.add_dl6gt3_k$(0, rootCause);
|
|
2374
2374
|
}
|
|
2375
2375
|
if (!(proposedException == null) && !equals(proposedException, rootCause)) {
|
|
2376
|
-
list.
|
|
2376
|
+
list.add_utx5q5_k$(proposedException);
|
|
2377
2377
|
}
|
|
2378
2378
|
_set_exceptionsHolder__tqm22h(this, get_SEALED());
|
|
2379
2379
|
return list;
|
|
2380
2380
|
};
|
|
2381
|
-
protoOf(Finishing).
|
|
2382
|
-
var rootCause = this.
|
|
2381
|
+
protoOf(Finishing).addExceptionLocked_hjqo7b_k$ = function (exception) {
|
|
2382
|
+
var rootCause = this.get_rootCause_69dwxu_k$();
|
|
2383
2383
|
if (rootCause == null) {
|
|
2384
|
-
this.
|
|
2384
|
+
this.set_rootCause_zflycc_k$(exception);
|
|
2385
2385
|
return Unit_instance;
|
|
2386
2386
|
}
|
|
2387
2387
|
if (exception === rootCause)
|
|
@@ -2395,12 +2395,12 @@
|
|
|
2395
2395
|
return Unit_instance;
|
|
2396
2396
|
// Inline function 'kotlin.apply' call
|
|
2397
2397
|
var this_0 = allocateList(this);
|
|
2398
|
-
this_0.
|
|
2399
|
-
this_0.
|
|
2398
|
+
this_0.add_utx5q5_k$(eh);
|
|
2399
|
+
this_0.add_utx5q5_k$(exception);
|
|
2400
2400
|
_set_exceptionsHolder__tqm22h(this, this_0);
|
|
2401
2401
|
} else {
|
|
2402
2402
|
if (eh instanceof ArrayList) {
|
|
2403
|
-
(eh instanceof ArrayList ? eh : THROW_CCE()).
|
|
2403
|
+
(eh instanceof ArrayList ? eh : THROW_CCE()).add_utx5q5_k$(exception);
|
|
2404
2404
|
} else {
|
|
2405
2405
|
// Inline function 'kotlin.error' call
|
|
2406
2406
|
var message = 'State is ' + toString(eh);
|
|
@@ -2410,29 +2410,29 @@
|
|
|
2410
2410
|
}
|
|
2411
2411
|
};
|
|
2412
2412
|
protoOf(Finishing).toString = function () {
|
|
2413
|
-
return 'Finishing[cancelling=' + this.
|
|
2413
|
+
return 'Finishing[cancelling=' + this.get_isCancelling_o1apv_k$() + ', completing=' + this.get_isCompleting_vi2bwp_k$() + ', rootCause=' + toString_0(this.get_rootCause_69dwxu_k$()) + ', exceptions=' + toString_0(_get_exceptionsHolder__nhszp(this)) + ', list=' + this.list_1.toString() + ']';
|
|
2414
2414
|
};
|
|
2415
2415
|
function ChildCompletion(parent, state, child, proposedUpdate) {
|
|
2416
2416
|
JobNode.call(this);
|
|
2417
|
-
this.
|
|
2418
|
-
this.
|
|
2419
|
-
this.
|
|
2420
|
-
this.
|
|
2417
|
+
this.parent_1 = parent;
|
|
2418
|
+
this.state_1 = state;
|
|
2419
|
+
this.child_1 = child;
|
|
2420
|
+
this.proposedUpdate_1 = proposedUpdate;
|
|
2421
2421
|
}
|
|
2422
|
-
protoOf(ChildCompletion).
|
|
2422
|
+
protoOf(ChildCompletion).get_onCancelling_k07uns_k$ = function () {
|
|
2423
2423
|
return false;
|
|
2424
2424
|
};
|
|
2425
|
-
protoOf(ChildCompletion).
|
|
2426
|
-
continueCompleting(this.
|
|
2425
|
+
protoOf(ChildCompletion).invoke_py2q9a_k$ = function (cause) {
|
|
2426
|
+
continueCompleting(this.parent_1, this.state_1, this.child_1, this.proposedUpdate_1);
|
|
2427
2427
|
};
|
|
2428
2428
|
function AwaitContinuation(delegate, job) {
|
|
2429
2429
|
CancellableContinuationImpl.call(this, delegate, 1);
|
|
2430
|
-
this.
|
|
2430
|
+
this.job_1 = job;
|
|
2431
2431
|
}
|
|
2432
|
-
protoOf(AwaitContinuation).
|
|
2433
|
-
var state = this.
|
|
2432
|
+
protoOf(AwaitContinuation).getContinuationCancellationCause_3nurbc_k$ = function (parent) {
|
|
2433
|
+
var state = this.job_1.get_state_2t6sbp_k$();
|
|
2434
2434
|
if (state instanceof Finishing) {
|
|
2435
|
-
var tmp0_safe_receiver = state.
|
|
2435
|
+
var tmp0_safe_receiver = state.get_rootCause_69dwxu_k$();
|
|
2436
2436
|
if (tmp0_safe_receiver == null)
|
|
2437
2437
|
null;
|
|
2438
2438
|
else {
|
|
@@ -2441,66 +2441,66 @@
|
|
|
2441
2441
|
}
|
|
2442
2442
|
}
|
|
2443
2443
|
if (state instanceof CompletedExceptionally)
|
|
2444
|
-
return state.
|
|
2445
|
-
return parent.
|
|
2444
|
+
return state.cause_1;
|
|
2445
|
+
return parent.getCancellationException_8i1q6u_k$();
|
|
2446
2446
|
};
|
|
2447
|
-
protoOf(AwaitContinuation).
|
|
2447
|
+
protoOf(AwaitContinuation).nameString_cd9e9w_k$ = function () {
|
|
2448
2448
|
return 'AwaitContinuation';
|
|
2449
2449
|
};
|
|
2450
2450
|
function awaitSuspend($this, $completion) {
|
|
2451
2451
|
var cont = new AwaitContinuation(intercepted($completion), $this);
|
|
2452
|
-
cont.
|
|
2452
|
+
cont.initCancellability_shqc60_k$();
|
|
2453
2453
|
disposeOnCancellation(cont, invokeOnCompletion($this, VOID, new ResumeAwaitOnCompletion(cont)));
|
|
2454
|
-
return cont.
|
|
2454
|
+
return cont.getResult_fck196_k$();
|
|
2455
2455
|
}
|
|
2456
2456
|
function JobSupport(active) {
|
|
2457
|
-
this.
|
|
2458
|
-
this.
|
|
2457
|
+
this._state_1 = atomic$ref$1(active ? get_EMPTY_ACTIVE() : get_EMPTY_NEW());
|
|
2458
|
+
this._parentHandle_1 = atomic$ref$1(null);
|
|
2459
2459
|
}
|
|
2460
|
-
protoOf(JobSupport).
|
|
2460
|
+
protoOf(JobSupport).get_key_18j28a_k$ = function () {
|
|
2461
2461
|
return Key_instance_2;
|
|
2462
2462
|
};
|
|
2463
|
-
protoOf(JobSupport).
|
|
2464
|
-
this.
|
|
2463
|
+
protoOf(JobSupport).set_parentHandle_knepiy_k$ = function (value) {
|
|
2464
|
+
this._parentHandle_1.kotlinx$atomicfu$value = value;
|
|
2465
2465
|
};
|
|
2466
|
-
protoOf(JobSupport).
|
|
2467
|
-
return this.
|
|
2466
|
+
protoOf(JobSupport).get_parentHandle_h80e5u_k$ = function () {
|
|
2467
|
+
return this._parentHandle_1.kotlinx$atomicfu$value;
|
|
2468
2468
|
};
|
|
2469
|
-
protoOf(JobSupport).
|
|
2469
|
+
protoOf(JobSupport).initParentJob_jbhsg3_k$ = function (parent) {
|
|
2470
2470
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
2471
2471
|
if (parent == null) {
|
|
2472
|
-
this.
|
|
2472
|
+
this.set_parentHandle_knepiy_k$(NonDisposableHandle_instance);
|
|
2473
2473
|
return Unit_instance;
|
|
2474
2474
|
}
|
|
2475
|
-
parent.
|
|
2476
|
-
var handle = parent.
|
|
2477
|
-
this.
|
|
2478
|
-
if (this.
|
|
2479
|
-
handle.
|
|
2480
|
-
this.
|
|
2475
|
+
parent.start_1tchgi_k$();
|
|
2476
|
+
var handle = parent.attachChild_314ws0_k$(this);
|
|
2477
|
+
this.set_parentHandle_knepiy_k$(handle);
|
|
2478
|
+
if (this.get_isCompleted_a6j6c8_k$()) {
|
|
2479
|
+
handle.dispose_3nnxhr_k$();
|
|
2480
|
+
this.set_parentHandle_knepiy_k$(NonDisposableHandle_instance);
|
|
2481
2481
|
}
|
|
2482
2482
|
};
|
|
2483
|
-
protoOf(JobSupport).
|
|
2484
|
-
return this.
|
|
2483
|
+
protoOf(JobSupport).get_state_2t6sbp_k$ = function () {
|
|
2484
|
+
return this._state_1.kotlinx$atomicfu$value;
|
|
2485
2485
|
};
|
|
2486
|
-
protoOf(JobSupport).
|
|
2487
|
-
var state = this.
|
|
2486
|
+
protoOf(JobSupport).get_isActive_quafmh_k$ = function () {
|
|
2487
|
+
var state = this.get_state_2t6sbp_k$();
|
|
2488
2488
|
var tmp;
|
|
2489
2489
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2490
|
-
tmp = state.
|
|
2490
|
+
tmp = state.get_isActive_quafmh_k$();
|
|
2491
2491
|
} else {
|
|
2492
2492
|
tmp = false;
|
|
2493
2493
|
}
|
|
2494
2494
|
return tmp;
|
|
2495
2495
|
};
|
|
2496
|
-
protoOf(JobSupport).
|
|
2497
|
-
var tmp = this.
|
|
2496
|
+
protoOf(JobSupport).get_isCompleted_a6j6c8_k$ = function () {
|
|
2497
|
+
var tmp = this.get_state_2t6sbp_k$();
|
|
2498
2498
|
return !(!(tmp == null) ? isInterface(tmp, Incomplete) : false);
|
|
2499
2499
|
};
|
|
2500
|
-
protoOf(JobSupport).
|
|
2500
|
+
protoOf(JobSupport).start_1tchgi_k$ = function () {
|
|
2501
2501
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2502
2502
|
while (true) {
|
|
2503
|
-
var state = this.
|
|
2503
|
+
var state = this.get_state_2t6sbp_k$();
|
|
2504
2504
|
var tmp0_subject = startInternal(this, state);
|
|
2505
2505
|
if (tmp0_subject === 0)
|
|
2506
2506
|
return false;
|
|
@@ -2508,14 +2508,14 @@
|
|
|
2508
2508
|
return true;
|
|
2509
2509
|
}
|
|
2510
2510
|
};
|
|
2511
|
-
protoOf(JobSupport).
|
|
2511
|
+
protoOf(JobSupport).onStart_qsx7gt_k$ = function () {
|
|
2512
2512
|
};
|
|
2513
|
-
protoOf(JobSupport).
|
|
2514
|
-
var state = this.
|
|
2513
|
+
protoOf(JobSupport).getCancellationException_8i1q6u_k$ = function () {
|
|
2514
|
+
var state = this.get_state_2t6sbp_k$();
|
|
2515
2515
|
var tmp;
|
|
2516
2516
|
if (state instanceof Finishing) {
|
|
2517
|
-
var tmp0_safe_receiver = state.
|
|
2518
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.
|
|
2517
|
+
var tmp0_safe_receiver = state.get_rootCause_69dwxu_k$();
|
|
2518
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.toCancellationException_70r72h_k$(tmp0_safe_receiver, get_classSimpleName(this) + ' is cancelling');
|
|
2519
2519
|
var tmp_0;
|
|
2520
2520
|
if (tmp1_elvis_lhs == null) {
|
|
2521
2521
|
// Inline function 'kotlin.error' call
|
|
@@ -2532,7 +2532,7 @@
|
|
|
2532
2532
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
2533
2533
|
} else {
|
|
2534
2534
|
if (state instanceof CompletedExceptionally) {
|
|
2535
|
-
tmp = this.
|
|
2535
|
+
tmp = this.toCancellationException$default_nbl2nx_k$(state.cause_1);
|
|
2536
2536
|
} else {
|
|
2537
2537
|
tmp = new JobCancellationException(get_classSimpleName(this) + ' has completed normally', null, this);
|
|
2538
2538
|
}
|
|
@@ -2540,44 +2540,44 @@
|
|
|
2540
2540
|
}
|
|
2541
2541
|
return tmp;
|
|
2542
2542
|
};
|
|
2543
|
-
protoOf(JobSupport).
|
|
2543
|
+
protoOf(JobSupport).toCancellationException_70r72h_k$ = function (_this__u8e3s4, message) {
|
|
2544
2544
|
var tmp0_elvis_lhs = _this__u8e3s4 instanceof CancellationException ? _this__u8e3s4 : null;
|
|
2545
2545
|
var tmp;
|
|
2546
2546
|
if (tmp0_elvis_lhs == null) {
|
|
2547
2547
|
// Inline function 'kotlinx.coroutines.JobSupport.defaultCancellationException' call
|
|
2548
|
-
tmp = new JobCancellationException(message == null ? this.
|
|
2548
|
+
tmp = new JobCancellationException(message == null ? this.cancellationExceptionMessage_a64063_k$() : message, _this__u8e3s4, this);
|
|
2549
2549
|
} else {
|
|
2550
2550
|
tmp = tmp0_elvis_lhs;
|
|
2551
2551
|
}
|
|
2552
2552
|
return tmp;
|
|
2553
2553
|
};
|
|
2554
|
-
protoOf(JobSupport).
|
|
2554
|
+
protoOf(JobSupport).toCancellationException$default_nbl2nx_k$ = function (_this__u8e3s4, message, $super) {
|
|
2555
2555
|
message = message === VOID ? null : message;
|
|
2556
|
-
return $super === VOID ? this.
|
|
2556
|
+
return $super === VOID ? this.toCancellationException_70r72h_k$(_this__u8e3s4, message) : $super.toCancellationException_70r72h_k$.call(this, _this__u8e3s4, message);
|
|
2557
2557
|
};
|
|
2558
|
-
protoOf(JobSupport).
|
|
2559
|
-
return this.
|
|
2558
|
+
protoOf(JobSupport).invokeOnCompletion_n6cffu_k$ = function (handler) {
|
|
2559
|
+
return this.invokeOnCompletionInternal_5jxuhy_k$(true, new InvokeOnCompletion(handler));
|
|
2560
2560
|
};
|
|
2561
|
-
protoOf(JobSupport).
|
|
2561
|
+
protoOf(JobSupport).invokeOnCompletion_sct3wq_k$ = function (onCancelling, invokeImmediately, handler) {
|
|
2562
2562
|
var tmp;
|
|
2563
2563
|
if (onCancelling) {
|
|
2564
2564
|
tmp = new InvokeOnCancelling(handler);
|
|
2565
2565
|
} else {
|
|
2566
2566
|
tmp = new InvokeOnCompletion(handler);
|
|
2567
2567
|
}
|
|
2568
|
-
return this.
|
|
2568
|
+
return this.invokeOnCompletionInternal_5jxuhy_k$(invokeImmediately, tmp);
|
|
2569
2569
|
};
|
|
2570
|
-
protoOf(JobSupport).
|
|
2571
|
-
node.
|
|
2570
|
+
protoOf(JobSupport).invokeOnCompletionInternal_5jxuhy_k$ = function (invokeImmediately, node) {
|
|
2571
|
+
node.job_1 = this;
|
|
2572
2572
|
var tmp$ret$0;
|
|
2573
2573
|
$l$block_1: {
|
|
2574
2574
|
// Inline function 'kotlinx.coroutines.JobSupport.tryPutNodeIntoList' call
|
|
2575
2575
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2576
2576
|
while (true) {
|
|
2577
|
-
var state = this.
|
|
2577
|
+
var state = this.get_state_2t6sbp_k$();
|
|
2578
2578
|
if (state instanceof Empty) {
|
|
2579
|
-
if (state.
|
|
2580
|
-
if (this.
|
|
2579
|
+
if (state.isActive_1) {
|
|
2580
|
+
if (this._state_1.atomicfu$compareAndSet(state, node)) {
|
|
2581
2581
|
tmp$ret$0 = true;
|
|
2582
2582
|
break $l$block_1;
|
|
2583
2583
|
}
|
|
@@ -2586,26 +2586,26 @@
|
|
|
2586
2586
|
}
|
|
2587
2587
|
} else {
|
|
2588
2588
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2589
|
-
var list = state.
|
|
2589
|
+
var list = state.get_list_wopuqv_k$();
|
|
2590
2590
|
if (list == null) {
|
|
2591
2591
|
promoteSingleToNodeList(this, state instanceof JobNode ? state : THROW_CCE());
|
|
2592
2592
|
} else {
|
|
2593
2593
|
var tmp;
|
|
2594
|
-
if (node.
|
|
2594
|
+
if (node.get_onCancelling_k07uns_k$()) {
|
|
2595
2595
|
var tmp0_safe_receiver = state instanceof Finishing ? state : null;
|
|
2596
|
-
var rootCause = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2596
|
+
var rootCause = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_rootCause_69dwxu_k$();
|
|
2597
2597
|
var tmp_0;
|
|
2598
2598
|
if (rootCause == null) {
|
|
2599
|
-
tmp_0 = list.
|
|
2599
|
+
tmp_0 = list.addLast_5b0i77_k$(node, 5);
|
|
2600
2600
|
} else {
|
|
2601
2601
|
if (invokeImmediately) {
|
|
2602
|
-
node.
|
|
2602
|
+
node.invoke_py2q9a_k$(rootCause);
|
|
2603
2603
|
}
|
|
2604
2604
|
return NonDisposableHandle_instance;
|
|
2605
2605
|
}
|
|
2606
2606
|
tmp = tmp_0;
|
|
2607
2607
|
} else {
|
|
2608
|
-
tmp = list.
|
|
2608
|
+
tmp = list.addLast_5b0i77_k$(node, 1);
|
|
2609
2609
|
}
|
|
2610
2610
|
if (tmp) {
|
|
2611
2611
|
tmp$ret$0 = true;
|
|
@@ -2623,25 +2623,25 @@
|
|
|
2623
2623
|
if (added)
|
|
2624
2624
|
return node;
|
|
2625
2625
|
else if (invokeImmediately) {
|
|
2626
|
-
var tmp_1 = this.
|
|
2626
|
+
var tmp_1 = this.get_state_2t6sbp_k$();
|
|
2627
2627
|
var tmp0_safe_receiver_0 = tmp_1 instanceof CompletedExceptionally ? tmp_1 : null;
|
|
2628
|
-
node.
|
|
2628
|
+
node.invoke_py2q9a_k$(tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.cause_1);
|
|
2629
2629
|
}
|
|
2630
2630
|
return NonDisposableHandle_instance;
|
|
2631
2631
|
};
|
|
2632
|
-
protoOf(JobSupport).
|
|
2632
|
+
protoOf(JobSupport).removeNode_qrwaz_k$ = function (node) {
|
|
2633
2633
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2634
2634
|
while (true) {
|
|
2635
|
-
var state = this.
|
|
2635
|
+
var state = this.get_state_2t6sbp_k$();
|
|
2636
2636
|
if (state instanceof JobNode) {
|
|
2637
2637
|
if (!(state === node))
|
|
2638
2638
|
return Unit_instance;
|
|
2639
|
-
if (this.
|
|
2639
|
+
if (this._state_1.atomicfu$compareAndSet(state, get_EMPTY_ACTIVE()))
|
|
2640
2640
|
return Unit_instance;
|
|
2641
2641
|
} else {
|
|
2642
2642
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2643
|
-
if (!(state.
|
|
2644
|
-
node.
|
|
2643
|
+
if (!(state.get_list_wopuqv_k$() == null)) {
|
|
2644
|
+
node.remove_fgfybg_k$();
|
|
2645
2645
|
}
|
|
2646
2646
|
return Unit_instance;
|
|
2647
2647
|
} else {
|
|
@@ -2650,23 +2650,23 @@
|
|
|
2650
2650
|
}
|
|
2651
2651
|
}
|
|
2652
2652
|
};
|
|
2653
|
-
protoOf(JobSupport).
|
|
2653
|
+
protoOf(JobSupport).get_onCancelComplete_jew0sy_k$ = function () {
|
|
2654
2654
|
return false;
|
|
2655
2655
|
};
|
|
2656
|
-
protoOf(JobSupport).
|
|
2656
|
+
protoOf(JobSupport).cancellationExceptionMessage_a64063_k$ = function () {
|
|
2657
2657
|
return 'Job was cancelled';
|
|
2658
2658
|
};
|
|
2659
|
-
protoOf(JobSupport).
|
|
2660
|
-
this.
|
|
2659
|
+
protoOf(JobSupport).parentCancelled_nk0n80_k$ = function (parentJob) {
|
|
2660
|
+
this.cancelImpl_465b6c_k$(parentJob);
|
|
2661
2661
|
};
|
|
2662
|
-
protoOf(JobSupport).
|
|
2662
|
+
protoOf(JobSupport).childCancelled_hsnipy_k$ = function (cause) {
|
|
2663
2663
|
if (cause instanceof CancellationException)
|
|
2664
2664
|
return true;
|
|
2665
|
-
return this.
|
|
2665
|
+
return this.cancelImpl_465b6c_k$(cause) && this.get_handlesException_ctmhwg_k$();
|
|
2666
2666
|
};
|
|
2667
|
-
protoOf(JobSupport).
|
|
2667
|
+
protoOf(JobSupport).cancelImpl_465b6c_k$ = function (cause) {
|
|
2668
2668
|
var finalState = get_COMPLETING_ALREADY();
|
|
2669
|
-
if (this.
|
|
2669
|
+
if (this.get_onCancelComplete_jew0sy_k$()) {
|
|
2670
2670
|
finalState = cancelMakeCompleting(this, cause);
|
|
2671
2671
|
if (finalState === get_COMPLETING_WAITING_CHILDREN())
|
|
2672
2672
|
return true;
|
|
@@ -2682,19 +2682,19 @@
|
|
|
2682
2682
|
} else if (finalState === get_TOO_LATE_TO_CANCEL()) {
|
|
2683
2683
|
tmp = false;
|
|
2684
2684
|
} else {
|
|
2685
|
-
this.
|
|
2685
|
+
this.afterCompletion_2p0irt_k$(finalState);
|
|
2686
2686
|
tmp = true;
|
|
2687
2687
|
}
|
|
2688
2688
|
return tmp;
|
|
2689
2689
|
};
|
|
2690
|
-
protoOf(JobSupport).
|
|
2691
|
-
var state = this.
|
|
2690
|
+
protoOf(JobSupport).getChildJobCancellationCause_wx9uoh_k$ = function () {
|
|
2691
|
+
var state = this.get_state_2t6sbp_k$();
|
|
2692
2692
|
var tmp;
|
|
2693
2693
|
if (state instanceof Finishing) {
|
|
2694
|
-
tmp = state.
|
|
2694
|
+
tmp = state.get_rootCause_69dwxu_k$();
|
|
2695
2695
|
} else {
|
|
2696
2696
|
if (state instanceof CompletedExceptionally) {
|
|
2697
|
-
tmp = state.
|
|
2697
|
+
tmp = state.cause_1;
|
|
2698
2698
|
} else {
|
|
2699
2699
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2700
2700
|
// Inline function 'kotlin.error' call
|
|
@@ -2709,10 +2709,10 @@
|
|
|
2709
2709
|
var tmp1_elvis_lhs = rootCause instanceof CancellationException ? rootCause : null;
|
|
2710
2710
|
return tmp1_elvis_lhs == null ? new JobCancellationException('Parent job is ' + stateString(this, state), rootCause, this) : tmp1_elvis_lhs;
|
|
2711
2711
|
};
|
|
2712
|
-
protoOf(JobSupport).
|
|
2712
|
+
protoOf(JobSupport).makeCompleting_fohkwa_k$ = function (proposedUpdate) {
|
|
2713
2713
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2714
2714
|
while (true) {
|
|
2715
|
-
var tmp0 = this.
|
|
2715
|
+
var tmp0 = this.get_state_2t6sbp_k$();
|
|
2716
2716
|
$l$block: {
|
|
2717
2717
|
var finalState = tryMakeCompleting(this, tmp0, proposedUpdate);
|
|
2718
2718
|
if (finalState === get_COMPLETING_ALREADY())
|
|
@@ -2722,16 +2722,16 @@
|
|
|
2722
2722
|
else if (finalState === get_COMPLETING_RETRY()) {
|
|
2723
2723
|
break $l$block;
|
|
2724
2724
|
} else {
|
|
2725
|
-
this.
|
|
2725
|
+
this.afterCompletion_2p0irt_k$(finalState);
|
|
2726
2726
|
return true;
|
|
2727
2727
|
}
|
|
2728
2728
|
}
|
|
2729
2729
|
}
|
|
2730
2730
|
};
|
|
2731
|
-
protoOf(JobSupport).
|
|
2731
|
+
protoOf(JobSupport).makeCompletingOnce_m8ggg9_k$ = function (proposedUpdate) {
|
|
2732
2732
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2733
2733
|
while (true) {
|
|
2734
|
-
var tmp0 = this.
|
|
2734
|
+
var tmp0 = this.get_state_2t6sbp_k$();
|
|
2735
2735
|
$l$block: {
|
|
2736
2736
|
var finalState = tryMakeCompleting(this, tmp0, proposedUpdate);
|
|
2737
2737
|
if (finalState === get_COMPLETING_ALREADY())
|
|
@@ -2743,20 +2743,20 @@
|
|
|
2743
2743
|
}
|
|
2744
2744
|
}
|
|
2745
2745
|
};
|
|
2746
|
-
protoOf(JobSupport).
|
|
2746
|
+
protoOf(JobSupport).attachChild_314ws0_k$ = function (child) {
|
|
2747
2747
|
// Inline function 'kotlin.also' call
|
|
2748
2748
|
var this_0 = new ChildHandleNode(child);
|
|
2749
|
-
this_0.
|
|
2749
|
+
this_0.job_1 = this;
|
|
2750
2750
|
var node = this_0;
|
|
2751
2751
|
var tmp$ret$2;
|
|
2752
2752
|
$l$block_1: {
|
|
2753
2753
|
// Inline function 'kotlinx.coroutines.JobSupport.tryPutNodeIntoList' call
|
|
2754
2754
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2755
2755
|
while (true) {
|
|
2756
|
-
var state = this.
|
|
2756
|
+
var state = this.get_state_2t6sbp_k$();
|
|
2757
2757
|
if (state instanceof Empty) {
|
|
2758
|
-
if (state.
|
|
2759
|
-
if (this.
|
|
2758
|
+
if (state.isActive_1) {
|
|
2759
|
+
if (this._state_1.atomicfu$compareAndSet(state, node)) {
|
|
2760
2760
|
tmp$ret$2 = true;
|
|
2761
2761
|
break $l$block_1;
|
|
2762
2762
|
}
|
|
@@ -2765,27 +2765,27 @@
|
|
|
2765
2765
|
}
|
|
2766
2766
|
} else {
|
|
2767
2767
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2768
|
-
var list = state.
|
|
2768
|
+
var list = state.get_list_wopuqv_k$();
|
|
2769
2769
|
if (list == null) {
|
|
2770
2770
|
promoteSingleToNodeList(this, state instanceof JobNode ? state : THROW_CCE());
|
|
2771
2771
|
} else {
|
|
2772
|
-
var addedBeforeCancellation = list.
|
|
2772
|
+
var addedBeforeCancellation = list.addLast_5b0i77_k$(node, 7);
|
|
2773
2773
|
var tmp;
|
|
2774
2774
|
if (addedBeforeCancellation) {
|
|
2775
2775
|
tmp = true;
|
|
2776
2776
|
} else {
|
|
2777
|
-
var addedBeforeCompletion = list.
|
|
2778
|
-
var latestState = this.
|
|
2777
|
+
var addedBeforeCompletion = list.addLast_5b0i77_k$(node, 3);
|
|
2778
|
+
var latestState = this.get_state_2t6sbp_k$();
|
|
2779
2779
|
var tmp_0;
|
|
2780
2780
|
if (latestState instanceof Finishing) {
|
|
2781
|
-
tmp_0 = latestState.
|
|
2781
|
+
tmp_0 = latestState.get_rootCause_69dwxu_k$();
|
|
2782
2782
|
} else {
|
|
2783
2783
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
2784
2784
|
var tmp0_safe_receiver = latestState instanceof CompletedExceptionally ? latestState : null;
|
|
2785
|
-
tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2785
|
+
tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cause_1;
|
|
2786
2786
|
}
|
|
2787
2787
|
var rootCause = tmp_0;
|
|
2788
|
-
node.
|
|
2788
|
+
node.invoke_py2q9a_k$(rootCause);
|
|
2789
2789
|
var tmp_1;
|
|
2790
2790
|
if (addedBeforeCompletion) {
|
|
2791
2791
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
@@ -2810,40 +2810,40 @@
|
|
|
2810
2810
|
var added = tmp$ret$2;
|
|
2811
2811
|
if (added)
|
|
2812
2812
|
return node;
|
|
2813
|
-
var tmp_2 = this.
|
|
2813
|
+
var tmp_2 = this.get_state_2t6sbp_k$();
|
|
2814
2814
|
var tmp0_safe_receiver_0 = tmp_2 instanceof CompletedExceptionally ? tmp_2 : null;
|
|
2815
|
-
node.
|
|
2815
|
+
node.invoke_py2q9a_k$(tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.cause_1);
|
|
2816
2816
|
return NonDisposableHandle_instance;
|
|
2817
2817
|
};
|
|
2818
|
-
protoOf(JobSupport).
|
|
2818
|
+
protoOf(JobSupport).handleOnCompletionException_l1g6ri_k$ = function (exception) {
|
|
2819
2819
|
throw exception;
|
|
2820
2820
|
};
|
|
2821
|
-
protoOf(JobSupport).
|
|
2821
|
+
protoOf(JobSupport).onCancelling_aqzbl5_k$ = function (cause) {
|
|
2822
2822
|
};
|
|
2823
|
-
protoOf(JobSupport).
|
|
2823
|
+
protoOf(JobSupport).get_isScopedCoroutine_rwmmff_k$ = function () {
|
|
2824
2824
|
return false;
|
|
2825
2825
|
};
|
|
2826
|
-
protoOf(JobSupport).
|
|
2826
|
+
protoOf(JobSupport).get_handlesException_ctmhwg_k$ = function () {
|
|
2827
2827
|
return true;
|
|
2828
2828
|
};
|
|
2829
|
-
protoOf(JobSupport).
|
|
2829
|
+
protoOf(JobSupport).handleJobException_9fdet1_k$ = function (exception) {
|
|
2830
2830
|
return false;
|
|
2831
2831
|
};
|
|
2832
|
-
protoOf(JobSupport).
|
|
2832
|
+
protoOf(JobSupport).onCompletionInternal_38s8uv_k$ = function (state) {
|
|
2833
2833
|
};
|
|
2834
|
-
protoOf(JobSupport).
|
|
2834
|
+
protoOf(JobSupport).afterCompletion_2p0irt_k$ = function (state) {
|
|
2835
2835
|
};
|
|
2836
2836
|
protoOf(JobSupport).toString = function () {
|
|
2837
|
-
return this.
|
|
2837
|
+
return this.toDebugString_v3moy1_k$() + '@' + get_hexAddress(this);
|
|
2838
2838
|
};
|
|
2839
|
-
protoOf(JobSupport).
|
|
2840
|
-
return this.
|
|
2839
|
+
protoOf(JobSupport).toDebugString_v3moy1_k$ = function () {
|
|
2840
|
+
return this.nameString_4rfuxd_k$() + '{' + stateString(this, this.get_state_2t6sbp_k$()) + '}';
|
|
2841
2841
|
};
|
|
2842
|
-
protoOf(JobSupport).
|
|
2842
|
+
protoOf(JobSupport).nameString_4rfuxd_k$ = function () {
|
|
2843
2843
|
return get_classSimpleName(this);
|
|
2844
2844
|
};
|
|
2845
|
-
protoOf(JobSupport).
|
|
2846
|
-
var state = this.
|
|
2845
|
+
protoOf(JobSupport).getCompletionExceptionOrNull_snuvbb_k$ = function () {
|
|
2846
|
+
var state = this.get_state_2t6sbp_k$();
|
|
2847
2847
|
// Inline function 'kotlin.check' call
|
|
2848
2848
|
if (!!(!(state == null) ? isInterface(state, Incomplete) : false)) {
|
|
2849
2849
|
var message = 'This job has not completed yet';
|
|
@@ -2851,24 +2851,24 @@
|
|
|
2851
2851
|
}
|
|
2852
2852
|
return _get_exceptionOrNull__b3j7js(this, state);
|
|
2853
2853
|
};
|
|
2854
|
-
protoOf(JobSupport).
|
|
2855
|
-
var state = this.
|
|
2854
|
+
protoOf(JobSupport).getCompletedInternal_tfzdln_k$ = function () {
|
|
2855
|
+
var state = this.get_state_2t6sbp_k$();
|
|
2856
2856
|
// Inline function 'kotlin.check' call
|
|
2857
2857
|
if (!!(!(state == null) ? isInterface(state, Incomplete) : false)) {
|
|
2858
2858
|
var message = 'This job has not completed yet';
|
|
2859
2859
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
2860
2860
|
}
|
|
2861
2861
|
if (state instanceof CompletedExceptionally)
|
|
2862
|
-
throw state.
|
|
2862
|
+
throw state.cause_1;
|
|
2863
2863
|
return unboxState(state);
|
|
2864
2864
|
};
|
|
2865
|
-
protoOf(JobSupport).
|
|
2865
|
+
protoOf(JobSupport).awaitInternal_5d94r6_k$ = function ($completion) {
|
|
2866
2866
|
$l$loop: while (true) {
|
|
2867
|
-
var state = this.
|
|
2867
|
+
var state = this.get_state_2t6sbp_k$();
|
|
2868
2868
|
if (!(!(state == null) ? isInterface(state, Incomplete) : false)) {
|
|
2869
2869
|
if (state instanceof CompletedExceptionally) {
|
|
2870
2870
|
// Inline function 'kotlinx.coroutines.internal.recoverAndThrow' call
|
|
2871
|
-
throw state.
|
|
2871
|
+
throw state.cause_1;
|
|
2872
2872
|
}
|
|
2873
2873
|
return unboxState(state);
|
|
2874
2874
|
}
|
|
@@ -2878,54 +2878,54 @@
|
|
|
2878
2878
|
return awaitSuspend(this, $completion);
|
|
2879
2879
|
};
|
|
2880
2880
|
function Empty(isActive) {
|
|
2881
|
-
this.
|
|
2881
|
+
this.isActive_1 = isActive;
|
|
2882
2882
|
}
|
|
2883
|
-
protoOf(Empty).
|
|
2884
|
-
return this.
|
|
2883
|
+
protoOf(Empty).get_isActive_quafmh_k$ = function () {
|
|
2884
|
+
return this.isActive_1;
|
|
2885
2885
|
};
|
|
2886
|
-
protoOf(Empty).
|
|
2886
|
+
protoOf(Empty).get_list_wopuqv_k$ = function () {
|
|
2887
2887
|
return null;
|
|
2888
2888
|
};
|
|
2889
2889
|
protoOf(Empty).toString = function () {
|
|
2890
|
-
return 'Empty{' + (this.
|
|
2890
|
+
return 'Empty{' + (this.isActive_1 ? 'Active' : 'New') + '}';
|
|
2891
2891
|
};
|
|
2892
2892
|
function Incomplete() {
|
|
2893
2893
|
}
|
|
2894
2894
|
function NodeList() {
|
|
2895
2895
|
LockFreeLinkedListHead.call(this);
|
|
2896
2896
|
}
|
|
2897
|
-
protoOf(NodeList).
|
|
2897
|
+
protoOf(NodeList).get_isActive_quafmh_k$ = function () {
|
|
2898
2898
|
return true;
|
|
2899
2899
|
};
|
|
2900
|
-
protoOf(NodeList).
|
|
2900
|
+
protoOf(NodeList).get_list_wopuqv_k$ = function () {
|
|
2901
2901
|
return this;
|
|
2902
2902
|
};
|
|
2903
|
-
protoOf(NodeList).
|
|
2903
|
+
protoOf(NodeList).getString_gb1pt9_k$ = function (state) {
|
|
2904
2904
|
// Inline function 'kotlin.text.buildString' call
|
|
2905
2905
|
// Inline function 'kotlin.apply' call
|
|
2906
2906
|
var this_0 = StringBuilder_init_$Create$();
|
|
2907
|
-
this_0.
|
|
2908
|
-
this_0.
|
|
2909
|
-
this_0.
|
|
2907
|
+
this_0.append_22ad7x_k$('List{');
|
|
2908
|
+
this_0.append_22ad7x_k$(state);
|
|
2909
|
+
this_0.append_22ad7x_k$('}[');
|
|
2910
2910
|
var first = true;
|
|
2911
2911
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListHead.forEach' call
|
|
2912
|
-
var cur = this.
|
|
2912
|
+
var cur = this._next_1;
|
|
2913
2913
|
while (!equals(cur, this)) {
|
|
2914
2914
|
var node = cur;
|
|
2915
2915
|
if (node instanceof JobNode) {
|
|
2916
2916
|
if (first) {
|
|
2917
2917
|
first = false;
|
|
2918
2918
|
} else
|
|
2919
|
-
this_0.
|
|
2920
|
-
this_0.
|
|
2919
|
+
this_0.append_22ad7x_k$(', ');
|
|
2920
|
+
this_0.append_t8pm91_k$(node);
|
|
2921
2921
|
}
|
|
2922
|
-
cur = cur.
|
|
2922
|
+
cur = cur._next_1;
|
|
2923
2923
|
}
|
|
2924
|
-
this_0.
|
|
2924
|
+
this_0.append_22ad7x_k$(']');
|
|
2925
2925
|
return this_0.toString();
|
|
2926
2926
|
};
|
|
2927
2927
|
protoOf(NodeList).toString = function () {
|
|
2928
|
-
return get_DEBUG() ? this.
|
|
2928
|
+
return get_DEBUG() ? this.getString_gb1pt9_k$('Active') : protoOf(LockFreeLinkedListHead).toString.call(this);
|
|
2929
2929
|
};
|
|
2930
2930
|
function boxIncomplete(_this__u8e3s4) {
|
|
2931
2931
|
_init_properties_JobSupport_kt__68f172();
|
|
@@ -2938,86 +2938,86 @@
|
|
|
2938
2938
|
return tmp;
|
|
2939
2939
|
}
|
|
2940
2940
|
function InactiveNodeList(list) {
|
|
2941
|
-
this.
|
|
2941
|
+
this.list_1 = list;
|
|
2942
2942
|
}
|
|
2943
|
-
protoOf(InactiveNodeList).
|
|
2944
|
-
return this.
|
|
2943
|
+
protoOf(InactiveNodeList).get_list_wopuqv_k$ = function () {
|
|
2944
|
+
return this.list_1;
|
|
2945
2945
|
};
|
|
2946
|
-
protoOf(InactiveNodeList).
|
|
2946
|
+
protoOf(InactiveNodeList).get_isActive_quafmh_k$ = function () {
|
|
2947
2947
|
return false;
|
|
2948
2948
|
};
|
|
2949
2949
|
protoOf(InactiveNodeList).toString = function () {
|
|
2950
|
-
return get_DEBUG() ? this.
|
|
2950
|
+
return get_DEBUG() ? this.list_1.getString_gb1pt9_k$('New') : anyToString(this);
|
|
2951
2951
|
};
|
|
2952
2952
|
function InvokeOnCompletion(handler) {
|
|
2953
2953
|
JobNode.call(this);
|
|
2954
|
-
this.
|
|
2954
|
+
this.handler_1 = handler;
|
|
2955
2955
|
}
|
|
2956
|
-
protoOf(InvokeOnCompletion).
|
|
2956
|
+
protoOf(InvokeOnCompletion).get_onCancelling_k07uns_k$ = function () {
|
|
2957
2957
|
return false;
|
|
2958
2958
|
};
|
|
2959
|
-
protoOf(InvokeOnCompletion).
|
|
2960
|
-
return this.
|
|
2959
|
+
protoOf(InvokeOnCompletion).invoke_py2q9a_k$ = function (cause) {
|
|
2960
|
+
return this.handler_1(cause);
|
|
2961
2961
|
};
|
|
2962
2962
|
function InvokeOnCancelling(handler) {
|
|
2963
2963
|
JobNode.call(this);
|
|
2964
|
-
this.
|
|
2965
|
-
this.
|
|
2964
|
+
this.handler_1 = handler;
|
|
2965
|
+
this._invoked_1 = atomic$boolean$1(false);
|
|
2966
2966
|
}
|
|
2967
|
-
protoOf(InvokeOnCancelling).
|
|
2967
|
+
protoOf(InvokeOnCancelling).get_onCancelling_k07uns_k$ = function () {
|
|
2968
2968
|
return true;
|
|
2969
2969
|
};
|
|
2970
|
-
protoOf(InvokeOnCancelling).
|
|
2971
|
-
if (this.
|
|
2972
|
-
this.
|
|
2970
|
+
protoOf(InvokeOnCancelling).invoke_py2q9a_k$ = function (cause) {
|
|
2971
|
+
if (this._invoked_1.atomicfu$compareAndSet(false, true))
|
|
2972
|
+
this.handler_1(cause);
|
|
2973
2973
|
};
|
|
2974
2974
|
function ChildHandleNode(childJob) {
|
|
2975
2975
|
JobNode.call(this);
|
|
2976
|
-
this.
|
|
2976
|
+
this.childJob_1 = childJob;
|
|
2977
2977
|
}
|
|
2978
|
-
protoOf(ChildHandleNode).
|
|
2978
|
+
protoOf(ChildHandleNode).get_onCancelling_k07uns_k$ = function () {
|
|
2979
2979
|
return true;
|
|
2980
2980
|
};
|
|
2981
|
-
protoOf(ChildHandleNode).
|
|
2982
|
-
return this.
|
|
2981
|
+
protoOf(ChildHandleNode).invoke_py2q9a_k$ = function (cause) {
|
|
2982
|
+
return this.childJob_1.parentCancelled_nk0n80_k$(this.get_job_18j2r0_k$());
|
|
2983
2983
|
};
|
|
2984
|
-
protoOf(ChildHandleNode).
|
|
2985
|
-
return this.
|
|
2984
|
+
protoOf(ChildHandleNode).childCancelled_hsnipy_k$ = function (cause) {
|
|
2985
|
+
return this.get_job_18j2r0_k$().childCancelled_hsnipy_k$(cause);
|
|
2986
2986
|
};
|
|
2987
2987
|
function unboxState(_this__u8e3s4) {
|
|
2988
2988
|
_init_properties_JobSupport_kt__68f172();
|
|
2989
2989
|
var tmp0_safe_receiver = _this__u8e3s4 instanceof IncompleteStateBox ? _this__u8e3s4 : null;
|
|
2990
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2990
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.state_1;
|
|
2991
2991
|
return tmp1_elvis_lhs == null ? _this__u8e3s4 : tmp1_elvis_lhs;
|
|
2992
2992
|
}
|
|
2993
2993
|
function ResumeAwaitOnCompletion(continuation) {
|
|
2994
2994
|
JobNode.call(this);
|
|
2995
|
-
this.
|
|
2995
|
+
this.continuation_1 = continuation;
|
|
2996
2996
|
}
|
|
2997
|
-
protoOf(ResumeAwaitOnCompletion).
|
|
2997
|
+
protoOf(ResumeAwaitOnCompletion).get_onCancelling_k07uns_k$ = function () {
|
|
2998
2998
|
return false;
|
|
2999
2999
|
};
|
|
3000
|
-
protoOf(ResumeAwaitOnCompletion).
|
|
3001
|
-
var state = this.
|
|
3000
|
+
protoOf(ResumeAwaitOnCompletion).invoke_py2q9a_k$ = function (cause) {
|
|
3001
|
+
var state = this.get_job_18j2r0_k$().get_state_2t6sbp_k$();
|
|
3002
3002
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3003
3003
|
if (state instanceof CompletedExceptionally) {
|
|
3004
|
-
var tmp0 = this.
|
|
3004
|
+
var tmp0 = this.continuation_1;
|
|
3005
3005
|
// Inline function 'kotlin.coroutines.resumeWithException' call
|
|
3006
3006
|
// Inline function 'kotlin.Companion.failure' call
|
|
3007
|
-
var exception = state.
|
|
3007
|
+
var exception = state.cause_1;
|
|
3008
3008
|
var tmp$ret$2 = _Result___init__impl__xyqfz8(createFailure(exception));
|
|
3009
|
-
tmp0.
|
|
3009
|
+
tmp0.resumeWith_rk9gbt_k$(tmp$ret$2);
|
|
3010
3010
|
} else {
|
|
3011
|
-
var tmp0_0 = this.
|
|
3011
|
+
var tmp0_0 = this.continuation_1;
|
|
3012
3012
|
// Inline function 'kotlin.coroutines.resume' call
|
|
3013
3013
|
// Inline function 'kotlin.Companion.success' call
|
|
3014
3014
|
var value = unboxState(state);
|
|
3015
3015
|
var tmp$ret$4 = _Result___init__impl__xyqfz8(value);
|
|
3016
|
-
tmp0_0.
|
|
3016
|
+
tmp0_0.resumeWith_rk9gbt_k$(tmp$ret$4);
|
|
3017
3017
|
}
|
|
3018
3018
|
};
|
|
3019
3019
|
function IncompleteStateBox(state) {
|
|
3020
|
-
this.
|
|
3020
|
+
this.state_1 = state;
|
|
3021
3021
|
}
|
|
3022
3022
|
var properties_initialized_JobSupport_kt_5iq8a4;
|
|
3023
3023
|
function _init_properties_JobSupport_kt__68f172() {
|
|
@@ -3034,7 +3034,7 @@
|
|
|
3034
3034
|
}
|
|
3035
3035
|
function JobNode$invoke$ref(p0) {
|
|
3036
3036
|
return constructCallableReference(function (p0_0) {
|
|
3037
|
-
p0.
|
|
3037
|
+
p0.invoke_py2q9a_k$(p0_0);
|
|
3038
3038
|
return Unit_instance;
|
|
3039
3039
|
}, 1, 0, 0, 'invoke', [p0]);
|
|
3040
3040
|
}
|
|
@@ -3042,16 +3042,16 @@
|
|
|
3042
3042
|
CoroutineDispatcher.call(this);
|
|
3043
3043
|
}
|
|
3044
3044
|
protoOf(MainCoroutineDispatcher).toString = function () {
|
|
3045
|
-
var tmp0_elvis_lhs = this.
|
|
3045
|
+
var tmp0_elvis_lhs = this.toStringInternalImpl_hcqz93_k$();
|
|
3046
3046
|
return tmp0_elvis_lhs == null ? get_classSimpleName(this) + '@' + get_hexAddress(this) : tmp0_elvis_lhs;
|
|
3047
3047
|
};
|
|
3048
|
-
protoOf(MainCoroutineDispatcher).
|
|
3049
|
-
var main = Dispatchers_getInstance().
|
|
3048
|
+
protoOf(MainCoroutineDispatcher).toStringInternalImpl_hcqz93_k$ = function () {
|
|
3049
|
+
var main = Dispatchers_getInstance().get_Main_wo5vz6_k$();
|
|
3050
3050
|
if (this === main)
|
|
3051
3051
|
return 'Dispatchers.Main';
|
|
3052
3052
|
var tmp;
|
|
3053
3053
|
try {
|
|
3054
|
-
tmp = main.
|
|
3054
|
+
tmp = main.get_immediate_r3y8eg_k$();
|
|
3055
3055
|
} catch ($p) {
|
|
3056
3056
|
var tmp_0;
|
|
3057
3057
|
if ($p instanceof UnsupportedOperationException) {
|
|
@@ -3073,13 +3073,13 @@
|
|
|
3073
3073
|
Unconfined_instance = this;
|
|
3074
3074
|
CoroutineDispatcher.call(this);
|
|
3075
3075
|
}
|
|
3076
|
-
protoOf(Unconfined).
|
|
3076
|
+
protoOf(Unconfined).isDispatchNeeded_ft82v4_k$ = function (context) {
|
|
3077
3077
|
return false;
|
|
3078
3078
|
};
|
|
3079
|
-
protoOf(Unconfined).
|
|
3080
|
-
var yieldContext = context.
|
|
3079
|
+
protoOf(Unconfined).dispatch_qa3n0o_k$ = function (context, block) {
|
|
3080
|
+
var yieldContext = context.get_y2st91_k$(Key_instance_3);
|
|
3081
3081
|
if (!(yieldContext == null)) {
|
|
3082
|
-
yieldContext.
|
|
3082
|
+
yieldContext.dispatcherWasUnconfined_1 = true;
|
|
3083
3083
|
return Unit_instance;
|
|
3084
3084
|
}
|
|
3085
3085
|
throw UnsupportedOperationException_init_$Create$('Dispatchers.Unconfined.dispatch function can only be used by the yield function. If you wrap Unconfined dispatcher in your code, make sure you properly delegate isDispatchNeeded and dispatch calls.');
|
|
@@ -3108,20 +3108,20 @@
|
|
|
3108
3108
|
var CLOSED;
|
|
3109
3109
|
function Segment(id, prev, pointers) {
|
|
3110
3110
|
ConcurrentLinkedListNode.call(this, prev);
|
|
3111
|
-
this.
|
|
3112
|
-
this.
|
|
3111
|
+
this.id_1 = id;
|
|
3112
|
+
this.cleanedAndPointers_1 = atomic$int$1(pointers << 16);
|
|
3113
3113
|
}
|
|
3114
|
-
protoOf(Segment).
|
|
3115
|
-
return this.
|
|
3114
|
+
protoOf(Segment).get_isRemoved_gzdz59_k$ = function () {
|
|
3115
|
+
return this.cleanedAndPointers_1.kotlinx$atomicfu$value === this.get_numberOfSlots_n3mgwk_k$() && !this.get_isTail_ew6gmb_k$();
|
|
3116
3116
|
};
|
|
3117
|
-
protoOf(Segment).
|
|
3118
|
-
var tmp0 = this.
|
|
3117
|
+
protoOf(Segment).tryIncPointers_6zsfpw_k$ = function () {
|
|
3118
|
+
var tmp0 = this.cleanedAndPointers_1;
|
|
3119
3119
|
var tmp$ret$0;
|
|
3120
3120
|
$l$block_0: {
|
|
3121
3121
|
// Inline function 'kotlinx.coroutines.internal.addConditionally' call
|
|
3122
3122
|
while (true) {
|
|
3123
3123
|
var cur = tmp0.kotlinx$atomicfu$value;
|
|
3124
|
-
if (!(!(cur === this.
|
|
3124
|
+
if (!(!(cur === this.get_numberOfSlots_n3mgwk_k$()) || this.get_isTail_ew6gmb_k$())) {
|
|
3125
3125
|
tmp$ret$0 = false;
|
|
3126
3126
|
break $l$block_0;
|
|
3127
3127
|
}
|
|
@@ -3133,12 +3133,12 @@
|
|
|
3133
3133
|
}
|
|
3134
3134
|
return tmp$ret$0;
|
|
3135
3135
|
};
|
|
3136
|
-
protoOf(Segment).
|
|
3137
|
-
return this.
|
|
3136
|
+
protoOf(Segment).decPointers_vy306j_k$ = function () {
|
|
3137
|
+
return this.cleanedAndPointers_1.atomicfu$addAndGet(-65536) === this.get_numberOfSlots_n3mgwk_k$() && !this.get_isTail_ew6gmb_k$();
|
|
3138
3138
|
};
|
|
3139
|
-
protoOf(Segment).
|
|
3140
|
-
if (this.
|
|
3141
|
-
this.
|
|
3139
|
+
protoOf(Segment).onSlotCleaned_do6lqz_k$ = function () {
|
|
3140
|
+
if (this.cleanedAndPointers_1.atomicfu$incrementAndGet() === this.get_numberOfSlots_n3mgwk_k$()) {
|
|
3141
|
+
this.remove_ldkf9o_k$();
|
|
3142
3142
|
}
|
|
3143
3143
|
};
|
|
3144
3144
|
function _SegmentOrClosed___init__impl__jnexvb(value) {
|
|
@@ -3163,19 +3163,19 @@
|
|
|
3163
3163
|
return tmp;
|
|
3164
3164
|
}
|
|
3165
3165
|
function _get_nextOrClosed__w0gmuv($this) {
|
|
3166
|
-
return $this.
|
|
3166
|
+
return $this._next_1.kotlinx$atomicfu$value;
|
|
3167
3167
|
}
|
|
3168
3168
|
function _get_aliveSegmentLeft__mr4ndu($this) {
|
|
3169
|
-
var cur = $this.
|
|
3170
|
-
while (!(cur === null) && cur.
|
|
3171
|
-
cur = cur.
|
|
3169
|
+
var cur = $this.get_prev_wosl18_k$();
|
|
3170
|
+
while (!(cur === null) && cur.get_isRemoved_gzdz59_k$())
|
|
3171
|
+
cur = cur._prev_1.kotlinx$atomicfu$value;
|
|
3172
3172
|
return cur;
|
|
3173
3173
|
}
|
|
3174
3174
|
function _get_aliveSegmentRight__7ulr0b($this) {
|
|
3175
3175
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3176
|
-
var cur = ensureNotNull($this.
|
|
3177
|
-
while (cur.
|
|
3178
|
-
var tmp0_elvis_lhs = cur.
|
|
3176
|
+
var cur = ensureNotNull($this.get_next_wor1vg_k$());
|
|
3177
|
+
while (cur.get_isRemoved_gzdz59_k$()) {
|
|
3178
|
+
var tmp0_elvis_lhs = cur.get_next_wor1vg_k$();
|
|
3179
3179
|
var tmp;
|
|
3180
3180
|
if (tmp0_elvis_lhs == null) {
|
|
3181
3181
|
return cur;
|
|
@@ -3190,10 +3190,10 @@
|
|
|
3190
3190
|
return _get_nextOrClosed__w0gmuv($this);
|
|
3191
3191
|
}
|
|
3192
3192
|
function ConcurrentLinkedListNode(prev) {
|
|
3193
|
-
this.
|
|
3194
|
-
this.
|
|
3193
|
+
this._next_1 = atomic$ref$1(null);
|
|
3194
|
+
this._prev_1 = atomic$ref$1(prev);
|
|
3195
3195
|
}
|
|
3196
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3196
|
+
protoOf(ConcurrentLinkedListNode).get_next_wor1vg_k$ = function () {
|
|
3197
3197
|
// Inline function 'kotlinx.coroutines.internal.ConcurrentLinkedListNode.nextOrIfClosed' call
|
|
3198
3198
|
// Inline function 'kotlin.let' call
|
|
3199
3199
|
var it = access$_get_nextOrClosed__ywzond(this);
|
|
@@ -3205,27 +3205,27 @@
|
|
|
3205
3205
|
}
|
|
3206
3206
|
return tmp;
|
|
3207
3207
|
};
|
|
3208
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3209
|
-
return this.
|
|
3208
|
+
protoOf(ConcurrentLinkedListNode).trySetNext_31oiph_k$ = function (value) {
|
|
3209
|
+
return this._next_1.atomicfu$compareAndSet(null, value);
|
|
3210
3210
|
};
|
|
3211
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3212
|
-
return this.
|
|
3211
|
+
protoOf(ConcurrentLinkedListNode).get_isTail_ew6gmb_k$ = function () {
|
|
3212
|
+
return this.get_next_wor1vg_k$() == null;
|
|
3213
3213
|
};
|
|
3214
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3215
|
-
return this.
|
|
3214
|
+
protoOf(ConcurrentLinkedListNode).get_prev_wosl18_k$ = function () {
|
|
3215
|
+
return this._prev_1.kotlinx$atomicfu$value;
|
|
3216
3216
|
};
|
|
3217
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3217
|
+
protoOf(ConcurrentLinkedListNode).cleanPrev_rn0kss_k$ = function () {
|
|
3218
3218
|
// Inline function 'kotlinx.atomicfu.AtomicRef.lazySet' call
|
|
3219
|
-
this.
|
|
3219
|
+
this._prev_1.kotlinx$atomicfu$value = null;
|
|
3220
3220
|
};
|
|
3221
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3221
|
+
protoOf(ConcurrentLinkedListNode).remove_ldkf9o_k$ = function () {
|
|
3222
3222
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3223
|
-
if (this.
|
|
3223
|
+
if (this.get_isTail_ew6gmb_k$())
|
|
3224
3224
|
return Unit_instance;
|
|
3225
3225
|
$l$loop_0: while (true) {
|
|
3226
3226
|
var prev = _get_aliveSegmentLeft__mr4ndu(this);
|
|
3227
3227
|
var next = _get_aliveSegmentRight__7ulr0b(this);
|
|
3228
|
-
var tmp0 = next.
|
|
3228
|
+
var tmp0 = next._prev_1;
|
|
3229
3229
|
$l$block: {
|
|
3230
3230
|
// Inline function 'kotlinx.atomicfu.update' call
|
|
3231
3231
|
while (true) {
|
|
@@ -3237,10 +3237,10 @@
|
|
|
3237
3237
|
}
|
|
3238
3238
|
}
|
|
3239
3239
|
if (!(prev === null))
|
|
3240
|
-
prev.
|
|
3241
|
-
if (next.
|
|
3240
|
+
prev._next_1.kotlinx$atomicfu$value = next;
|
|
3241
|
+
if (next.get_isRemoved_gzdz59_k$() && !next.get_isTail_ew6gmb_k$())
|
|
3242
3242
|
continue $l$loop_0;
|
|
3243
|
-
if (!(prev === null) && prev.
|
|
3243
|
+
if (!(prev === null) && prev.get_isRemoved_gzdz59_k$())
|
|
3244
3244
|
continue $l$loop_0;
|
|
3245
3245
|
return Unit_instance;
|
|
3246
3246
|
}
|
|
@@ -3248,7 +3248,7 @@
|
|
|
3248
3248
|
function findSegmentInternal(_this__u8e3s4, id, createNewSegment) {
|
|
3249
3249
|
_init_properties_ConcurrentLinkedList_kt__5gcgzy();
|
|
3250
3250
|
var cur = _this__u8e3s4;
|
|
3251
|
-
$l$loop: while (compare(cur.
|
|
3251
|
+
$l$loop: while (compare(cur.id_1, id) < 0 || cur.get_isRemoved_gzdz59_k$()) {
|
|
3252
3252
|
// Inline function 'kotlinx.coroutines.internal.ConcurrentLinkedListNode.nextOrIfClosed' call
|
|
3253
3253
|
var this_0 = cur;
|
|
3254
3254
|
// Inline function 'kotlin.let' call
|
|
@@ -3265,11 +3265,11 @@
|
|
|
3265
3265
|
continue $l$loop;
|
|
3266
3266
|
}
|
|
3267
3267
|
// Inline function 'kotlin.Long.plus' call
|
|
3268
|
-
var this_1 = cur.
|
|
3268
|
+
var this_1 = cur.id_1;
|
|
3269
3269
|
var newTail = createNewSegment(add(this_1, fromInt(1)), cur);
|
|
3270
|
-
if (cur.
|
|
3271
|
-
if (cur.
|
|
3272
|
-
cur.
|
|
3270
|
+
if (cur.trySetNext_31oiph_k$(newTail)) {
|
|
3271
|
+
if (cur.get_isRemoved_gzdz59_k$()) {
|
|
3272
|
+
cur.remove_ldkf9o_k$();
|
|
3273
3273
|
}
|
|
3274
3274
|
cur = newTail;
|
|
3275
3275
|
}
|
|
@@ -3287,11 +3287,11 @@
|
|
|
3287
3287
|
}
|
|
3288
3288
|
}
|
|
3289
3289
|
function handleUncaughtCoroutineException(context, exception) {
|
|
3290
|
-
var _iterator__ex2g4s = get_platformExceptionHandlers().
|
|
3291
|
-
while (_iterator__ex2g4s.
|
|
3292
|
-
var handler = _iterator__ex2g4s.
|
|
3290
|
+
var _iterator__ex2g4s = get_platformExceptionHandlers().iterator_jk1svi_k$();
|
|
3291
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
3292
|
+
var handler = _iterator__ex2g4s.next_20eer_k$();
|
|
3293
3293
|
try {
|
|
3294
|
-
handler.
|
|
3294
|
+
handler.handleException_e679jj_k$(context, exception);
|
|
3295
3295
|
} catch ($p) {
|
|
3296
3296
|
if ($p instanceof ExceptionSuccessfullyProcessed) {
|
|
3297
3297
|
var _unused_var__etf5q3 = $p;
|
|
@@ -3330,48 +3330,48 @@
|
|
|
3330
3330
|
}
|
|
3331
3331
|
var REUSABLE_CLAIMED;
|
|
3332
3332
|
function _get_reusableCancellableContinuation__9qex09($this) {
|
|
3333
|
-
var tmp = $this.
|
|
3333
|
+
var tmp = $this._reusableCancellableContinuation_1.kotlinx$atomicfu$value;
|
|
3334
3334
|
return tmp instanceof CancellableContinuationImpl ? tmp : null;
|
|
3335
3335
|
}
|
|
3336
3336
|
function DispatchedContinuation(dispatcher, continuation) {
|
|
3337
3337
|
DispatchedTask.call(this, -1);
|
|
3338
|
-
this.
|
|
3339
|
-
this.
|
|
3340
|
-
this.
|
|
3341
|
-
this.
|
|
3342
|
-
this.
|
|
3338
|
+
this.dispatcher_1 = dispatcher;
|
|
3339
|
+
this.continuation_1 = continuation;
|
|
3340
|
+
this._state_1 = get_UNDEFINED();
|
|
3341
|
+
this.countOrElement_1 = threadContextElements(this.get_context_h02k06_k$());
|
|
3342
|
+
this._reusableCancellableContinuation_1 = atomic$ref$1(null);
|
|
3343
3343
|
}
|
|
3344
|
-
protoOf(DispatchedContinuation).
|
|
3345
|
-
return !(this.
|
|
3344
|
+
protoOf(DispatchedContinuation).isReusable_asltyw_k$ = function () {
|
|
3345
|
+
return !(this._reusableCancellableContinuation_1.kotlinx$atomicfu$value == null);
|
|
3346
3346
|
};
|
|
3347
|
-
protoOf(DispatchedContinuation).
|
|
3347
|
+
protoOf(DispatchedContinuation).awaitReusability_6g41eu_k$ = function () {
|
|
3348
3348
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
3349
|
-
var this_0 = this.
|
|
3349
|
+
var this_0 = this._reusableCancellableContinuation_1;
|
|
3350
3350
|
while (true) {
|
|
3351
3351
|
if (!(this_0.kotlinx$atomicfu$value === get_REUSABLE_CLAIMED()))
|
|
3352
3352
|
return Unit_instance;
|
|
3353
3353
|
}
|
|
3354
3354
|
};
|
|
3355
|
-
protoOf(DispatchedContinuation).
|
|
3356
|
-
this.
|
|
3355
|
+
protoOf(DispatchedContinuation).release_8sql92_k$ = function () {
|
|
3356
|
+
this.awaitReusability_6g41eu_k$();
|
|
3357
3357
|
var tmp0_safe_receiver = _get_reusableCancellableContinuation__9qex09(this);
|
|
3358
3358
|
if (tmp0_safe_receiver == null)
|
|
3359
3359
|
null;
|
|
3360
3360
|
else {
|
|
3361
|
-
tmp0_safe_receiver.
|
|
3361
|
+
tmp0_safe_receiver.detachChild_85lap8_k$();
|
|
3362
3362
|
}
|
|
3363
3363
|
};
|
|
3364
|
-
protoOf(DispatchedContinuation).
|
|
3364
|
+
protoOf(DispatchedContinuation).claimReusableCancellableContinuation_924qwh_k$ = function () {
|
|
3365
3365
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
3366
|
-
var this_0 = this.
|
|
3366
|
+
var this_0 = this._reusableCancellableContinuation_1;
|
|
3367
3367
|
while (true) {
|
|
3368
3368
|
var state = this_0.kotlinx$atomicfu$value;
|
|
3369
3369
|
if (state === null) {
|
|
3370
|
-
this.
|
|
3370
|
+
this._reusableCancellableContinuation_1.kotlinx$atomicfu$value = get_REUSABLE_CLAIMED();
|
|
3371
3371
|
return null;
|
|
3372
3372
|
} else {
|
|
3373
3373
|
if (state instanceof CancellableContinuationImpl) {
|
|
3374
|
-
if (this.
|
|
3374
|
+
if (this._reusableCancellableContinuation_1.atomicfu$compareAndSet(state, get_REUSABLE_CLAIMED())) {
|
|
3375
3375
|
return state instanceof CancellableContinuationImpl ? state : THROW_CCE();
|
|
3376
3376
|
}
|
|
3377
3377
|
} else {
|
|
@@ -3386,19 +3386,19 @@
|
|
|
3386
3386
|
}
|
|
3387
3387
|
}
|
|
3388
3388
|
};
|
|
3389
|
-
protoOf(DispatchedContinuation).
|
|
3389
|
+
protoOf(DispatchedContinuation).tryReleaseClaimedContinuation_ko810q_k$ = function (continuation) {
|
|
3390
3390
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
3391
|
-
var this_0 = this.
|
|
3391
|
+
var this_0 = this._reusableCancellableContinuation_1;
|
|
3392
3392
|
while (true) {
|
|
3393
3393
|
var state = this_0.kotlinx$atomicfu$value;
|
|
3394
3394
|
if (state === get_REUSABLE_CLAIMED()) {
|
|
3395
|
-
if (this.
|
|
3395
|
+
if (this._reusableCancellableContinuation_1.atomicfu$compareAndSet(get_REUSABLE_CLAIMED(), continuation))
|
|
3396
3396
|
return null;
|
|
3397
3397
|
} else {
|
|
3398
3398
|
if (state instanceof Error) {
|
|
3399
3399
|
// Inline function 'kotlin.require' call
|
|
3400
3400
|
// Inline function 'kotlin.require' call
|
|
3401
|
-
if (!this.
|
|
3401
|
+
if (!this._reusableCancellableContinuation_1.atomicfu$compareAndSet(state, null)) {
|
|
3402
3402
|
var message = 'Failed requirement.';
|
|
3403
3403
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
3404
3404
|
}
|
|
@@ -3411,73 +3411,73 @@
|
|
|
3411
3411
|
}
|
|
3412
3412
|
}
|
|
3413
3413
|
};
|
|
3414
|
-
protoOf(DispatchedContinuation).
|
|
3414
|
+
protoOf(DispatchedContinuation).postponeCancellation_hjv3hh_k$ = function (cause) {
|
|
3415
3415
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
3416
|
-
var this_0 = this.
|
|
3416
|
+
var this_0 = this._reusableCancellableContinuation_1;
|
|
3417
3417
|
while (true) {
|
|
3418
3418
|
var state = this_0.kotlinx$atomicfu$value;
|
|
3419
3419
|
if (equals(state, get_REUSABLE_CLAIMED())) {
|
|
3420
|
-
if (this.
|
|
3420
|
+
if (this._reusableCancellableContinuation_1.atomicfu$compareAndSet(get_REUSABLE_CLAIMED(), cause))
|
|
3421
3421
|
return true;
|
|
3422
3422
|
} else {
|
|
3423
3423
|
if (state instanceof Error)
|
|
3424
3424
|
return true;
|
|
3425
3425
|
else {
|
|
3426
|
-
if (this.
|
|
3426
|
+
if (this._reusableCancellableContinuation_1.atomicfu$compareAndSet(state, null))
|
|
3427
3427
|
return false;
|
|
3428
3428
|
}
|
|
3429
3429
|
}
|
|
3430
3430
|
}
|
|
3431
3431
|
};
|
|
3432
|
-
protoOf(DispatchedContinuation).
|
|
3433
|
-
var state = this.
|
|
3432
|
+
protoOf(DispatchedContinuation).takeState_a1bv3x_k$ = function () {
|
|
3433
|
+
var state = this._state_1;
|
|
3434
3434
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3435
|
-
this.
|
|
3435
|
+
this._state_1 = get_UNDEFINED();
|
|
3436
3436
|
return state;
|
|
3437
3437
|
};
|
|
3438
|
-
protoOf(DispatchedContinuation).
|
|
3438
|
+
protoOf(DispatchedContinuation).get_delegate_hasf9b_k$ = function () {
|
|
3439
3439
|
return this;
|
|
3440
3440
|
};
|
|
3441
|
-
protoOf(DispatchedContinuation).
|
|
3441
|
+
protoOf(DispatchedContinuation).resumeWith_rk9gbt_k$ = function (result) {
|
|
3442
3442
|
var state = toState_0(result);
|
|
3443
|
-
if (safeIsDispatchNeeded(this.
|
|
3444
|
-
this.
|
|
3445
|
-
this.
|
|
3446
|
-
safeDispatch(this.
|
|
3443
|
+
if (safeIsDispatchNeeded(this.dispatcher_1, this.get_context_h02k06_k$())) {
|
|
3444
|
+
this._state_1 = state;
|
|
3445
|
+
this.resumeMode_1 = 0;
|
|
3446
|
+
safeDispatch(this.dispatcher_1, this.get_context_h02k06_k$(), this);
|
|
3447
3447
|
} else {
|
|
3448
3448
|
$l$block: {
|
|
3449
3449
|
// Inline function 'kotlinx.coroutines.internal.executeUnconfined' call
|
|
3450
3450
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3451
|
-
var eventLoop = ThreadLocalEventLoop_getInstance().
|
|
3452
|
-
if (false && eventLoop.
|
|
3451
|
+
var eventLoop = ThreadLocalEventLoop_getInstance().get_eventLoop_wo5hfs_k$();
|
|
3452
|
+
if (false && eventLoop.get_isUnconfinedQueueEmpty_mi405s_k$()) {
|
|
3453
3453
|
break $l$block;
|
|
3454
3454
|
}
|
|
3455
3455
|
var tmp;
|
|
3456
|
-
if (eventLoop.
|
|
3457
|
-
this.
|
|
3458
|
-
this.
|
|
3459
|
-
eventLoop.
|
|
3456
|
+
if (eventLoop.get_isUnconfinedLoopActive_g78ri6_k$()) {
|
|
3457
|
+
this._state_1 = state;
|
|
3458
|
+
this.resumeMode_1 = 0;
|
|
3459
|
+
eventLoop.dispatchUnconfined_o79kaq_k$(this);
|
|
3460
3460
|
tmp = true;
|
|
3461
3461
|
} else {
|
|
3462
3462
|
// Inline function 'kotlinx.coroutines.runUnconfinedEventLoop' call
|
|
3463
|
-
eventLoop.
|
|
3463
|
+
eventLoop.incrementUseCount_jadqvy_k$(true);
|
|
3464
3464
|
try {
|
|
3465
|
-
this.
|
|
3465
|
+
this.get_context_h02k06_k$();
|
|
3466
3466
|
// Inline function 'kotlinx.coroutines.withCoroutineContext' call
|
|
3467
|
-
this.
|
|
3468
|
-
this.
|
|
3469
|
-
$l$loop: while (eventLoop.
|
|
3467
|
+
this.countOrElement_1;
|
|
3468
|
+
this.continuation_1.resumeWith_rk9gbt_k$(result);
|
|
3469
|
+
$l$loop: while (eventLoop.processUnconfinedEvent_mypjl6_k$()) {
|
|
3470
3470
|
}
|
|
3471
3471
|
} catch ($p) {
|
|
3472
3472
|
if ($p instanceof Error) {
|
|
3473
3473
|
var e = $p;
|
|
3474
|
-
this.
|
|
3474
|
+
this.handleFatalException_fix1y3_k$(e);
|
|
3475
3475
|
} else {
|
|
3476
3476
|
throw $p;
|
|
3477
3477
|
}
|
|
3478
3478
|
}
|
|
3479
3479
|
finally {
|
|
3480
|
-
eventLoop.
|
|
3480
|
+
eventLoop.decrementUseCount_x8i8ca_k$(true);
|
|
3481
3481
|
}
|
|
3482
3482
|
tmp = false;
|
|
3483
3483
|
}
|
|
@@ -3485,15 +3485,15 @@
|
|
|
3485
3485
|
}
|
|
3486
3486
|
};
|
|
3487
3487
|
protoOf(DispatchedContinuation).toString = function () {
|
|
3488
|
-
return 'DispatchedContinuation[' + this.
|
|
3488
|
+
return 'DispatchedContinuation[' + this.dispatcher_1.toString() + ', ' + toDebugString(this.continuation_1) + ']';
|
|
3489
3489
|
};
|
|
3490
|
-
protoOf(DispatchedContinuation).
|
|
3491
|
-
return this.
|
|
3490
|
+
protoOf(DispatchedContinuation).get_context_h02k06_k$ = function () {
|
|
3491
|
+
return this.continuation_1.get_context_h02k06_k$();
|
|
3492
3492
|
};
|
|
3493
3493
|
function safeDispatch(_this__u8e3s4, context, runnable) {
|
|
3494
3494
|
_init_properties_DispatchedContinuation_kt__tnmqc0();
|
|
3495
3495
|
try {
|
|
3496
|
-
_this__u8e3s4.
|
|
3496
|
+
_this__u8e3s4.dispatch_qa3n0o_k$(context, runnable);
|
|
3497
3497
|
} catch ($p) {
|
|
3498
3498
|
if ($p instanceof Error) {
|
|
3499
3499
|
var e = $p;
|
|
@@ -3506,7 +3506,7 @@
|
|
|
3506
3506
|
function safeIsDispatchNeeded(_this__u8e3s4, context) {
|
|
3507
3507
|
_init_properties_DispatchedContinuation_kt__tnmqc0();
|
|
3508
3508
|
try {
|
|
3509
|
-
return _this__u8e3s4.
|
|
3509
|
+
return _this__u8e3s4.isDispatchNeeded_ft82v4_k$(context);
|
|
3510
3510
|
} catch ($p) {
|
|
3511
3511
|
if ($p instanceof Error) {
|
|
3512
3512
|
var e = $p;
|
|
@@ -3522,39 +3522,39 @@
|
|
|
3522
3522
|
if (_this__u8e3s4 instanceof DispatchedContinuation) {
|
|
3523
3523
|
// Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeCancellableWith' call
|
|
3524
3524
|
var state = toState_0(result);
|
|
3525
|
-
if (safeIsDispatchNeeded(_this__u8e3s4.
|
|
3526
|
-
_this__u8e3s4.
|
|
3527
|
-
_this__u8e3s4.
|
|
3528
|
-
safeDispatch(_this__u8e3s4.
|
|
3525
|
+
if (safeIsDispatchNeeded(_this__u8e3s4.dispatcher_1, _this__u8e3s4.get_context_h02k06_k$())) {
|
|
3526
|
+
_this__u8e3s4._state_1 = state;
|
|
3527
|
+
_this__u8e3s4.resumeMode_1 = 1;
|
|
3528
|
+
safeDispatch(_this__u8e3s4.dispatcher_1, _this__u8e3s4.get_context_h02k06_k$(), _this__u8e3s4);
|
|
3529
3529
|
} else {
|
|
3530
3530
|
$l$block: {
|
|
3531
3531
|
// Inline function 'kotlinx.coroutines.internal.executeUnconfined' call
|
|
3532
3532
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3533
|
-
var eventLoop = ThreadLocalEventLoop_getInstance().
|
|
3534
|
-
if (false && eventLoop.
|
|
3533
|
+
var eventLoop = ThreadLocalEventLoop_getInstance().get_eventLoop_wo5hfs_k$();
|
|
3534
|
+
if (false && eventLoop.get_isUnconfinedQueueEmpty_mi405s_k$()) {
|
|
3535
3535
|
break $l$block;
|
|
3536
3536
|
}
|
|
3537
3537
|
var tmp_0;
|
|
3538
|
-
if (eventLoop.
|
|
3539
|
-
_this__u8e3s4.
|
|
3540
|
-
_this__u8e3s4.
|
|
3541
|
-
eventLoop.
|
|
3538
|
+
if (eventLoop.get_isUnconfinedLoopActive_g78ri6_k$()) {
|
|
3539
|
+
_this__u8e3s4._state_1 = state;
|
|
3540
|
+
_this__u8e3s4.resumeMode_1 = 1;
|
|
3541
|
+
eventLoop.dispatchUnconfined_o79kaq_k$(_this__u8e3s4);
|
|
3542
3542
|
tmp_0 = true;
|
|
3543
3543
|
} else {
|
|
3544
3544
|
// Inline function 'kotlinx.coroutines.runUnconfinedEventLoop' call
|
|
3545
|
-
eventLoop.
|
|
3545
|
+
eventLoop.incrementUseCount_jadqvy_k$(true);
|
|
3546
3546
|
try {
|
|
3547
3547
|
var tmp$ret$5;
|
|
3548
3548
|
$l$block_0: {
|
|
3549
3549
|
// Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeCancelled' call
|
|
3550
|
-
var job = _this__u8e3s4.
|
|
3551
|
-
if (!(job == null) && !job.
|
|
3552
|
-
var cause = job.
|
|
3553
|
-
_this__u8e3s4.
|
|
3550
|
+
var job = _this__u8e3s4.get_context_h02k06_k$().get_y2st91_k$(Key_instance_2);
|
|
3551
|
+
if (!(job == null) && !job.get_isActive_quafmh_k$()) {
|
|
3552
|
+
var cause = job.getCancellationException_8i1q6u_k$();
|
|
3553
|
+
_this__u8e3s4.cancelCompletedResult_pnx7en_k$(state, cause);
|
|
3554
3554
|
// Inline function 'kotlin.coroutines.resumeWithException' call
|
|
3555
3555
|
// Inline function 'kotlin.Companion.failure' call
|
|
3556
3556
|
var tmp$ret$7 = _Result___init__impl__xyqfz8(createFailure(cause));
|
|
3557
|
-
_this__u8e3s4.
|
|
3557
|
+
_this__u8e3s4.resumeWith_rk9gbt_k$(tmp$ret$7);
|
|
3558
3558
|
tmp$ret$5 = true;
|
|
3559
3559
|
break $l$block_0;
|
|
3560
3560
|
}
|
|
@@ -3562,23 +3562,23 @@
|
|
|
3562
3562
|
}
|
|
3563
3563
|
if (!tmp$ret$5) {
|
|
3564
3564
|
// Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeUndispatchedWith' call
|
|
3565
|
-
_this__u8e3s4.
|
|
3565
|
+
_this__u8e3s4.continuation_1;
|
|
3566
3566
|
// Inline function 'kotlinx.coroutines.withContinuationContext' call
|
|
3567
|
-
_this__u8e3s4.
|
|
3568
|
-
_this__u8e3s4.
|
|
3567
|
+
_this__u8e3s4.countOrElement_1;
|
|
3568
|
+
_this__u8e3s4.continuation_1.resumeWith_rk9gbt_k$(result);
|
|
3569
3569
|
}
|
|
3570
|
-
$l$loop: while (eventLoop.
|
|
3570
|
+
$l$loop: while (eventLoop.processUnconfinedEvent_mypjl6_k$()) {
|
|
3571
3571
|
}
|
|
3572
3572
|
} catch ($p) {
|
|
3573
3573
|
if ($p instanceof Error) {
|
|
3574
3574
|
var e = $p;
|
|
3575
|
-
_this__u8e3s4.
|
|
3575
|
+
_this__u8e3s4.handleFatalException_fix1y3_k$(e);
|
|
3576
3576
|
} else {
|
|
3577
3577
|
throw $p;
|
|
3578
3578
|
}
|
|
3579
3579
|
}
|
|
3580
3580
|
finally {
|
|
3581
|
-
eventLoop.
|
|
3581
|
+
eventLoop.decrementUseCount_x8i8ca_k$(true);
|
|
3582
3582
|
}
|
|
3583
3583
|
tmp_0 = false;
|
|
3584
3584
|
}
|
|
@@ -3586,7 +3586,7 @@
|
|
|
3586
3586
|
}
|
|
3587
3587
|
tmp = Unit_instance;
|
|
3588
3588
|
} else {
|
|
3589
|
-
_this__u8e3s4.
|
|
3589
|
+
_this__u8e3s4.resumeWith_rk9gbt_k$(result);
|
|
3590
3590
|
tmp = Unit_instance;
|
|
3591
3591
|
}
|
|
3592
3592
|
return tmp;
|
|
@@ -3601,68 +3601,68 @@
|
|
|
3601
3601
|
}
|
|
3602
3602
|
function DispatchedTask(resumeMode) {
|
|
3603
3603
|
SchedulerTask.call(this);
|
|
3604
|
-
this.
|
|
3604
|
+
this.resumeMode_1 = resumeMode;
|
|
3605
3605
|
}
|
|
3606
|
-
protoOf(DispatchedTask).
|
|
3606
|
+
protoOf(DispatchedTask).cancelCompletedResult_pnx7en_k$ = function (takenState, cause) {
|
|
3607
3607
|
};
|
|
3608
|
-
protoOf(DispatchedTask).
|
|
3608
|
+
protoOf(DispatchedTask).getSuccessfulResult_4uqe9r_k$ = function (state) {
|
|
3609
3609
|
return state;
|
|
3610
3610
|
};
|
|
3611
|
-
protoOf(DispatchedTask).
|
|
3611
|
+
protoOf(DispatchedTask).getExceptionalResult_i3cs19_k$ = function (state) {
|
|
3612
3612
|
var tmp0_safe_receiver = state instanceof CompletedExceptionally ? state : null;
|
|
3613
|
-
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
3613
|
+
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cause_1;
|
|
3614
3614
|
};
|
|
3615
|
-
protoOf(DispatchedTask).
|
|
3615
|
+
protoOf(DispatchedTask).run_mvkpxh_k$ = function () {
|
|
3616
3616
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3617
3617
|
try {
|
|
3618
|
-
var tmp = this.
|
|
3618
|
+
var tmp = this.get_delegate_hasf9b_k$();
|
|
3619
3619
|
var delegate = tmp instanceof DispatchedContinuation ? tmp : THROW_CCE();
|
|
3620
|
-
var continuation = delegate.
|
|
3620
|
+
var continuation = delegate.continuation_1;
|
|
3621
3621
|
// Inline function 'kotlinx.coroutines.withContinuationContext' call
|
|
3622
|
-
delegate.
|
|
3623
|
-
var context = continuation.
|
|
3624
|
-
var state = this.
|
|
3625
|
-
var exception = this.
|
|
3626
|
-
var job = exception == null && get_isCancellableMode(this.
|
|
3627
|
-
if (!(job == null) && !job.
|
|
3628
|
-
var cause = job.
|
|
3629
|
-
this.
|
|
3622
|
+
delegate.countOrElement_1;
|
|
3623
|
+
var context = continuation.get_context_h02k06_k$();
|
|
3624
|
+
var state = this.takeState_a1bv3x_k$();
|
|
3625
|
+
var exception = this.getExceptionalResult_i3cs19_k$(state);
|
|
3626
|
+
var job = exception == null && get_isCancellableMode(this.resumeMode_1) ? context.get_y2st91_k$(Key_instance_2) : null;
|
|
3627
|
+
if (!(job == null) && !job.get_isActive_quafmh_k$()) {
|
|
3628
|
+
var cause = job.getCancellationException_8i1q6u_k$();
|
|
3629
|
+
this.cancelCompletedResult_pnx7en_k$(state, cause);
|
|
3630
3630
|
// Inline function 'kotlinx.coroutines.resumeWithStackTrace' call
|
|
3631
3631
|
// Inline function 'kotlin.Companion.failure' call
|
|
3632
3632
|
var exception_0 = recoverStackTrace(cause, continuation);
|
|
3633
3633
|
var tmp$ret$4 = _Result___init__impl__xyqfz8(createFailure(exception_0));
|
|
3634
|
-
continuation.
|
|
3634
|
+
continuation.resumeWith_rk9gbt_k$(tmp$ret$4);
|
|
3635
3635
|
} else {
|
|
3636
3636
|
if (!(exception == null)) {
|
|
3637
3637
|
// Inline function 'kotlin.coroutines.resumeWithException' call
|
|
3638
3638
|
// Inline function 'kotlin.Companion.failure' call
|
|
3639
3639
|
var tmp$ret$6 = _Result___init__impl__xyqfz8(createFailure(exception));
|
|
3640
|
-
continuation.
|
|
3640
|
+
continuation.resumeWith_rk9gbt_k$(tmp$ret$6);
|
|
3641
3641
|
} else {
|
|
3642
3642
|
// Inline function 'kotlin.coroutines.resume' call
|
|
3643
3643
|
// Inline function 'kotlin.Companion.success' call
|
|
3644
|
-
var value = this.
|
|
3644
|
+
var value = this.getSuccessfulResult_4uqe9r_k$(state);
|
|
3645
3645
|
var tmp$ret$8 = _Result___init__impl__xyqfz8(value);
|
|
3646
|
-
continuation.
|
|
3646
|
+
continuation.resumeWith_rk9gbt_k$(tmp$ret$8);
|
|
3647
3647
|
}
|
|
3648
3648
|
}
|
|
3649
3649
|
} catch ($p) {
|
|
3650
3650
|
if ($p instanceof DispatchException) {
|
|
3651
3651
|
var e = $p;
|
|
3652
|
-
handleCoroutineException(this.
|
|
3652
|
+
handleCoroutineException(this.get_delegate_hasf9b_k$().get_context_h02k06_k$(), e.cause_1);
|
|
3653
3653
|
} else {
|
|
3654
3654
|
if ($p instanceof Error) {
|
|
3655
3655
|
var e_0 = $p;
|
|
3656
|
-
this.
|
|
3656
|
+
this.handleFatalException_fix1y3_k$(e_0);
|
|
3657
3657
|
} else {
|
|
3658
3658
|
throw $p;
|
|
3659
3659
|
}
|
|
3660
3660
|
}
|
|
3661
3661
|
}
|
|
3662
3662
|
};
|
|
3663
|
-
protoOf(DispatchedTask).
|
|
3663
|
+
protoOf(DispatchedTask).handleFatalException_fix1y3_k$ = function (exception) {
|
|
3664
3664
|
var reason = new CoroutinesInternalError('Fatal exception in coroutines machinery for ' + toString(this) + '. ' + "Please read KDoc to 'handleFatalException' method and report this incident to maintainers", exception);
|
|
3665
|
-
handleCoroutineException(this.
|
|
3665
|
+
handleCoroutineException(this.get_delegate_hasf9b_k$().get_context_h02k06_k$(), reason);
|
|
3666
3666
|
};
|
|
3667
3667
|
function get_isReusableMode(_this__u8e3s4) {
|
|
3668
3668
|
return _this__u8e3s4 === 2;
|
|
@@ -3672,7 +3672,7 @@
|
|
|
3672
3672
|
}
|
|
3673
3673
|
function dispatch(_this__u8e3s4, mode) {
|
|
3674
3674
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3675
|
-
var delegate = _this__u8e3s4.
|
|
3675
|
+
var delegate = _this__u8e3s4.get_delegate_hasf9b_k$();
|
|
3676
3676
|
var undispatched = mode === 4;
|
|
3677
3677
|
var tmp;
|
|
3678
3678
|
var tmp_0;
|
|
@@ -3682,13 +3682,13 @@
|
|
|
3682
3682
|
tmp_0 = false;
|
|
3683
3683
|
}
|
|
3684
3684
|
if (tmp_0) {
|
|
3685
|
-
tmp = get_isCancellableMode(mode) === get_isCancellableMode(_this__u8e3s4.
|
|
3685
|
+
tmp = get_isCancellableMode(mode) === get_isCancellableMode(_this__u8e3s4.resumeMode_1);
|
|
3686
3686
|
} else {
|
|
3687
3687
|
tmp = false;
|
|
3688
3688
|
}
|
|
3689
3689
|
if (tmp) {
|
|
3690
|
-
var dispatcher = delegate.
|
|
3691
|
-
var context = delegate.
|
|
3690
|
+
var dispatcher = delegate.dispatcher_1;
|
|
3691
|
+
var context = delegate.get_context_h02k06_k$();
|
|
3692
3692
|
if (safeIsDispatchNeeded(dispatcher, context)) {
|
|
3693
3693
|
safeDispatch(dispatcher, context, _this__u8e3s4);
|
|
3694
3694
|
} else {
|
|
@@ -3701,80 +3701,80 @@
|
|
|
3701
3701
|
function DispatchException(cause, dispatcher, context) {
|
|
3702
3702
|
Exception_init_$Init$('Coroutine dispatcher ' + dispatcher.toString() + ' threw an exception, context = ' + toString(context), cause, this);
|
|
3703
3703
|
captureStack(this, DispatchException);
|
|
3704
|
-
this.
|
|
3704
|
+
this.cause_1 = cause;
|
|
3705
3705
|
delete this.cause;
|
|
3706
3706
|
}
|
|
3707
|
-
protoOf(DispatchException).
|
|
3708
|
-
return this.
|
|
3707
|
+
protoOf(DispatchException).get_cause_iplhs0_k$ = function () {
|
|
3708
|
+
return this.cause_1;
|
|
3709
3709
|
};
|
|
3710
3710
|
function resumeUnconfined(_this__u8e3s4) {
|
|
3711
|
-
var eventLoop = ThreadLocalEventLoop_getInstance().
|
|
3712
|
-
if (eventLoop.
|
|
3713
|
-
eventLoop.
|
|
3711
|
+
var eventLoop = ThreadLocalEventLoop_getInstance().get_eventLoop_wo5hfs_k$();
|
|
3712
|
+
if (eventLoop.get_isUnconfinedLoopActive_g78ri6_k$()) {
|
|
3713
|
+
eventLoop.dispatchUnconfined_o79kaq_k$(_this__u8e3s4);
|
|
3714
3714
|
} else {
|
|
3715
3715
|
// Inline function 'kotlinx.coroutines.runUnconfinedEventLoop' call
|
|
3716
|
-
eventLoop.
|
|
3716
|
+
eventLoop.incrementUseCount_jadqvy_k$(true);
|
|
3717
3717
|
try {
|
|
3718
|
-
resume(_this__u8e3s4, _this__u8e3s4.
|
|
3719
|
-
$l$loop: while (eventLoop.
|
|
3718
|
+
resume(_this__u8e3s4, _this__u8e3s4.get_delegate_hasf9b_k$(), true);
|
|
3719
|
+
$l$loop: while (eventLoop.processUnconfinedEvent_mypjl6_k$()) {
|
|
3720
3720
|
}
|
|
3721
3721
|
} catch ($p) {
|
|
3722
3722
|
if ($p instanceof Error) {
|
|
3723
3723
|
var e = $p;
|
|
3724
|
-
_this__u8e3s4.
|
|
3724
|
+
_this__u8e3s4.handleFatalException_fix1y3_k$(e);
|
|
3725
3725
|
} else {
|
|
3726
3726
|
throw $p;
|
|
3727
3727
|
}
|
|
3728
3728
|
}
|
|
3729
3729
|
finally {
|
|
3730
|
-
eventLoop.
|
|
3730
|
+
eventLoop.decrementUseCount_x8i8ca_k$(true);
|
|
3731
3731
|
}
|
|
3732
3732
|
}
|
|
3733
3733
|
}
|
|
3734
3734
|
function resume(_this__u8e3s4, delegate, undispatched) {
|
|
3735
|
-
var state = _this__u8e3s4.
|
|
3736
|
-
var exception = _this__u8e3s4.
|
|
3735
|
+
var state = _this__u8e3s4.takeState_a1bv3x_k$();
|
|
3736
|
+
var exception = _this__u8e3s4.getExceptionalResult_i3cs19_k$(state);
|
|
3737
3737
|
var tmp;
|
|
3738
3738
|
if (!(exception == null)) {
|
|
3739
3739
|
// Inline function 'kotlin.Companion.failure' call
|
|
3740
3740
|
tmp = _Result___init__impl__xyqfz8(createFailure(exception));
|
|
3741
3741
|
} else {
|
|
3742
3742
|
// Inline function 'kotlin.Companion.success' call
|
|
3743
|
-
var value = _this__u8e3s4.
|
|
3743
|
+
var value = _this__u8e3s4.getSuccessfulResult_4uqe9r_k$(state);
|
|
3744
3744
|
tmp = _Result___init__impl__xyqfz8(value);
|
|
3745
3745
|
}
|
|
3746
3746
|
var result = tmp;
|
|
3747
3747
|
if (undispatched) {
|
|
3748
3748
|
// Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeUndispatchedWith' call
|
|
3749
3749
|
var this_0 = delegate instanceof DispatchedContinuation ? delegate : THROW_CCE();
|
|
3750
|
-
this_0.
|
|
3750
|
+
this_0.continuation_1;
|
|
3751
3751
|
// Inline function 'kotlinx.coroutines.withContinuationContext' call
|
|
3752
|
-
this_0.
|
|
3753
|
-
this_0.
|
|
3752
|
+
this_0.countOrElement_1;
|
|
3753
|
+
this_0.continuation_1.resumeWith_rk9gbt_k$(result);
|
|
3754
3754
|
} else {
|
|
3755
|
-
delegate.
|
|
3755
|
+
delegate.resumeWith_rk9gbt_k$(result);
|
|
3756
3756
|
}
|
|
3757
3757
|
}
|
|
3758
3758
|
function ScopeCoroutine(context, uCont) {
|
|
3759
3759
|
AbstractCoroutine.call(this, context, true, true);
|
|
3760
|
-
this.
|
|
3760
|
+
this.uCont_1 = uCont;
|
|
3761
3761
|
}
|
|
3762
|
-
protoOf(ScopeCoroutine).
|
|
3762
|
+
protoOf(ScopeCoroutine).get_isScopedCoroutine_rwmmff_k$ = function () {
|
|
3763
3763
|
return true;
|
|
3764
3764
|
};
|
|
3765
|
-
protoOf(ScopeCoroutine).
|
|
3766
|
-
resumeCancellableWithInternal(intercepted(this.
|
|
3765
|
+
protoOf(ScopeCoroutine).afterCompletion_2p0irt_k$ = function (state) {
|
|
3766
|
+
resumeCancellableWithInternal(intercepted(this.uCont_1), recoverResult(state, this.uCont_1));
|
|
3767
3767
|
};
|
|
3768
|
-
protoOf(ScopeCoroutine).
|
|
3768
|
+
protoOf(ScopeCoroutine).afterCompletionUndispatched_mss5y2_k$ = function () {
|
|
3769
3769
|
};
|
|
3770
|
-
protoOf(ScopeCoroutine).
|
|
3771
|
-
this.
|
|
3770
|
+
protoOf(ScopeCoroutine).afterResume_ugh2hm_k$ = function (state) {
|
|
3771
|
+
this.uCont_1.resumeWith_rk9gbt_k$(recoverResult(state, this.uCont_1));
|
|
3772
3772
|
};
|
|
3773
3773
|
function Symbol(symbol) {
|
|
3774
|
-
this.
|
|
3774
|
+
this.symbol_1 = symbol;
|
|
3775
3775
|
}
|
|
3776
3776
|
protoOf(Symbol).toString = function () {
|
|
3777
|
-
return '<' + this.
|
|
3777
|
+
return '<' + this.symbol_1 + '>';
|
|
3778
3778
|
};
|
|
3779
3779
|
function systemProp(propertyName, defaultValue, minValue, maxValue) {
|
|
3780
3780
|
minValue = minValue === VOID ? 1 : minValue;
|
|
@@ -3846,14 +3846,14 @@
|
|
|
3846
3846
|
function dispatcherFailure(completion, e) {
|
|
3847
3847
|
var tmp;
|
|
3848
3848
|
if (e instanceof DispatchException) {
|
|
3849
|
-
tmp = e.
|
|
3849
|
+
tmp = e.cause_1;
|
|
3850
3850
|
} else {
|
|
3851
3851
|
tmp = e;
|
|
3852
3852
|
}
|
|
3853
3853
|
var reportException = tmp;
|
|
3854
3854
|
// Inline function 'kotlin.Companion.failure' call
|
|
3855
3855
|
var tmp$ret$0 = _Result___init__impl__xyqfz8(createFailure(reportException));
|
|
3856
|
-
completion.
|
|
3856
|
+
completion.resumeWith_rk9gbt_k$(tmp$ret$0);
|
|
3857
3857
|
throw reportException;
|
|
3858
3858
|
}
|
|
3859
3859
|
function startUndispatchedOrReturn(_this__u8e3s4, receiver, block) {
|
|
@@ -3865,7 +3865,7 @@
|
|
|
3865
3865
|
var tmp;
|
|
3866
3866
|
try {
|
|
3867
3867
|
// Inline function 'kotlinx.coroutines.withCoroutineContext' call
|
|
3868
|
-
actualCompletion.
|
|
3868
|
+
actualCompletion.get_context_h02k06_k$();
|
|
3869
3869
|
// Inline function 'kotlinx.coroutines.internal.probeCoroutineResumed' call
|
|
3870
3870
|
// Inline function 'kotlin.coroutines.intrinsics.startCoroutineUninterceptedOrReturn' call
|
|
3871
3871
|
tmp = startCoroutineUninterceptedOrReturnNonGeneratorVersion(_this__u8e3s4, receiver, actualCompletion);
|
|
@@ -3875,7 +3875,7 @@
|
|
|
3875
3875
|
var e = $p;
|
|
3876
3876
|
var tmp_1;
|
|
3877
3877
|
if (e instanceof DispatchException) {
|
|
3878
|
-
tmp_1 = e.
|
|
3878
|
+
tmp_1 = e.cause_1;
|
|
3879
3879
|
} else {
|
|
3880
3880
|
tmp_1 = e;
|
|
3881
3881
|
}
|
|
@@ -3883,7 +3883,7 @@
|
|
|
3883
3883
|
// Inline function 'kotlin.coroutines.resumeWithException' call
|
|
3884
3884
|
// Inline function 'kotlin.Companion.failure' call
|
|
3885
3885
|
var tmp$ret$6 = _Result___init__impl__xyqfz8(createFailure(reportException));
|
|
3886
|
-
actualCompletion.
|
|
3886
|
+
actualCompletion.resumeWith_rk9gbt_k$(tmp$ret$6);
|
|
3887
3887
|
return Unit_instance;
|
|
3888
3888
|
} else {
|
|
3889
3889
|
throw $p;
|
|
@@ -3894,7 +3894,7 @@
|
|
|
3894
3894
|
// Inline function 'kotlin.coroutines.resume' call
|
|
3895
3895
|
// Inline function 'kotlin.Companion.success' call
|
|
3896
3896
|
var tmp$ret$8 = _Result___init__impl__xyqfz8(value);
|
|
3897
|
-
actualCompletion.
|
|
3897
|
+
actualCompletion.resumeWith_rk9gbt_k$(tmp$ret$8);
|
|
3898
3898
|
}
|
|
3899
3899
|
}
|
|
3900
3900
|
function startUndispatched(_this__u8e3s4, alwaysRethrow, receiver, block) {
|
|
@@ -3920,18 +3920,18 @@
|
|
|
3920
3920
|
var result = tmp;
|
|
3921
3921
|
if (result === get_COROUTINE_SUSPENDED())
|
|
3922
3922
|
return get_COROUTINE_SUSPENDED();
|
|
3923
|
-
var state = _this__u8e3s4.
|
|
3923
|
+
var state = _this__u8e3s4.makeCompletingOnce_m8ggg9_k$(result);
|
|
3924
3924
|
if (state === get_COMPLETING_WAITING_CHILDREN())
|
|
3925
3925
|
return get_COROUTINE_SUSPENDED();
|
|
3926
|
-
_this__u8e3s4.
|
|
3926
|
+
_this__u8e3s4.afterCompletionUndispatched_mss5y2_k$();
|
|
3927
3927
|
var tmp_1;
|
|
3928
3928
|
if (state instanceof CompletedExceptionally) {
|
|
3929
3929
|
var tmp_2;
|
|
3930
|
-
if (alwaysRethrow || notOwnTimeout(_this__u8e3s4, state.
|
|
3931
|
-
throw recoverStackTrace(state.
|
|
3930
|
+
if (alwaysRethrow || notOwnTimeout(_this__u8e3s4, state.cause_1)) {
|
|
3931
|
+
throw recoverStackTrace(state.cause_1, _this__u8e3s4.uCont_1);
|
|
3932
3932
|
} else {
|
|
3933
3933
|
if (result instanceof CompletedExceptionally) {
|
|
3934
|
-
throw recoverStackTrace(result.
|
|
3934
|
+
throw recoverStackTrace(result.cause_1, _this__u8e3s4.uCont_1);
|
|
3935
3935
|
} else {
|
|
3936
3936
|
tmp_2 = result;
|
|
3937
3937
|
}
|
|
@@ -3943,15 +3943,15 @@
|
|
|
3943
3943
|
return tmp_1;
|
|
3944
3944
|
}
|
|
3945
3945
|
function dispatchExceptionAndMakeCompleting(_this__u8e3s4, e) {
|
|
3946
|
-
_this__u8e3s4.
|
|
3947
|
-
throw recoverStackTrace(e.
|
|
3946
|
+
_this__u8e3s4.makeCompleting_fohkwa_k$(new CompletedExceptionally(e.cause_1));
|
|
3947
|
+
throw recoverStackTrace(e.cause_1, _this__u8e3s4.uCont_1);
|
|
3948
3948
|
}
|
|
3949
3949
|
function notOwnTimeout(_this__u8e3s4, cause) {
|
|
3950
3950
|
var tmp;
|
|
3951
3951
|
if (!(cause instanceof TimeoutCancellationException)) {
|
|
3952
3952
|
tmp = true;
|
|
3953
3953
|
} else {
|
|
3954
|
-
tmp = !(cause.
|
|
3954
|
+
tmp = !(cause.coroutine_1 === _this__u8e3s4);
|
|
3955
3955
|
}
|
|
3956
3956
|
return tmp;
|
|
3957
3957
|
}
|
|
@@ -3971,22 +3971,22 @@
|
|
|
3971
3971
|
function MutexImpl$CancellableContinuationWithOwner$tryResume$lambda(this$0, this$1) {
|
|
3972
3972
|
return function (_unused_var__etf5q3, _unused_var__etf5q3_0, _unused_var__etf5q3_1) {
|
|
3973
3973
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3974
|
-
this$0.
|
|
3975
|
-
this$0.
|
|
3974
|
+
this$0.owner_1.kotlinx$atomicfu$value = this$1.owner_1;
|
|
3975
|
+
this$0.unlock_ulcrcl_k$(this$1.owner_1);
|
|
3976
3976
|
return Unit_instance;
|
|
3977
3977
|
};
|
|
3978
3978
|
}
|
|
3979
3979
|
function MutexImpl$CancellableContinuationWithOwner$resume$lambda(this$0, this$1) {
|
|
3980
3980
|
return function (it) {
|
|
3981
|
-
this$0.
|
|
3981
|
+
this$0.unlock_ulcrcl_k$(this$1.owner_1);
|
|
3982
3982
|
return Unit_instance;
|
|
3983
3983
|
};
|
|
3984
3984
|
}
|
|
3985
3985
|
function holdsLockImpl($this, owner) {
|
|
3986
3986
|
$l$loop: while (true) {
|
|
3987
|
-
if (!$this.
|
|
3987
|
+
if (!$this.get_isLocked_w82zdp_k$())
|
|
3988
3988
|
return 0;
|
|
3989
|
-
var curOwner = $this.
|
|
3989
|
+
var curOwner = $this.owner_1.kotlinx$atomicfu$value;
|
|
3990
3990
|
if (curOwner === get_NO_OWNER())
|
|
3991
3991
|
continue $l$loop;
|
|
3992
3992
|
return curOwner === owner ? 1 : 2;
|
|
@@ -4000,19 +4000,19 @@
|
|
|
4000
4000
|
} catch ($p) {
|
|
4001
4001
|
if ($p instanceof Error) {
|
|
4002
4002
|
var e = $p;
|
|
4003
|
-
cancellable.
|
|
4003
|
+
cancellable.releaseClaimedReusableContinuation_mdg0s9_k$();
|
|
4004
4004
|
throw e;
|
|
4005
4005
|
} else {
|
|
4006
4006
|
throw $p;
|
|
4007
4007
|
}
|
|
4008
4008
|
}
|
|
4009
|
-
return cancellable.
|
|
4009
|
+
return cancellable.getResult_fck196_k$();
|
|
4010
4010
|
}
|
|
4011
4011
|
function tryLockImpl($this, owner) {
|
|
4012
4012
|
$l$loop: while (true) {
|
|
4013
|
-
if ($this.
|
|
4013
|
+
if ($this.tryAcquire_4pp2ed_k$()) {
|
|
4014
4014
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
4015
|
-
$this.
|
|
4015
|
+
$this.owner_1.kotlinx$atomicfu$value = owner;
|
|
4016
4016
|
return 0;
|
|
4017
4017
|
} else {
|
|
4018
4018
|
if (owner == null)
|
|
@@ -4029,54 +4029,54 @@
|
|
|
4029
4029
|
}
|
|
4030
4030
|
}
|
|
4031
4031
|
function CancellableContinuationWithOwner($outer, cont, owner) {
|
|
4032
|
-
this
|
|
4033
|
-
this.
|
|
4034
|
-
this.
|
|
4032
|
+
this.$this_1 = $outer;
|
|
4033
|
+
this.cont_1 = cont;
|
|
4034
|
+
this.owner_1 = owner;
|
|
4035
4035
|
}
|
|
4036
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4036
|
+
protoOf(CancellableContinuationWithOwner).tryResume_3kelvk_k$ = function (value, idempotent, onCancellation) {
|
|
4037
4037
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
4038
|
-
var token = this.
|
|
4038
|
+
var token = this.cont_1.tryResume_gmd8sc_k$(value, idempotent, MutexImpl$CancellableContinuationWithOwner$tryResume$lambda(this.$this_1, this));
|
|
4039
4039
|
if (!(token == null)) {
|
|
4040
4040
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
4041
|
-
this.
|
|
4041
|
+
this.$this_1.owner_1.kotlinx$atomicfu$value = this.owner_1;
|
|
4042
4042
|
}
|
|
4043
4043
|
return token;
|
|
4044
4044
|
};
|
|
4045
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4046
|
-
return this.
|
|
4045
|
+
protoOf(CancellableContinuationWithOwner).tryResume_gmd8sc_k$ = function (value, idempotent, onCancellation) {
|
|
4046
|
+
return this.tryResume_3kelvk_k$(value instanceof Unit ? value : THROW_CCE(), idempotent, onCancellation);
|
|
4047
4047
|
};
|
|
4048
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4048
|
+
protoOf(CancellableContinuationWithOwner).resume_2c53ai_k$ = function (value, onCancellation) {
|
|
4049
4049
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
4050
|
-
this.
|
|
4051
|
-
this.
|
|
4050
|
+
this.$this_1.owner_1.kotlinx$atomicfu$value = this.owner_1;
|
|
4051
|
+
this.cont_1.resume_a4kjl1_k$(Unit_instance, MutexImpl$CancellableContinuationWithOwner$resume$lambda(this.$this_1, this));
|
|
4052
4052
|
};
|
|
4053
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4054
|
-
return this.
|
|
4053
|
+
protoOf(CancellableContinuationWithOwner).resume_nf5g9e_k$ = function (value, onCancellation) {
|
|
4054
|
+
return this.resume_2c53ai_k$(value instanceof Unit ? value : THROW_CCE(), onCancellation);
|
|
4055
4055
|
};
|
|
4056
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4057
|
-
return this.
|
|
4056
|
+
protoOf(CancellableContinuationWithOwner).get_isCompleted_a6j6c8_k$ = function () {
|
|
4057
|
+
return this.cont_1.get_isCompleted_a6j6c8_k$();
|
|
4058
4058
|
};
|
|
4059
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4060
|
-
return this.
|
|
4059
|
+
protoOf(CancellableContinuationWithOwner).tryResumeWithException_4drsj6_k$ = function (exception) {
|
|
4060
|
+
return this.cont_1.tryResumeWithException_4drsj6_k$(exception);
|
|
4061
4061
|
};
|
|
4062
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4063
|
-
this.
|
|
4062
|
+
protoOf(CancellableContinuationWithOwner).completeResume_fabtk_k$ = function (token) {
|
|
4063
|
+
this.cont_1.completeResume_fabtk_k$(token);
|
|
4064
4064
|
};
|
|
4065
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4066
|
-
this.
|
|
4065
|
+
protoOf(CancellableContinuationWithOwner).invokeOnCancellation_effrxe_k$ = function (segment, index) {
|
|
4066
|
+
this.cont_1.invokeOnCancellation_effrxe_k$(segment, index);
|
|
4067
4067
|
};
|
|
4068
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4069
|
-
this.
|
|
4068
|
+
protoOf(CancellableContinuationWithOwner).resumeWith_lgtnnr_k$ = function (result) {
|
|
4069
|
+
this.cont_1.resumeWith_rk9gbt_k$(result);
|
|
4070
4070
|
};
|
|
4071
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4072
|
-
return this.
|
|
4071
|
+
protoOf(CancellableContinuationWithOwner).resumeWith_rk9gbt_k$ = function (result) {
|
|
4072
|
+
return this.resumeWith_lgtnnr_k$(result);
|
|
4073
4073
|
};
|
|
4074
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4075
|
-
return this.
|
|
4074
|
+
protoOf(CancellableContinuationWithOwner).get_context_h02k06_k$ = function () {
|
|
4075
|
+
return this.cont_1.get_context_h02k06_k$();
|
|
4076
4076
|
};
|
|
4077
4077
|
function MutexImpl$onSelectCancellationUnlockConstructor$lambda$lambda(this$0, $owner) {
|
|
4078
4078
|
return function (_unused_var__etf5q3, _unused_var__etf5q3_0, _unused_var__etf5q3_1) {
|
|
4079
|
-
this$0.
|
|
4079
|
+
this$0.unlock_ulcrcl_k$($owner);
|
|
4080
4080
|
return Unit_instance;
|
|
4081
4081
|
};
|
|
4082
4082
|
}
|
|
@@ -4087,19 +4087,19 @@
|
|
|
4087
4087
|
}
|
|
4088
4088
|
function MutexImpl(locked) {
|
|
4089
4089
|
SemaphoreAndMutexImpl.call(this, 1, locked ? 1 : 0);
|
|
4090
|
-
this.
|
|
4090
|
+
this.owner_1 = atomic$ref$1(locked ? null : get_NO_OWNER());
|
|
4091
4091
|
var tmp = this;
|
|
4092
|
-
tmp.
|
|
4092
|
+
tmp.onSelectCancellationUnlockConstructor_1 = MutexImpl$onSelectCancellationUnlockConstructor$lambda(this);
|
|
4093
4093
|
}
|
|
4094
|
-
protoOf(MutexImpl).
|
|
4095
|
-
return this.
|
|
4094
|
+
protoOf(MutexImpl).get_isLocked_w82zdp_k$ = function () {
|
|
4095
|
+
return this.get_availablePermits_tq8ya0_k$() === 0;
|
|
4096
4096
|
};
|
|
4097
|
-
protoOf(MutexImpl).
|
|
4098
|
-
if (this.
|
|
4097
|
+
protoOf(MutexImpl).lock_ugrcvf_k$ = function (owner, $completion) {
|
|
4098
|
+
if (this.tryLock_jl1wg7_k$(owner))
|
|
4099
4099
|
return Unit_instance;
|
|
4100
4100
|
return lockSuspend(this, owner, $completion);
|
|
4101
4101
|
};
|
|
4102
|
-
protoOf(MutexImpl).
|
|
4102
|
+
protoOf(MutexImpl).tryLock_jl1wg7_k$ = function (owner) {
|
|
4103
4103
|
var tmp;
|
|
4104
4104
|
switch (tryLockImpl(this, owner)) {
|
|
4105
4105
|
case 0:
|
|
@@ -4121,14 +4121,14 @@
|
|
|
4121
4121
|
}
|
|
4122
4122
|
return tmp;
|
|
4123
4123
|
};
|
|
4124
|
-
protoOf(MutexImpl).
|
|
4124
|
+
protoOf(MutexImpl).unlock_ulcrcl_k$ = function (owner) {
|
|
4125
4125
|
$l$loop_0: while (true) {
|
|
4126
4126
|
// Inline function 'kotlin.check' call
|
|
4127
|
-
if (!this.
|
|
4127
|
+
if (!this.get_isLocked_w82zdp_k$()) {
|
|
4128
4128
|
var message = 'This mutex is not locked';
|
|
4129
4129
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
4130
4130
|
}
|
|
4131
|
-
var curOwner = this.
|
|
4131
|
+
var curOwner = this.owner_1.kotlinx$atomicfu$value;
|
|
4132
4132
|
if (curOwner === get_NO_OWNER())
|
|
4133
4133
|
continue $l$loop_0;
|
|
4134
4134
|
// Inline function 'kotlin.check' call
|
|
@@ -4136,14 +4136,14 @@
|
|
|
4136
4136
|
var message_0 = 'This mutex is locked by ' + toString_0(curOwner) + ', but ' + toString_0(owner) + ' is expected';
|
|
4137
4137
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
4138
4138
|
}
|
|
4139
|
-
if (!this.
|
|
4139
|
+
if (!this.owner_1.atomicfu$compareAndSet(curOwner, get_NO_OWNER()))
|
|
4140
4140
|
continue $l$loop_0;
|
|
4141
|
-
this.
|
|
4141
|
+
this.release_wu5yyf_k$();
|
|
4142
4142
|
return Unit_instance;
|
|
4143
4143
|
}
|
|
4144
4144
|
};
|
|
4145
4145
|
protoOf(MutexImpl).toString = function () {
|
|
4146
|
-
return 'Mutex@' + get_hexAddress(this) + '[isLocked=' + this.
|
|
4146
|
+
return 'Mutex@' + get_hexAddress(this) + '[isLocked=' + this.get_isLocked_w82zdp_k$() + ',owner=' + toString_0(this.owner_1.kotlinx$atomicfu$value) + ']';
|
|
4147
4147
|
};
|
|
4148
4148
|
var properties_initialized_Mutex_kt_yv4p3j;
|
|
4149
4149
|
function _init_properties_Mutex_kt__jod56b() {
|
|
@@ -4200,36 +4200,36 @@
|
|
|
4200
4200
|
} catch ($p) {
|
|
4201
4201
|
if ($p instanceof Error) {
|
|
4202
4202
|
var e = $p;
|
|
4203
|
-
cancellable.
|
|
4203
|
+
cancellable.releaseClaimedReusableContinuation_mdg0s9_k$();
|
|
4204
4204
|
throw e;
|
|
4205
4205
|
} else {
|
|
4206
4206
|
throw $p;
|
|
4207
4207
|
}
|
|
4208
4208
|
}
|
|
4209
|
-
return cancellable.
|
|
4209
|
+
return cancellable.getResult_fck196_k$();
|
|
4210
4210
|
}
|
|
4211
4211
|
function decPermits($this) {
|
|
4212
4212
|
$l$loop: while (true) {
|
|
4213
|
-
var p = $this.
|
|
4214
|
-
if (p > $this.
|
|
4213
|
+
var p = $this._availablePermits_1.atomicfu$getAndDecrement();
|
|
4214
|
+
if (p > $this.permits_1)
|
|
4215
4215
|
continue $l$loop;
|
|
4216
4216
|
return p;
|
|
4217
4217
|
}
|
|
4218
4218
|
}
|
|
4219
4219
|
function coerceAvailablePermitsAtMaximum($this) {
|
|
4220
4220
|
$l$loop_0: while (true) {
|
|
4221
|
-
var cur = $this.
|
|
4222
|
-
if (cur <= $this.
|
|
4221
|
+
var cur = $this._availablePermits_1.kotlinx$atomicfu$value;
|
|
4222
|
+
if (cur <= $this.permits_1)
|
|
4223
4223
|
break $l$loop_0;
|
|
4224
|
-
if ($this.
|
|
4224
|
+
if ($this._availablePermits_1.atomicfu$compareAndSet(cur, $this.permits_1))
|
|
4225
4225
|
break $l$loop_0;
|
|
4226
4226
|
}
|
|
4227
4227
|
}
|
|
4228
4228
|
function addAcquireToQueue($this, waiter) {
|
|
4229
|
-
var curTail = $this.
|
|
4230
|
-
var enqIdx = $this.
|
|
4229
|
+
var curTail = $this.tail_1.kotlinx$atomicfu$value;
|
|
4230
|
+
var enqIdx = $this.enqIdx_1.atomicfu$getAndIncrement$long();
|
|
4231
4231
|
var createNewSegment = createSegment$ref();
|
|
4232
|
-
var tmp0 = $this.
|
|
4232
|
+
var tmp0 = $this.tail_1;
|
|
4233
4233
|
// Inline function 'kotlin.Long.div' call
|
|
4234
4234
|
var other = get_SEGMENT_SIZE();
|
|
4235
4235
|
var tmp2 = divide(enqIdx, fromInt(other));
|
|
@@ -4250,23 +4250,23 @@
|
|
|
4250
4250
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
4251
4251
|
while (true) {
|
|
4252
4252
|
var cur = tmp0.kotlinx$atomicfu$value;
|
|
4253
|
-
if (compare(cur.
|
|
4253
|
+
if (compare(cur.id_1, tmp2_0.id_1) >= 0) {
|
|
4254
4254
|
tmp$ret$2 = true;
|
|
4255
4255
|
break $l$block_1;
|
|
4256
4256
|
}
|
|
4257
|
-
if (!tmp2_0.
|
|
4257
|
+
if (!tmp2_0.tryIncPointers_6zsfpw_k$()) {
|
|
4258
4258
|
tmp$ret$2 = false;
|
|
4259
4259
|
break $l$block_1;
|
|
4260
4260
|
}
|
|
4261
4261
|
if (tmp0.atomicfu$compareAndSet(cur, tmp2_0)) {
|
|
4262
|
-
if (cur.
|
|
4263
|
-
cur.
|
|
4262
|
+
if (cur.decPointers_vy306j_k$()) {
|
|
4263
|
+
cur.remove_ldkf9o_k$();
|
|
4264
4264
|
}
|
|
4265
4265
|
tmp$ret$2 = true;
|
|
4266
4266
|
break $l$block_1;
|
|
4267
4267
|
}
|
|
4268
|
-
if (tmp2_0.
|
|
4269
|
-
tmp2_0.
|
|
4268
|
+
if (tmp2_0.decPointers_vy306j_k$()) {
|
|
4269
|
+
tmp2_0.remove_ldkf9o_k$();
|
|
4270
4270
|
}
|
|
4271
4271
|
}
|
|
4272
4272
|
tmp$ret$2 = tmp$ret$3;
|
|
@@ -4285,21 +4285,21 @@
|
|
|
4285
4285
|
var tmp$ret$5 = modulo(enqIdx, fromInt(other_0));
|
|
4286
4286
|
var i = convertToInt(tmp$ret$5);
|
|
4287
4287
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.cas' call
|
|
4288
|
-
if (segment.
|
|
4289
|
-
waiter.
|
|
4288
|
+
if (segment.acquirers_1.atomicfu$get(i).atomicfu$compareAndSet(null, waiter)) {
|
|
4289
|
+
waiter.invokeOnCancellation_effrxe_k$(segment, i);
|
|
4290
4290
|
return true;
|
|
4291
4291
|
}
|
|
4292
4292
|
var tmp4 = get_PERMIT();
|
|
4293
4293
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.cas' call
|
|
4294
4294
|
var value = get_TAKEN();
|
|
4295
|
-
if (segment.
|
|
4295
|
+
if (segment.acquirers_1.atomicfu$get(i).atomicfu$compareAndSet(tmp4, value)) {
|
|
4296
4296
|
if (isInterface(waiter, CancellableContinuation)) {
|
|
4297
4297
|
if (!isInterface(waiter, CancellableContinuation))
|
|
4298
4298
|
THROW_CCE();
|
|
4299
|
-
waiter.
|
|
4299
|
+
waiter.resume_nf5g9e_k$(Unit_instance, $this.onCancellationRelease_1);
|
|
4300
4300
|
} else {
|
|
4301
4301
|
if (isInterface(waiter, SelectInstance)) {
|
|
4302
|
-
waiter.
|
|
4302
|
+
waiter.selectInRegistrationPhase_ldg7ua_k$(Unit_instance);
|
|
4303
4303
|
} else {
|
|
4304
4304
|
// Inline function 'kotlin.error' call
|
|
4305
4305
|
var message = 'unexpected: ' + toString(waiter);
|
|
@@ -4312,13 +4312,13 @@
|
|
|
4312
4312
|
return false;
|
|
4313
4313
|
}
|
|
4314
4314
|
function tryResumeNextFromQueue($this) {
|
|
4315
|
-
var curHead = $this.
|
|
4316
|
-
var deqIdx = $this.
|
|
4315
|
+
var curHead = $this.head_1.kotlinx$atomicfu$value;
|
|
4316
|
+
var deqIdx = $this.deqIdx_1.atomicfu$getAndIncrement$long();
|
|
4317
4317
|
// Inline function 'kotlin.Long.div' call
|
|
4318
4318
|
var other = get_SEGMENT_SIZE();
|
|
4319
4319
|
var id = divide(deqIdx, fromInt(other));
|
|
4320
4320
|
var createNewSegment = createSegment$ref();
|
|
4321
|
-
var tmp0 = $this.
|
|
4321
|
+
var tmp0 = $this.head_1;
|
|
4322
4322
|
var tmp$ret$1;
|
|
4323
4323
|
$l$block_2: {
|
|
4324
4324
|
// Inline function 'kotlinx.coroutines.internal.findSegmentAndMoveForward' call
|
|
@@ -4336,23 +4336,23 @@
|
|
|
4336
4336
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
4337
4337
|
while (true) {
|
|
4338
4338
|
var cur = tmp0.kotlinx$atomicfu$value;
|
|
4339
|
-
if (compare(cur.
|
|
4339
|
+
if (compare(cur.id_1, tmp2.id_1) >= 0) {
|
|
4340
4340
|
tmp$ret$2 = true;
|
|
4341
4341
|
break $l$block_1;
|
|
4342
4342
|
}
|
|
4343
|
-
if (!tmp2.
|
|
4343
|
+
if (!tmp2.tryIncPointers_6zsfpw_k$()) {
|
|
4344
4344
|
tmp$ret$2 = false;
|
|
4345
4345
|
break $l$block_1;
|
|
4346
4346
|
}
|
|
4347
4347
|
if (tmp0.atomicfu$compareAndSet(cur, tmp2)) {
|
|
4348
|
-
if (cur.
|
|
4349
|
-
cur.
|
|
4348
|
+
if (cur.decPointers_vy306j_k$()) {
|
|
4349
|
+
cur.remove_ldkf9o_k$();
|
|
4350
4350
|
}
|
|
4351
4351
|
tmp$ret$2 = true;
|
|
4352
4352
|
break $l$block_1;
|
|
4353
4353
|
}
|
|
4354
|
-
if (tmp2.
|
|
4355
|
-
tmp2.
|
|
4354
|
+
if (tmp2.decPointers_vy306j_k$()) {
|
|
4355
|
+
tmp2.remove_ldkf9o_k$();
|
|
4356
4356
|
}
|
|
4357
4357
|
}
|
|
4358
4358
|
tmp$ret$2 = tmp$ret$3;
|
|
@@ -4366,8 +4366,8 @@
|
|
|
4366
4366
|
}
|
|
4367
4367
|
}
|
|
4368
4368
|
var segment = _SegmentOrClosed___get_segment__impl__jvcr9l(tmp$ret$1);
|
|
4369
|
-
segment.
|
|
4370
|
-
if (compare(segment.
|
|
4369
|
+
segment.cleanPrev_rn0kss_k$();
|
|
4370
|
+
if (compare(segment.id_1, id) > 0)
|
|
4371
4371
|
return false;
|
|
4372
4372
|
// Inline function 'kotlin.Long.rem' call
|
|
4373
4373
|
var other_0 = get_SEGMENT_SIZE();
|
|
@@ -4375,7 +4375,7 @@
|
|
|
4375
4375
|
var i = convertToInt(tmp$ret$5);
|
|
4376
4376
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.getAndSet' call
|
|
4377
4377
|
var value = get_PERMIT();
|
|
4378
|
-
var cellState = segment.
|
|
4378
|
+
var cellState = segment.acquirers_1.atomicfu$get(i).atomicfu$getAndSet(value);
|
|
4379
4379
|
if (cellState === null) {
|
|
4380
4380
|
// Inline function 'kotlin.repeat' call
|
|
4381
4381
|
var times = get_MAX_SPIN_CYCLES();
|
|
@@ -4385,14 +4385,14 @@
|
|
|
4385
4385
|
var index = inductionVariable;
|
|
4386
4386
|
inductionVariable = inductionVariable + 1 | 0;
|
|
4387
4387
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.get' call
|
|
4388
|
-
if (segment.
|
|
4388
|
+
if (segment.acquirers_1.atomicfu$get(i).kotlinx$atomicfu$value === get_TAKEN())
|
|
4389
4389
|
return true;
|
|
4390
4390
|
}
|
|
4391
4391
|
while (inductionVariable < times);
|
|
4392
4392
|
var tmp4 = get_PERMIT();
|
|
4393
4393
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.cas' call
|
|
4394
4394
|
var value_0 = get_BROKEN();
|
|
4395
|
-
return !segment.
|
|
4395
|
+
return !segment.acquirers_1.atomicfu$get(i).atomicfu$compareAndSet(tmp4, value_0);
|
|
4396
4396
|
} else if (cellState === get_CANCELLED())
|
|
4397
4397
|
return false;
|
|
4398
4398
|
else
|
|
@@ -4403,10 +4403,10 @@
|
|
|
4403
4403
|
if (isInterface($receiver, CancellableContinuation)) {
|
|
4404
4404
|
if (!isInterface($receiver, CancellableContinuation))
|
|
4405
4405
|
THROW_CCE();
|
|
4406
|
-
var token = $receiver.
|
|
4406
|
+
var token = $receiver.tryResume_gmd8sc_k$(Unit_instance, null, $this.onCancellationRelease_1);
|
|
4407
4407
|
var tmp_0;
|
|
4408
4408
|
if (!(token == null)) {
|
|
4409
|
-
$receiver.
|
|
4409
|
+
$receiver.completeResume_fabtk_k$(token);
|
|
4410
4410
|
tmp_0 = true;
|
|
4411
4411
|
} else {
|
|
4412
4412
|
tmp_0 = false;
|
|
@@ -4414,7 +4414,7 @@
|
|
|
4414
4414
|
tmp = tmp_0;
|
|
4415
4415
|
} else {
|
|
4416
4416
|
if (isInterface($receiver, SelectInstance)) {
|
|
4417
|
-
tmp = $receiver.
|
|
4417
|
+
tmp = $receiver.trySelect_fbege0_k$($this, Unit_instance);
|
|
4418
4418
|
} else {
|
|
4419
4419
|
// Inline function 'kotlin.error' call
|
|
4420
4420
|
var message = 'unexpected: ' + toString($receiver);
|
|
@@ -4425,7 +4425,7 @@
|
|
|
4425
4425
|
}
|
|
4426
4426
|
function SemaphoreAndMutexImpl$onCancellationRelease$lambda(this$0) {
|
|
4427
4427
|
return function (_unused_var__etf5q3, _unused_var__etf5q3_0, _unused_var__etf5q3_1) {
|
|
4428
|
-
this$0.
|
|
4428
|
+
this$0.release_wu5yyf_k$();
|
|
4429
4429
|
return Unit_instance;
|
|
4430
4430
|
};
|
|
4431
4431
|
}
|
|
@@ -4435,45 +4435,45 @@
|
|
|
4435
4435
|
}, 2, 0, 1, 'createSegment');
|
|
4436
4436
|
}
|
|
4437
4437
|
function SemaphoreAndMutexImpl(permits, acquiredPermits) {
|
|
4438
|
-
this.
|
|
4439
|
-
this.
|
|
4440
|
-
this.
|
|
4438
|
+
this.permits_1 = permits;
|
|
4439
|
+
this.deqIdx_1 = atomic$long$1(new Long(0, 0));
|
|
4440
|
+
this.enqIdx_1 = atomic$long$1(new Long(0, 0));
|
|
4441
4441
|
// Inline function 'kotlin.require' call
|
|
4442
|
-
if (!(this.
|
|
4443
|
-
var message = 'Semaphore should have at least 1 permit, but had ' + this.
|
|
4442
|
+
if (!(this.permits_1 > 0)) {
|
|
4443
|
+
var message = 'Semaphore should have at least 1 permit, but had ' + this.permits_1;
|
|
4444
4444
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
4445
4445
|
}
|
|
4446
4446
|
// Inline function 'kotlin.require' call
|
|
4447
|
-
if (!(0 <= acquiredPermits ? acquiredPermits <= this.
|
|
4448
|
-
var message_0 = 'The number of acquired permits should be in 0..' + this.
|
|
4447
|
+
if (!(0 <= acquiredPermits ? acquiredPermits <= this.permits_1 : false)) {
|
|
4448
|
+
var message_0 = 'The number of acquired permits should be in 0..' + this.permits_1;
|
|
4449
4449
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
4450
4450
|
}
|
|
4451
4451
|
var s = new SemaphoreSegment(new Long(0, 0), null, 2);
|
|
4452
|
-
this.
|
|
4453
|
-
this.
|
|
4454
|
-
this.
|
|
4452
|
+
this.head_1 = atomic$ref$1(s);
|
|
4453
|
+
this.tail_1 = atomic$ref$1(s);
|
|
4454
|
+
this._availablePermits_1 = atomic$int$1(this.permits_1 - acquiredPermits | 0);
|
|
4455
4455
|
var tmp = this;
|
|
4456
|
-
tmp.
|
|
4456
|
+
tmp.onCancellationRelease_1 = SemaphoreAndMutexImpl$onCancellationRelease$lambda(this);
|
|
4457
4457
|
}
|
|
4458
|
-
protoOf(SemaphoreAndMutexImpl).
|
|
4458
|
+
protoOf(SemaphoreAndMutexImpl).get_availablePermits_tq8ya0_k$ = function () {
|
|
4459
4459
|
// Inline function 'kotlin.math.max' call
|
|
4460
|
-
var a = this.
|
|
4460
|
+
var a = this._availablePermits_1.kotlinx$atomicfu$value;
|
|
4461
4461
|
return Math.max(a, 0);
|
|
4462
4462
|
};
|
|
4463
|
-
protoOf(SemaphoreAndMutexImpl).
|
|
4463
|
+
protoOf(SemaphoreAndMutexImpl).tryAcquire_4pp2ed_k$ = function () {
|
|
4464
4464
|
$l$loop: while (true) {
|
|
4465
|
-
var p = this.
|
|
4466
|
-
if (p > this.
|
|
4465
|
+
var p = this._availablePermits_1.kotlinx$atomicfu$value;
|
|
4466
|
+
if (p > this.permits_1) {
|
|
4467
4467
|
coerceAvailablePermitsAtMaximum(this);
|
|
4468
4468
|
continue $l$loop;
|
|
4469
4469
|
}
|
|
4470
4470
|
if (p <= 0)
|
|
4471
4471
|
return false;
|
|
4472
|
-
if (this.
|
|
4472
|
+
if (this._availablePermits_1.atomicfu$compareAndSet(p, p - 1 | 0))
|
|
4473
4473
|
return true;
|
|
4474
4474
|
}
|
|
4475
4475
|
};
|
|
4476
|
-
protoOf(SemaphoreAndMutexImpl).
|
|
4476
|
+
protoOf(SemaphoreAndMutexImpl).acquire_kfvtdt_k$ = function ($completion) {
|
|
4477
4477
|
var p = decPermits(this);
|
|
4478
4478
|
if (p > 0)
|
|
4479
4479
|
return Unit_instance;
|
|
@@ -4486,7 +4486,7 @@
|
|
|
4486
4486
|
while (true) {
|
|
4487
4487
|
var p = decPermits(this);
|
|
4488
4488
|
if (p > 0) {
|
|
4489
|
-
waiter.
|
|
4489
|
+
waiter.resume_nf5g9e_k$(Unit_instance, this.onCancellationRelease_1);
|
|
4490
4490
|
tmp$ret$0 = Unit_instance;
|
|
4491
4491
|
break $l$block_0;
|
|
4492
4492
|
}
|
|
@@ -4499,13 +4499,13 @@
|
|
|
4499
4499
|
}
|
|
4500
4500
|
return tmp$ret$0;
|
|
4501
4501
|
};
|
|
4502
|
-
protoOf(SemaphoreAndMutexImpl).
|
|
4502
|
+
protoOf(SemaphoreAndMutexImpl).release_wu5yyf_k$ = function () {
|
|
4503
4503
|
while (true) {
|
|
4504
|
-
var p = this.
|
|
4505
|
-
if (p >= this.
|
|
4504
|
+
var p = this._availablePermits_1.atomicfu$getAndIncrement();
|
|
4505
|
+
if (p >= this.permits_1) {
|
|
4506
4506
|
coerceAvailablePermitsAtMaximum(this);
|
|
4507
4507
|
// Inline function 'kotlin.error' call
|
|
4508
|
-
var message = 'The number of released permits cannot be greater than ' + this.
|
|
4508
|
+
var message = 'The number of released permits cannot be greater than ' + this.permits_1;
|
|
4509
4509
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
4510
4510
|
}
|
|
4511
4511
|
if (p >= 0)
|
|
@@ -4519,19 +4519,19 @@
|
|
|
4519
4519
|
}
|
|
4520
4520
|
function SemaphoreSegment(id, prev, pointers) {
|
|
4521
4521
|
Segment.call(this, id, prev, pointers);
|
|
4522
|
-
this.
|
|
4522
|
+
this.acquirers_1 = atomicfu$AtomicRefArray$ofNulls(get_SEGMENT_SIZE());
|
|
4523
4523
|
}
|
|
4524
|
-
protoOf(SemaphoreSegment).
|
|
4524
|
+
protoOf(SemaphoreSegment).get_numberOfSlots_n3mgwk_k$ = function () {
|
|
4525
4525
|
return get_SEGMENT_SIZE();
|
|
4526
4526
|
};
|
|
4527
|
-
protoOf(SemaphoreSegment).
|
|
4527
|
+
protoOf(SemaphoreSegment).onCancellation_4jec3b_k$ = function (index, cause, context) {
|
|
4528
4528
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.set' call
|
|
4529
4529
|
var value = get_CANCELLED();
|
|
4530
|
-
this.
|
|
4531
|
-
this.
|
|
4530
|
+
this.acquirers_1.atomicfu$get(index).kotlinx$atomicfu$value = value;
|
|
4531
|
+
this.onSlotCleaned_do6lqz_k$();
|
|
4532
4532
|
};
|
|
4533
4533
|
protoOf(SemaphoreSegment).toString = function () {
|
|
4534
|
-
return 'SemaphoreSegment[id=' + this.
|
|
4534
|
+
return 'SemaphoreSegment[id=' + this.id_1.toString() + ', hashCode=' + hashCode(this) + ']';
|
|
4535
4535
|
};
|
|
4536
4536
|
function createSegment(id, prev) {
|
|
4537
4537
|
_init_properties_Semaphore_kt__t514r6();
|
|
@@ -4589,7 +4589,7 @@
|
|
|
4589
4589
|
}
|
|
4590
4590
|
var DEBUG;
|
|
4591
4591
|
function get_classSimpleName(_this__u8e3s4) {
|
|
4592
|
-
var tmp0_elvis_lhs = getKClassFromExpression(_this__u8e3s4).
|
|
4592
|
+
var tmp0_elvis_lhs = getKClassFromExpression(_this__u8e3s4).get_simpleName_r6f8py_k$();
|
|
4593
4593
|
return tmp0_elvis_lhs == null ? 'Unknown' : tmp0_elvis_lhs;
|
|
4594
4594
|
}
|
|
4595
4595
|
function get_hexAddress(_this__u8e3s4) {
|
|
@@ -4607,8 +4607,8 @@
|
|
|
4607
4607
|
NodeDispatcher_instance = this;
|
|
4608
4608
|
SetTimeoutBasedDispatcher.call(this);
|
|
4609
4609
|
}
|
|
4610
|
-
protoOf(NodeDispatcher).
|
|
4611
|
-
process.nextTick(this.
|
|
4610
|
+
protoOf(NodeDispatcher).scheduleQueueProcessing_nxtlcz_k$ = function () {
|
|
4611
|
+
process.nextTick(this.messageQueue_1.processQueue_1);
|
|
4612
4612
|
};
|
|
4613
4613
|
var NodeDispatcher_instance;
|
|
4614
4614
|
function NodeDispatcher_getInstance() {
|
|
@@ -4618,31 +4618,31 @@
|
|
|
4618
4618
|
}
|
|
4619
4619
|
function ScheduledMessageQueue$processQueue$lambda(this$0) {
|
|
4620
4620
|
return function () {
|
|
4621
|
-
this$0.
|
|
4621
|
+
this$0.process_myqcf5_k$();
|
|
4622
4622
|
return Unit_instance;
|
|
4623
4623
|
};
|
|
4624
4624
|
}
|
|
4625
4625
|
function ScheduledMessageQueue(dispatcher) {
|
|
4626
4626
|
MessageQueue.call(this);
|
|
4627
|
-
this.
|
|
4627
|
+
this.dispatcher_1 = dispatcher;
|
|
4628
4628
|
var tmp = this;
|
|
4629
|
-
tmp.
|
|
4629
|
+
tmp.processQueue_1 = ScheduledMessageQueue$processQueue$lambda(this);
|
|
4630
4630
|
}
|
|
4631
|
-
protoOf(ScheduledMessageQueue).
|
|
4632
|
-
this.
|
|
4631
|
+
protoOf(ScheduledMessageQueue).schedule_o777if_k$ = function () {
|
|
4632
|
+
this.dispatcher_1.scheduleQueueProcessing_nxtlcz_k$();
|
|
4633
4633
|
};
|
|
4634
|
-
protoOf(ScheduledMessageQueue).
|
|
4635
|
-
setTimeout(this.
|
|
4634
|
+
protoOf(ScheduledMessageQueue).reschedule_mhlssa_k$ = function () {
|
|
4635
|
+
setTimeout(this.processQueue_1, 0);
|
|
4636
4636
|
};
|
|
4637
|
-
protoOf(ScheduledMessageQueue).
|
|
4638
|
-
setTimeout(this.
|
|
4637
|
+
protoOf(ScheduledMessageQueue).setTimeout_6sdjei_k$ = function (timeout) {
|
|
4638
|
+
setTimeout(this.processQueue_1, timeout);
|
|
4639
4639
|
};
|
|
4640
4640
|
function WindowMessageQueue$lambda(this$0) {
|
|
4641
4641
|
return function (event) {
|
|
4642
4642
|
var tmp;
|
|
4643
|
-
if (event.source == this$0.
|
|
4643
|
+
if (event.source == this$0.window_1 && event.data == this$0.messageName_1) {
|
|
4644
4644
|
event.stopPropagation();
|
|
4645
|
-
this$0.
|
|
4645
|
+
this$0.process_myqcf5_k$();
|
|
4646
4646
|
tmp = Unit_instance;
|
|
4647
4647
|
}
|
|
4648
4648
|
return Unit_instance;
|
|
@@ -4650,22 +4650,22 @@
|
|
|
4650
4650
|
}
|
|
4651
4651
|
function WindowMessageQueue$schedule$lambda(this$0) {
|
|
4652
4652
|
return function (it) {
|
|
4653
|
-
this$0.
|
|
4653
|
+
this$0.process_myqcf5_k$();
|
|
4654
4654
|
return Unit_instance;
|
|
4655
4655
|
};
|
|
4656
4656
|
}
|
|
4657
4657
|
function WindowMessageQueue(window_0) {
|
|
4658
4658
|
MessageQueue.call(this);
|
|
4659
|
-
this.
|
|
4660
|
-
this.
|
|
4661
|
-
this.
|
|
4659
|
+
this.window_1 = window_0;
|
|
4660
|
+
this.messageName_1 = 'dispatchCoroutine';
|
|
4661
|
+
this.window_1.addEventListener('message', WindowMessageQueue$lambda(this), true);
|
|
4662
4662
|
}
|
|
4663
|
-
protoOf(WindowMessageQueue).
|
|
4663
|
+
protoOf(WindowMessageQueue).schedule_o777if_k$ = function () {
|
|
4664
4664
|
var tmp = Promise.resolve(Unit_instance);
|
|
4665
4665
|
tmp.then(WindowMessageQueue$schedule$lambda(this));
|
|
4666
4666
|
};
|
|
4667
|
-
protoOf(WindowMessageQueue).
|
|
4668
|
-
this.
|
|
4667
|
+
protoOf(WindowMessageQueue).reschedule_mhlssa_k$ = function () {
|
|
4668
|
+
this.window_1.postMessage(this.messageName_1, '*');
|
|
4669
4669
|
};
|
|
4670
4670
|
function toThrowable(_this__u8e3s4) {
|
|
4671
4671
|
var tmp0_elvis_lhs = _this__u8e3s4 instanceof Error ? _this__u8e3s4 : null;
|
|
@@ -4690,8 +4690,8 @@
|
|
|
4690
4690
|
return tmp;
|
|
4691
4691
|
}
|
|
4692
4692
|
function newCoroutineContext(_this__u8e3s4, context) {
|
|
4693
|
-
var combined = _this__u8e3s4.
|
|
4694
|
-
return !(combined === Dispatchers_getInstance().
|
|
4693
|
+
var combined = _this__u8e3s4.get_coroutineContext_115oqo_k$().plus_s13ygv_k$(context);
|
|
4694
|
+
return !(combined === Dispatchers_getInstance().Default_1) && combined.get_y2st91_k$(Key_instance) == null ? combined.plus_s13ygv_k$(Dispatchers_getInstance().Default_1) : combined;
|
|
4695
4695
|
}
|
|
4696
4696
|
function toDebugString(_this__u8e3s4) {
|
|
4697
4697
|
return toString(_this__u8e3s4);
|
|
@@ -4701,14 +4701,14 @@
|
|
|
4701
4701
|
}
|
|
4702
4702
|
function Dispatchers() {
|
|
4703
4703
|
Dispatchers_instance = this;
|
|
4704
|
-
this.
|
|
4705
|
-
this.
|
|
4706
|
-
this.
|
|
4707
|
-
this.
|
|
4704
|
+
this.Default_1 = createDefaultDispatcher();
|
|
4705
|
+
this.Unconfined_1 = Unconfined_getInstance();
|
|
4706
|
+
this.mainDispatcher_1 = new JsMainDispatcher(this.Default_1, false);
|
|
4707
|
+
this.injectedMainDispatcher_1 = null;
|
|
4708
4708
|
}
|
|
4709
|
-
protoOf(Dispatchers).
|
|
4710
|
-
var tmp0_elvis_lhs = this.
|
|
4711
|
-
return tmp0_elvis_lhs == null ? this.
|
|
4709
|
+
protoOf(Dispatchers).get_Main_wo5vz6_k$ = function () {
|
|
4710
|
+
var tmp0_elvis_lhs = this.injectedMainDispatcher_1;
|
|
4711
|
+
return tmp0_elvis_lhs == null ? this.mainDispatcher_1 : tmp0_elvis_lhs;
|
|
4712
4712
|
};
|
|
4713
4713
|
var Dispatchers_instance;
|
|
4714
4714
|
function Dispatchers_getInstance() {
|
|
@@ -4718,30 +4718,30 @@
|
|
|
4718
4718
|
}
|
|
4719
4719
|
function JsMainDispatcher(delegate, invokeImmediately) {
|
|
4720
4720
|
MainCoroutineDispatcher.call(this);
|
|
4721
|
-
this.
|
|
4722
|
-
this.
|
|
4723
|
-
this.
|
|
4721
|
+
this.delegate_1 = delegate;
|
|
4722
|
+
this.invokeImmediately_1 = invokeImmediately;
|
|
4723
|
+
this.immediate_1 = this.invokeImmediately_1 ? this : new JsMainDispatcher(this.delegate_1, true);
|
|
4724
4724
|
}
|
|
4725
|
-
protoOf(JsMainDispatcher).
|
|
4726
|
-
return this.
|
|
4725
|
+
protoOf(JsMainDispatcher).get_immediate_r3y8eg_k$ = function () {
|
|
4726
|
+
return this.immediate_1;
|
|
4727
4727
|
};
|
|
4728
|
-
protoOf(JsMainDispatcher).
|
|
4729
|
-
return !this.
|
|
4728
|
+
protoOf(JsMainDispatcher).isDispatchNeeded_ft82v4_k$ = function (context) {
|
|
4729
|
+
return !this.invokeImmediately_1;
|
|
4730
4730
|
};
|
|
4731
|
-
protoOf(JsMainDispatcher).
|
|
4732
|
-
return this.
|
|
4731
|
+
protoOf(JsMainDispatcher).dispatch_qa3n0o_k$ = function (context, block) {
|
|
4732
|
+
return this.delegate_1.dispatch_qa3n0o_k$(context, block);
|
|
4733
4733
|
};
|
|
4734
4734
|
protoOf(JsMainDispatcher).toString = function () {
|
|
4735
|
-
var tmp0_elvis_lhs = this.
|
|
4736
|
-
return tmp0_elvis_lhs == null ? this.
|
|
4735
|
+
var tmp0_elvis_lhs = this.toStringInternalImpl_hcqz93_k$();
|
|
4736
|
+
return tmp0_elvis_lhs == null ? this.delegate_1.toString() : tmp0_elvis_lhs;
|
|
4737
4737
|
};
|
|
4738
4738
|
function JobCancellationException(message, cause, job) {
|
|
4739
4739
|
CancellationException_init_$Init$(message, cause, this);
|
|
4740
4740
|
captureStack(this, JobCancellationException);
|
|
4741
|
-
this.
|
|
4741
|
+
this.job_1 = job;
|
|
4742
4742
|
}
|
|
4743
4743
|
protoOf(JobCancellationException).toString = function () {
|
|
4744
|
-
return protoOf(CancellationException).toString.call(this) + '; job=' + toString(this.
|
|
4744
|
+
return protoOf(CancellationException).toString.call(this) + '; job=' + toString(this.job_1);
|
|
4745
4745
|
};
|
|
4746
4746
|
protoOf(JobCancellationException).equals = function (other) {
|
|
4747
4747
|
var tmp;
|
|
@@ -4757,7 +4757,7 @@
|
|
|
4757
4757
|
tmp_2 = false;
|
|
4758
4758
|
}
|
|
4759
4759
|
if (tmp_2) {
|
|
4760
|
-
tmp_1 = equals(other.
|
|
4760
|
+
tmp_1 = equals(other.job_1, this.job_1);
|
|
4761
4761
|
} else {
|
|
4762
4762
|
tmp_1 = false;
|
|
4763
4763
|
}
|
|
@@ -4771,7 +4771,7 @@
|
|
|
4771
4771
|
return tmp;
|
|
4772
4772
|
};
|
|
4773
4773
|
protoOf(JobCancellationException).hashCode = function () {
|
|
4774
|
-
var tmp = imul(imul(getStringHashCode(ensureNotNull(this.message)), 31) + hashCode(this.
|
|
4774
|
+
var tmp = imul(imul(getStringHashCode(ensureNotNull(this.message)), 31) + hashCode(this.job_1) | 0, 31);
|
|
4775
4775
|
var tmp0_safe_receiver = this.cause;
|
|
4776
4776
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
|
|
4777
4777
|
return tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
|
|
@@ -4805,41 +4805,41 @@
|
|
|
4805
4805
|
}
|
|
4806
4806
|
}
|
|
4807
4807
|
function LockFreeLinkedListNode() {
|
|
4808
|
-
this.
|
|
4809
|
-
this.
|
|
4810
|
-
this.
|
|
4808
|
+
this._next_1 = this;
|
|
4809
|
+
this._prev_1 = this;
|
|
4810
|
+
this._removed_1 = false;
|
|
4811
4811
|
}
|
|
4812
|
-
protoOf(LockFreeLinkedListNode).
|
|
4813
|
-
var prev = this.
|
|
4812
|
+
protoOf(LockFreeLinkedListNode).addLast_5b0i77_k$ = function (node, permissionsBitmask) {
|
|
4813
|
+
var prev = this._prev_1;
|
|
4814
4814
|
var tmp;
|
|
4815
4815
|
if (prev instanceof ListClosed) {
|
|
4816
|
-
tmp = ((prev.
|
|
4816
|
+
tmp = ((prev.forbiddenElementsBitmask_1 & permissionsBitmask) === 0 && prev.addLast_5b0i77_k$(node, permissionsBitmask));
|
|
4817
4817
|
} else {
|
|
4818
|
-
node.
|
|
4819
|
-
node.
|
|
4820
|
-
prev.
|
|
4821
|
-
this.
|
|
4818
|
+
node._next_1 = this;
|
|
4819
|
+
node._prev_1 = prev;
|
|
4820
|
+
prev._next_1 = node;
|
|
4821
|
+
this._prev_1 = node;
|
|
4822
4822
|
tmp = true;
|
|
4823
4823
|
}
|
|
4824
4824
|
return tmp;
|
|
4825
4825
|
};
|
|
4826
|
-
protoOf(LockFreeLinkedListNode).
|
|
4827
|
-
this.
|
|
4826
|
+
protoOf(LockFreeLinkedListNode).close_ari2z4_k$ = function (forbiddenElementsBit) {
|
|
4827
|
+
this.addLast_5b0i77_k$(new ListClosed(forbiddenElementsBit), forbiddenElementsBit);
|
|
4828
4828
|
};
|
|
4829
|
-
protoOf(LockFreeLinkedListNode).
|
|
4830
|
-
if (this.
|
|
4829
|
+
protoOf(LockFreeLinkedListNode).remove_fgfybg_k$ = function () {
|
|
4830
|
+
if (this._removed_1)
|
|
4831
4831
|
return false;
|
|
4832
|
-
var prev = this.
|
|
4833
|
-
var next = this.
|
|
4834
|
-
prev.
|
|
4835
|
-
next.
|
|
4836
|
-
this.
|
|
4832
|
+
var prev = this._prev_1;
|
|
4833
|
+
var next = this._next_1;
|
|
4834
|
+
prev._next_1 = next;
|
|
4835
|
+
next._prev_1 = prev;
|
|
4836
|
+
this._removed_1 = true;
|
|
4837
4837
|
return true;
|
|
4838
4838
|
};
|
|
4839
|
-
protoOf(LockFreeLinkedListNode).
|
|
4840
|
-
if (!(this.
|
|
4839
|
+
protoOf(LockFreeLinkedListNode).addOneIfEmpty_2jwoix_k$ = function (node) {
|
|
4840
|
+
if (!(this._next_1 === this))
|
|
4841
4841
|
return false;
|
|
4842
|
-
this.
|
|
4842
|
+
this.addLast_5b0i77_k$(node, -2147483648);
|
|
4843
4843
|
return true;
|
|
4844
4844
|
};
|
|
4845
4845
|
function LockFreeLinkedListHead() {
|
|
@@ -4847,7 +4847,7 @@
|
|
|
4847
4847
|
}
|
|
4848
4848
|
function ListClosed(forbiddenElementsBitmask) {
|
|
4849
4849
|
LockFreeLinkedListNode.call(this);
|
|
4850
|
-
this.
|
|
4850
|
+
this.forbiddenElementsBitmask_1 = forbiddenElementsBitmask;
|
|
4851
4851
|
}
|
|
4852
4852
|
function recoverStackTrace(exception, continuation) {
|
|
4853
4853
|
return exception;
|
|
@@ -4864,13 +4864,13 @@
|
|
|
4864
4864
|
return 0;
|
|
4865
4865
|
}
|
|
4866
4866
|
function CommonThreadLocal() {
|
|
4867
|
-
this.
|
|
4867
|
+
this.value_1 = null;
|
|
4868
4868
|
}
|
|
4869
|
-
protoOf(CommonThreadLocal).
|
|
4870
|
-
return this.
|
|
4869
|
+
protoOf(CommonThreadLocal).get_26vq_k$ = function () {
|
|
4870
|
+
return this.value_1;
|
|
4871
4871
|
};
|
|
4872
|
-
protoOf(CommonThreadLocal).
|
|
4873
|
-
this.
|
|
4872
|
+
protoOf(CommonThreadLocal).set_tg4fwj_k$ = function (value) {
|
|
4873
|
+
this.value_1 = value;
|
|
4874
4874
|
};
|
|
4875
4875
|
function commonThreadLocal(name) {
|
|
4876
4876
|
return new CommonThreadLocal();
|
|
@@ -4881,7 +4881,7 @@
|
|
|
4881
4881
|
function UnconfinedEventLoop() {
|
|
4882
4882
|
EventLoop.call(this);
|
|
4883
4883
|
}
|
|
4884
|
-
protoOf(UnconfinedEventLoop).
|
|
4884
|
+
protoOf(UnconfinedEventLoop).dispatch_qa3n0o_k$ = function (context, block) {
|
|
4885
4885
|
unsupported();
|
|
4886
4886
|
};
|
|
4887
4887
|
function unsupported() {
|
|
@@ -4894,10 +4894,10 @@
|
|
|
4894
4894
|
}
|
|
4895
4895
|
function await_0(_this__u8e3s4, $completion) {
|
|
4896
4896
|
var cancellable = new CancellableContinuationImpl(intercepted($completion), 1);
|
|
4897
|
-
cancellable.
|
|
4897
|
+
cancellable.initCancellability_shqc60_k$();
|
|
4898
4898
|
var tmp = await$lambda(cancellable);
|
|
4899
4899
|
_this__u8e3s4.then(tmp, await$lambda_0(cancellable));
|
|
4900
|
-
return cancellable.
|
|
4900
|
+
return cancellable.getResult_fck196_k$();
|
|
4901
4901
|
}
|
|
4902
4902
|
function asPromise(_this__u8e3s4) {
|
|
4903
4903
|
var promise = new Promise(asPromise$lambda(_this__u8e3s4));
|
|
@@ -4917,7 +4917,7 @@
|
|
|
4917
4917
|
var this_0 = $cont;
|
|
4918
4918
|
// Inline function 'kotlin.Companion.success' call
|
|
4919
4919
|
var tmp$ret$1 = _Result___init__impl__xyqfz8(it);
|
|
4920
|
-
this_0.
|
|
4920
|
+
this_0.resumeWith_rk9gbt_k$(tmp$ret$1);
|
|
4921
4921
|
return null;
|
|
4922
4922
|
};
|
|
4923
4923
|
}
|
|
@@ -4928,31 +4928,31 @@
|
|
|
4928
4928
|
// Inline function 'kotlin.Companion.failure' call
|
|
4929
4929
|
var exception = toThrowable(it);
|
|
4930
4930
|
var tmp$ret$1 = _Result___init__impl__xyqfz8(createFailure(exception));
|
|
4931
|
-
tmp0.
|
|
4931
|
+
tmp0.resumeWith_rk9gbt_k$(tmp$ret$1);
|
|
4932
4932
|
return null;
|
|
4933
4933
|
};
|
|
4934
4934
|
}
|
|
4935
4935
|
function asPromise$lambda$lambda($this_asPromise, $reject, $resolve) {
|
|
4936
4936
|
return function (it) {
|
|
4937
|
-
var e = $this_asPromise.
|
|
4937
|
+
var e = $this_asPromise.getCompletionExceptionOrNull_snuvbb_k$();
|
|
4938
4938
|
var tmp;
|
|
4939
4939
|
if (!(e == null)) {
|
|
4940
4940
|
tmp = $reject(toJsPromiseError(e));
|
|
4941
4941
|
} else {
|
|
4942
|
-
tmp = $resolve($this_asPromise.
|
|
4942
|
+
tmp = $resolve($this_asPromise.getCompleted_nczk2z_k$());
|
|
4943
4943
|
}
|
|
4944
4944
|
return Unit_instance;
|
|
4945
4945
|
};
|
|
4946
4946
|
}
|
|
4947
4947
|
function asPromise$lambda($this_asPromise) {
|
|
4948
4948
|
return function (resolve, reject) {
|
|
4949
|
-
$this_asPromise.
|
|
4949
|
+
$this_asPromise.invokeOnCompletion_n6cffu_k$(asPromise$lambda$lambda($this_asPromise, reject, resolve));
|
|
4950
4950
|
return Unit_instance;
|
|
4951
4951
|
};
|
|
4952
4952
|
}
|
|
4953
4953
|
function propagateExceptionFinalResort(exception) {
|
|
4954
4954
|
// Inline function 'kotlin.with' call
|
|
4955
|
-
throwAsyncJsError(exception.message, getKClassFromExpression(exception).
|
|
4955
|
+
throwAsyncJsError(exception.message, getKClassFromExpression(exception).get_simpleName_r6f8py_k$(), stackTraceToString(exception));
|
|
4956
4956
|
return Unit_instance;
|
|
4957
4957
|
}
|
|
4958
4958
|
function throwAsyncJsError(message, className, stack) {
|
|
@@ -4974,8 +4974,8 @@
|
|
|
4974
4974
|
SetTimeoutDispatcher_instance = this;
|
|
4975
4975
|
SetTimeoutBasedDispatcher.call(this);
|
|
4976
4976
|
}
|
|
4977
|
-
protoOf(SetTimeoutDispatcher).
|
|
4978
|
-
this.
|
|
4977
|
+
protoOf(SetTimeoutDispatcher).scheduleQueueProcessing_nxtlcz_k$ = function () {
|
|
4978
|
+
this.messageQueue_1.setTimeout_6sdjei_k$(0);
|
|
4979
4979
|
};
|
|
4980
4980
|
var SetTimeoutDispatcher_instance;
|
|
4981
4981
|
function SetTimeoutDispatcher_getInstance() {
|
|
@@ -4985,27 +4985,27 @@
|
|
|
4985
4985
|
}
|
|
4986
4986
|
function SetTimeoutBasedDispatcher() {
|
|
4987
4987
|
CoroutineDispatcher.call(this);
|
|
4988
|
-
this.
|
|
4988
|
+
this.messageQueue_1 = new ScheduledMessageQueue(this);
|
|
4989
4989
|
}
|
|
4990
|
-
protoOf(SetTimeoutBasedDispatcher).
|
|
4991
|
-
this.
|
|
4990
|
+
protoOf(SetTimeoutBasedDispatcher).dispatch_qa3n0o_k$ = function (context, block) {
|
|
4991
|
+
this.messageQueue_1.enqueue_uiib2n_k$(block);
|
|
4992
4992
|
};
|
|
4993
4993
|
function MessageQueue() {
|
|
4994
|
-
this
|
|
4995
|
-
this.
|
|
4996
|
-
this.
|
|
4994
|
+
this.$$delegate_0__1 = ArrayDeque_init_$Create$();
|
|
4995
|
+
this.yieldEvery_1 = 16;
|
|
4996
|
+
this.scheduled_1 = false;
|
|
4997
4997
|
}
|
|
4998
|
-
protoOf(MessageQueue).
|
|
4999
|
-
this.
|
|
5000
|
-
if (!this.
|
|
5001
|
-
this.
|
|
5002
|
-
this.
|
|
4998
|
+
protoOf(MessageQueue).enqueue_uiib2n_k$ = function (element) {
|
|
4999
|
+
this.add_a21854_k$(element);
|
|
5000
|
+
if (!this.scheduled_1) {
|
|
5001
|
+
this.scheduled_1 = true;
|
|
5002
|
+
this.schedule_o777if_k$();
|
|
5003
5003
|
}
|
|
5004
5004
|
};
|
|
5005
|
-
protoOf(MessageQueue).
|
|
5005
|
+
protoOf(MessageQueue).process_myqcf5_k$ = function () {
|
|
5006
5006
|
try {
|
|
5007
5007
|
// Inline function 'kotlin.repeat' call
|
|
5008
|
-
var times = this.
|
|
5008
|
+
var times = this.yieldEvery_1;
|
|
5009
5009
|
var inductionVariable = 0;
|
|
5010
5010
|
if (inductionVariable < times)
|
|
5011
5011
|
do {
|
|
@@ -5019,98 +5019,98 @@
|
|
|
5019
5019
|
tmp = tmp0_elvis_lhs;
|
|
5020
5020
|
}
|
|
5021
5021
|
var element = tmp;
|
|
5022
|
-
element.
|
|
5022
|
+
element.run_mvkpxh_k$();
|
|
5023
5023
|
}
|
|
5024
5024
|
while (inductionVariable < times);
|
|
5025
5025
|
}finally {
|
|
5026
|
-
if (this.
|
|
5027
|
-
this.
|
|
5026
|
+
if (this.isEmpty_y1axqb_k$()) {
|
|
5027
|
+
this.scheduled_1 = false;
|
|
5028
5028
|
} else {
|
|
5029
|
-
this.
|
|
5029
|
+
this.reschedule_mhlssa_k$();
|
|
5030
5030
|
}
|
|
5031
5031
|
}
|
|
5032
5032
|
};
|
|
5033
|
-
protoOf(MessageQueue).
|
|
5034
|
-
return this.
|
|
5033
|
+
protoOf(MessageQueue).add_a21854_k$ = function (element) {
|
|
5034
|
+
return this.$$delegate_0__1.add_utx5q5_k$(element);
|
|
5035
5035
|
};
|
|
5036
|
-
protoOf(MessageQueue).
|
|
5037
|
-
return this.
|
|
5036
|
+
protoOf(MessageQueue).add_utx5q5_k$ = function (element) {
|
|
5037
|
+
return this.add_a21854_k$((!(element == null) ? isInterface(element, Runnable) : false) ? element : THROW_CCE());
|
|
5038
5038
|
};
|
|
5039
|
-
protoOf(MessageQueue).
|
|
5040
|
-
this.
|
|
5039
|
+
protoOf(MessageQueue).add_phqi2m_k$ = function (index, element) {
|
|
5040
|
+
this.$$delegate_0__1.add_dl6gt3_k$(index, element);
|
|
5041
5041
|
};
|
|
5042
|
-
protoOf(MessageQueue).
|
|
5043
|
-
return this.
|
|
5042
|
+
protoOf(MessageQueue).add_dl6gt3_k$ = function (index, element) {
|
|
5043
|
+
return this.add_phqi2m_k$(index, (!(element == null) ? isInterface(element, Runnable) : false) ? element : THROW_CCE());
|
|
5044
5044
|
};
|
|
5045
|
-
protoOf(MessageQueue).
|
|
5046
|
-
return this.
|
|
5045
|
+
protoOf(MessageQueue).remove_9lpry3_k$ = function (element) {
|
|
5046
|
+
return this.$$delegate_0__1.remove_cedx0m_k$(element);
|
|
5047
5047
|
};
|
|
5048
|
-
protoOf(MessageQueue).
|
|
5048
|
+
protoOf(MessageQueue).remove_cedx0m_k$ = function (element) {
|
|
5049
5049
|
if (!(!(element == null) ? isInterface(element, Runnable) : false))
|
|
5050
5050
|
return false;
|
|
5051
|
-
return this.
|
|
5051
|
+
return this.remove_9lpry3_k$((!(element == null) ? isInterface(element, Runnable) : false) ? element : THROW_CCE());
|
|
5052
5052
|
};
|
|
5053
|
-
protoOf(MessageQueue).
|
|
5054
|
-
return this.
|
|
5053
|
+
protoOf(MessageQueue).addAll_o2twvu_k$ = function (elements) {
|
|
5054
|
+
return this.$$delegate_0__1.addAll_h3ej1q_k$(elements);
|
|
5055
5055
|
};
|
|
5056
|
-
protoOf(MessageQueue).
|
|
5057
|
-
return this.
|
|
5056
|
+
protoOf(MessageQueue).addAll_h3ej1q_k$ = function (elements) {
|
|
5057
|
+
return this.addAll_o2twvu_k$(elements);
|
|
5058
5058
|
};
|
|
5059
|
-
protoOf(MessageQueue).
|
|
5060
|
-
return this.
|
|
5059
|
+
protoOf(MessageQueue).addAll_2s7yea_k$ = function (index, elements) {
|
|
5060
|
+
return this.$$delegate_0__1.addAll_h0epyi_k$(index, elements);
|
|
5061
5061
|
};
|
|
5062
|
-
protoOf(MessageQueue).
|
|
5063
|
-
return this.
|
|
5062
|
+
protoOf(MessageQueue).addAll_h0epyi_k$ = function (index, elements) {
|
|
5063
|
+
return this.addAll_2s7yea_k$(index, elements);
|
|
5064
5064
|
};
|
|
5065
|
-
protoOf(MessageQueue).
|
|
5066
|
-
this.
|
|
5065
|
+
protoOf(MessageQueue).clear_j9egeb_k$ = function () {
|
|
5066
|
+
this.$$delegate_0__1.clear_j9egeb_k$();
|
|
5067
5067
|
};
|
|
5068
|
-
protoOf(MessageQueue).
|
|
5069
|
-
return this.
|
|
5068
|
+
protoOf(MessageQueue).set_r80eul_k$ = function (index, element) {
|
|
5069
|
+
return this.$$delegate_0__1.set_82063s_k$(index, element);
|
|
5070
5070
|
};
|
|
5071
|
-
protoOf(MessageQueue).
|
|
5072
|
-
return this.
|
|
5071
|
+
protoOf(MessageQueue).set_82063s_k$ = function (index, element) {
|
|
5072
|
+
return this.set_r80eul_k$(index, (!(element == null) ? isInterface(element, Runnable) : false) ? element : THROW_CCE());
|
|
5073
5073
|
};
|
|
5074
|
-
protoOf(MessageQueue).
|
|
5075
|
-
return this.
|
|
5074
|
+
protoOf(MessageQueue).removeAt_6niowx_k$ = function (index) {
|
|
5075
|
+
return this.$$delegate_0__1.removeAt_6niowx_k$(index);
|
|
5076
5076
|
};
|
|
5077
|
-
protoOf(MessageQueue).
|
|
5078
|
-
return this.
|
|
5077
|
+
protoOf(MessageQueue).isEmpty_y1axqb_k$ = function () {
|
|
5078
|
+
return this.$$delegate_0__1.isEmpty_y1axqb_k$();
|
|
5079
5079
|
};
|
|
5080
|
-
protoOf(MessageQueue).
|
|
5081
|
-
return this.
|
|
5080
|
+
protoOf(MessageQueue).iterator_jk1svi_k$ = function () {
|
|
5081
|
+
return this.$$delegate_0__1.iterator_jk1svi_k$();
|
|
5082
5082
|
};
|
|
5083
|
-
protoOf(MessageQueue).
|
|
5084
|
-
return this.
|
|
5083
|
+
protoOf(MessageQueue).get_c1px32_k$ = function (index) {
|
|
5084
|
+
return this.$$delegate_0__1.get_c1px32_k$(index);
|
|
5085
5085
|
};
|
|
5086
|
-
protoOf(MessageQueue).
|
|
5087
|
-
return this.
|
|
5086
|
+
protoOf(MessageQueue).indexOf_gb589s_k$ = function (element) {
|
|
5087
|
+
return this.$$delegate_0__1.indexOf_si1fv9_k$(element);
|
|
5088
5088
|
};
|
|
5089
|
-
protoOf(MessageQueue).
|
|
5089
|
+
protoOf(MessageQueue).indexOf_si1fv9_k$ = function (element) {
|
|
5090
5090
|
if (!(!(element == null) ? isInterface(element, Runnable) : false))
|
|
5091
5091
|
return -1;
|
|
5092
|
-
return this.
|
|
5092
|
+
return this.indexOf_gb589s_k$((!(element == null) ? isInterface(element, Runnable) : false) ? element : THROW_CCE());
|
|
5093
5093
|
};
|
|
5094
|
-
protoOf(MessageQueue).
|
|
5095
|
-
return this.
|
|
5094
|
+
protoOf(MessageQueue).get_size_woubt6_k$ = function () {
|
|
5095
|
+
return this.$$delegate_0__1.size_1;
|
|
5096
5096
|
};
|
|
5097
5097
|
function WindowDispatcher(window_0) {
|
|
5098
5098
|
CoroutineDispatcher.call(this);
|
|
5099
|
-
this.
|
|
5100
|
-
this.
|
|
5099
|
+
this.window_1 = window_0;
|
|
5100
|
+
this.queue_1 = new WindowMessageQueue(this.window_1);
|
|
5101
5101
|
}
|
|
5102
|
-
protoOf(WindowDispatcher).
|
|
5103
|
-
return this.
|
|
5102
|
+
protoOf(WindowDispatcher).dispatch_qa3n0o_k$ = function (context, block) {
|
|
5103
|
+
return this.queue_1.enqueue_uiib2n_k$(block);
|
|
5104
5104
|
};
|
|
5105
5105
|
//region block: post-declaration
|
|
5106
|
-
protoOf(JobSupport).
|
|
5107
|
-
protoOf(JobSupport).
|
|
5108
|
-
protoOf(JobSupport).
|
|
5109
|
-
protoOf(JobSupport).
|
|
5110
|
-
protoOf(CoroutineDispatcher).
|
|
5111
|
-
protoOf(CoroutineDispatcher).
|
|
5106
|
+
protoOf(JobSupport).plus_s13ygv_k$ = plus;
|
|
5107
|
+
protoOf(JobSupport).get_y2st91_k$ = get_0;
|
|
5108
|
+
protoOf(JobSupport).fold_j2vaxd_k$ = fold;
|
|
5109
|
+
protoOf(JobSupport).minusKey_9i5ggf_k$ = minusKey_0;
|
|
5110
|
+
protoOf(CoroutineDispatcher).get_y2st91_k$ = get;
|
|
5111
|
+
protoOf(CoroutineDispatcher).minusKey_9i5ggf_k$ = minusKey;
|
|
5112
5112
|
defineProp(protoOf(DispatchException), 'cause', function () {
|
|
5113
|
-
return this.
|
|
5113
|
+
return this.get_cause_iplhs0_k$();
|
|
5114
5114
|
});
|
|
5115
5115
|
//endregion
|
|
5116
5116
|
//region block: init
|