@glandais/vcyclist-elevation 1.0.0 → 1.1.1
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 +46 -2
- package/kotlin-kotlin-stdlib.js +136 -46
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +17 -17
- package/kotlinx-coroutines-core.js +994 -994
- package/package.json +4 -2
- package/vcyclist-elevation.js +784 -535
- package/vcyclist-elevation.js.map +1 -1
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
//region block: imports
|
|
18
18
|
var imul = Math.imul;
|
|
19
19
|
var Unit_instance = kotlin_kotlin.$_$.e;
|
|
20
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
20
|
+
var protoOf = kotlin_kotlin.$_$.p3;
|
|
21
21
|
var Element = kotlin_kotlin.$_$.f2;
|
|
22
22
|
var Continuation = kotlin_kotlin.$_$.b2;
|
|
23
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
23
|
+
var initMetadataForClass = kotlin_kotlin.$_$.e3;
|
|
24
24
|
var VOID = kotlin_kotlin.$_$.a;
|
|
25
|
-
var toString = kotlin_kotlin.$_$.
|
|
25
|
+
var toString = kotlin_kotlin.$_$.q3;
|
|
26
26
|
var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
|
|
27
27
|
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.j2;
|
|
28
28
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.g;
|
|
@@ -34,23 +34,23 @@
|
|
|
34
34
|
var copyToArray = kotlin_kotlin.$_$.k1;
|
|
35
35
|
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.s1;
|
|
36
36
|
var emptyList = kotlin_kotlin.$_$.l1;
|
|
37
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
37
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.g3;
|
|
38
38
|
var EmptyCoroutineContext_getInstance = kotlin_kotlin.$_$.c;
|
|
39
39
|
var createCoroutineUnintercepted = kotlin_kotlin.$_$.t1;
|
|
40
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
40
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.i3;
|
|
41
41
|
var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.x;
|
|
42
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
43
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
42
|
+
var isInterface = kotlin_kotlin.$_$.l3;
|
|
43
|
+
var THROW_CCE = kotlin_kotlin.$_$.d4;
|
|
44
44
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
45
|
-
var toString_0 = kotlin_kotlin.$_$.
|
|
46
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
47
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
45
|
+
var toString_0 = kotlin_kotlin.$_$.n4;
|
|
46
|
+
var initMetadataForObject = kotlin_kotlin.$_$.k3;
|
|
47
|
+
var hashCode = kotlin_kotlin.$_$.d3;
|
|
48
48
|
var equals = kotlin_kotlin.$_$.y2;
|
|
49
49
|
var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.b;
|
|
50
50
|
var CancellationException_init_$Create$ = kotlin_kotlin.$_$.l;
|
|
51
51
|
var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.z;
|
|
52
52
|
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.a1;
|
|
53
|
-
var createFailure = kotlin_kotlin.$_$.
|
|
53
|
+
var createFailure = kotlin_kotlin.$_$.h4;
|
|
54
54
|
var AbstractCoroutineContextKey = kotlin_kotlin.$_$.x1;
|
|
55
55
|
var Key_instance = kotlin_kotlin.$_$.b;
|
|
56
56
|
var AbstractCoroutineContextElement = kotlin_kotlin.$_$.w1;
|
|
@@ -58,19 +58,19 @@
|
|
|
58
58
|
var minusKey = kotlin_kotlin.$_$.z1;
|
|
59
59
|
var ContinuationInterceptor = kotlin_kotlin.$_$.a2;
|
|
60
60
|
var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.w;
|
|
61
|
-
var addSuppressed = kotlin_kotlin.$_$.
|
|
62
|
-
var Enum = kotlin_kotlin.$_$.
|
|
61
|
+
var addSuppressed = kotlin_kotlin.$_$.g4;
|
|
62
|
+
var Enum = kotlin_kotlin.$_$.y3;
|
|
63
63
|
var startCoroutine = kotlin_kotlin.$_$.i2;
|
|
64
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
65
|
-
var Long = kotlin_kotlin.$_$.
|
|
64
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.l4;
|
|
65
|
+
var Long = kotlin_kotlin.$_$.b4;
|
|
66
66
|
var ArrayDeque_init_$Create$ = kotlin_kotlin.$_$.f;
|
|
67
67
|
var compare = kotlin_kotlin.$_$.m2;
|
|
68
68
|
var add = kotlin_kotlin.$_$.l2;
|
|
69
69
|
var subtract = kotlin_kotlin.$_$.t2;
|
|
70
|
-
var RuntimeException = kotlin_kotlin.$_$.
|
|
70
|
+
var RuntimeException = kotlin_kotlin.$_$.c4;
|
|
71
71
|
var RuntimeException_init_$Init$ = kotlin_kotlin.$_$.v;
|
|
72
72
|
var captureStack = kotlin_kotlin.$_$.w2;
|
|
73
|
-
var Error_0 = kotlin_kotlin.$_$.
|
|
73
|
+
var Error_0 = kotlin_kotlin.$_$.z3;
|
|
74
74
|
var Error_init_$Init$ = kotlin_kotlin.$_$.o;
|
|
75
75
|
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.n;
|
|
76
76
|
var CancellationException = kotlin_kotlin.$_$.r1;
|
|
@@ -81,32 +81,32 @@
|
|
|
81
81
|
var fold = kotlin_kotlin.$_$.c2;
|
|
82
82
|
var minusKey_0 = kotlin_kotlin.$_$.e2;
|
|
83
83
|
var anyToString = kotlin_kotlin.$_$.v2;
|
|
84
|
-
var UnsupportedOperationException = kotlin_kotlin.$_$.
|
|
85
|
-
var ensureNotNull = kotlin_kotlin.$_$.
|
|
84
|
+
var UnsupportedOperationException = kotlin_kotlin.$_$.f4;
|
|
85
|
+
var ensureNotNull = kotlin_kotlin.$_$.i4;
|
|
86
86
|
var fromInt = kotlin_kotlin.$_$.q2;
|
|
87
|
-
var Exception = kotlin_kotlin.$_$.
|
|
87
|
+
var Exception = kotlin_kotlin.$_$.a4;
|
|
88
88
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.r;
|
|
89
89
|
var Exception_init_$Init$ = kotlin_kotlin.$_$.q;
|
|
90
90
|
var defineProp = kotlin_kotlin.$_$.x2;
|
|
91
91
|
var convertToInt = kotlin_kotlin.$_$.n2;
|
|
92
|
-
var toLongOrNull = kotlin_kotlin.$_$.
|
|
92
|
+
var toLongOrNull = kotlin_kotlin.$_$.x3;
|
|
93
93
|
var startCoroutineUninterceptedOrReturnNonGeneratorVersion = kotlin_kotlin.$_$.v1;
|
|
94
|
-
var Unit = kotlin_kotlin.$_$.
|
|
94
|
+
var Unit = kotlin_kotlin.$_$.e4;
|
|
95
95
|
var divide = kotlin_kotlin.$_$.o2;
|
|
96
96
|
var modulo = kotlin_kotlin.$_$.r2;
|
|
97
97
|
var atomic$long$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.c;
|
|
98
98
|
var atomicfu$AtomicRefArray$ofNulls = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.a;
|
|
99
|
-
var getKClassFromExpression = kotlin_kotlin.$_$.
|
|
99
|
+
var getKClassFromExpression = kotlin_kotlin.$_$.u3;
|
|
100
100
|
var Exception_init_$Create$ = kotlin_kotlin.$_$.p;
|
|
101
101
|
var CancellationException_init_$Init$ = kotlin_kotlin.$_$.m;
|
|
102
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
102
|
+
var getStringHashCode = kotlin_kotlin.$_$.c3;
|
|
103
103
|
var HashSet_init_$Create$ = kotlin_kotlin.$_$.i;
|
|
104
104
|
var RuntimeException_init_$Init$_0 = kotlin_kotlin.$_$.u;
|
|
105
105
|
var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.k;
|
|
106
|
-
var stackTraceToString = kotlin_kotlin.$_$.
|
|
106
|
+
var stackTraceToString = kotlin_kotlin.$_$.m4;
|
|
107
107
|
var removeFirstOrNull = kotlin_kotlin.$_$.o1;
|
|
108
|
-
var KtList = kotlin_kotlin.$_$.d1;
|
|
109
108
|
var Collection = kotlin_kotlin.$_$.c1;
|
|
109
|
+
var KtList = kotlin_kotlin.$_$.d1;
|
|
110
110
|
//endregion
|
|
111
111
|
//region block: pre-declaration
|
|
112
112
|
initMetadataForInterface(ParentJob, 'ParentJob', VOID, VOID, [Element], [0]);
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
initMetadataForClass(SemaphoreSegment, 'SemaphoreSegment', VOID, Segment);
|
|
183
183
|
initMetadataForClass(SetTimeoutBasedDispatcher, 'SetTimeoutBasedDispatcher', VOID, CoroutineDispatcher, VOID, [1]);
|
|
184
184
|
initMetadataForObject(NodeDispatcher, 'NodeDispatcher', VOID, SetTimeoutBasedDispatcher, VOID, [1]);
|
|
185
|
-
initMetadataForClass(MessageQueue, 'MessageQueue', VOID, VOID, [
|
|
185
|
+
initMetadataForClass(MessageQueue, 'MessageQueue', VOID, VOID, [Collection, KtList]);
|
|
186
186
|
initMetadataForClass(ScheduledMessageQueue, 'ScheduledMessageQueue', VOID, MessageQueue);
|
|
187
187
|
initMetadataForClass(WindowMessageQueue, 'WindowMessageQueue', VOID, MessageQueue);
|
|
188
188
|
initMetadataForObject(Dispatchers, 'Dispatchers');
|
|
@@ -198,58 +198,58 @@
|
|
|
198
198
|
function AbstractCoroutine(parentContext, initParentJob, active) {
|
|
199
199
|
JobSupport.call(this, active);
|
|
200
200
|
if (initParentJob) {
|
|
201
|
-
this.
|
|
201
|
+
this.fa(parentContext.n5(Key_instance_2));
|
|
202
202
|
}
|
|
203
|
-
this.
|
|
203
|
+
this.ia_1 = parentContext.s8(this);
|
|
204
204
|
}
|
|
205
205
|
protoOf(AbstractCoroutine).g5 = function () {
|
|
206
|
-
return this.
|
|
206
|
+
return this.ia_1;
|
|
207
207
|
};
|
|
208
|
-
protoOf(AbstractCoroutine).
|
|
209
|
-
return this.
|
|
208
|
+
protoOf(AbstractCoroutine).ja = function () {
|
|
209
|
+
return this.ia_1;
|
|
210
210
|
};
|
|
211
|
-
protoOf(AbstractCoroutine).
|
|
212
|
-
return protoOf(JobSupport).
|
|
211
|
+
protoOf(AbstractCoroutine).ka = function () {
|
|
212
|
+
return protoOf(JobSupport).ka.call(this);
|
|
213
213
|
};
|
|
214
|
-
protoOf(AbstractCoroutine).
|
|
214
|
+
protoOf(AbstractCoroutine).la = function (value) {
|
|
215
215
|
};
|
|
216
|
-
protoOf(AbstractCoroutine).
|
|
216
|
+
protoOf(AbstractCoroutine).ma = function (cause, handled) {
|
|
217
217
|
};
|
|
218
|
-
protoOf(AbstractCoroutine).
|
|
218
|
+
protoOf(AbstractCoroutine).na = function () {
|
|
219
219
|
return get_classSimpleName(this) + ' was cancelled';
|
|
220
220
|
};
|
|
221
|
-
protoOf(AbstractCoroutine).
|
|
221
|
+
protoOf(AbstractCoroutine).oa = function (state) {
|
|
222
222
|
if (state instanceof CompletedExceptionally) {
|
|
223
|
-
this.
|
|
223
|
+
this.ma(state.pa_1, state.ra());
|
|
224
224
|
} else {
|
|
225
|
-
this.
|
|
225
|
+
this.la(state);
|
|
226
226
|
}
|
|
227
227
|
};
|
|
228
228
|
protoOf(AbstractCoroutine).l5 = function (result) {
|
|
229
|
-
var state = this.
|
|
229
|
+
var state = this.sa(toState_0(result));
|
|
230
230
|
if (state === get_COMPLETING_WAITING_CHILDREN())
|
|
231
231
|
return Unit_instance;
|
|
232
|
-
this.
|
|
232
|
+
this.ta(state);
|
|
233
233
|
};
|
|
234
|
-
protoOf(AbstractCoroutine).
|
|
235
|
-
return this.
|
|
234
|
+
protoOf(AbstractCoroutine).ta = function (state) {
|
|
235
|
+
return this.ua(state);
|
|
236
236
|
};
|
|
237
|
-
protoOf(AbstractCoroutine).
|
|
238
|
-
handleCoroutineException(this.
|
|
237
|
+
protoOf(AbstractCoroutine).va = function (exception) {
|
|
238
|
+
handleCoroutineException(this.ia_1, exception);
|
|
239
239
|
};
|
|
240
|
-
protoOf(AbstractCoroutine).
|
|
241
|
-
var tmp0_elvis_lhs = get_coroutineName(this.
|
|
240
|
+
protoOf(AbstractCoroutine).wa = function () {
|
|
241
|
+
var tmp0_elvis_lhs = get_coroutineName(this.ia_1);
|
|
242
242
|
var tmp;
|
|
243
243
|
if (tmp0_elvis_lhs == null) {
|
|
244
|
-
return protoOf(JobSupport).
|
|
244
|
+
return protoOf(JobSupport).wa.call(this);
|
|
245
245
|
} else {
|
|
246
246
|
tmp = tmp0_elvis_lhs;
|
|
247
247
|
}
|
|
248
248
|
var coroutineName = tmp;
|
|
249
|
-
return '"' + coroutineName + '":' + protoOf(JobSupport).
|
|
249
|
+
return '"' + coroutineName + '":' + protoOf(JobSupport).wa.call(this);
|
|
250
250
|
};
|
|
251
|
-
protoOf(AbstractCoroutine).
|
|
252
|
-
start.
|
|
251
|
+
protoOf(AbstractCoroutine).xa = function (start, receiver, block) {
|
|
252
|
+
start.ab(block, receiver, this);
|
|
253
253
|
};
|
|
254
254
|
function awaitAll(_this__u8e3s4, $completion) {
|
|
255
255
|
var tmp = new $awaitAllCOROUTINE$(_this__u8e3s4, $completion);
|
|
@@ -258,65 +258,65 @@
|
|
|
258
258
|
return tmp.i5();
|
|
259
259
|
}
|
|
260
260
|
function DisposeHandlersOnCancel($outer, nodes) {
|
|
261
|
-
this.
|
|
262
|
-
this.
|
|
261
|
+
this.oc_1 = $outer;
|
|
262
|
+
this.nc_1 = nodes;
|
|
263
263
|
}
|
|
264
|
-
protoOf(DisposeHandlersOnCancel).
|
|
264
|
+
protoOf(DisposeHandlersOnCancel).pc = function () {
|
|
265
265
|
// Inline function 'kotlin.collections.forEach' call
|
|
266
|
-
var indexedObject = this.
|
|
266
|
+
var indexedObject = this.nc_1;
|
|
267
267
|
var inductionVariable = 0;
|
|
268
268
|
var last = indexedObject.length;
|
|
269
269
|
while (inductionVariable < last) {
|
|
270
270
|
var element = indexedObject[inductionVariable];
|
|
271
271
|
inductionVariable = inductionVariable + 1 | 0;
|
|
272
|
-
element.
|
|
272
|
+
element.yc().zc();
|
|
273
273
|
}
|
|
274
274
|
};
|
|
275
|
-
protoOf(DisposeHandlersOnCancel).
|
|
276
|
-
this.
|
|
275
|
+
protoOf(DisposeHandlersOnCancel).ad = function (cause) {
|
|
276
|
+
this.pc();
|
|
277
277
|
};
|
|
278
278
|
protoOf(DisposeHandlersOnCancel).toString = function () {
|
|
279
|
-
return 'DisposeHandlersOnCancel[' + toString(this.
|
|
279
|
+
return 'DisposeHandlersOnCancel[' + toString(this.nc_1) + ']';
|
|
280
280
|
};
|
|
281
281
|
function AwaitAllNode($outer, continuation) {
|
|
282
|
-
this.
|
|
282
|
+
this.xc_1 = $outer;
|
|
283
283
|
JobNode.call(this);
|
|
284
|
-
this.
|
|
285
|
-
this.
|
|
284
|
+
this.uc_1 = continuation;
|
|
285
|
+
this.wc_1 = atomic$ref$1(null);
|
|
286
286
|
}
|
|
287
|
-
protoOf(AwaitAllNode).
|
|
288
|
-
var tmp = this.
|
|
287
|
+
protoOf(AwaitAllNode).yc = function () {
|
|
288
|
+
var tmp = this.vc_1;
|
|
289
289
|
if (!(tmp == null))
|
|
290
290
|
return tmp;
|
|
291
291
|
else {
|
|
292
292
|
throwUninitializedPropertyAccessException('handle');
|
|
293
293
|
}
|
|
294
294
|
};
|
|
295
|
-
protoOf(AwaitAllNode).
|
|
296
|
-
this.
|
|
295
|
+
protoOf(AwaitAllNode).bd = function (value) {
|
|
296
|
+
this.wc_1.kotlinx$atomicfu$value = value;
|
|
297
297
|
};
|
|
298
|
-
protoOf(AwaitAllNode).
|
|
299
|
-
return this.
|
|
298
|
+
protoOf(AwaitAllNode).cd = function () {
|
|
299
|
+
return this.wc_1.kotlinx$atomicfu$value;
|
|
300
300
|
};
|
|
301
|
-
protoOf(AwaitAllNode).
|
|
301
|
+
protoOf(AwaitAllNode).dd = function () {
|
|
302
302
|
return false;
|
|
303
303
|
};
|
|
304
|
-
protoOf(AwaitAllNode).
|
|
304
|
+
protoOf(AwaitAllNode).ad = function (cause) {
|
|
305
305
|
if (!(cause == null)) {
|
|
306
|
-
var token = this.
|
|
306
|
+
var token = this.uc_1.hd(cause);
|
|
307
307
|
if (!(token == null)) {
|
|
308
|
-
this.
|
|
309
|
-
var tmp0_safe_receiver = this.
|
|
308
|
+
this.uc_1.id(token);
|
|
309
|
+
var tmp0_safe_receiver = this.cd();
|
|
310
310
|
if (tmp0_safe_receiver == null)
|
|
311
311
|
null;
|
|
312
312
|
else {
|
|
313
|
-
tmp0_safe_receiver.
|
|
313
|
+
tmp0_safe_receiver.pc();
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
-
} else if (this.
|
|
317
|
-
var tmp0 = this.
|
|
316
|
+
} else if (this.xc_1.fd_1.atomicfu$decrementAndGet() === 0) {
|
|
317
|
+
var tmp0 = this.uc_1;
|
|
318
318
|
// Inline function 'kotlin.collections.map' call
|
|
319
|
-
var this_0 = this.
|
|
319
|
+
var this_0 = this.xc_1.ed_1;
|
|
320
320
|
// Inline function 'kotlin.collections.mapTo' call
|
|
321
321
|
var destination = ArrayList_init_$Create$(this_0.length);
|
|
322
322
|
var inductionVariable = 0;
|
|
@@ -324,7 +324,7 @@
|
|
|
324
324
|
while (inductionVariable < last) {
|
|
325
325
|
var item = this_0[inductionVariable];
|
|
326
326
|
inductionVariable = inductionVariable + 1 | 0;
|
|
327
|
-
var tmp$ret$2 = item.
|
|
327
|
+
var tmp$ret$2 = item.gd();
|
|
328
328
|
destination.l(tmp$ret$2);
|
|
329
329
|
}
|
|
330
330
|
// Inline function 'kotlin.coroutines.resume' call
|
|
@@ -334,23 +334,23 @@
|
|
|
334
334
|
}
|
|
335
335
|
};
|
|
336
336
|
function AwaitAll(deferreds) {
|
|
337
|
-
this.
|
|
338
|
-
this.
|
|
337
|
+
this.ed_1 = deferreds;
|
|
338
|
+
this.fd_1 = atomic$int$1(this.ed_1.length);
|
|
339
339
|
}
|
|
340
|
-
protoOf(AwaitAll).
|
|
340
|
+
protoOf(AwaitAll).vd = function ($completion) {
|
|
341
341
|
var cancellable = new CancellableContinuationImpl(intercepted($completion), 1);
|
|
342
|
-
cancellable.
|
|
342
|
+
cancellable.ce();
|
|
343
343
|
var tmp = 0;
|
|
344
|
-
var tmp_0 = this.
|
|
344
|
+
var tmp_0 = this.ed_1.length;
|
|
345
345
|
// Inline function 'kotlin.arrayOfNulls' call
|
|
346
346
|
var tmp_1 = Array(tmp_0);
|
|
347
347
|
while (tmp < tmp_0) {
|
|
348
348
|
var tmp_2 = tmp;
|
|
349
|
-
var deferred = this.
|
|
350
|
-
deferred.
|
|
349
|
+
var deferred = this.ed_1[tmp_2];
|
|
350
|
+
deferred.fb();
|
|
351
351
|
// Inline function 'kotlin.apply' call
|
|
352
352
|
var this_0 = new AwaitAllNode(this, cancellable);
|
|
353
|
-
this_0.
|
|
353
|
+
this_0.vc_1 = invokeOnCompletion(deferred, VOID, this_0);
|
|
354
354
|
tmp_1[tmp_2] = this_0;
|
|
355
355
|
tmp = tmp + 1 | 0;
|
|
356
356
|
}
|
|
@@ -362,18 +362,18 @@
|
|
|
362
362
|
while (inductionVariable < last) {
|
|
363
363
|
var element = nodes[inductionVariable];
|
|
364
364
|
inductionVariable = inductionVariable + 1 | 0;
|
|
365
|
-
element.
|
|
365
|
+
element.bd(disposer);
|
|
366
366
|
}
|
|
367
|
-
if (cancellable.
|
|
368
|
-
disposer.
|
|
367
|
+
if (cancellable.eb()) {
|
|
368
|
+
disposer.pc();
|
|
369
369
|
} else {
|
|
370
370
|
invokeOnCancellation(cancellable, disposer);
|
|
371
371
|
}
|
|
372
|
-
return cancellable.
|
|
372
|
+
return cancellable.de();
|
|
373
373
|
};
|
|
374
374
|
function $awaitAllCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
375
375
|
CoroutineImpl.call(this, resultContinuation);
|
|
376
|
-
this.
|
|
376
|
+
this.lc_1 = _this__u8e3s4;
|
|
377
377
|
}
|
|
378
378
|
protoOf($awaitAllCOROUTINE$).i5 = function () {
|
|
379
379
|
var suspendResult = this.c5_1;
|
|
@@ -383,14 +383,14 @@
|
|
|
383
383
|
switch (tmp) {
|
|
384
384
|
case 0:
|
|
385
385
|
this.b5_1 = 3;
|
|
386
|
-
if (this.
|
|
387
|
-
this.
|
|
386
|
+
if (this.lc_1.n()) {
|
|
387
|
+
this.mc_1 = emptyList();
|
|
388
388
|
this.a5_1 = 2;
|
|
389
389
|
continue $sm;
|
|
390
390
|
} else {
|
|
391
391
|
this.a5_1 = 1;
|
|
392
|
-
var this_0 = this.
|
|
393
|
-
suspendResult = (new AwaitAll(copyToArray(this_0))).
|
|
392
|
+
var this_0 = this.lc_1;
|
|
393
|
+
suspendResult = (new AwaitAll(copyToArray(this_0))).vd(this);
|
|
394
394
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
395
395
|
return suspendResult;
|
|
396
396
|
}
|
|
@@ -398,11 +398,11 @@
|
|
|
398
398
|
}
|
|
399
399
|
|
|
400
400
|
case 1:
|
|
401
|
-
this.
|
|
401
|
+
this.mc_1 = suspendResult;
|
|
402
402
|
this.a5_1 = 2;
|
|
403
403
|
continue $sm;
|
|
404
404
|
case 2:
|
|
405
|
-
return this.
|
|
405
|
+
return this.mc_1;
|
|
406
406
|
case 3:
|
|
407
407
|
throw this.d5_1;
|
|
408
408
|
}
|
|
@@ -421,13 +421,13 @@
|
|
|
421
421
|
context = context === VOID ? EmptyCoroutineContext_getInstance() : context;
|
|
422
422
|
start = start === VOID ? CoroutineStart_DEFAULT_getInstance() : start;
|
|
423
423
|
var newContext = newCoroutineContext(_this__u8e3s4, context);
|
|
424
|
-
var coroutine = start.
|
|
425
|
-
coroutine.
|
|
424
|
+
var coroutine = start.ee() ? new LazyDeferredCoroutine(newContext, block) : new DeferredCoroutine(newContext, true);
|
|
425
|
+
coroutine.xa(start, coroutine, block);
|
|
426
426
|
return coroutine;
|
|
427
427
|
}
|
|
428
428
|
function $awaitCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
429
429
|
CoroutineImpl.call(this, resultContinuation);
|
|
430
|
-
this.
|
|
430
|
+
this.ne_1 = _this__u8e3s4;
|
|
431
431
|
}
|
|
432
432
|
protoOf($awaitCOROUTINE$).i5 = function () {
|
|
433
433
|
var suspendResult = this.c5_1;
|
|
@@ -438,7 +438,7 @@
|
|
|
438
438
|
case 0:
|
|
439
439
|
this.b5_1 = 2;
|
|
440
440
|
this.a5_1 = 1;
|
|
441
|
-
suspendResult = this.
|
|
441
|
+
suspendResult = this.ne_1.cc(this);
|
|
442
442
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
443
443
|
return suspendResult;
|
|
444
444
|
}
|
|
@@ -463,10 +463,10 @@
|
|
|
463
463
|
function DeferredCoroutine(parentContext, active) {
|
|
464
464
|
AbstractCoroutine.call(this, parentContext, true, active);
|
|
465
465
|
}
|
|
466
|
-
protoOf(DeferredCoroutine).
|
|
467
|
-
return this.
|
|
466
|
+
protoOf(DeferredCoroutine).gd = function () {
|
|
467
|
+
return this.bc();
|
|
468
468
|
};
|
|
469
|
-
protoOf(DeferredCoroutine).
|
|
469
|
+
protoOf(DeferredCoroutine).re = function ($completion) {
|
|
470
470
|
var tmp = new $awaitCOROUTINE$(this, $completion);
|
|
471
471
|
tmp.c5_1 = Unit_instance;
|
|
472
472
|
tmp.d5_1 = null;
|
|
@@ -474,10 +474,10 @@
|
|
|
474
474
|
};
|
|
475
475
|
function LazyDeferredCoroutine(parentContext, block) {
|
|
476
476
|
DeferredCoroutine.call(this, parentContext, false);
|
|
477
|
-
this.
|
|
477
|
+
this.ve_1 = createCoroutineUnintercepted(block, this, this);
|
|
478
478
|
}
|
|
479
|
-
protoOf(LazyDeferredCoroutine).
|
|
480
|
-
startCoroutineCancellable(this.
|
|
479
|
+
protoOf(LazyDeferredCoroutine).gb = function () {
|
|
480
|
+
startCoroutineCancellable(this.ve_1, this);
|
|
481
481
|
};
|
|
482
482
|
function CancellableContinuation() {
|
|
483
483
|
}
|
|
@@ -487,7 +487,7 @@
|
|
|
487
487
|
function invokeOnCancellation(_this__u8e3s4, handler) {
|
|
488
488
|
var tmp;
|
|
489
489
|
if (_this__u8e3s4 instanceof CancellableContinuationImpl) {
|
|
490
|
-
_this__u8e3s4.
|
|
490
|
+
_this__u8e3s4.ye(handler);
|
|
491
491
|
tmp = Unit_instance;
|
|
492
492
|
} else {
|
|
493
493
|
throw UnsupportedOperationException_init_$Create$('third-party implementation of CancellableContinuation is not supported');
|
|
@@ -495,26 +495,26 @@
|
|
|
495
495
|
return tmp;
|
|
496
496
|
}
|
|
497
497
|
function DisposeOnCancel(handle) {
|
|
498
|
-
this.
|
|
498
|
+
this.ze_1 = handle;
|
|
499
499
|
}
|
|
500
|
-
protoOf(DisposeOnCancel).
|
|
501
|
-
return this.
|
|
500
|
+
protoOf(DisposeOnCancel).ad = function (cause) {
|
|
501
|
+
return this.ze_1.zc();
|
|
502
502
|
};
|
|
503
503
|
protoOf(DisposeOnCancel).toString = function () {
|
|
504
|
-
return 'DisposeOnCancel[' + toString(this.
|
|
504
|
+
return 'DisposeOnCancel[' + toString(this.ze_1) + ']';
|
|
505
505
|
};
|
|
506
506
|
function getOrCreateCancellableContinuation(delegate) {
|
|
507
507
|
if (!(delegate instanceof DispatchedContinuation)) {
|
|
508
508
|
return new CancellableContinuationImpl(delegate, 1);
|
|
509
509
|
}
|
|
510
|
-
var tmp0_safe_receiver = delegate.
|
|
510
|
+
var tmp0_safe_receiver = delegate.gf();
|
|
511
511
|
var tmp;
|
|
512
512
|
if (tmp0_safe_receiver == null) {
|
|
513
513
|
tmp = null;
|
|
514
514
|
} else {
|
|
515
515
|
// Inline function 'kotlin.takeIf' call
|
|
516
516
|
var tmp_0;
|
|
517
|
-
if (tmp0_safe_receiver.
|
|
517
|
+
if (tmp0_safe_receiver.hf()) {
|
|
518
518
|
tmp_0 = tmp0_safe_receiver;
|
|
519
519
|
} else {
|
|
520
520
|
tmp_0 = null;
|
|
@@ -536,10 +536,10 @@
|
|
|
536
536
|
}
|
|
537
537
|
var RESUME_TOKEN;
|
|
538
538
|
function _get_parentHandle__f8dcex($this) {
|
|
539
|
-
return $this.
|
|
539
|
+
return $this.be_1.kotlinx$atomicfu$value;
|
|
540
540
|
}
|
|
541
541
|
function _get_stateDebugRepresentation__bf18u4($this) {
|
|
542
|
-
var tmp0_subject = $this.
|
|
542
|
+
var tmp0_subject = $this.db();
|
|
543
543
|
var tmp;
|
|
544
544
|
if (!(tmp0_subject == null) ? isInterface(tmp0_subject, NotCompleted) : false) {
|
|
545
545
|
tmp = 'Active';
|
|
@@ -554,9 +554,9 @@
|
|
|
554
554
|
}
|
|
555
555
|
function isReusable($this) {
|
|
556
556
|
var tmp;
|
|
557
|
-
if (get_isReusableMode($this.
|
|
558
|
-
var tmp_0 = $this.
|
|
559
|
-
tmp = (tmp_0 instanceof DispatchedContinuation ? tmp_0 : THROW_CCE()).
|
|
557
|
+
if (get_isReusableMode($this.jf_1)) {
|
|
558
|
+
var tmp_0 = $this.xd_1;
|
|
559
|
+
tmp = (tmp_0 instanceof DispatchedContinuation ? tmp_0 : THROW_CCE()).if();
|
|
560
560
|
} else {
|
|
561
561
|
tmp = false;
|
|
562
562
|
}
|
|
@@ -565,13 +565,13 @@
|
|
|
565
565
|
function cancelLater($this, cause) {
|
|
566
566
|
if (!isReusable($this))
|
|
567
567
|
return false;
|
|
568
|
-
var tmp = $this.
|
|
568
|
+
var tmp = $this.xd_1;
|
|
569
569
|
var dispatched = tmp instanceof DispatchedContinuation ? tmp : THROW_CCE();
|
|
570
|
-
return dispatched.
|
|
570
|
+
return dispatched.kf(cause);
|
|
571
571
|
}
|
|
572
572
|
function callSegmentOnCancellation($this, segment, cause) {
|
|
573
573
|
// Inline function 'kotlinx.coroutines.index' call
|
|
574
|
-
var index = $this.
|
|
574
|
+
var index = $this.zd_1.kotlinx$atomicfu$value & 536870911;
|
|
575
575
|
// Inline function 'kotlin.check' call
|
|
576
576
|
if (!!(index === 536870911)) {
|
|
577
577
|
var message = 'The index for Segment.onCancellation(..) is broken';
|
|
@@ -579,7 +579,7 @@
|
|
|
579
579
|
}
|
|
580
580
|
// Inline function 'kotlinx.coroutines.CancellableContinuationImpl.callCancelHandlerSafely' call
|
|
581
581
|
try {
|
|
582
|
-
segment.
|
|
582
|
+
segment.pf(index, cause, $this.g5());
|
|
583
583
|
} catch ($p) {
|
|
584
584
|
if ($p instanceof Error) {
|
|
585
585
|
var ex = $p;
|
|
@@ -591,7 +591,7 @@
|
|
|
591
591
|
}
|
|
592
592
|
function trySuspend($this) {
|
|
593
593
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
594
|
-
var this_0 = $this.
|
|
594
|
+
var this_0 = $this.zd_1;
|
|
595
595
|
while (true) {
|
|
596
596
|
var cur = this_0.kotlinx$atomicfu$value;
|
|
597
597
|
// Inline function 'kotlinx.coroutines.decision' call
|
|
@@ -602,7 +602,7 @@
|
|
|
602
602
|
// Inline function 'kotlinx.coroutines.decisionAndIndex' call
|
|
603
603
|
|
|
604
604
|
var tmp$ret$4 = (1 << 29) + (cur & 536870911) | 0;
|
|
605
|
-
if ($this.
|
|
605
|
+
if ($this.zd_1.atomicfu$compareAndSet(cur, tmp$ret$4))
|
|
606
606
|
return true;
|
|
607
607
|
break;
|
|
608
608
|
case 2:
|
|
@@ -617,7 +617,7 @@
|
|
|
617
617
|
}
|
|
618
618
|
function tryResume($this) {
|
|
619
619
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
620
|
-
var this_0 = $this.
|
|
620
|
+
var this_0 = $this.zd_1;
|
|
621
621
|
while (true) {
|
|
622
622
|
var cur = this_0.kotlinx$atomicfu$value;
|
|
623
623
|
// Inline function 'kotlinx.coroutines.decision' call
|
|
@@ -628,7 +628,7 @@
|
|
|
628
628
|
// Inline function 'kotlinx.coroutines.decisionAndIndex' call
|
|
629
629
|
|
|
630
630
|
var tmp$ret$4 = (2 << 29) + (cur & 536870911) | 0;
|
|
631
|
-
if ($this.
|
|
631
|
+
if ($this.zd_1.atomicfu$compareAndSet(cur, tmp$ret$4))
|
|
632
632
|
return true;
|
|
633
633
|
break;
|
|
634
634
|
case 1:
|
|
@@ -651,17 +651,17 @@
|
|
|
651
651
|
}
|
|
652
652
|
var parent = tmp;
|
|
653
653
|
var handle = invokeOnCompletion(parent, VOID, new ChildContinuation($this));
|
|
654
|
-
$this.
|
|
654
|
+
$this.be_1.atomicfu$compareAndSet(null, handle);
|
|
655
655
|
return handle;
|
|
656
656
|
}
|
|
657
657
|
function invokeOnCancellationImpl($this, handler) {
|
|
658
658
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
659
659
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
660
|
-
var this_0 = $this.
|
|
660
|
+
var this_0 = $this.ae_1;
|
|
661
661
|
while (true) {
|
|
662
662
|
var state = this_0.kotlinx$atomicfu$value;
|
|
663
663
|
if (state instanceof Active) {
|
|
664
|
-
if ($this.
|
|
664
|
+
if ($this.ae_1.atomicfu$compareAndSet(state, handler))
|
|
665
665
|
return Unit_instance;
|
|
666
666
|
} else {
|
|
667
667
|
var tmp;
|
|
@@ -674,14 +674,14 @@
|
|
|
674
674
|
multipleHandlersError($this, handler, state);
|
|
675
675
|
} else {
|
|
676
676
|
if (state instanceof CompletedExceptionally) {
|
|
677
|
-
if (!state.
|
|
677
|
+
if (!state.yf()) {
|
|
678
678
|
multipleHandlersError($this, handler, state);
|
|
679
679
|
}
|
|
680
680
|
if (state instanceof CancelledContinuation) {
|
|
681
681
|
var tmp1_safe_receiver = state instanceof CompletedExceptionally ? state : null;
|
|
682
|
-
var cause = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
682
|
+
var cause = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.pa_1;
|
|
683
683
|
if (isInterface(handler, CancelHandler)) {
|
|
684
|
-
$this.
|
|
684
|
+
$this.vf(handler, cause);
|
|
685
685
|
} else {
|
|
686
686
|
var segment = handler instanceof Segment ? handler : THROW_CCE();
|
|
687
687
|
callSegmentOnCancellation($this, segment, cause);
|
|
@@ -690,19 +690,19 @@
|
|
|
690
690
|
return Unit_instance;
|
|
691
691
|
} else {
|
|
692
692
|
if (state instanceof CompletedContinuation) {
|
|
693
|
-
if (!(state.
|
|
693
|
+
if (!(state.rf_1 == null)) {
|
|
694
694
|
multipleHandlersError($this, handler, state);
|
|
695
695
|
}
|
|
696
696
|
if (handler instanceof Segment)
|
|
697
697
|
return Unit_instance;
|
|
698
698
|
if (!isInterface(handler, CancelHandler))
|
|
699
699
|
THROW_CCE();
|
|
700
|
-
if (state.
|
|
701
|
-
$this.
|
|
700
|
+
if (state.wf()) {
|
|
701
|
+
$this.vf(handler, state.uf_1);
|
|
702
702
|
return Unit_instance;
|
|
703
703
|
}
|
|
704
|
-
var update = state.
|
|
705
|
-
if ($this.
|
|
704
|
+
var update = state.xf(VOID, handler);
|
|
705
|
+
if ($this.ae_1.atomicfu$compareAndSet(state, update))
|
|
706
706
|
return Unit_instance;
|
|
707
707
|
} else {
|
|
708
708
|
if (handler instanceof Segment)
|
|
@@ -710,7 +710,7 @@
|
|
|
710
710
|
if (!isInterface(handler, CancelHandler))
|
|
711
711
|
THROW_CCE();
|
|
712
712
|
var update_0 = new CompletedContinuation(state, handler);
|
|
713
|
-
if ($this.
|
|
713
|
+
if ($this.ae_1.atomicfu$compareAndSet(state, update_0))
|
|
714
714
|
return Unit_instance;
|
|
715
715
|
}
|
|
716
716
|
}
|
|
@@ -761,13 +761,13 @@
|
|
|
761
761
|
}
|
|
762
762
|
function tryResumeImpl($this, proposedUpdate, idempotent, onCancellation) {
|
|
763
763
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
764
|
-
var this_0 = $this.
|
|
764
|
+
var this_0 = $this.ae_1;
|
|
765
765
|
while (true) {
|
|
766
766
|
var tmp0 = this_0.kotlinx$atomicfu$value;
|
|
767
767
|
$l$block: {
|
|
768
768
|
if (!(tmp0 == null) ? isInterface(tmp0, NotCompleted) : false) {
|
|
769
|
-
var update = resumedState($this, tmp0, proposedUpdate, $this.
|
|
770
|
-
if (!$this.
|
|
769
|
+
var update = resumedState($this, tmp0, proposedUpdate, $this.jf_1, onCancellation, idempotent);
|
|
770
|
+
if (!$this.ae_1.atomicfu$compareAndSet(tmp0, update)) {
|
|
771
771
|
break $l$block;
|
|
772
772
|
}
|
|
773
773
|
detachChildIfNonReusable($this);
|
|
@@ -775,7 +775,7 @@
|
|
|
775
775
|
} else {
|
|
776
776
|
if (tmp0 instanceof CompletedContinuation) {
|
|
777
777
|
var tmp;
|
|
778
|
-
if (!(idempotent == null) && tmp0.
|
|
778
|
+
if (!(idempotent == null) && tmp0.tf_1 === idempotent) {
|
|
779
779
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
780
780
|
tmp = get_RESUME_TOKEN();
|
|
781
781
|
} else {
|
|
@@ -796,7 +796,7 @@
|
|
|
796
796
|
}
|
|
797
797
|
function detachChildIfNonReusable($this) {
|
|
798
798
|
if (!isReusable($this)) {
|
|
799
|
-
$this.
|
|
799
|
+
$this.zf();
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
function CancellableContinuationImpl$resume$lambda($onCancellation) {
|
|
@@ -807,30 +807,30 @@
|
|
|
807
807
|
}
|
|
808
808
|
function CancellableContinuationImpl(delegate, resumeMode) {
|
|
809
809
|
DispatchedTask.call(this, resumeMode);
|
|
810
|
-
this.
|
|
810
|
+
this.xd_1 = delegate;
|
|
811
811
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
812
|
-
this.
|
|
812
|
+
this.yd_1 = this.xd_1.g5();
|
|
813
813
|
var tmp = this;
|
|
814
814
|
// Inline function 'kotlinx.coroutines.decisionAndIndex' call
|
|
815
815
|
var tmp$ret$1 = (0 << 29) + 536870911 | 0;
|
|
816
|
-
tmp.
|
|
817
|
-
this.
|
|
818
|
-
this.
|
|
816
|
+
tmp.zd_1 = atomic$int$1(tmp$ret$1);
|
|
817
|
+
this.ae_1 = atomic$ref$1(Active_instance);
|
|
818
|
+
this.be_1 = atomic$ref$1(null);
|
|
819
819
|
}
|
|
820
|
-
protoOf(CancellableContinuationImpl).
|
|
821
|
-
return this.
|
|
820
|
+
protoOf(CancellableContinuationImpl).ag = function () {
|
|
821
|
+
return this.xd_1;
|
|
822
822
|
};
|
|
823
823
|
protoOf(CancellableContinuationImpl).g5 = function () {
|
|
824
|
-
return this.
|
|
824
|
+
return this.yd_1;
|
|
825
825
|
};
|
|
826
|
-
protoOf(CancellableContinuationImpl).
|
|
827
|
-
return this.
|
|
826
|
+
protoOf(CancellableContinuationImpl).db = function () {
|
|
827
|
+
return this.ae_1.kotlinx$atomicfu$value;
|
|
828
828
|
};
|
|
829
|
-
protoOf(CancellableContinuationImpl).
|
|
830
|
-
var tmp = this.
|
|
829
|
+
protoOf(CancellableContinuationImpl).eb = function () {
|
|
830
|
+
var tmp = this.db();
|
|
831
831
|
return !(!(tmp == null) ? isInterface(tmp, NotCompleted) : false);
|
|
832
832
|
};
|
|
833
|
-
protoOf(CancellableContinuationImpl).
|
|
833
|
+
protoOf(CancellableContinuationImpl).ce = function () {
|
|
834
834
|
var tmp0_elvis_lhs = installParentHandle(this);
|
|
835
835
|
var tmp;
|
|
836
836
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -839,39 +839,39 @@
|
|
|
839
839
|
tmp = tmp0_elvis_lhs;
|
|
840
840
|
}
|
|
841
841
|
var handle = tmp;
|
|
842
|
-
if (this.
|
|
843
|
-
handle.
|
|
844
|
-
this.
|
|
842
|
+
if (this.eb()) {
|
|
843
|
+
handle.zc();
|
|
844
|
+
this.be_1.kotlinx$atomicfu$value = NonDisposableHandle_instance;
|
|
845
845
|
}
|
|
846
846
|
};
|
|
847
|
-
protoOf(CancellableContinuationImpl).
|
|
847
|
+
protoOf(CancellableContinuationImpl).hf = function () {
|
|
848
848
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
849
849
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
850
|
-
var state = this.
|
|
850
|
+
var state = this.ae_1.kotlinx$atomicfu$value;
|
|
851
851
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
852
852
|
var tmp;
|
|
853
853
|
if (state instanceof CompletedContinuation) {
|
|
854
|
-
tmp = !(state.
|
|
854
|
+
tmp = !(state.tf_1 == null);
|
|
855
855
|
} else {
|
|
856
856
|
tmp = false;
|
|
857
857
|
}
|
|
858
858
|
if (tmp) {
|
|
859
|
-
this.
|
|
859
|
+
this.zf();
|
|
860
860
|
return false;
|
|
861
861
|
}
|
|
862
|
-
var tmp_0 = this.
|
|
862
|
+
var tmp_0 = this.zd_1;
|
|
863
863
|
// Inline function 'kotlinx.coroutines.decisionAndIndex' call
|
|
864
864
|
tmp_0.kotlinx$atomicfu$value = (0 << 29) + 536870911 | 0;
|
|
865
|
-
this.
|
|
865
|
+
this.ae_1.kotlinx$atomicfu$value = Active_instance;
|
|
866
866
|
return true;
|
|
867
867
|
};
|
|
868
|
-
protoOf(CancellableContinuationImpl).
|
|
869
|
-
return this.
|
|
868
|
+
protoOf(CancellableContinuationImpl).bg = function () {
|
|
869
|
+
return this.db();
|
|
870
870
|
};
|
|
871
|
-
protoOf(CancellableContinuationImpl).
|
|
871
|
+
protoOf(CancellableContinuationImpl).cg = function (takenState, cause) {
|
|
872
872
|
var tmp$ret$0;
|
|
873
873
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
874
|
-
var this_0 = this.
|
|
874
|
+
var this_0 = this.ae_1;
|
|
875
875
|
while (true) {
|
|
876
876
|
var state = this_0.kotlinx$atomicfu$value;
|
|
877
877
|
if (!(state == null) ? isInterface(state, NotCompleted) : false) {
|
|
@@ -884,17 +884,17 @@
|
|
|
884
884
|
else {
|
|
885
885
|
if (state instanceof CompletedContinuation) {
|
|
886
886
|
// Inline function 'kotlin.check' call
|
|
887
|
-
if (!!state.
|
|
887
|
+
if (!!state.wf()) {
|
|
888
888
|
var message_0 = 'Must be called at most once';
|
|
889
889
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
890
890
|
}
|
|
891
|
-
var update = state.
|
|
892
|
-
if (this.
|
|
893
|
-
state.
|
|
891
|
+
var update = state.xf(VOID, VOID, VOID, VOID, cause);
|
|
892
|
+
if (this.ae_1.atomicfu$compareAndSet(state, update)) {
|
|
893
|
+
state.dg(this, cause);
|
|
894
894
|
return Unit_instance;
|
|
895
895
|
}
|
|
896
896
|
} else {
|
|
897
|
-
if (this.
|
|
897
|
+
if (this.ae_1.atomicfu$compareAndSet(state, new CompletedContinuation(state, VOID, VOID, VOID, cause))) {
|
|
898
898
|
return Unit_instance;
|
|
899
899
|
}
|
|
900
900
|
}
|
|
@@ -903,9 +903,9 @@
|
|
|
903
903
|
}
|
|
904
904
|
return tmp$ret$0;
|
|
905
905
|
};
|
|
906
|
-
protoOf(CancellableContinuationImpl).
|
|
906
|
+
protoOf(CancellableContinuationImpl).eg = function (cause) {
|
|
907
907
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
908
|
-
var this_0 = this.
|
|
908
|
+
var this_0 = this.ae_1;
|
|
909
909
|
while (true) {
|
|
910
910
|
var tmp0 = this_0.kotlinx$atomicfu$value;
|
|
911
911
|
$l$block: {
|
|
@@ -918,32 +918,32 @@
|
|
|
918
918
|
tmp = tmp0 instanceof Segment;
|
|
919
919
|
}
|
|
920
920
|
var update = new CancelledContinuation(this, cause, tmp);
|
|
921
|
-
if (!this.
|
|
921
|
+
if (!this.ae_1.atomicfu$compareAndSet(tmp0, update)) {
|
|
922
922
|
break $l$block;
|
|
923
923
|
}
|
|
924
924
|
if (isInterface(tmp0, CancelHandler)) {
|
|
925
|
-
this.
|
|
925
|
+
this.vf(tmp0, cause);
|
|
926
926
|
} else {
|
|
927
927
|
if (tmp0 instanceof Segment) {
|
|
928
928
|
callSegmentOnCancellation(this, tmp0, cause);
|
|
929
929
|
}
|
|
930
930
|
}
|
|
931
931
|
detachChildIfNonReusable(this);
|
|
932
|
-
dispatchResume(this, this.
|
|
932
|
+
dispatchResume(this, this.jf_1);
|
|
933
933
|
return true;
|
|
934
934
|
}
|
|
935
935
|
}
|
|
936
936
|
};
|
|
937
|
-
protoOf(CancellableContinuationImpl).
|
|
937
|
+
protoOf(CancellableContinuationImpl).fg = function (cause) {
|
|
938
938
|
if (cancelLater(this, cause))
|
|
939
939
|
return Unit_instance;
|
|
940
|
-
this.
|
|
940
|
+
this.eg(cause);
|
|
941
941
|
detachChildIfNonReusable(this);
|
|
942
942
|
};
|
|
943
|
-
protoOf(CancellableContinuationImpl).
|
|
943
|
+
protoOf(CancellableContinuationImpl).vf = function (handler, cause) {
|
|
944
944
|
// Inline function 'kotlinx.coroutines.CancellableContinuationImpl.callCancelHandlerSafely' call
|
|
945
945
|
try {
|
|
946
|
-
handler.
|
|
946
|
+
handler.ad(cause);
|
|
947
947
|
} catch ($p) {
|
|
948
948
|
if ($p instanceof Error) {
|
|
949
949
|
var ex = $p;
|
|
@@ -954,7 +954,7 @@
|
|
|
954
954
|
}
|
|
955
955
|
return Unit_instance;
|
|
956
956
|
};
|
|
957
|
-
protoOf(CancellableContinuationImpl).
|
|
957
|
+
protoOf(CancellableContinuationImpl).gg = function (onCancellation, cause, value) {
|
|
958
958
|
try {
|
|
959
959
|
onCancellation(cause, value, this.g5());
|
|
960
960
|
} catch ($p) {
|
|
@@ -966,40 +966,40 @@
|
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
968
|
};
|
|
969
|
-
protoOf(CancellableContinuationImpl).
|
|
970
|
-
return parent.
|
|
969
|
+
protoOf(CancellableContinuationImpl).hg = function (parent) {
|
|
970
|
+
return parent.hb();
|
|
971
971
|
};
|
|
972
|
-
protoOf(CancellableContinuationImpl).
|
|
972
|
+
protoOf(CancellableContinuationImpl).de = function () {
|
|
973
973
|
var isReusable_0 = isReusable(this);
|
|
974
974
|
if (trySuspend(this)) {
|
|
975
975
|
if (_get_parentHandle__f8dcex(this) == null) {
|
|
976
976
|
installParentHandle(this);
|
|
977
977
|
}
|
|
978
978
|
if (isReusable_0) {
|
|
979
|
-
this.
|
|
979
|
+
this.ig();
|
|
980
980
|
}
|
|
981
981
|
return get_COROUTINE_SUSPENDED();
|
|
982
982
|
}
|
|
983
983
|
if (isReusable_0) {
|
|
984
|
-
this.
|
|
984
|
+
this.ig();
|
|
985
985
|
}
|
|
986
|
-
var state = this.
|
|
986
|
+
var state = this.db();
|
|
987
987
|
if (state instanceof CompletedExceptionally)
|
|
988
|
-
throw recoverStackTrace(state.
|
|
989
|
-
if (get_isCancellableMode(this.
|
|
988
|
+
throw recoverStackTrace(state.pa_1, this);
|
|
989
|
+
if (get_isCancellableMode(this.jf_1)) {
|
|
990
990
|
var job = this.g5().n5(Key_instance_2);
|
|
991
|
-
if (!(job == null) && !job.
|
|
992
|
-
var cause = job.
|
|
993
|
-
this.
|
|
991
|
+
if (!(job == null) && !job.ka()) {
|
|
992
|
+
var cause = job.hb();
|
|
993
|
+
this.cg(state, cause);
|
|
994
994
|
throw recoverStackTrace(cause, this);
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
|
-
return this.
|
|
997
|
+
return this.jg(state);
|
|
998
998
|
};
|
|
999
|
-
protoOf(CancellableContinuationImpl).
|
|
1000
|
-
var tmp = this.
|
|
999
|
+
protoOf(CancellableContinuationImpl).ig = function () {
|
|
1000
|
+
var tmp = this.xd_1;
|
|
1001
1001
|
var tmp0_safe_receiver = tmp instanceof DispatchedContinuation ? tmp : null;
|
|
1002
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1002
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kg(this);
|
|
1003
1003
|
var tmp_0;
|
|
1004
1004
|
if (tmp1_elvis_lhs == null) {
|
|
1005
1005
|
return Unit_instance;
|
|
@@ -1007,14 +1007,14 @@
|
|
|
1007
1007
|
tmp_0 = tmp1_elvis_lhs;
|
|
1008
1008
|
}
|
|
1009
1009
|
var cancellationCause = tmp_0;
|
|
1010
|
-
this.
|
|
1011
|
-
this.
|
|
1010
|
+
this.zf();
|
|
1011
|
+
this.eg(cancellationCause);
|
|
1012
1012
|
};
|
|
1013
1013
|
protoOf(CancellableContinuationImpl).l5 = function (result) {
|
|
1014
|
-
return this.
|
|
1014
|
+
return this.lg(toState(result, this), this.jf_1);
|
|
1015
1015
|
};
|
|
1016
|
-
protoOf(CancellableContinuationImpl).
|
|
1017
|
-
var tmp = this.
|
|
1016
|
+
protoOf(CancellableContinuationImpl).mg = function (value, onCancellation) {
|
|
1017
|
+
var tmp = this.jf_1;
|
|
1018
1018
|
var tmp_0;
|
|
1019
1019
|
if (onCancellation == null) {
|
|
1020
1020
|
tmp_0 = null;
|
|
@@ -1022,13 +1022,13 @@
|
|
|
1022
1022
|
// Inline function 'kotlin.let' call
|
|
1023
1023
|
tmp_0 = CancellableContinuationImpl$resume$lambda(onCancellation);
|
|
1024
1024
|
}
|
|
1025
|
-
return this.
|
|
1025
|
+
return this.ng(value, tmp, tmp_0);
|
|
1026
1026
|
};
|
|
1027
|
-
protoOf(CancellableContinuationImpl).
|
|
1028
|
-
return this.
|
|
1027
|
+
protoOf(CancellableContinuationImpl).xe = function (value, onCancellation) {
|
|
1028
|
+
return this.ng(value, this.jf_1, onCancellation);
|
|
1029
1029
|
};
|
|
1030
|
-
protoOf(CancellableContinuationImpl).
|
|
1031
|
-
var tmp0 = this.
|
|
1030
|
+
protoOf(CancellableContinuationImpl).og = function (segment, index) {
|
|
1031
|
+
var tmp0 = this.zd_1;
|
|
1032
1032
|
$l$block: {
|
|
1033
1033
|
// Inline function 'kotlinx.atomicfu.update' call
|
|
1034
1034
|
while (true) {
|
|
@@ -1049,18 +1049,18 @@
|
|
|
1049
1049
|
}
|
|
1050
1050
|
invokeOnCancellationImpl(this, segment);
|
|
1051
1051
|
};
|
|
1052
|
-
protoOf(CancellableContinuationImpl).
|
|
1052
|
+
protoOf(CancellableContinuationImpl).ye = function (handler) {
|
|
1053
1053
|
return invokeOnCancellationImpl(this, handler);
|
|
1054
1054
|
};
|
|
1055
|
-
protoOf(CancellableContinuationImpl).
|
|
1055
|
+
protoOf(CancellableContinuationImpl).ng = function (proposedUpdate, resumeMode, onCancellation) {
|
|
1056
1056
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
1057
|
-
var this_0 = this.
|
|
1057
|
+
var this_0 = this.ae_1;
|
|
1058
1058
|
while (true) {
|
|
1059
1059
|
var tmp0 = this_0.kotlinx$atomicfu$value;
|
|
1060
1060
|
$l$block: {
|
|
1061
1061
|
if (!(tmp0 == null) ? isInterface(tmp0, NotCompleted) : false) {
|
|
1062
1062
|
var update = resumedState(this, tmp0, proposedUpdate, resumeMode, onCancellation, null);
|
|
1063
|
-
if (!this.
|
|
1063
|
+
if (!this.ae_1.atomicfu$compareAndSet(tmp0, update)) {
|
|
1064
1064
|
break $l$block;
|
|
1065
1065
|
}
|
|
1066
1066
|
detachChildIfNonReusable(this);
|
|
@@ -1068,12 +1068,12 @@
|
|
|
1068
1068
|
return Unit_instance;
|
|
1069
1069
|
} else {
|
|
1070
1070
|
if (tmp0 instanceof CancelledContinuation) {
|
|
1071
|
-
if (tmp0.
|
|
1071
|
+
if (tmp0.sg()) {
|
|
1072
1072
|
if (onCancellation == null)
|
|
1073
1073
|
null;
|
|
1074
1074
|
else {
|
|
1075
1075
|
// Inline function 'kotlin.let' call
|
|
1076
|
-
this.
|
|
1076
|
+
this.gg(onCancellation, tmp0.pa_1, proposedUpdate);
|
|
1077
1077
|
}
|
|
1078
1078
|
return Unit_instance;
|
|
1079
1079
|
}
|
|
@@ -1083,18 +1083,18 @@
|
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
1085
1085
|
};
|
|
1086
|
-
protoOf(CancellableContinuationImpl).
|
|
1086
|
+
protoOf(CancellableContinuationImpl).lg = function (proposedUpdate, resumeMode, onCancellation, $super) {
|
|
1087
1087
|
onCancellation = onCancellation === VOID ? null : onCancellation;
|
|
1088
1088
|
var tmp;
|
|
1089
1089
|
if ($super === VOID) {
|
|
1090
|
-
this.
|
|
1090
|
+
this.ng(proposedUpdate, resumeMode, onCancellation);
|
|
1091
1091
|
tmp = Unit_instance;
|
|
1092
1092
|
} else {
|
|
1093
|
-
tmp = $super.
|
|
1093
|
+
tmp = $super.ng.call(this, proposedUpdate, resumeMode, onCancellation);
|
|
1094
1094
|
}
|
|
1095
1095
|
return tmp;
|
|
1096
1096
|
};
|
|
1097
|
-
protoOf(CancellableContinuationImpl).
|
|
1097
|
+
protoOf(CancellableContinuationImpl).zf = function () {
|
|
1098
1098
|
var tmp0_elvis_lhs = _get_parentHandle__f8dcex(this);
|
|
1099
1099
|
var tmp;
|
|
1100
1100
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -1103,43 +1103,43 @@
|
|
|
1103
1103
|
tmp = tmp0_elvis_lhs;
|
|
1104
1104
|
}
|
|
1105
1105
|
var handle = tmp;
|
|
1106
|
-
handle.
|
|
1107
|
-
this.
|
|
1106
|
+
handle.zc();
|
|
1107
|
+
this.be_1.kotlinx$atomicfu$value = NonDisposableHandle_instance;
|
|
1108
1108
|
};
|
|
1109
|
-
protoOf(CancellableContinuationImpl).
|
|
1109
|
+
protoOf(CancellableContinuationImpl).we = function (value, idempotent, onCancellation) {
|
|
1110
1110
|
return tryResumeImpl(this, value, idempotent, onCancellation);
|
|
1111
1111
|
};
|
|
1112
|
-
protoOf(CancellableContinuationImpl).
|
|
1112
|
+
protoOf(CancellableContinuationImpl).hd = function (exception) {
|
|
1113
1113
|
return tryResumeImpl(this, new CompletedExceptionally(exception), null, null);
|
|
1114
1114
|
};
|
|
1115
|
-
protoOf(CancellableContinuationImpl).
|
|
1115
|
+
protoOf(CancellableContinuationImpl).id = function (token) {
|
|
1116
1116
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1117
|
-
dispatchResume(this, this.
|
|
1117
|
+
dispatchResume(this, this.jf_1);
|
|
1118
1118
|
};
|
|
1119
|
-
protoOf(CancellableContinuationImpl).
|
|
1119
|
+
protoOf(CancellableContinuationImpl).jg = function (state) {
|
|
1120
1120
|
var tmp;
|
|
1121
1121
|
if (state instanceof CompletedContinuation) {
|
|
1122
|
-
tmp = state.
|
|
1122
|
+
tmp = state.qf_1;
|
|
1123
1123
|
} else {
|
|
1124
1124
|
tmp = state;
|
|
1125
1125
|
}
|
|
1126
1126
|
return tmp;
|
|
1127
1127
|
};
|
|
1128
|
-
protoOf(CancellableContinuationImpl).
|
|
1129
|
-
var tmp0_safe_receiver = protoOf(DispatchedTask).
|
|
1128
|
+
protoOf(CancellableContinuationImpl).tg = function (state) {
|
|
1129
|
+
var tmp0_safe_receiver = protoOf(DispatchedTask).tg.call(this, state);
|
|
1130
1130
|
var tmp;
|
|
1131
1131
|
if (tmp0_safe_receiver == null) {
|
|
1132
1132
|
tmp = null;
|
|
1133
1133
|
} else {
|
|
1134
1134
|
// Inline function 'kotlin.let' call
|
|
1135
|
-
tmp = recoverStackTrace(tmp0_safe_receiver, this.
|
|
1135
|
+
tmp = recoverStackTrace(tmp0_safe_receiver, this.xd_1);
|
|
1136
1136
|
}
|
|
1137
1137
|
return tmp;
|
|
1138
1138
|
};
|
|
1139
1139
|
protoOf(CancellableContinuationImpl).toString = function () {
|
|
1140
|
-
return this.
|
|
1140
|
+
return this.ug() + '(' + toDebugString(this.xd_1) + '){' + _get_stateDebugRepresentation__bf18u4(this) + '}@' + get_hexAddress(this);
|
|
1141
1141
|
};
|
|
1142
|
-
protoOf(CancellableContinuationImpl).
|
|
1142
|
+
protoOf(CancellableContinuationImpl).ug = function () {
|
|
1143
1143
|
return 'CancellableContinuation';
|
|
1144
1144
|
};
|
|
1145
1145
|
function NotCompleted() {
|
|
@@ -1160,51 +1160,51 @@
|
|
|
1160
1160
|
onCancellation = onCancellation === VOID ? null : onCancellation;
|
|
1161
1161
|
idempotentResume = idempotentResume === VOID ? null : idempotentResume;
|
|
1162
1162
|
cancelCause = cancelCause === VOID ? null : cancelCause;
|
|
1163
|
-
this.
|
|
1164
|
-
this.
|
|
1165
|
-
this.
|
|
1166
|
-
this.
|
|
1167
|
-
this.
|
|
1163
|
+
this.qf_1 = result;
|
|
1164
|
+
this.rf_1 = cancelHandler;
|
|
1165
|
+
this.sf_1 = onCancellation;
|
|
1166
|
+
this.tf_1 = idempotentResume;
|
|
1167
|
+
this.uf_1 = cancelCause;
|
|
1168
1168
|
}
|
|
1169
|
-
protoOf(CompletedContinuation).
|
|
1170
|
-
return !(this.
|
|
1169
|
+
protoOf(CompletedContinuation).wf = function () {
|
|
1170
|
+
return !(this.uf_1 == null);
|
|
1171
1171
|
};
|
|
1172
|
-
protoOf(CompletedContinuation).
|
|
1173
|
-
var tmp0_safe_receiver = this.
|
|
1172
|
+
protoOf(CompletedContinuation).dg = function (cont, cause) {
|
|
1173
|
+
var tmp0_safe_receiver = this.rf_1;
|
|
1174
1174
|
if (tmp0_safe_receiver == null)
|
|
1175
1175
|
null;
|
|
1176
1176
|
else {
|
|
1177
1177
|
// Inline function 'kotlin.let' call
|
|
1178
|
-
cont.
|
|
1178
|
+
cont.vf(tmp0_safe_receiver, cause);
|
|
1179
1179
|
}
|
|
1180
|
-
var tmp1_safe_receiver = this.
|
|
1180
|
+
var tmp1_safe_receiver = this.sf_1;
|
|
1181
1181
|
if (tmp1_safe_receiver == null)
|
|
1182
1182
|
null;
|
|
1183
1183
|
else {
|
|
1184
1184
|
// Inline function 'kotlin.let' call
|
|
1185
|
-
cont.
|
|
1185
|
+
cont.gg(tmp1_safe_receiver, cause, this.qf_1);
|
|
1186
1186
|
}
|
|
1187
1187
|
};
|
|
1188
|
-
protoOf(CompletedContinuation).
|
|
1188
|
+
protoOf(CompletedContinuation).xg = function (result, cancelHandler, onCancellation, idempotentResume, cancelCause) {
|
|
1189
1189
|
return new CompletedContinuation(result, cancelHandler, onCancellation, idempotentResume, cancelCause);
|
|
1190
1190
|
};
|
|
1191
|
-
protoOf(CompletedContinuation).
|
|
1192
|
-
result = result === VOID ? this.
|
|
1193
|
-
cancelHandler = cancelHandler === VOID ? this.
|
|
1194
|
-
onCancellation = onCancellation === VOID ? this.
|
|
1195
|
-
idempotentResume = idempotentResume === VOID ? this.
|
|
1196
|
-
cancelCause = cancelCause === VOID ? this.
|
|
1197
|
-
return $super === VOID ? this.
|
|
1191
|
+
protoOf(CompletedContinuation).xf = function (result, cancelHandler, onCancellation, idempotentResume, cancelCause, $super) {
|
|
1192
|
+
result = result === VOID ? this.qf_1 : result;
|
|
1193
|
+
cancelHandler = cancelHandler === VOID ? this.rf_1 : cancelHandler;
|
|
1194
|
+
onCancellation = onCancellation === VOID ? this.sf_1 : onCancellation;
|
|
1195
|
+
idempotentResume = idempotentResume === VOID ? this.tf_1 : idempotentResume;
|
|
1196
|
+
cancelCause = cancelCause === VOID ? this.uf_1 : cancelCause;
|
|
1197
|
+
return $super === VOID ? this.xg(result, cancelHandler, onCancellation, idempotentResume, cancelCause) : $super.xg.call(this, result, cancelHandler, onCancellation, idempotentResume, cancelCause);
|
|
1198
1198
|
};
|
|
1199
1199
|
protoOf(CompletedContinuation).toString = function () {
|
|
1200
|
-
return 'CompletedContinuation(result=' + toString_0(this.
|
|
1200
|
+
return 'CompletedContinuation(result=' + toString_0(this.qf_1) + ', cancelHandler=' + toString_0(this.rf_1) + ', onCancellation=' + toString_0(this.sf_1) + ', idempotentResume=' + toString_0(this.tf_1) + ', cancelCause=' + toString_0(this.uf_1) + ')';
|
|
1201
1201
|
};
|
|
1202
1202
|
protoOf(CompletedContinuation).hashCode = function () {
|
|
1203
|
-
var result = this.
|
|
1204
|
-
result = imul(result, 31) + (this.of_1 == null ? 0 : hashCode(this.of_1)) | 0;
|
|
1205
|
-
result = imul(result, 31) + (this.pf_1 == null ? 0 : hashCode(this.pf_1)) | 0;
|
|
1206
|
-
result = imul(result, 31) + (this.qf_1 == null ? 0 : hashCode(this.qf_1)) | 0;
|
|
1203
|
+
var result = this.qf_1 == null ? 0 : hashCode(this.qf_1);
|
|
1207
1204
|
result = imul(result, 31) + (this.rf_1 == null ? 0 : hashCode(this.rf_1)) | 0;
|
|
1205
|
+
result = imul(result, 31) + (this.sf_1 == null ? 0 : hashCode(this.sf_1)) | 0;
|
|
1206
|
+
result = imul(result, 31) + (this.tf_1 == null ? 0 : hashCode(this.tf_1)) | 0;
|
|
1207
|
+
result = imul(result, 31) + (this.uf_1 == null ? 0 : hashCode(this.uf_1)) | 0;
|
|
1208
1208
|
return result;
|
|
1209
1209
|
};
|
|
1210
1210
|
protoOf(CompletedContinuation).equals = function (other) {
|
|
@@ -1212,27 +1212,27 @@
|
|
|
1212
1212
|
return true;
|
|
1213
1213
|
if (!(other instanceof CompletedContinuation))
|
|
1214
1214
|
return false;
|
|
1215
|
-
if (!equals(this.
|
|
1215
|
+
if (!equals(this.qf_1, other.qf_1))
|
|
1216
1216
|
return false;
|
|
1217
|
-
if (!equals(this.
|
|
1217
|
+
if (!equals(this.rf_1, other.rf_1))
|
|
1218
1218
|
return false;
|
|
1219
|
-
if (!equals(this.
|
|
1219
|
+
if (!equals(this.sf_1, other.sf_1))
|
|
1220
1220
|
return false;
|
|
1221
|
-
if (!equals(this.
|
|
1221
|
+
if (!equals(this.tf_1, other.tf_1))
|
|
1222
1222
|
return false;
|
|
1223
|
-
if (!equals(this.
|
|
1223
|
+
if (!equals(this.uf_1, other.uf_1))
|
|
1224
1224
|
return false;
|
|
1225
1225
|
return true;
|
|
1226
1226
|
};
|
|
1227
1227
|
function ChildContinuation(child) {
|
|
1228
1228
|
JobNode.call(this);
|
|
1229
|
-
this.
|
|
1229
|
+
this.ch_1 = child;
|
|
1230
1230
|
}
|
|
1231
|
-
protoOf(ChildContinuation).
|
|
1231
|
+
protoOf(ChildContinuation).dd = function () {
|
|
1232
1232
|
return true;
|
|
1233
1233
|
};
|
|
1234
|
-
protoOf(ChildContinuation).
|
|
1235
|
-
this.
|
|
1234
|
+
protoOf(ChildContinuation).ad = function (cause) {
|
|
1235
|
+
this.ch_1.fg(this.ch_1.hg(this.nd()));
|
|
1236
1236
|
};
|
|
1237
1237
|
var properties_initialized_CancellableContinuationImpl_kt_xtzb03;
|
|
1238
1238
|
function _init_properties_CancellableContinuationImpl_kt__6rrtdd() {
|
|
@@ -1247,7 +1247,7 @@
|
|
|
1247
1247
|
}
|
|
1248
1248
|
function $awaitCOROUTINE$_0(_this__u8e3s4, resultContinuation) {
|
|
1249
1249
|
CoroutineImpl.call(this, resultContinuation);
|
|
1250
|
-
this.
|
|
1250
|
+
this.lh_1 = _this__u8e3s4;
|
|
1251
1251
|
}
|
|
1252
1252
|
protoOf($awaitCOROUTINE$_0).i5 = function () {
|
|
1253
1253
|
var suspendResult = this.c5_1;
|
|
@@ -1258,7 +1258,7 @@
|
|
|
1258
1258
|
case 0:
|
|
1259
1259
|
this.b5_1 = 2;
|
|
1260
1260
|
this.a5_1 = 1;
|
|
1261
|
-
suspendResult = this.
|
|
1261
|
+
suspendResult = this.lh_1.cc(this);
|
|
1262
1262
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1263
1263
|
return suspendResult;
|
|
1264
1264
|
}
|
|
@@ -1282,46 +1282,46 @@
|
|
|
1282
1282
|
};
|
|
1283
1283
|
function CompletableDeferredImpl(parent) {
|
|
1284
1284
|
JobSupport.call(this, true);
|
|
1285
|
-
this.
|
|
1285
|
+
this.fa(parent);
|
|
1286
1286
|
}
|
|
1287
|
-
protoOf(CompletableDeferredImpl).
|
|
1287
|
+
protoOf(CompletableDeferredImpl).ob = function () {
|
|
1288
1288
|
return true;
|
|
1289
1289
|
};
|
|
1290
|
-
protoOf(CompletableDeferredImpl).
|
|
1291
|
-
return this.
|
|
1290
|
+
protoOf(CompletableDeferredImpl).gd = function () {
|
|
1291
|
+
return this.bc();
|
|
1292
1292
|
};
|
|
1293
|
-
protoOf(CompletableDeferredImpl).
|
|
1293
|
+
protoOf(CompletableDeferredImpl).re = function ($completion) {
|
|
1294
1294
|
var tmp = new $awaitCOROUTINE$_0(this, $completion);
|
|
1295
1295
|
tmp.c5_1 = Unit_instance;
|
|
1296
1296
|
tmp.d5_1 = null;
|
|
1297
1297
|
return tmp.i5();
|
|
1298
1298
|
};
|
|
1299
|
-
protoOf(CompletableDeferredImpl).
|
|
1300
|
-
return this.
|
|
1299
|
+
protoOf(CompletableDeferredImpl).oh = function (value) {
|
|
1300
|
+
return this.tb(value);
|
|
1301
1301
|
};
|
|
1302
|
-
protoOf(CompletableDeferredImpl).
|
|
1303
|
-
return this.
|
|
1302
|
+
protoOf(CompletableDeferredImpl).ph = function (exception) {
|
|
1303
|
+
return this.tb(new CompletedExceptionally(exception));
|
|
1304
1304
|
};
|
|
1305
1305
|
function CompletedExceptionally(cause, handled) {
|
|
1306
1306
|
handled = handled === VOID ? false : handled;
|
|
1307
|
-
this.
|
|
1308
|
-
this.
|
|
1307
|
+
this.pa_1 = cause;
|
|
1308
|
+
this.qa_1 = atomic$boolean$1(handled);
|
|
1309
1309
|
}
|
|
1310
|
-
protoOf(CompletedExceptionally).
|
|
1311
|
-
return this.
|
|
1310
|
+
protoOf(CompletedExceptionally).ra = function () {
|
|
1311
|
+
return this.qa_1.kotlinx$atomicfu$value;
|
|
1312
1312
|
};
|
|
1313
|
-
protoOf(CompletedExceptionally).
|
|
1314
|
-
return this.
|
|
1313
|
+
protoOf(CompletedExceptionally).yf = function () {
|
|
1314
|
+
return this.qa_1.atomicfu$compareAndSet(false, true);
|
|
1315
1315
|
};
|
|
1316
1316
|
protoOf(CompletedExceptionally).toString = function () {
|
|
1317
|
-
return get_classSimpleName(this) + '[' + this.
|
|
1317
|
+
return get_classSimpleName(this) + '[' + this.pa_1.toString() + ']';
|
|
1318
1318
|
};
|
|
1319
1319
|
function CancelledContinuation(continuation, cause, handled) {
|
|
1320
1320
|
CompletedExceptionally.call(this, cause == null ? CancellationException_init_$Create$('Continuation ' + toString(continuation) + ' was cancelled normally') : cause, handled);
|
|
1321
|
-
this.
|
|
1321
|
+
this.rg_1 = atomic$boolean$1(false);
|
|
1322
1322
|
}
|
|
1323
|
-
protoOf(CancelledContinuation).
|
|
1324
|
-
return this.
|
|
1323
|
+
protoOf(CancelledContinuation).sg = function () {
|
|
1324
|
+
return this.rg_1.atomicfu$compareAndSet(false, true);
|
|
1325
1325
|
};
|
|
1326
1326
|
function toState(_this__u8e3s4, caller) {
|
|
1327
1327
|
// Inline function 'kotlin.getOrElse' call
|
|
@@ -1349,7 +1349,7 @@
|
|
|
1349
1349
|
var tmp;
|
|
1350
1350
|
if (state instanceof CompletedExceptionally) {
|
|
1351
1351
|
// Inline function 'kotlin.Companion.failure' call
|
|
1352
|
-
var exception = recoverStackTrace(state.
|
|
1352
|
+
var exception = recoverStackTrace(state.pa_1, uCont);
|
|
1353
1353
|
tmp = _Result___init__impl__xyqfz8(createFailure(exception));
|
|
1354
1354
|
} else {
|
|
1355
1355
|
// Inline function 'kotlin.Companion.success' call
|
|
@@ -1375,7 +1375,7 @@
|
|
|
1375
1375
|
Key_getInstance();
|
|
1376
1376
|
AbstractCoroutineContextElement.call(this, Key_instance);
|
|
1377
1377
|
}
|
|
1378
|
-
protoOf(CoroutineDispatcher).
|
|
1378
|
+
protoOf(CoroutineDispatcher).rh = function (context) {
|
|
1379
1379
|
return true;
|
|
1380
1380
|
};
|
|
1381
1381
|
protoOf(CoroutineDispatcher).o5 = function (continuation) {
|
|
@@ -1383,7 +1383,7 @@
|
|
|
1383
1383
|
};
|
|
1384
1384
|
protoOf(CoroutineDispatcher).p5 = function (continuation) {
|
|
1385
1385
|
var dispatched = continuation instanceof DispatchedContinuation ? continuation : THROW_CCE();
|
|
1386
|
-
dispatched.
|
|
1386
|
+
dispatched.th();
|
|
1387
1387
|
};
|
|
1388
1388
|
protoOf(CoroutineDispatcher).toString = function () {
|
|
1389
1389
|
return get_classSimpleName(this) + '@' + get_hexAddress(this);
|
|
@@ -1391,7 +1391,7 @@
|
|
|
1391
1391
|
function handleCoroutineException(context, exception) {
|
|
1392
1392
|
var tmp;
|
|
1393
1393
|
if (exception instanceof DispatchException) {
|
|
1394
|
-
tmp = exception.
|
|
1394
|
+
tmp = exception.uh_1;
|
|
1395
1395
|
} else {
|
|
1396
1396
|
tmp = exception;
|
|
1397
1397
|
}
|
|
@@ -1402,7 +1402,7 @@
|
|
|
1402
1402
|
null;
|
|
1403
1403
|
else {
|
|
1404
1404
|
// Inline function 'kotlin.let' call
|
|
1405
|
-
tmp0_safe_receiver.
|
|
1405
|
+
tmp0_safe_receiver.vh(context, reportException);
|
|
1406
1406
|
return Unit_instance;
|
|
1407
1407
|
}
|
|
1408
1408
|
} catch ($p) {
|
|
@@ -1438,7 +1438,7 @@
|
|
|
1438
1438
|
}
|
|
1439
1439
|
function GlobalScope() {
|
|
1440
1440
|
}
|
|
1441
|
-
protoOf(GlobalScope).
|
|
1441
|
+
protoOf(GlobalScope).ja = function () {
|
|
1442
1442
|
return EmptyCoroutineContext_getInstance();
|
|
1443
1443
|
};
|
|
1444
1444
|
var GlobalScope_instance;
|
|
@@ -1462,7 +1462,7 @@
|
|
|
1462
1462
|
function CoroutineStart(name, ordinal) {
|
|
1463
1463
|
Enum.call(this, name, ordinal);
|
|
1464
1464
|
}
|
|
1465
|
-
protoOf(CoroutineStart).
|
|
1465
|
+
protoOf(CoroutineStart).ab = function (block, receiver, completion) {
|
|
1466
1466
|
var tmp;
|
|
1467
1467
|
switch (this.w_1) {
|
|
1468
1468
|
case 0:
|
|
@@ -1486,7 +1486,7 @@
|
|
|
1486
1486
|
}
|
|
1487
1487
|
return tmp;
|
|
1488
1488
|
};
|
|
1489
|
-
protoOf(CoroutineStart).
|
|
1489
|
+
protoOf(CoroutineStart).ee = function () {
|
|
1490
1490
|
return this === CoroutineStart_LAZY_getInstance();
|
|
1491
1491
|
};
|
|
1492
1492
|
function CoroutineStart_DEFAULT_getInstance() {
|
|
@@ -1502,12 +1502,12 @@
|
|
|
1502
1502
|
}
|
|
1503
1503
|
function EventLoop() {
|
|
1504
1504
|
CoroutineDispatcher.call(this);
|
|
1505
|
-
this.
|
|
1506
|
-
this.
|
|
1507
|
-
this.
|
|
1505
|
+
this.xh_1 = new Long(0, 0);
|
|
1506
|
+
this.yh_1 = false;
|
|
1507
|
+
this.zh_1 = null;
|
|
1508
1508
|
}
|
|
1509
|
-
protoOf(EventLoop).
|
|
1510
|
-
var tmp0_elvis_lhs = this.
|
|
1509
|
+
protoOf(EventLoop).ai = function () {
|
|
1510
|
+
var tmp0_elvis_lhs = this.zh_1;
|
|
1511
1511
|
var tmp;
|
|
1512
1512
|
if (tmp0_elvis_lhs == null) {
|
|
1513
1513
|
return false;
|
|
@@ -1523,16 +1523,16 @@
|
|
|
1523
1523
|
tmp_0 = tmp1_elvis_lhs;
|
|
1524
1524
|
}
|
|
1525
1525
|
var task = tmp_0;
|
|
1526
|
-
task.
|
|
1526
|
+
task.vg();
|
|
1527
1527
|
return true;
|
|
1528
1528
|
};
|
|
1529
|
-
protoOf(EventLoop).
|
|
1530
|
-
var tmp0_elvis_lhs = this.
|
|
1529
|
+
protoOf(EventLoop).bi = function (task) {
|
|
1530
|
+
var tmp0_elvis_lhs = this.zh_1;
|
|
1531
1531
|
var tmp;
|
|
1532
1532
|
if (tmp0_elvis_lhs == null) {
|
|
1533
1533
|
// Inline function 'kotlin.also' call
|
|
1534
1534
|
var this_0 = ArrayDeque_init_$Create$();
|
|
1535
|
-
this.
|
|
1535
|
+
this.zh_1 = this_0;
|
|
1536
1536
|
tmp = this_0;
|
|
1537
1537
|
} else {
|
|
1538
1538
|
tmp = tmp0_elvis_lhs;
|
|
@@ -1540,41 +1540,41 @@
|
|
|
1540
1540
|
var queue = tmp;
|
|
1541
1541
|
queue.f8(task);
|
|
1542
1542
|
};
|
|
1543
|
-
protoOf(EventLoop).
|
|
1544
|
-
return compare(this.
|
|
1543
|
+
protoOf(EventLoop).ci = function () {
|
|
1544
|
+
return compare(this.xh_1, delta(this, true)) >= 0;
|
|
1545
1545
|
};
|
|
1546
|
-
protoOf(EventLoop).
|
|
1547
|
-
var tmp0_safe_receiver = this.
|
|
1546
|
+
protoOf(EventLoop).di = function () {
|
|
1547
|
+
var tmp0_safe_receiver = this.zh_1;
|
|
1548
1548
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n();
|
|
1549
1549
|
return tmp1_elvis_lhs == null ? true : tmp1_elvis_lhs;
|
|
1550
1550
|
};
|
|
1551
|
-
protoOf(EventLoop).
|
|
1552
|
-
this.
|
|
1551
|
+
protoOf(EventLoop).ei = function (unconfined) {
|
|
1552
|
+
this.xh_1 = add(this.xh_1, delta(this, unconfined));
|
|
1553
1553
|
if (!unconfined)
|
|
1554
|
-
this.
|
|
1554
|
+
this.yh_1 = true;
|
|
1555
1555
|
};
|
|
1556
|
-
protoOf(EventLoop).
|
|
1557
|
-
this.
|
|
1558
|
-
if (compare(this.
|
|
1556
|
+
protoOf(EventLoop).fi = function (unconfined) {
|
|
1557
|
+
this.xh_1 = subtract(this.xh_1, delta(this, unconfined));
|
|
1558
|
+
if (compare(this.xh_1, new Long(0, 0)) > 0)
|
|
1559
1559
|
return Unit_instance;
|
|
1560
1560
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1561
|
-
if (this.
|
|
1562
|
-
this.
|
|
1561
|
+
if (this.yh_1) {
|
|
1562
|
+
this.gi();
|
|
1563
1563
|
}
|
|
1564
1564
|
};
|
|
1565
|
-
protoOf(EventLoop).
|
|
1565
|
+
protoOf(EventLoop).gi = function () {
|
|
1566
1566
|
};
|
|
1567
1567
|
function ThreadLocalEventLoop() {
|
|
1568
1568
|
ThreadLocalEventLoop_instance = this;
|
|
1569
|
-
this.
|
|
1569
|
+
this.hi_1 = commonThreadLocal(new Symbol('ThreadLocalEventLoop'));
|
|
1570
1570
|
}
|
|
1571
|
-
protoOf(ThreadLocalEventLoop).
|
|
1572
|
-
var tmp0_elvis_lhs = this.
|
|
1571
|
+
protoOf(ThreadLocalEventLoop).ii = function () {
|
|
1572
|
+
var tmp0_elvis_lhs = this.hi_1.ki();
|
|
1573
1573
|
var tmp;
|
|
1574
1574
|
if (tmp0_elvis_lhs == null) {
|
|
1575
1575
|
// Inline function 'kotlin.also' call
|
|
1576
1576
|
var this_0 = createEventLoop();
|
|
1577
|
-
ThreadLocalEventLoop_getInstance().
|
|
1577
|
+
ThreadLocalEventLoop_getInstance().hi_1.li(this_0);
|
|
1578
1578
|
tmp = this_0;
|
|
1579
1579
|
} else {
|
|
1580
1580
|
tmp = tmp0_elvis_lhs;
|
|
@@ -1605,9 +1605,9 @@
|
|
|
1605
1605
|
}
|
|
1606
1606
|
function NonDisposableHandle() {
|
|
1607
1607
|
}
|
|
1608
|
-
protoOf(NonDisposableHandle).
|
|
1608
|
+
protoOf(NonDisposableHandle).zc = function () {
|
|
1609
1609
|
};
|
|
1610
|
-
protoOf(NonDisposableHandle).
|
|
1610
|
+
protoOf(NonDisposableHandle).qb = function (cause) {
|
|
1611
1611
|
return false;
|
|
1612
1612
|
};
|
|
1613
1613
|
protoOf(NonDisposableHandle).toString = function () {
|
|
@@ -1621,16 +1621,16 @@
|
|
|
1621
1621
|
invokeImmediately = invokeImmediately === VOID ? true : invokeImmediately;
|
|
1622
1622
|
var tmp;
|
|
1623
1623
|
if (_this__u8e3s4 instanceof JobSupport) {
|
|
1624
|
-
tmp = _this__u8e3s4.
|
|
1624
|
+
tmp = _this__u8e3s4.mb(invokeImmediately, handler);
|
|
1625
1625
|
} else {
|
|
1626
|
-
var tmp_0 = handler.
|
|
1627
|
-
tmp = _this__u8e3s4.
|
|
1626
|
+
var tmp_0 = handler.dd();
|
|
1627
|
+
tmp = _this__u8e3s4.lb(tmp_0, invokeImmediately, JobNode$invoke$ref(handler));
|
|
1628
1628
|
}
|
|
1629
1629
|
return tmp;
|
|
1630
1630
|
}
|
|
1631
1631
|
function JobNode$invoke$ref(p0) {
|
|
1632
1632
|
var l = function (_this__u8e3s4) {
|
|
1633
|
-
p0.
|
|
1633
|
+
p0.ad(_this__u8e3s4);
|
|
1634
1634
|
return Unit_instance;
|
|
1635
1635
|
};
|
|
1636
1636
|
l.callableName = 'invoke';
|
|
@@ -1672,29 +1672,29 @@
|
|
|
1672
1672
|
}
|
|
1673
1673
|
var EMPTY_ACTIVE;
|
|
1674
1674
|
function Empty(isActive) {
|
|
1675
|
-
this.
|
|
1675
|
+
this.mi_1 = isActive;
|
|
1676
1676
|
}
|
|
1677
|
-
protoOf(Empty).
|
|
1678
|
-
return this.
|
|
1677
|
+
protoOf(Empty).ka = function () {
|
|
1678
|
+
return this.mi_1;
|
|
1679
1679
|
};
|
|
1680
|
-
protoOf(Empty).
|
|
1680
|
+
protoOf(Empty).od = function () {
|
|
1681
1681
|
return null;
|
|
1682
1682
|
};
|
|
1683
1683
|
protoOf(Empty).toString = function () {
|
|
1684
|
-
return 'Empty{' + (this.
|
|
1684
|
+
return 'Empty{' + (this.mi_1 ? 'Active' : 'New') + '}';
|
|
1685
1685
|
};
|
|
1686
1686
|
function Incomplete() {
|
|
1687
1687
|
}
|
|
1688
1688
|
function NodeList() {
|
|
1689
1689
|
LockFreeLinkedListHead.call(this);
|
|
1690
1690
|
}
|
|
1691
|
-
protoOf(NodeList).
|
|
1691
|
+
protoOf(NodeList).ka = function () {
|
|
1692
1692
|
return true;
|
|
1693
1693
|
};
|
|
1694
|
-
protoOf(NodeList).
|
|
1694
|
+
protoOf(NodeList).od = function () {
|
|
1695
1695
|
return this;
|
|
1696
1696
|
};
|
|
1697
|
-
protoOf(NodeList).
|
|
1697
|
+
protoOf(NodeList).qi = function (state) {
|
|
1698
1698
|
// Inline function 'kotlin.text.buildString' call
|
|
1699
1699
|
// Inline function 'kotlin.apply' call
|
|
1700
1700
|
var this_0 = StringBuilder_init_$Create$();
|
|
@@ -1703,7 +1703,7 @@
|
|
|
1703
1703
|
this_0.p4('}[');
|
|
1704
1704
|
var first = true;
|
|
1705
1705
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListHead.forEach' call
|
|
1706
|
-
var cur = this.
|
|
1706
|
+
var cur = this.pd_1;
|
|
1707
1707
|
while (!equals(cur, this)) {
|
|
1708
1708
|
var node = cur;
|
|
1709
1709
|
if (node instanceof JobNode) {
|
|
@@ -1713,42 +1713,42 @@
|
|
|
1713
1713
|
this_0.p4(', ');
|
|
1714
1714
|
this_0.o4(node);
|
|
1715
1715
|
}
|
|
1716
|
-
cur = cur.
|
|
1716
|
+
cur = cur.pd_1;
|
|
1717
1717
|
}
|
|
1718
1718
|
this_0.p4(']');
|
|
1719
1719
|
return this_0.toString();
|
|
1720
1720
|
};
|
|
1721
1721
|
protoOf(NodeList).toString = function () {
|
|
1722
|
-
return get_DEBUG() ? this.
|
|
1722
|
+
return get_DEBUG() ? this.qi('Active') : protoOf(LockFreeLinkedListHead).toString.call(this);
|
|
1723
1723
|
};
|
|
1724
1724
|
function JobNode() {
|
|
1725
1725
|
LockFreeLinkedListNode.call(this);
|
|
1726
1726
|
}
|
|
1727
|
-
protoOf(JobNode).
|
|
1728
|
-
var tmp = this.
|
|
1727
|
+
protoOf(JobNode).nd = function () {
|
|
1728
|
+
var tmp = this.md_1;
|
|
1729
1729
|
if (!(tmp == null))
|
|
1730
1730
|
return tmp;
|
|
1731
1731
|
else {
|
|
1732
1732
|
throwUninitializedPropertyAccessException('job');
|
|
1733
1733
|
}
|
|
1734
1734
|
};
|
|
1735
|
-
protoOf(JobNode).
|
|
1735
|
+
protoOf(JobNode).ka = function () {
|
|
1736
1736
|
return true;
|
|
1737
1737
|
};
|
|
1738
|
-
protoOf(JobNode).
|
|
1738
|
+
protoOf(JobNode).od = function () {
|
|
1739
1739
|
return null;
|
|
1740
1740
|
};
|
|
1741
|
-
protoOf(JobNode).
|
|
1742
|
-
return this.
|
|
1741
|
+
protoOf(JobNode).zc = function () {
|
|
1742
|
+
return this.nd().nb(this);
|
|
1743
1743
|
};
|
|
1744
1744
|
protoOf(JobNode).toString = function () {
|
|
1745
|
-
return get_classSimpleName(this) + '@' + get_hexAddress(this) + '[job@' + get_hexAddress(this.
|
|
1745
|
+
return get_classSimpleName(this) + '@' + get_hexAddress(this) + '[job@' + get_hexAddress(this.nd()) + ']';
|
|
1746
1746
|
};
|
|
1747
1747
|
function _set_exceptionsHolder__tqm22h($this, value) {
|
|
1748
|
-
$this.
|
|
1748
|
+
$this.vi_1.kotlinx$atomicfu$value = value;
|
|
1749
1749
|
}
|
|
1750
1750
|
function _get_exceptionsHolder__nhszp($this) {
|
|
1751
|
-
return $this.
|
|
1751
|
+
return $this.vi_1.kotlinx$atomicfu$value;
|
|
1752
1752
|
}
|
|
1753
1753
|
function allocateList($this) {
|
|
1754
1754
|
return ArrayList_init_$Create$(4);
|
|
@@ -1758,12 +1758,12 @@
|
|
|
1758
1758
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1759
1759
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1760
1760
|
var tmp0_safe_receiver = proposedUpdate instanceof CompletedExceptionally ? proposedUpdate : null;
|
|
1761
|
-
var proposedException = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1761
|
+
var proposedException = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pa_1;
|
|
1762
1762
|
var wasCancelling;
|
|
1763
1763
|
// Inline function 'kotlinx.coroutines.internal.synchronized' call
|
|
1764
1764
|
// Inline function 'kotlinx.coroutines.internal.synchronizedImpl' call
|
|
1765
|
-
wasCancelling = state.
|
|
1766
|
-
var exceptions = state.
|
|
1765
|
+
wasCancelling = state.wi();
|
|
1766
|
+
var exceptions = state.xi(proposedException);
|
|
1767
1767
|
var finalCause = getFinalRootCause($this, state, exceptions);
|
|
1768
1768
|
if (!(finalCause == null)) {
|
|
1769
1769
|
addSuppressedExceptions($this, finalCause, exceptions);
|
|
@@ -1771,25 +1771,25 @@
|
|
|
1771
1771
|
var finalException = finalCause;
|
|
1772
1772
|
var finalState = finalException == null ? proposedUpdate : finalException === proposedException ? proposedUpdate : new CompletedExceptionally(finalException);
|
|
1773
1773
|
if (!(finalException == null)) {
|
|
1774
|
-
var handled = cancelParent($this, finalException) || $this.
|
|
1774
|
+
var handled = cancelParent($this, finalException) || $this.yb(finalException);
|
|
1775
1775
|
if (handled) {
|
|
1776
|
-
(finalState instanceof CompletedExceptionally ? finalState : THROW_CCE()).
|
|
1776
|
+
(finalState instanceof CompletedExceptionally ? finalState : THROW_CCE()).yf();
|
|
1777
1777
|
}
|
|
1778
1778
|
}
|
|
1779
1779
|
if (!wasCancelling) {
|
|
1780
|
-
$this.
|
|
1780
|
+
$this.vb(finalException);
|
|
1781
1781
|
}
|
|
1782
|
-
$this.
|
|
1783
|
-
var casSuccess = $this.
|
|
1782
|
+
$this.oa(finalState);
|
|
1783
|
+
var casSuccess = $this.da_1.atomicfu$compareAndSet(state, boxIncomplete(finalState));
|
|
1784
1784
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1785
1785
|
completeStateFinalization($this, state, finalState);
|
|
1786
1786
|
return finalState;
|
|
1787
1787
|
}
|
|
1788
1788
|
function getFinalRootCause($this, state, exceptions) {
|
|
1789
1789
|
if (exceptions.n()) {
|
|
1790
|
-
if (state.
|
|
1790
|
+
if (state.wi()) {
|
|
1791
1791
|
// Inline function 'kotlinx.coroutines.JobSupport.defaultCancellationException' call
|
|
1792
|
-
return new JobCancellationException(null == null ? $this.
|
|
1792
|
+
return new JobCancellationException(null == null ? $this.na() : null, null, $this);
|
|
1793
1793
|
}
|
|
1794
1794
|
return null;
|
|
1795
1795
|
}
|
|
@@ -1865,37 +1865,37 @@
|
|
|
1865
1865
|
function tryFinalizeSimpleState($this, state, update) {
|
|
1866
1866
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1867
1867
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1868
|
-
if (!$this.
|
|
1868
|
+
if (!$this.da_1.atomicfu$compareAndSet(state, boxIncomplete(update)))
|
|
1869
1869
|
return false;
|
|
1870
|
-
$this.
|
|
1871
|
-
$this.
|
|
1870
|
+
$this.vb(null);
|
|
1871
|
+
$this.oa(update);
|
|
1872
1872
|
completeStateFinalization($this, state, update);
|
|
1873
1873
|
return true;
|
|
1874
1874
|
}
|
|
1875
1875
|
function completeStateFinalization($this, state, update) {
|
|
1876
|
-
var tmp0_safe_receiver = $this.
|
|
1876
|
+
var tmp0_safe_receiver = $this.cb();
|
|
1877
1877
|
if (tmp0_safe_receiver == null)
|
|
1878
1878
|
null;
|
|
1879
1879
|
else {
|
|
1880
1880
|
// Inline function 'kotlin.let' call
|
|
1881
|
-
tmp0_safe_receiver.
|
|
1882
|
-
$this.
|
|
1881
|
+
tmp0_safe_receiver.zc();
|
|
1882
|
+
$this.bb(NonDisposableHandle_instance);
|
|
1883
1883
|
}
|
|
1884
1884
|
var tmp1_safe_receiver = update instanceof CompletedExceptionally ? update : null;
|
|
1885
|
-
var cause = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1885
|
+
var cause = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.pa_1;
|
|
1886
1886
|
if (state instanceof JobNode) {
|
|
1887
1887
|
try {
|
|
1888
|
-
state.
|
|
1888
|
+
state.ad(cause);
|
|
1889
1889
|
} catch ($p) {
|
|
1890
1890
|
if ($p instanceof Error) {
|
|
1891
1891
|
var ex = $p;
|
|
1892
|
-
$this.
|
|
1892
|
+
$this.va(new CompletionHandlerException('Exception in completion handler ' + state.toString() + ' for ' + $this.toString(), ex));
|
|
1893
1893
|
} else {
|
|
1894
1894
|
throw $p;
|
|
1895
1895
|
}
|
|
1896
1896
|
}
|
|
1897
1897
|
} else {
|
|
1898
|
-
var tmp2_safe_receiver = state.
|
|
1898
|
+
var tmp2_safe_receiver = state.od();
|
|
1899
1899
|
if (tmp2_safe_receiver == null)
|
|
1900
1900
|
null;
|
|
1901
1901
|
else {
|
|
@@ -1904,23 +1904,23 @@
|
|
|
1904
1904
|
}
|
|
1905
1905
|
}
|
|
1906
1906
|
function notifyCancelling($this, list, cause) {
|
|
1907
|
-
$this.
|
|
1908
|
-
list.
|
|
1907
|
+
$this.vb(cause);
|
|
1908
|
+
list.ri(4);
|
|
1909
1909
|
// Inline function 'kotlinx.coroutines.JobSupport.notifyHandlers' call
|
|
1910
1910
|
var exception = null;
|
|
1911
1911
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListHead.forEach' call
|
|
1912
|
-
var cur = list.
|
|
1912
|
+
var cur = list.pd_1;
|
|
1913
1913
|
while (!equals(cur, list)) {
|
|
1914
1914
|
var node = cur;
|
|
1915
1915
|
var tmp;
|
|
1916
1916
|
if (node instanceof JobNode) {
|
|
1917
|
-
tmp = node.
|
|
1917
|
+
tmp = node.dd();
|
|
1918
1918
|
} else {
|
|
1919
1919
|
tmp = false;
|
|
1920
1920
|
}
|
|
1921
1921
|
if (tmp) {
|
|
1922
1922
|
try {
|
|
1923
|
-
node.
|
|
1923
|
+
node.ad(cause);
|
|
1924
1924
|
} catch ($p) {
|
|
1925
1925
|
if ($p instanceof Error) {
|
|
1926
1926
|
var ex = $p;
|
|
@@ -1942,33 +1942,33 @@
|
|
|
1942
1942
|
}
|
|
1943
1943
|
}
|
|
1944
1944
|
}
|
|
1945
|
-
cur = cur.
|
|
1945
|
+
cur = cur.pd_1;
|
|
1946
1946
|
}
|
|
1947
1947
|
var tmp0_safe_receiver_0 = exception;
|
|
1948
1948
|
if (tmp0_safe_receiver_0 == null)
|
|
1949
1949
|
null;
|
|
1950
1950
|
else {
|
|
1951
1951
|
// Inline function 'kotlin.let' call
|
|
1952
|
-
$this.
|
|
1952
|
+
$this.va(tmp0_safe_receiver_0);
|
|
1953
1953
|
}
|
|
1954
1954
|
cancelParent($this, cause);
|
|
1955
1955
|
}
|
|
1956
1956
|
function cancelParent($this, cause) {
|
|
1957
|
-
if ($this.
|
|
1957
|
+
if ($this.wb())
|
|
1958
1958
|
return true;
|
|
1959
1959
|
var isCancellation = cause instanceof CancellationException;
|
|
1960
|
-
var parent = $this.
|
|
1960
|
+
var parent = $this.cb();
|
|
1961
1961
|
if (parent === null || parent === NonDisposableHandle_instance) {
|
|
1962
1962
|
return isCancellation;
|
|
1963
1963
|
}
|
|
1964
|
-
return parent.
|
|
1964
|
+
return parent.qb(cause) || isCancellation;
|
|
1965
1965
|
}
|
|
1966
1966
|
function notifyCompletion($this, $receiver, cause) {
|
|
1967
|
-
$receiver.
|
|
1967
|
+
$receiver.ri(1);
|
|
1968
1968
|
// Inline function 'kotlinx.coroutines.JobSupport.notifyHandlers' call
|
|
1969
1969
|
var exception = null;
|
|
1970
1970
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListHead.forEach' call
|
|
1971
|
-
var cur = $receiver.
|
|
1971
|
+
var cur = $receiver.pd_1;
|
|
1972
1972
|
while (!equals(cur, $receiver)) {
|
|
1973
1973
|
var node = cur;
|
|
1974
1974
|
var tmp;
|
|
@@ -1979,7 +1979,7 @@
|
|
|
1979
1979
|
}
|
|
1980
1980
|
if (tmp) {
|
|
1981
1981
|
try {
|
|
1982
|
-
node.
|
|
1982
|
+
node.ad(cause);
|
|
1983
1983
|
} catch ($p) {
|
|
1984
1984
|
if ($p instanceof Error) {
|
|
1985
1985
|
var ex = $p;
|
|
@@ -2001,29 +2001,29 @@
|
|
|
2001
2001
|
}
|
|
2002
2002
|
}
|
|
2003
2003
|
}
|
|
2004
|
-
cur = cur.
|
|
2004
|
+
cur = cur.pd_1;
|
|
2005
2005
|
}
|
|
2006
2006
|
var tmp0_safe_receiver_0 = exception;
|
|
2007
2007
|
if (tmp0_safe_receiver_0 == null)
|
|
2008
2008
|
null;
|
|
2009
2009
|
else {
|
|
2010
2010
|
// Inline function 'kotlin.let' call
|
|
2011
|
-
$this.
|
|
2011
|
+
$this.va(tmp0_safe_receiver_0);
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
2014
2014
|
function startInternal($this, state) {
|
|
2015
2015
|
if (state instanceof Empty) {
|
|
2016
|
-
if (state.
|
|
2016
|
+
if (state.mi_1)
|
|
2017
2017
|
return 0;
|
|
2018
|
-
if (!$this.
|
|
2018
|
+
if (!$this.da_1.atomicfu$compareAndSet(state, get_EMPTY_ACTIVE()))
|
|
2019
2019
|
return -1;
|
|
2020
|
-
$this.
|
|
2020
|
+
$this.gb();
|
|
2021
2021
|
return 1;
|
|
2022
2022
|
} else {
|
|
2023
2023
|
if (state instanceof InactiveNodeList) {
|
|
2024
|
-
if (!$this.
|
|
2024
|
+
if (!$this.da_1.atomicfu$compareAndSet(state, state.yi_1))
|
|
2025
2025
|
return -1;
|
|
2026
|
-
$this.
|
|
2026
|
+
$this.gb();
|
|
2027
2027
|
return 1;
|
|
2028
2028
|
} else {
|
|
2029
2029
|
return 0;
|
|
@@ -2032,26 +2032,26 @@
|
|
|
2032
2032
|
}
|
|
2033
2033
|
function promoteEmptyToNodeList($this, state) {
|
|
2034
2034
|
var list = new NodeList();
|
|
2035
|
-
var update = state.
|
|
2036
|
-
$this.
|
|
2035
|
+
var update = state.mi_1 ? list : new InactiveNodeList(list);
|
|
2036
|
+
$this.da_1.atomicfu$compareAndSet(state, update);
|
|
2037
2037
|
}
|
|
2038
2038
|
function promoteSingleToNodeList($this, state) {
|
|
2039
|
-
state.
|
|
2039
|
+
state.ud(new NodeList());
|
|
2040
2040
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.nextNode' call
|
|
2041
|
-
var list = state.
|
|
2042
|
-
$this.
|
|
2041
|
+
var list = state.pd_1;
|
|
2042
|
+
$this.da_1.atomicfu$compareAndSet(state, list);
|
|
2043
2043
|
}
|
|
2044
2044
|
function cancelMakeCompleting($this, cause) {
|
|
2045
2045
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2046
2046
|
while (true) {
|
|
2047
|
-
var state = $this.
|
|
2047
|
+
var state = $this.db();
|
|
2048
2048
|
var tmp;
|
|
2049
2049
|
if (!(!(state == null) ? isInterface(state, Incomplete) : false)) {
|
|
2050
2050
|
tmp = true;
|
|
2051
2051
|
} else {
|
|
2052
2052
|
var tmp_0;
|
|
2053
2053
|
if (state instanceof Finishing) {
|
|
2054
|
-
tmp_0 = state.
|
|
2054
|
+
tmp_0 = state.zi();
|
|
2055
2055
|
} else {
|
|
2056
2056
|
tmp_0 = false;
|
|
2057
2057
|
}
|
|
@@ -2072,13 +2072,13 @@
|
|
|
2072
2072
|
var tmp_0;
|
|
2073
2073
|
if (cause == null) {
|
|
2074
2074
|
// Inline function 'kotlinx.coroutines.JobSupport.defaultCancellationException' call
|
|
2075
|
-
tmp_0 = new JobCancellationException(null == null ? $this.
|
|
2075
|
+
tmp_0 = new JobCancellationException(null == null ? $this.na() : null, null, $this);
|
|
2076
2076
|
} else {
|
|
2077
2077
|
tmp_0 = cause;
|
|
2078
2078
|
}
|
|
2079
2079
|
tmp = tmp_0;
|
|
2080
2080
|
} else {
|
|
2081
|
-
tmp = (isInterface(cause, ParentJob) ? cause : THROW_CCE()).
|
|
2081
|
+
tmp = (isInterface(cause, ParentJob) ? cause : THROW_CCE()).sb();
|
|
2082
2082
|
}
|
|
2083
2083
|
return tmp;
|
|
2084
2084
|
}
|
|
@@ -2086,14 +2086,14 @@
|
|
|
2086
2086
|
var causeExceptionCache = null;
|
|
2087
2087
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2088
2088
|
while (true) {
|
|
2089
|
-
var tmp0 = $this.
|
|
2089
|
+
var tmp0 = $this.db();
|
|
2090
2090
|
$l$block: {
|
|
2091
2091
|
if (tmp0 instanceof Finishing) {
|
|
2092
2092
|
// Inline function 'kotlinx.coroutines.internal.synchronized' call
|
|
2093
2093
|
// Inline function 'kotlinx.coroutines.internal.synchronizedImpl' call
|
|
2094
|
-
if (tmp0.
|
|
2094
|
+
if (tmp0.aj())
|
|
2095
2095
|
return get_TOO_LATE_TO_CANCEL();
|
|
2096
|
-
var wasCancelling = tmp0.
|
|
2096
|
+
var wasCancelling = tmp0.wi();
|
|
2097
2097
|
if (!(cause == null) || !wasCancelling) {
|
|
2098
2098
|
var tmp0_elvis_lhs = causeExceptionCache;
|
|
2099
2099
|
var tmp;
|
|
@@ -2106,10 +2106,10 @@
|
|
|
2106
2106
|
tmp = tmp0_elvis_lhs;
|
|
2107
2107
|
}
|
|
2108
2108
|
var causeException = tmp;
|
|
2109
|
-
tmp0.
|
|
2109
|
+
tmp0.bj(causeException);
|
|
2110
2110
|
}
|
|
2111
2111
|
// Inline function 'kotlin.takeIf' call
|
|
2112
|
-
var this_1 = tmp0.
|
|
2112
|
+
var this_1 = tmp0.cj();
|
|
2113
2113
|
var tmp_0;
|
|
2114
2114
|
if (!wasCancelling) {
|
|
2115
2115
|
tmp_0 = this_1;
|
|
@@ -2121,7 +2121,7 @@
|
|
|
2121
2121
|
null;
|
|
2122
2122
|
else {
|
|
2123
2123
|
// Inline function 'kotlin.let' call
|
|
2124
|
-
notifyCancelling($this, tmp0.
|
|
2124
|
+
notifyCancelling($this, tmp0.si_1, notifyRootCause);
|
|
2125
2125
|
}
|
|
2126
2126
|
return get_COMPLETING_ALREADY();
|
|
2127
2127
|
} else {
|
|
@@ -2137,7 +2137,7 @@
|
|
|
2137
2137
|
tmp_1 = tmp2_elvis_lhs;
|
|
2138
2138
|
}
|
|
2139
2139
|
var causeException_0 = tmp_1;
|
|
2140
|
-
if (tmp0.
|
|
2140
|
+
if (tmp0.ka()) {
|
|
2141
2141
|
if (tryMakeCancelling($this, tmp0, causeException_0))
|
|
2142
2142
|
return get_COMPLETING_ALREADY();
|
|
2143
2143
|
} else {
|
|
@@ -2159,7 +2159,7 @@
|
|
|
2159
2159
|
}
|
|
2160
2160
|
}
|
|
2161
2161
|
function getOrPromoteCancellingList($this, state) {
|
|
2162
|
-
var tmp0_elvis_lhs = state.
|
|
2162
|
+
var tmp0_elvis_lhs = state.od();
|
|
2163
2163
|
var tmp;
|
|
2164
2164
|
if (tmp0_elvis_lhs == null) {
|
|
2165
2165
|
var tmp_0;
|
|
@@ -2193,7 +2193,7 @@
|
|
|
2193
2193
|
}
|
|
2194
2194
|
var list = tmp;
|
|
2195
2195
|
var cancelling = new Finishing(list, false, rootCause);
|
|
2196
|
-
if (!$this.
|
|
2196
|
+
if (!$this.da_1.atomicfu$compareAndSet(state, cancelling))
|
|
2197
2197
|
return false;
|
|
2198
2198
|
notifyCancelling($this, list, rootCause);
|
|
2199
2199
|
return true;
|
|
@@ -2241,24 +2241,24 @@
|
|
|
2241
2241
|
var notifyRootCause;
|
|
2242
2242
|
// Inline function 'kotlinx.coroutines.internal.synchronized' call
|
|
2243
2243
|
// Inline function 'kotlinx.coroutines.internal.synchronizedImpl' call
|
|
2244
|
-
if (finishing.
|
|
2244
|
+
if (finishing.zi())
|
|
2245
2245
|
return get_COMPLETING_ALREADY();
|
|
2246
|
-
finishing.
|
|
2246
|
+
finishing.dj(true);
|
|
2247
2247
|
if (!(finishing === state)) {
|
|
2248
|
-
if (!$this.
|
|
2248
|
+
if (!$this.da_1.atomicfu$compareAndSet(state, finishing))
|
|
2249
2249
|
return get_COMPLETING_RETRY();
|
|
2250
2250
|
}
|
|
2251
2251
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
2252
|
-
var wasCancelling = finishing.
|
|
2252
|
+
var wasCancelling = finishing.wi();
|
|
2253
2253
|
var tmp0_safe_receiver = proposedUpdate instanceof CompletedExceptionally ? proposedUpdate : null;
|
|
2254
2254
|
if (tmp0_safe_receiver == null)
|
|
2255
2255
|
null;
|
|
2256
2256
|
else {
|
|
2257
2257
|
// Inline function 'kotlin.let' call
|
|
2258
|
-
finishing.
|
|
2258
|
+
finishing.bj(tmp0_safe_receiver.pa_1);
|
|
2259
2259
|
}
|
|
2260
2260
|
// Inline function 'kotlin.takeIf' call
|
|
2261
|
-
var this_0 = finishing.
|
|
2261
|
+
var this_0 = finishing.cj();
|
|
2262
2262
|
var tmp_0;
|
|
2263
2263
|
if (!wasCancelling) {
|
|
2264
2264
|
tmp_0 = this_0;
|
|
@@ -2275,7 +2275,7 @@
|
|
|
2275
2275
|
var child = nextChild($this, list);
|
|
2276
2276
|
if (!(child == null) && tryWaitForChild($this, finishing, child, proposedUpdate))
|
|
2277
2277
|
return get_COMPLETING_WAITING_CHILDREN();
|
|
2278
|
-
list.
|
|
2278
|
+
list.ri(2);
|
|
2279
2279
|
var anotherChild = nextChild($this, list);
|
|
2280
2280
|
if (!(anotherChild == null) && tryWaitForChild($this, finishing, anotherChild, proposedUpdate))
|
|
2281
2281
|
return get_COMPLETING_WAITING_CHILDREN();
|
|
@@ -2283,7 +2283,7 @@
|
|
|
2283
2283
|
}
|
|
2284
2284
|
function _get_exceptionOrNull__b3j7js($this, $receiver) {
|
|
2285
2285
|
var tmp0_safe_receiver = $receiver instanceof CompletedExceptionally ? $receiver : null;
|
|
2286
|
-
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2286
|
+
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pa_1;
|
|
2287
2287
|
}
|
|
2288
2288
|
function tryWaitForChild($this, state, child, proposedUpdate) {
|
|
2289
2289
|
var $this_0 = $this;
|
|
@@ -2292,7 +2292,7 @@
|
|
|
2292
2292
|
var proposedUpdate_0 = proposedUpdate;
|
|
2293
2293
|
$l$1: do {
|
|
2294
2294
|
$l$0: do {
|
|
2295
|
-
var handle = invokeOnCompletion(child_0.
|
|
2295
|
+
var handle = invokeOnCompletion(child_0.ij_1, false, new ChildCompletion($this_0, state_0, child_0, proposedUpdate_0));
|
|
2296
2296
|
if (!(handle === NonDisposableHandle_instance))
|
|
2297
2297
|
return true;
|
|
2298
2298
|
var tmp0_elvis_lhs = nextChild($this_0, child_0);
|
|
@@ -2321,29 +2321,29 @@
|
|
|
2321
2321
|
var waitChild = nextChild($this, lastChild);
|
|
2322
2322
|
if (!(waitChild == null) && tryWaitForChild($this, state, waitChild, proposedUpdate))
|
|
2323
2323
|
return Unit_instance;
|
|
2324
|
-
state.
|
|
2324
|
+
state.si_1.ri(2);
|
|
2325
2325
|
var waitChildAgain = nextChild($this, lastChild);
|
|
2326
2326
|
if (!(waitChildAgain == null) && tryWaitForChild($this, state, waitChildAgain, proposedUpdate)) {
|
|
2327
2327
|
return Unit_instance;
|
|
2328
2328
|
}
|
|
2329
2329
|
var finalState = finalizeFinishingState($this, state, proposedUpdate);
|
|
2330
|
-
$this.
|
|
2330
|
+
$this.ua(finalState);
|
|
2331
2331
|
}
|
|
2332
2332
|
function nextChild($this, $receiver) {
|
|
2333
2333
|
var cur = $receiver;
|
|
2334
2334
|
$l$loop: while (true) {
|
|
2335
2335
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.isRemoved' call
|
|
2336
|
-
if (!cur.
|
|
2336
|
+
if (!cur.rd_1) {
|
|
2337
2337
|
break $l$loop;
|
|
2338
2338
|
}
|
|
2339
2339
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.prevNode' call
|
|
2340
|
-
cur = cur.
|
|
2340
|
+
cur = cur.qd_1;
|
|
2341
2341
|
}
|
|
2342
2342
|
$l$loop_0: while (true) {
|
|
2343
2343
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.nextNode' call
|
|
2344
|
-
cur = cur.
|
|
2344
|
+
cur = cur.pd_1;
|
|
2345
2345
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.isRemoved' call
|
|
2346
|
-
if (cur.
|
|
2346
|
+
if (cur.rd_1)
|
|
2347
2347
|
continue $l$loop_0;
|
|
2348
2348
|
if (cur instanceof ChildHandleNode)
|
|
2349
2349
|
return cur;
|
|
@@ -2354,10 +2354,10 @@
|
|
|
2354
2354
|
function stateString($this, state) {
|
|
2355
2355
|
var tmp;
|
|
2356
2356
|
if (state instanceof Finishing) {
|
|
2357
|
-
tmp = state.
|
|
2357
|
+
tmp = state.wi() ? 'Cancelling' : state.zi() ? 'Completing' : 'Active';
|
|
2358
2358
|
} else {
|
|
2359
2359
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2360
|
-
tmp = state.
|
|
2360
|
+
tmp = state.ka() ? 'Active' : 'New';
|
|
2361
2361
|
} else {
|
|
2362
2362
|
if (state instanceof CompletedExceptionally) {
|
|
2363
2363
|
tmp = 'Cancelled';
|
|
@@ -2370,36 +2370,36 @@
|
|
|
2370
2370
|
}
|
|
2371
2371
|
function Finishing(list, isCompleting, rootCause) {
|
|
2372
2372
|
SynchronizedObject.call(this);
|
|
2373
|
-
this.
|
|
2374
|
-
this.
|
|
2375
|
-
this.
|
|
2376
|
-
this.
|
|
2373
|
+
this.si_1 = list;
|
|
2374
|
+
this.ti_1 = atomic$boolean$1(isCompleting);
|
|
2375
|
+
this.ui_1 = atomic$ref$1(rootCause);
|
|
2376
|
+
this.vi_1 = atomic$ref$1(null);
|
|
2377
2377
|
}
|
|
2378
|
-
protoOf(Finishing).
|
|
2379
|
-
return this.
|
|
2378
|
+
protoOf(Finishing).od = function () {
|
|
2379
|
+
return this.si_1;
|
|
2380
2380
|
};
|
|
2381
|
-
protoOf(Finishing).
|
|
2382
|
-
this.
|
|
2381
|
+
protoOf(Finishing).dj = function (value) {
|
|
2382
|
+
this.ti_1.kotlinx$atomicfu$value = value;
|
|
2383
2383
|
};
|
|
2384
|
-
protoOf(Finishing).
|
|
2385
|
-
return this.
|
|
2384
|
+
protoOf(Finishing).zi = function () {
|
|
2385
|
+
return this.ti_1.kotlinx$atomicfu$value;
|
|
2386
2386
|
};
|
|
2387
|
-
protoOf(Finishing).
|
|
2388
|
-
this.
|
|
2387
|
+
protoOf(Finishing).jj = function (value) {
|
|
2388
|
+
this.ui_1.kotlinx$atomicfu$value = value;
|
|
2389
2389
|
};
|
|
2390
|
-
protoOf(Finishing).
|
|
2391
|
-
return this.
|
|
2390
|
+
protoOf(Finishing).cj = function () {
|
|
2391
|
+
return this.ui_1.kotlinx$atomicfu$value;
|
|
2392
2392
|
};
|
|
2393
|
-
protoOf(Finishing).
|
|
2393
|
+
protoOf(Finishing).aj = function () {
|
|
2394
2394
|
return _get_exceptionsHolder__nhszp(this) === get_SEALED();
|
|
2395
2395
|
};
|
|
2396
|
-
protoOf(Finishing).
|
|
2397
|
-
return !(this.
|
|
2396
|
+
protoOf(Finishing).wi = function () {
|
|
2397
|
+
return !(this.cj() == null);
|
|
2398
2398
|
};
|
|
2399
|
-
protoOf(Finishing).
|
|
2400
|
-
return this.
|
|
2399
|
+
protoOf(Finishing).ka = function () {
|
|
2400
|
+
return this.cj() == null;
|
|
2401
2401
|
};
|
|
2402
|
-
protoOf(Finishing).
|
|
2402
|
+
protoOf(Finishing).xi = function (proposedException) {
|
|
2403
2403
|
var eh = _get_exceptionsHolder__nhszp(this);
|
|
2404
2404
|
var tmp;
|
|
2405
2405
|
if (eh == null) {
|
|
@@ -2421,7 +2421,7 @@
|
|
|
2421
2421
|
}
|
|
2422
2422
|
}
|
|
2423
2423
|
var list = tmp;
|
|
2424
|
-
var rootCause = this.
|
|
2424
|
+
var rootCause = this.cj();
|
|
2425
2425
|
if (rootCause == null)
|
|
2426
2426
|
null;
|
|
2427
2427
|
else {
|
|
@@ -2434,10 +2434,10 @@
|
|
|
2434
2434
|
_set_exceptionsHolder__tqm22h(this, get_SEALED());
|
|
2435
2435
|
return list;
|
|
2436
2436
|
};
|
|
2437
|
-
protoOf(Finishing).
|
|
2438
|
-
var rootCause = this.
|
|
2437
|
+
protoOf(Finishing).bj = function (exception) {
|
|
2438
|
+
var rootCause = this.cj();
|
|
2439
2439
|
if (rootCause == null) {
|
|
2440
|
-
this.
|
|
2440
|
+
this.jj(exception);
|
|
2441
2441
|
return Unit_instance;
|
|
2442
2442
|
}
|
|
2443
2443
|
if (exception === rootCause)
|
|
@@ -2466,29 +2466,29 @@
|
|
|
2466
2466
|
}
|
|
2467
2467
|
};
|
|
2468
2468
|
protoOf(Finishing).toString = function () {
|
|
2469
|
-
return 'Finishing[cancelling=' + this.
|
|
2469
|
+
return 'Finishing[cancelling=' + this.wi() + ', completing=' + this.zi() + ', rootCause=' + toString_0(this.cj()) + ', exceptions=' + toString_0(_get_exceptionsHolder__nhszp(this)) + ', list=' + this.si_1.toString() + ']';
|
|
2470
2470
|
};
|
|
2471
2471
|
function ChildCompletion(parent, state, child, proposedUpdate) {
|
|
2472
2472
|
JobNode.call(this);
|
|
2473
|
-
this.
|
|
2474
|
-
this.
|
|
2475
|
-
this.
|
|
2476
|
-
this.
|
|
2473
|
+
this.oj_1 = parent;
|
|
2474
|
+
this.pj_1 = state;
|
|
2475
|
+
this.qj_1 = child;
|
|
2476
|
+
this.rj_1 = proposedUpdate;
|
|
2477
2477
|
}
|
|
2478
|
-
protoOf(ChildCompletion).
|
|
2478
|
+
protoOf(ChildCompletion).dd = function () {
|
|
2479
2479
|
return false;
|
|
2480
2480
|
};
|
|
2481
|
-
protoOf(ChildCompletion).
|
|
2482
|
-
continueCompleting(this.
|
|
2481
|
+
protoOf(ChildCompletion).ad = function (cause) {
|
|
2482
|
+
continueCompleting(this.oj_1, this.pj_1, this.qj_1, this.rj_1);
|
|
2483
2483
|
};
|
|
2484
2484
|
function AwaitContinuation(delegate, job) {
|
|
2485
2485
|
CancellableContinuationImpl.call(this, delegate, 1);
|
|
2486
|
-
this.
|
|
2486
|
+
this.yj_1 = job;
|
|
2487
2487
|
}
|
|
2488
|
-
protoOf(AwaitContinuation).
|
|
2489
|
-
var state = this.
|
|
2488
|
+
protoOf(AwaitContinuation).hg = function (parent) {
|
|
2489
|
+
var state = this.yj_1.db();
|
|
2490
2490
|
if (state instanceof Finishing) {
|
|
2491
|
-
var tmp0_safe_receiver = state.
|
|
2491
|
+
var tmp0_safe_receiver = state.cj();
|
|
2492
2492
|
if (tmp0_safe_receiver == null)
|
|
2493
2493
|
null;
|
|
2494
2494
|
else {
|
|
@@ -2497,66 +2497,66 @@
|
|
|
2497
2497
|
}
|
|
2498
2498
|
}
|
|
2499
2499
|
if (state instanceof CompletedExceptionally)
|
|
2500
|
-
return state.
|
|
2501
|
-
return parent.
|
|
2500
|
+
return state.pa_1;
|
|
2501
|
+
return parent.hb();
|
|
2502
2502
|
};
|
|
2503
|
-
protoOf(AwaitContinuation).
|
|
2503
|
+
protoOf(AwaitContinuation).ug = function () {
|
|
2504
2504
|
return 'AwaitContinuation';
|
|
2505
2505
|
};
|
|
2506
2506
|
function awaitSuspend($this, $completion) {
|
|
2507
2507
|
var cont = new AwaitContinuation(intercepted($completion), $this);
|
|
2508
|
-
cont.
|
|
2508
|
+
cont.ce();
|
|
2509
2509
|
disposeOnCancellation(cont, invokeOnCompletion($this, VOID, new ResumeAwaitOnCompletion(cont)));
|
|
2510
|
-
return cont.
|
|
2510
|
+
return cont.de();
|
|
2511
2511
|
}
|
|
2512
2512
|
function JobSupport(active) {
|
|
2513
|
-
this.
|
|
2514
|
-
this.
|
|
2513
|
+
this.da_1 = atomic$ref$1(active ? get_EMPTY_ACTIVE() : get_EMPTY_NEW());
|
|
2514
|
+
this.ea_1 = atomic$ref$1(null);
|
|
2515
2515
|
}
|
|
2516
2516
|
protoOf(JobSupport).q = function () {
|
|
2517
2517
|
return Key_instance_2;
|
|
2518
2518
|
};
|
|
2519
|
-
protoOf(JobSupport).
|
|
2520
|
-
this.
|
|
2519
|
+
protoOf(JobSupport).bb = function (value) {
|
|
2520
|
+
this.ea_1.kotlinx$atomicfu$value = value;
|
|
2521
2521
|
};
|
|
2522
|
-
protoOf(JobSupport).
|
|
2523
|
-
return this.
|
|
2522
|
+
protoOf(JobSupport).cb = function () {
|
|
2523
|
+
return this.ea_1.kotlinx$atomicfu$value;
|
|
2524
2524
|
};
|
|
2525
|
-
protoOf(JobSupport).
|
|
2525
|
+
protoOf(JobSupport).fa = function (parent) {
|
|
2526
2526
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
2527
2527
|
if (parent == null) {
|
|
2528
|
-
this.
|
|
2528
|
+
this.bb(NonDisposableHandle_instance);
|
|
2529
2529
|
return Unit_instance;
|
|
2530
2530
|
}
|
|
2531
|
-
parent.
|
|
2532
|
-
var handle = parent.
|
|
2533
|
-
this.
|
|
2534
|
-
if (this.
|
|
2535
|
-
handle.
|
|
2536
|
-
this.
|
|
2531
|
+
parent.fb();
|
|
2532
|
+
var handle = parent.ub(this);
|
|
2533
|
+
this.bb(handle);
|
|
2534
|
+
if (this.eb()) {
|
|
2535
|
+
handle.zc();
|
|
2536
|
+
this.bb(NonDisposableHandle_instance);
|
|
2537
2537
|
}
|
|
2538
2538
|
};
|
|
2539
|
-
protoOf(JobSupport).
|
|
2540
|
-
return this.
|
|
2539
|
+
protoOf(JobSupport).db = function () {
|
|
2540
|
+
return this.da_1.kotlinx$atomicfu$value;
|
|
2541
2541
|
};
|
|
2542
|
-
protoOf(JobSupport).
|
|
2543
|
-
var state = this.
|
|
2542
|
+
protoOf(JobSupport).ka = function () {
|
|
2543
|
+
var state = this.db();
|
|
2544
2544
|
var tmp;
|
|
2545
2545
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2546
|
-
tmp = state.
|
|
2546
|
+
tmp = state.ka();
|
|
2547
2547
|
} else {
|
|
2548
2548
|
tmp = false;
|
|
2549
2549
|
}
|
|
2550
2550
|
return tmp;
|
|
2551
2551
|
};
|
|
2552
|
-
protoOf(JobSupport).
|
|
2553
|
-
var tmp = this.
|
|
2552
|
+
protoOf(JobSupport).eb = function () {
|
|
2553
|
+
var tmp = this.db();
|
|
2554
2554
|
return !(!(tmp == null) ? isInterface(tmp, Incomplete) : false);
|
|
2555
2555
|
};
|
|
2556
|
-
protoOf(JobSupport).
|
|
2556
|
+
protoOf(JobSupport).fb = function () {
|
|
2557
2557
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2558
2558
|
while (true) {
|
|
2559
|
-
var state = this.
|
|
2559
|
+
var state = this.db();
|
|
2560
2560
|
var tmp0_subject = startInternal(this, state);
|
|
2561
2561
|
if (tmp0_subject === 0)
|
|
2562
2562
|
return false;
|
|
@@ -2564,14 +2564,14 @@
|
|
|
2564
2564
|
return true;
|
|
2565
2565
|
}
|
|
2566
2566
|
};
|
|
2567
|
-
protoOf(JobSupport).
|
|
2567
|
+
protoOf(JobSupport).gb = function () {
|
|
2568
2568
|
};
|
|
2569
|
-
protoOf(JobSupport).
|
|
2570
|
-
var state = this.
|
|
2569
|
+
protoOf(JobSupport).hb = function () {
|
|
2570
|
+
var state = this.db();
|
|
2571
2571
|
var tmp;
|
|
2572
2572
|
if (state instanceof Finishing) {
|
|
2573
|
-
var tmp0_safe_receiver = state.
|
|
2574
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.
|
|
2573
|
+
var tmp0_safe_receiver = state.cj();
|
|
2574
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.ib(tmp0_safe_receiver, get_classSimpleName(this) + ' is cancelling');
|
|
2575
2575
|
var tmp_0;
|
|
2576
2576
|
if (tmp1_elvis_lhs == null) {
|
|
2577
2577
|
// Inline function 'kotlin.error' call
|
|
@@ -2588,7 +2588,7 @@
|
|
|
2588
2588
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
2589
2589
|
} else {
|
|
2590
2590
|
if (state instanceof CompletedExceptionally) {
|
|
2591
|
-
tmp = this.
|
|
2591
|
+
tmp = this.jb(state.pa_1);
|
|
2592
2592
|
} else {
|
|
2593
2593
|
tmp = new JobCancellationException(get_classSimpleName(this) + ' has completed normally', null, this);
|
|
2594
2594
|
}
|
|
@@ -2596,44 +2596,44 @@
|
|
|
2596
2596
|
}
|
|
2597
2597
|
return tmp;
|
|
2598
2598
|
};
|
|
2599
|
-
protoOf(JobSupport).
|
|
2599
|
+
protoOf(JobSupport).ib = function (_this__u8e3s4, message) {
|
|
2600
2600
|
var tmp0_elvis_lhs = _this__u8e3s4 instanceof CancellationException ? _this__u8e3s4 : null;
|
|
2601
2601
|
var tmp;
|
|
2602
2602
|
if (tmp0_elvis_lhs == null) {
|
|
2603
2603
|
// Inline function 'kotlinx.coroutines.JobSupport.defaultCancellationException' call
|
|
2604
|
-
tmp = new JobCancellationException(message == null ? this.
|
|
2604
|
+
tmp = new JobCancellationException(message == null ? this.na() : message, _this__u8e3s4, this);
|
|
2605
2605
|
} else {
|
|
2606
2606
|
tmp = tmp0_elvis_lhs;
|
|
2607
2607
|
}
|
|
2608
2608
|
return tmp;
|
|
2609
2609
|
};
|
|
2610
|
-
protoOf(JobSupport).
|
|
2610
|
+
protoOf(JobSupport).jb = function (_this__u8e3s4, message, $super) {
|
|
2611
2611
|
message = message === VOID ? null : message;
|
|
2612
|
-
return $super === VOID ? this.
|
|
2612
|
+
return $super === VOID ? this.ib(_this__u8e3s4, message) : $super.ib.call(this, _this__u8e3s4, message);
|
|
2613
2613
|
};
|
|
2614
|
-
protoOf(JobSupport).
|
|
2615
|
-
return this.
|
|
2614
|
+
protoOf(JobSupport).kb = function (handler) {
|
|
2615
|
+
return this.mb(true, new InvokeOnCompletion(handler));
|
|
2616
2616
|
};
|
|
2617
|
-
protoOf(JobSupport).
|
|
2617
|
+
protoOf(JobSupport).lb = function (onCancelling, invokeImmediately, handler) {
|
|
2618
2618
|
var tmp;
|
|
2619
2619
|
if (onCancelling) {
|
|
2620
2620
|
tmp = new InvokeOnCancelling(handler);
|
|
2621
2621
|
} else {
|
|
2622
2622
|
tmp = new InvokeOnCompletion(handler);
|
|
2623
2623
|
}
|
|
2624
|
-
return this.
|
|
2624
|
+
return this.mb(invokeImmediately, tmp);
|
|
2625
2625
|
};
|
|
2626
|
-
protoOf(JobSupport).
|
|
2627
|
-
node.
|
|
2626
|
+
protoOf(JobSupport).mb = function (invokeImmediately, node) {
|
|
2627
|
+
node.md_1 = this;
|
|
2628
2628
|
var tmp$ret$0;
|
|
2629
2629
|
$l$block_1: {
|
|
2630
2630
|
// Inline function 'kotlinx.coroutines.JobSupport.tryPutNodeIntoList' call
|
|
2631
2631
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2632
2632
|
while (true) {
|
|
2633
|
-
var state = this.
|
|
2633
|
+
var state = this.db();
|
|
2634
2634
|
if (state instanceof Empty) {
|
|
2635
|
-
if (state.
|
|
2636
|
-
if (this.
|
|
2635
|
+
if (state.mi_1) {
|
|
2636
|
+
if (this.da_1.atomicfu$compareAndSet(state, node)) {
|
|
2637
2637
|
tmp$ret$0 = true;
|
|
2638
2638
|
break $l$block_1;
|
|
2639
2639
|
}
|
|
@@ -2642,26 +2642,26 @@
|
|
|
2642
2642
|
}
|
|
2643
2643
|
} else {
|
|
2644
2644
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2645
|
-
var list = state.
|
|
2645
|
+
var list = state.od();
|
|
2646
2646
|
if (list == null) {
|
|
2647
2647
|
promoteSingleToNodeList(this, state instanceof JobNode ? state : THROW_CCE());
|
|
2648
2648
|
} else {
|
|
2649
2649
|
var tmp;
|
|
2650
|
-
if (node.
|
|
2650
|
+
if (node.dd()) {
|
|
2651
2651
|
var tmp0_safe_receiver = state instanceof Finishing ? state : null;
|
|
2652
|
-
var rootCause = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2652
|
+
var rootCause = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cj();
|
|
2653
2653
|
var tmp_0;
|
|
2654
2654
|
if (rootCause == null) {
|
|
2655
|
-
tmp_0 = list.
|
|
2655
|
+
tmp_0 = list.sd(node, 5);
|
|
2656
2656
|
} else {
|
|
2657
2657
|
if (invokeImmediately) {
|
|
2658
|
-
node.
|
|
2658
|
+
node.ad(rootCause);
|
|
2659
2659
|
}
|
|
2660
2660
|
return NonDisposableHandle_instance;
|
|
2661
2661
|
}
|
|
2662
2662
|
tmp = tmp_0;
|
|
2663
2663
|
} else {
|
|
2664
|
-
tmp = list.
|
|
2664
|
+
tmp = list.sd(node, 1);
|
|
2665
2665
|
}
|
|
2666
2666
|
if (tmp) {
|
|
2667
2667
|
tmp$ret$0 = true;
|
|
@@ -2679,25 +2679,25 @@
|
|
|
2679
2679
|
if (added)
|
|
2680
2680
|
return node;
|
|
2681
2681
|
else if (invokeImmediately) {
|
|
2682
|
-
var tmp_1 = this.
|
|
2682
|
+
var tmp_1 = this.db();
|
|
2683
2683
|
var tmp0_safe_receiver_0 = tmp_1 instanceof CompletedExceptionally ? tmp_1 : null;
|
|
2684
|
-
node.
|
|
2684
|
+
node.ad(tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.pa_1);
|
|
2685
2685
|
}
|
|
2686
2686
|
return NonDisposableHandle_instance;
|
|
2687
2687
|
};
|
|
2688
|
-
protoOf(JobSupport).
|
|
2688
|
+
protoOf(JobSupport).nb = function (node) {
|
|
2689
2689
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2690
2690
|
while (true) {
|
|
2691
|
-
var state = this.
|
|
2691
|
+
var state = this.db();
|
|
2692
2692
|
if (state instanceof JobNode) {
|
|
2693
2693
|
if (!(state === node))
|
|
2694
2694
|
return Unit_instance;
|
|
2695
|
-
if (this.
|
|
2695
|
+
if (this.da_1.atomicfu$compareAndSet(state, get_EMPTY_ACTIVE()))
|
|
2696
2696
|
return Unit_instance;
|
|
2697
2697
|
} else {
|
|
2698
2698
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2699
|
-
if (!(state.
|
|
2700
|
-
node.
|
|
2699
|
+
if (!(state.od() == null)) {
|
|
2700
|
+
node.td();
|
|
2701
2701
|
}
|
|
2702
2702
|
return Unit_instance;
|
|
2703
2703
|
} else {
|
|
@@ -2706,23 +2706,23 @@
|
|
|
2706
2706
|
}
|
|
2707
2707
|
}
|
|
2708
2708
|
};
|
|
2709
|
-
protoOf(JobSupport).
|
|
2709
|
+
protoOf(JobSupport).ob = function () {
|
|
2710
2710
|
return false;
|
|
2711
2711
|
};
|
|
2712
|
-
protoOf(JobSupport).
|
|
2712
|
+
protoOf(JobSupport).na = function () {
|
|
2713
2713
|
return 'Job was cancelled';
|
|
2714
2714
|
};
|
|
2715
|
-
protoOf(JobSupport).
|
|
2716
|
-
this.
|
|
2715
|
+
protoOf(JobSupport).pb = function (parentJob) {
|
|
2716
|
+
this.rb(parentJob);
|
|
2717
2717
|
};
|
|
2718
|
-
protoOf(JobSupport).
|
|
2718
|
+
protoOf(JobSupport).qb = function (cause) {
|
|
2719
2719
|
if (cause instanceof CancellationException)
|
|
2720
2720
|
return true;
|
|
2721
|
-
return this.
|
|
2721
|
+
return this.rb(cause) && this.xb();
|
|
2722
2722
|
};
|
|
2723
|
-
protoOf(JobSupport).
|
|
2723
|
+
protoOf(JobSupport).rb = function (cause) {
|
|
2724
2724
|
var finalState = get_COMPLETING_ALREADY();
|
|
2725
|
-
if (this.
|
|
2725
|
+
if (this.ob()) {
|
|
2726
2726
|
finalState = cancelMakeCompleting(this, cause);
|
|
2727
2727
|
if (finalState === get_COMPLETING_WAITING_CHILDREN())
|
|
2728
2728
|
return true;
|
|
@@ -2738,19 +2738,19 @@
|
|
|
2738
2738
|
} else if (finalState === get_TOO_LATE_TO_CANCEL()) {
|
|
2739
2739
|
tmp = false;
|
|
2740
2740
|
} else {
|
|
2741
|
-
this.
|
|
2741
|
+
this.ua(finalState);
|
|
2742
2742
|
tmp = true;
|
|
2743
2743
|
}
|
|
2744
2744
|
return tmp;
|
|
2745
2745
|
};
|
|
2746
|
-
protoOf(JobSupport).
|
|
2747
|
-
var state = this.
|
|
2746
|
+
protoOf(JobSupport).sb = function () {
|
|
2747
|
+
var state = this.db();
|
|
2748
2748
|
var tmp;
|
|
2749
2749
|
if (state instanceof Finishing) {
|
|
2750
|
-
tmp = state.
|
|
2750
|
+
tmp = state.cj();
|
|
2751
2751
|
} else {
|
|
2752
2752
|
if (state instanceof CompletedExceptionally) {
|
|
2753
|
-
tmp = state.
|
|
2753
|
+
tmp = state.pa_1;
|
|
2754
2754
|
} else {
|
|
2755
2755
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2756
2756
|
// Inline function 'kotlin.error' call
|
|
@@ -2765,10 +2765,10 @@
|
|
|
2765
2765
|
var tmp1_elvis_lhs = rootCause instanceof CancellationException ? rootCause : null;
|
|
2766
2766
|
return tmp1_elvis_lhs == null ? new JobCancellationException('Parent job is ' + stateString(this, state), rootCause, this) : tmp1_elvis_lhs;
|
|
2767
2767
|
};
|
|
2768
|
-
protoOf(JobSupport).
|
|
2768
|
+
protoOf(JobSupport).tb = function (proposedUpdate) {
|
|
2769
2769
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2770
2770
|
while (true) {
|
|
2771
|
-
var tmp0 = this.
|
|
2771
|
+
var tmp0 = this.db();
|
|
2772
2772
|
$l$block: {
|
|
2773
2773
|
var finalState = tryMakeCompleting(this, tmp0, proposedUpdate);
|
|
2774
2774
|
if (finalState === get_COMPLETING_ALREADY())
|
|
@@ -2778,16 +2778,16 @@
|
|
|
2778
2778
|
else if (finalState === get_COMPLETING_RETRY()) {
|
|
2779
2779
|
break $l$block;
|
|
2780
2780
|
} else {
|
|
2781
|
-
this.
|
|
2781
|
+
this.ua(finalState);
|
|
2782
2782
|
return true;
|
|
2783
2783
|
}
|
|
2784
2784
|
}
|
|
2785
2785
|
}
|
|
2786
2786
|
};
|
|
2787
|
-
protoOf(JobSupport).
|
|
2787
|
+
protoOf(JobSupport).sa = function (proposedUpdate) {
|
|
2788
2788
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2789
2789
|
while (true) {
|
|
2790
|
-
var tmp0 = this.
|
|
2790
|
+
var tmp0 = this.db();
|
|
2791
2791
|
$l$block: {
|
|
2792
2792
|
var finalState = tryMakeCompleting(this, tmp0, proposedUpdate);
|
|
2793
2793
|
if (finalState === get_COMPLETING_ALREADY())
|
|
@@ -2799,20 +2799,20 @@
|
|
|
2799
2799
|
}
|
|
2800
2800
|
}
|
|
2801
2801
|
};
|
|
2802
|
-
protoOf(JobSupport).
|
|
2802
|
+
protoOf(JobSupport).ub = function (child) {
|
|
2803
2803
|
// Inline function 'kotlin.also' call
|
|
2804
2804
|
var this_0 = new ChildHandleNode(child);
|
|
2805
|
-
this_0.
|
|
2805
|
+
this_0.md_1 = this;
|
|
2806
2806
|
var node = this_0;
|
|
2807
2807
|
var tmp$ret$2;
|
|
2808
2808
|
$l$block_1: {
|
|
2809
2809
|
// Inline function 'kotlinx.coroutines.JobSupport.tryPutNodeIntoList' call
|
|
2810
2810
|
// Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
|
|
2811
2811
|
while (true) {
|
|
2812
|
-
var state = this.
|
|
2812
|
+
var state = this.db();
|
|
2813
2813
|
if (state instanceof Empty) {
|
|
2814
|
-
if (state.
|
|
2815
|
-
if (this.
|
|
2814
|
+
if (state.mi_1) {
|
|
2815
|
+
if (this.da_1.atomicfu$compareAndSet(state, node)) {
|
|
2816
2816
|
tmp$ret$2 = true;
|
|
2817
2817
|
break $l$block_1;
|
|
2818
2818
|
}
|
|
@@ -2821,27 +2821,27 @@
|
|
|
2821
2821
|
}
|
|
2822
2822
|
} else {
|
|
2823
2823
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2824
|
-
var list = state.
|
|
2824
|
+
var list = state.od();
|
|
2825
2825
|
if (list == null) {
|
|
2826
2826
|
promoteSingleToNodeList(this, state instanceof JobNode ? state : THROW_CCE());
|
|
2827
2827
|
} else {
|
|
2828
|
-
var addedBeforeCancellation = list.
|
|
2828
|
+
var addedBeforeCancellation = list.sd(node, 7);
|
|
2829
2829
|
var tmp;
|
|
2830
2830
|
if (addedBeforeCancellation) {
|
|
2831
2831
|
tmp = true;
|
|
2832
2832
|
} else {
|
|
2833
|
-
var addedBeforeCompletion = list.
|
|
2834
|
-
var latestState = this.
|
|
2833
|
+
var addedBeforeCompletion = list.sd(node, 3);
|
|
2834
|
+
var latestState = this.db();
|
|
2835
2835
|
var tmp_0;
|
|
2836
2836
|
if (latestState instanceof Finishing) {
|
|
2837
|
-
tmp_0 = latestState.
|
|
2837
|
+
tmp_0 = latestState.cj();
|
|
2838
2838
|
} else {
|
|
2839
2839
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
2840
2840
|
var tmp0_safe_receiver = latestState instanceof CompletedExceptionally ? latestState : null;
|
|
2841
|
-
tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2841
|
+
tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pa_1;
|
|
2842
2842
|
}
|
|
2843
2843
|
var rootCause = tmp_0;
|
|
2844
|
-
node.
|
|
2844
|
+
node.ad(rootCause);
|
|
2845
2845
|
var tmp_1;
|
|
2846
2846
|
if (addedBeforeCompletion) {
|
|
2847
2847
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
@@ -2866,40 +2866,40 @@
|
|
|
2866
2866
|
var added = tmp$ret$2;
|
|
2867
2867
|
if (added)
|
|
2868
2868
|
return node;
|
|
2869
|
-
var tmp_2 = this.
|
|
2869
|
+
var tmp_2 = this.db();
|
|
2870
2870
|
var tmp0_safe_receiver_0 = tmp_2 instanceof CompletedExceptionally ? tmp_2 : null;
|
|
2871
|
-
node.
|
|
2871
|
+
node.ad(tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.pa_1);
|
|
2872
2872
|
return NonDisposableHandle_instance;
|
|
2873
2873
|
};
|
|
2874
|
-
protoOf(JobSupport).
|
|
2874
|
+
protoOf(JobSupport).va = function (exception) {
|
|
2875
2875
|
throw exception;
|
|
2876
2876
|
};
|
|
2877
|
-
protoOf(JobSupport).
|
|
2877
|
+
protoOf(JobSupport).vb = function (cause) {
|
|
2878
2878
|
};
|
|
2879
|
-
protoOf(JobSupport).
|
|
2879
|
+
protoOf(JobSupport).wb = function () {
|
|
2880
2880
|
return false;
|
|
2881
2881
|
};
|
|
2882
|
-
protoOf(JobSupport).
|
|
2882
|
+
protoOf(JobSupport).xb = function () {
|
|
2883
2883
|
return true;
|
|
2884
2884
|
};
|
|
2885
|
-
protoOf(JobSupport).
|
|
2885
|
+
protoOf(JobSupport).yb = function (exception) {
|
|
2886
2886
|
return false;
|
|
2887
2887
|
};
|
|
2888
|
-
protoOf(JobSupport).
|
|
2888
|
+
protoOf(JobSupport).oa = function (state) {
|
|
2889
2889
|
};
|
|
2890
|
-
protoOf(JobSupport).
|
|
2890
|
+
protoOf(JobSupport).ua = function (state) {
|
|
2891
2891
|
};
|
|
2892
2892
|
protoOf(JobSupport).toString = function () {
|
|
2893
|
-
return this.
|
|
2893
|
+
return this.zb() + '@' + get_hexAddress(this);
|
|
2894
2894
|
};
|
|
2895
|
-
protoOf(JobSupport).
|
|
2896
|
-
return this.
|
|
2895
|
+
protoOf(JobSupport).zb = function () {
|
|
2896
|
+
return this.wa() + '{' + stateString(this, this.db()) + '}';
|
|
2897
2897
|
};
|
|
2898
|
-
protoOf(JobSupport).
|
|
2898
|
+
protoOf(JobSupport).wa = function () {
|
|
2899
2899
|
return get_classSimpleName(this);
|
|
2900
2900
|
};
|
|
2901
|
-
protoOf(JobSupport).
|
|
2902
|
-
var state = this.
|
|
2901
|
+
protoOf(JobSupport).ac = function () {
|
|
2902
|
+
var state = this.db();
|
|
2903
2903
|
// Inline function 'kotlin.check' call
|
|
2904
2904
|
if (!!(!(state == null) ? isInterface(state, Incomplete) : false)) {
|
|
2905
2905
|
var message = 'This job has not completed yet';
|
|
@@ -2907,24 +2907,24 @@
|
|
|
2907
2907
|
}
|
|
2908
2908
|
return _get_exceptionOrNull__b3j7js(this, state);
|
|
2909
2909
|
};
|
|
2910
|
-
protoOf(JobSupport).
|
|
2911
|
-
var state = this.
|
|
2910
|
+
protoOf(JobSupport).bc = function () {
|
|
2911
|
+
var state = this.db();
|
|
2912
2912
|
// Inline function 'kotlin.check' call
|
|
2913
2913
|
if (!!(!(state == null) ? isInterface(state, Incomplete) : false)) {
|
|
2914
2914
|
var message = 'This job has not completed yet';
|
|
2915
2915
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
2916
2916
|
}
|
|
2917
2917
|
if (state instanceof CompletedExceptionally)
|
|
2918
|
-
throw state.
|
|
2918
|
+
throw state.pa_1;
|
|
2919
2919
|
return unboxState(state);
|
|
2920
2920
|
};
|
|
2921
|
-
protoOf(JobSupport).
|
|
2921
|
+
protoOf(JobSupport).cc = function ($completion) {
|
|
2922
2922
|
$l$loop: while (true) {
|
|
2923
|
-
var state = this.
|
|
2923
|
+
var state = this.db();
|
|
2924
2924
|
if (!(!(state == null) ? isInterface(state, Incomplete) : false)) {
|
|
2925
2925
|
if (state instanceof CompletedExceptionally) {
|
|
2926
2926
|
// Inline function 'kotlinx.coroutines.internal.recoverAndThrow' call
|
|
2927
|
-
throw state.
|
|
2927
|
+
throw state.pa_1;
|
|
2928
2928
|
}
|
|
2929
2929
|
return unboxState(state);
|
|
2930
2930
|
}
|
|
@@ -2944,77 +2944,77 @@
|
|
|
2944
2944
|
return tmp;
|
|
2945
2945
|
}
|
|
2946
2946
|
function InactiveNodeList(list) {
|
|
2947
|
-
this.
|
|
2947
|
+
this.yi_1 = list;
|
|
2948
2948
|
}
|
|
2949
|
-
protoOf(InactiveNodeList).
|
|
2950
|
-
return this.
|
|
2949
|
+
protoOf(InactiveNodeList).od = function () {
|
|
2950
|
+
return this.yi_1;
|
|
2951
2951
|
};
|
|
2952
|
-
protoOf(InactiveNodeList).
|
|
2952
|
+
protoOf(InactiveNodeList).ka = function () {
|
|
2953
2953
|
return false;
|
|
2954
2954
|
};
|
|
2955
2955
|
protoOf(InactiveNodeList).toString = function () {
|
|
2956
|
-
return get_DEBUG() ? this.
|
|
2956
|
+
return get_DEBUG() ? this.yi_1.qi('New') : anyToString(this);
|
|
2957
2957
|
};
|
|
2958
2958
|
function InvokeOnCompletion(handler) {
|
|
2959
2959
|
JobNode.call(this);
|
|
2960
|
-
this.
|
|
2960
|
+
this.dk_1 = handler;
|
|
2961
2961
|
}
|
|
2962
|
-
protoOf(InvokeOnCompletion).
|
|
2962
|
+
protoOf(InvokeOnCompletion).dd = function () {
|
|
2963
2963
|
return false;
|
|
2964
2964
|
};
|
|
2965
|
-
protoOf(InvokeOnCompletion).
|
|
2966
|
-
return this.
|
|
2965
|
+
protoOf(InvokeOnCompletion).ad = function (cause) {
|
|
2966
|
+
return this.dk_1(cause);
|
|
2967
2967
|
};
|
|
2968
2968
|
function InvokeOnCancelling(handler) {
|
|
2969
2969
|
JobNode.call(this);
|
|
2970
|
-
this.
|
|
2971
|
-
this.
|
|
2970
|
+
this.ik_1 = handler;
|
|
2971
|
+
this.jk_1 = atomic$boolean$1(false);
|
|
2972
2972
|
}
|
|
2973
|
-
protoOf(InvokeOnCancelling).
|
|
2973
|
+
protoOf(InvokeOnCancelling).dd = function () {
|
|
2974
2974
|
return true;
|
|
2975
2975
|
};
|
|
2976
|
-
protoOf(InvokeOnCancelling).
|
|
2977
|
-
if (this.
|
|
2978
|
-
this.
|
|
2976
|
+
protoOf(InvokeOnCancelling).ad = function (cause) {
|
|
2977
|
+
if (this.jk_1.atomicfu$compareAndSet(false, true))
|
|
2978
|
+
this.ik_1(cause);
|
|
2979
2979
|
};
|
|
2980
2980
|
function ChildHandleNode(childJob) {
|
|
2981
2981
|
JobNode.call(this);
|
|
2982
|
-
this.
|
|
2982
|
+
this.ij_1 = childJob;
|
|
2983
2983
|
}
|
|
2984
|
-
protoOf(ChildHandleNode).
|
|
2984
|
+
protoOf(ChildHandleNode).dd = function () {
|
|
2985
2985
|
return true;
|
|
2986
2986
|
};
|
|
2987
|
-
protoOf(ChildHandleNode).
|
|
2988
|
-
return this.
|
|
2987
|
+
protoOf(ChildHandleNode).ad = function (cause) {
|
|
2988
|
+
return this.ij_1.pb(this.nd());
|
|
2989
2989
|
};
|
|
2990
|
-
protoOf(ChildHandleNode).
|
|
2991
|
-
return this.
|
|
2990
|
+
protoOf(ChildHandleNode).qb = function (cause) {
|
|
2991
|
+
return this.nd().qb(cause);
|
|
2992
2992
|
};
|
|
2993
2993
|
function unboxState(_this__u8e3s4) {
|
|
2994
2994
|
_init_properties_JobSupport_kt__68f172();
|
|
2995
2995
|
var tmp0_safe_receiver = _this__u8e3s4 instanceof IncompleteStateBox ? _this__u8e3s4 : null;
|
|
2996
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2996
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kk_1;
|
|
2997
2997
|
return tmp1_elvis_lhs == null ? _this__u8e3s4 : tmp1_elvis_lhs;
|
|
2998
2998
|
}
|
|
2999
2999
|
function ResumeAwaitOnCompletion(continuation) {
|
|
3000
3000
|
JobNode.call(this);
|
|
3001
|
-
this.
|
|
3001
|
+
this.pk_1 = continuation;
|
|
3002
3002
|
}
|
|
3003
|
-
protoOf(ResumeAwaitOnCompletion).
|
|
3003
|
+
protoOf(ResumeAwaitOnCompletion).dd = function () {
|
|
3004
3004
|
return false;
|
|
3005
3005
|
};
|
|
3006
|
-
protoOf(ResumeAwaitOnCompletion).
|
|
3007
|
-
var state = this.
|
|
3006
|
+
protoOf(ResumeAwaitOnCompletion).ad = function (cause) {
|
|
3007
|
+
var state = this.nd().db();
|
|
3008
3008
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3009
3009
|
if (state instanceof CompletedExceptionally) {
|
|
3010
|
-
var tmp0 = this.
|
|
3010
|
+
var tmp0 = this.pk_1;
|
|
3011
3011
|
// Inline function 'kotlin.coroutines.resumeWithException' call
|
|
3012
3012
|
// Inline function 'kotlin.Companion.failure' call
|
|
3013
|
-
var exception = state.
|
|
3013
|
+
var exception = state.pa_1;
|
|
3014
3014
|
var tmp$ret$2 = _Result___init__impl__xyqfz8(createFailure(exception));
|
|
3015
3015
|
tmp0.l5(tmp$ret$2);
|
|
3016
3016
|
} else {
|
|
3017
|
-
var tmp0_0 = this.
|
|
3017
|
+
var tmp0_0 = this.pk_1;
|
|
3018
3018
|
// Inline function 'kotlin.coroutines.resume' call
|
|
3019
3019
|
// Inline function 'kotlin.Companion.success' call
|
|
3020
3020
|
var value = unboxState(state);
|
|
@@ -3023,7 +3023,7 @@
|
|
|
3023
3023
|
}
|
|
3024
3024
|
};
|
|
3025
3025
|
function IncompleteStateBox(state) {
|
|
3026
|
-
this.
|
|
3026
|
+
this.kk_1 = state;
|
|
3027
3027
|
}
|
|
3028
3028
|
var properties_initialized_JobSupport_kt_5iq8a4;
|
|
3029
3029
|
function _init_properties_JobSupport_kt__68f172() {
|
|
@@ -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.sk();
|
|
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).sk = function () {
|
|
3049
|
+
var main = Dispatchers_getInstance().xk();
|
|
3050
3050
|
if (this === main)
|
|
3051
3051
|
return 'Dispatchers.Main';
|
|
3052
3052
|
var tmp;
|
|
3053
3053
|
try {
|
|
3054
|
-
tmp = main.
|
|
3054
|
+
tmp = main.rk();
|
|
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).rh = function (context) {
|
|
3077
3077
|
return false;
|
|
3078
3078
|
};
|
|
3079
|
-
protoOf(Unconfined).
|
|
3079
|
+
protoOf(Unconfined).sh = function (context, block) {
|
|
3080
3080
|
var yieldContext = context.n5(Key_instance_3);
|
|
3081
3081
|
if (!(yieldContext == null)) {
|
|
3082
|
-
yieldContext.
|
|
3082
|
+
yieldContext.al_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.nf_1 = id;
|
|
3112
|
+
this.of_1 = atomic$int$1(pointers << 16);
|
|
3113
3113
|
}
|
|
3114
|
-
protoOf(Segment).
|
|
3115
|
-
return this.
|
|
3114
|
+
protoOf(Segment).cl = function () {
|
|
3115
|
+
return this.of_1.kotlinx$atomicfu$value === this.bl() && !this.fl();
|
|
3116
3116
|
};
|
|
3117
|
-
protoOf(Segment).
|
|
3118
|
-
var tmp0 = this.
|
|
3117
|
+
protoOf(Segment).gl = function () {
|
|
3118
|
+
var tmp0 = this.of_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.bl()) || this.fl())) {
|
|
3125
3125
|
tmp$ret$0 = false;
|
|
3126
3126
|
break $l$block_0;
|
|
3127
3127
|
}
|
|
@@ -3133,11 +3133,11 @@
|
|
|
3133
3133
|
}
|
|
3134
3134
|
return tmp$ret$0;
|
|
3135
3135
|
};
|
|
3136
|
-
protoOf(Segment).
|
|
3137
|
-
return this.
|
|
3136
|
+
protoOf(Segment).hl = function () {
|
|
3137
|
+
return this.of_1.atomicfu$addAndGet(-65536) === this.bl() && !this.fl();
|
|
3138
3138
|
};
|
|
3139
|
-
protoOf(Segment).
|
|
3140
|
-
if (this.
|
|
3139
|
+
protoOf(Segment).il = function () {
|
|
3140
|
+
if (this.of_1.atomicfu$incrementAndGet() === this.bl()) {
|
|
3141
3141
|
this.o1();
|
|
3142
3142
|
}
|
|
3143
3143
|
};
|
|
@@ -3163,19 +3163,19 @@
|
|
|
3163
3163
|
return tmp;
|
|
3164
3164
|
}
|
|
3165
3165
|
function _get_nextOrClosed__w0gmuv($this) {
|
|
3166
|
-
return $this.
|
|
3166
|
+
return $this.dl_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.ll();
|
|
3170
|
+
while (!(cur === null) && cur.cl())
|
|
3171
|
+
cur = cur.el_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.jl());
|
|
3177
|
+
while (cur.cl()) {
|
|
3178
|
+
var tmp0_elvis_lhs = cur.jl();
|
|
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.dl_1 = atomic$ref$1(null);
|
|
3194
|
+
this.el_1 = atomic$ref$1(prev);
|
|
3195
3195
|
}
|
|
3196
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3196
|
+
protoOf(ConcurrentLinkedListNode).jl = 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).kl = function (value) {
|
|
3209
|
+
return this.dl_1.atomicfu$compareAndSet(null, value);
|
|
3210
3210
|
};
|
|
3211
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3212
|
-
return this.
|
|
3211
|
+
protoOf(ConcurrentLinkedListNode).fl = function () {
|
|
3212
|
+
return this.jl() == null;
|
|
3213
3213
|
};
|
|
3214
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3215
|
-
return this.
|
|
3214
|
+
protoOf(ConcurrentLinkedListNode).ll = function () {
|
|
3215
|
+
return this.el_1.kotlinx$atomicfu$value;
|
|
3216
3216
|
};
|
|
3217
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3217
|
+
protoOf(ConcurrentLinkedListNode).ml = function () {
|
|
3218
3218
|
// Inline function 'kotlinx.atomicfu.AtomicRef.lazySet' call
|
|
3219
|
-
this.
|
|
3219
|
+
this.el_1.kotlinx$atomicfu$value = null;
|
|
3220
3220
|
};
|
|
3221
3221
|
protoOf(ConcurrentLinkedListNode).o1 = function () {
|
|
3222
3222
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3223
|
-
if (this.
|
|
3223
|
+
if (this.fl())
|
|
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.el_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.dl_1.kotlinx$atomicfu$value = next;
|
|
3241
|
+
if (next.cl() && !next.fl())
|
|
3242
3242
|
continue $l$loop_0;
|
|
3243
|
-
if (!(prev === null) && prev.
|
|
3243
|
+
if (!(prev === null) && prev.cl())
|
|
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.nf_1, id) < 0 || cur.cl()) {
|
|
3252
3252
|
// Inline function 'kotlinx.coroutines.internal.ConcurrentLinkedListNode.nextOrIfClosed' call
|
|
3253
3253
|
var this_0 = cur;
|
|
3254
3254
|
// Inline function 'kotlin.let' call
|
|
@@ -3265,10 +3265,10 @@
|
|
|
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.nf_1;
|
|
3269
3269
|
var newTail = createNewSegment(add(this_1, fromInt(1)), cur);
|
|
3270
|
-
if (cur.
|
|
3271
|
-
if (cur.
|
|
3270
|
+
if (cur.kl(newTail)) {
|
|
3271
|
+
if (cur.cl()) {
|
|
3272
3272
|
cur.o1();
|
|
3273
3273
|
}
|
|
3274
3274
|
cur = newTail;
|
|
@@ -3291,7 +3291,7 @@
|
|
|
3291
3291
|
while (_iterator__ex2g4s.h()) {
|
|
3292
3292
|
var handler = _iterator__ex2g4s.i();
|
|
3293
3293
|
try {
|
|
3294
|
-
handler.
|
|
3294
|
+
handler.vh(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.ff_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.bf_1 = dispatcher;
|
|
3339
|
+
this.cf_1 = continuation;
|
|
3340
|
+
this.df_1 = get_UNDEFINED();
|
|
3341
|
+
this.ef_1 = threadContextElements(this.g5());
|
|
3342
|
+
this.ff_1 = atomic$ref$1(null);
|
|
3343
3343
|
}
|
|
3344
|
-
protoOf(DispatchedContinuation).
|
|
3345
|
-
return !(this.
|
|
3344
|
+
protoOf(DispatchedContinuation).if = function () {
|
|
3345
|
+
return !(this.ff_1.kotlinx$atomicfu$value == null);
|
|
3346
3346
|
};
|
|
3347
|
-
protoOf(DispatchedContinuation).
|
|
3347
|
+
protoOf(DispatchedContinuation).nl = function () {
|
|
3348
3348
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
3349
|
-
var this_0 = this.
|
|
3349
|
+
var this_0 = this.ff_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).th = function () {
|
|
3356
|
+
this.nl();
|
|
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.zf();
|
|
3362
3362
|
}
|
|
3363
3363
|
};
|
|
3364
|
-
protoOf(DispatchedContinuation).
|
|
3364
|
+
protoOf(DispatchedContinuation).gf = function () {
|
|
3365
3365
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
3366
|
-
var this_0 = this.
|
|
3366
|
+
var this_0 = this.ff_1;
|
|
3367
3367
|
while (true) {
|
|
3368
3368
|
var state = this_0.kotlinx$atomicfu$value;
|
|
3369
3369
|
if (state === null) {
|
|
3370
|
-
this.
|
|
3370
|
+
this.ff_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.ff_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).kg = function (continuation) {
|
|
3390
3390
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
3391
|
-
var this_0 = this.
|
|
3391
|
+
var this_0 = this.ff_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.ff_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.ff_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).kf = function (cause) {
|
|
3415
3415
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
3416
|
-
var this_0 = this.
|
|
3416
|
+
var this_0 = this.ff_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.ff_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.ff_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).bg = function () {
|
|
3433
|
+
var state = this.df_1;
|
|
3434
3434
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3435
|
-
this.
|
|
3435
|
+
this.df_1 = get_UNDEFINED();
|
|
3436
3436
|
return state;
|
|
3437
3437
|
};
|
|
3438
|
-
protoOf(DispatchedContinuation).
|
|
3438
|
+
protoOf(DispatchedContinuation).ag = function () {
|
|
3439
3439
|
return this;
|
|
3440
3440
|
};
|
|
3441
3441
|
protoOf(DispatchedContinuation).l5 = function (result) {
|
|
3442
3442
|
var state = toState_0(result);
|
|
3443
|
-
if (safeIsDispatchNeeded(this.
|
|
3444
|
-
this.
|
|
3445
|
-
this.
|
|
3446
|
-
safeDispatch(this.
|
|
3443
|
+
if (safeIsDispatchNeeded(this.bf_1, this.g5())) {
|
|
3444
|
+
this.df_1 = state;
|
|
3445
|
+
this.jf_1 = 0;
|
|
3446
|
+
safeDispatch(this.bf_1, this.g5(), 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().ii();
|
|
3452
|
+
if (false && eventLoop.di()) {
|
|
3453
3453
|
break $l$block;
|
|
3454
3454
|
}
|
|
3455
3455
|
var tmp;
|
|
3456
|
-
if (eventLoop.
|
|
3457
|
-
this.
|
|
3458
|
-
this.
|
|
3459
|
-
eventLoop.
|
|
3456
|
+
if (eventLoop.ci()) {
|
|
3457
|
+
this.df_1 = state;
|
|
3458
|
+
this.jf_1 = 0;
|
|
3459
|
+
eventLoop.bi(this);
|
|
3460
3460
|
tmp = true;
|
|
3461
3461
|
} else {
|
|
3462
3462
|
// Inline function 'kotlinx.coroutines.runUnconfinedEventLoop' call
|
|
3463
|
-
eventLoop.
|
|
3463
|
+
eventLoop.ei(true);
|
|
3464
3464
|
try {
|
|
3465
3465
|
this.g5();
|
|
3466
3466
|
// Inline function 'kotlinx.coroutines.withCoroutineContext' call
|
|
3467
|
-
this.
|
|
3468
|
-
this.
|
|
3469
|
-
$l$loop: while (eventLoop.
|
|
3467
|
+
this.ef_1;
|
|
3468
|
+
this.cf_1.l5(result);
|
|
3469
|
+
$l$loop: while (eventLoop.ai()) {
|
|
3470
3470
|
}
|
|
3471
3471
|
} catch ($p) {
|
|
3472
3472
|
if ($p instanceof Error) {
|
|
3473
3473
|
var e = $p;
|
|
3474
|
-
this.
|
|
3474
|
+
this.wg(e);
|
|
3475
3475
|
} else {
|
|
3476
3476
|
throw $p;
|
|
3477
3477
|
}
|
|
3478
3478
|
}
|
|
3479
3479
|
finally {
|
|
3480
|
-
eventLoop.
|
|
3480
|
+
eventLoop.fi(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.bf_1.toString() + ', ' + toDebugString(this.cf_1) + ']';
|
|
3489
3489
|
};
|
|
3490
3490
|
protoOf(DispatchedContinuation).g5 = function () {
|
|
3491
|
-
return this.
|
|
3491
|
+
return this.cf_1.g5();
|
|
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.sh(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.rh(context);
|
|
3510
3510
|
} catch ($p) {
|
|
3511
3511
|
if ($p instanceof Error) {
|
|
3512
3512
|
var e = $p;
|
|
@@ -3522,35 +3522,35 @@
|
|
|
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.bf_1, _this__u8e3s4.g5())) {
|
|
3526
|
+
_this__u8e3s4.df_1 = state;
|
|
3527
|
+
_this__u8e3s4.jf_1 = 1;
|
|
3528
|
+
safeDispatch(_this__u8e3s4.bf_1, _this__u8e3s4.g5(), _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().ii();
|
|
3534
|
+
if (false && eventLoop.di()) {
|
|
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.ci()) {
|
|
3539
|
+
_this__u8e3s4.df_1 = state;
|
|
3540
|
+
_this__u8e3s4.jf_1 = 1;
|
|
3541
|
+
eventLoop.bi(_this__u8e3s4);
|
|
3542
3542
|
tmp_0 = true;
|
|
3543
3543
|
} else {
|
|
3544
3544
|
// Inline function 'kotlinx.coroutines.runUnconfinedEventLoop' call
|
|
3545
|
-
eventLoop.
|
|
3545
|
+
eventLoop.ei(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
3550
|
var job = _this__u8e3s4.g5().n5(Key_instance_2);
|
|
3551
|
-
if (!(job == null) && !job.
|
|
3552
|
-
var cause = job.
|
|
3553
|
-
_this__u8e3s4.
|
|
3551
|
+
if (!(job == null) && !job.ka()) {
|
|
3552
|
+
var cause = job.hb();
|
|
3553
|
+
_this__u8e3s4.cg(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));
|
|
@@ -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.cf_1;
|
|
3566
3566
|
// Inline function 'kotlinx.coroutines.withContinuationContext' call
|
|
3567
|
-
_this__u8e3s4.
|
|
3568
|
-
_this__u8e3s4.
|
|
3567
|
+
_this__u8e3s4.ef_1;
|
|
3568
|
+
_this__u8e3s4.cf_1.l5(result);
|
|
3569
3569
|
}
|
|
3570
|
-
$l$loop: while (eventLoop.
|
|
3570
|
+
$l$loop: while (eventLoop.ai()) {
|
|
3571
3571
|
}
|
|
3572
3572
|
} catch ($p) {
|
|
3573
3573
|
if ($p instanceof Error) {
|
|
3574
3574
|
var e = $p;
|
|
3575
|
-
_this__u8e3s4.
|
|
3575
|
+
_this__u8e3s4.wg(e);
|
|
3576
3576
|
} else {
|
|
3577
3577
|
throw $p;
|
|
3578
3578
|
}
|
|
3579
3579
|
}
|
|
3580
3580
|
finally {
|
|
3581
|
-
eventLoop.
|
|
3581
|
+
eventLoop.fi(true);
|
|
3582
3582
|
}
|
|
3583
3583
|
tmp_0 = false;
|
|
3584
3584
|
}
|
|
@@ -3601,32 +3601,32 @@
|
|
|
3601
3601
|
}
|
|
3602
3602
|
function DispatchedTask(resumeMode) {
|
|
3603
3603
|
SchedulerTask.call(this);
|
|
3604
|
-
this.
|
|
3604
|
+
this.jf_1 = resumeMode;
|
|
3605
3605
|
}
|
|
3606
|
-
protoOf(DispatchedTask).
|
|
3606
|
+
protoOf(DispatchedTask).cg = function (takenState, cause) {
|
|
3607
3607
|
};
|
|
3608
|
-
protoOf(DispatchedTask).
|
|
3608
|
+
protoOf(DispatchedTask).jg = function (state) {
|
|
3609
3609
|
return state;
|
|
3610
3610
|
};
|
|
3611
|
-
protoOf(DispatchedTask).
|
|
3611
|
+
protoOf(DispatchedTask).tg = 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.pa_1;
|
|
3614
3614
|
};
|
|
3615
|
-
protoOf(DispatchedTask).
|
|
3615
|
+
protoOf(DispatchedTask).vg = function () {
|
|
3616
3616
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3617
3617
|
try {
|
|
3618
|
-
var tmp = this.
|
|
3618
|
+
var tmp = this.ag();
|
|
3619
3619
|
var delegate = tmp instanceof DispatchedContinuation ? tmp : THROW_CCE();
|
|
3620
|
-
var continuation = delegate.
|
|
3620
|
+
var continuation = delegate.cf_1;
|
|
3621
3621
|
// Inline function 'kotlinx.coroutines.withContinuationContext' call
|
|
3622
|
-
delegate.
|
|
3622
|
+
delegate.ef_1;
|
|
3623
3623
|
var context = continuation.g5();
|
|
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.
|
|
3624
|
+
var state = this.bg();
|
|
3625
|
+
var exception = this.tg(state);
|
|
3626
|
+
var job = exception == null && get_isCancellableMode(this.jf_1) ? context.n5(Key_instance_2) : null;
|
|
3627
|
+
if (!(job == null) && !job.ka()) {
|
|
3628
|
+
var cause = job.hb();
|
|
3629
|
+
this.cg(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);
|
|
@@ -3641,7 +3641,7 @@
|
|
|
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.jg(state);
|
|
3645
3645
|
var tmp$ret$8 = _Result___init__impl__xyqfz8(value);
|
|
3646
3646
|
continuation.l5(tmp$ret$8);
|
|
3647
3647
|
}
|
|
@@ -3649,20 +3649,20 @@
|
|
|
3649
3649
|
} catch ($p) {
|
|
3650
3650
|
if ($p instanceof DispatchException) {
|
|
3651
3651
|
var e = $p;
|
|
3652
|
-
handleCoroutineException(this.
|
|
3652
|
+
handleCoroutineException(this.ag().g5(), e.uh_1);
|
|
3653
3653
|
} else {
|
|
3654
3654
|
if ($p instanceof Error) {
|
|
3655
3655
|
var e_0 = $p;
|
|
3656
|
-
this.
|
|
3656
|
+
this.wg(e_0);
|
|
3657
3657
|
} else {
|
|
3658
3658
|
throw $p;
|
|
3659
3659
|
}
|
|
3660
3660
|
}
|
|
3661
3661
|
}
|
|
3662
3662
|
};
|
|
3663
|
-
protoOf(DispatchedTask).
|
|
3663
|
+
protoOf(DispatchedTask).wg = 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.ag().g5(), 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.ag();
|
|
3676
3676
|
var undispatched = mode === 4;
|
|
3677
3677
|
var tmp;
|
|
3678
3678
|
var tmp_0;
|
|
@@ -3682,12 +3682,12 @@
|
|
|
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.jf_1);
|
|
3686
3686
|
} else {
|
|
3687
3687
|
tmp = false;
|
|
3688
3688
|
}
|
|
3689
3689
|
if (tmp) {
|
|
3690
|
-
var dispatcher = delegate.
|
|
3690
|
+
var dispatcher = delegate.bf_1;
|
|
3691
3691
|
var context = delegate.g5();
|
|
3692
3692
|
if (safeIsDispatchNeeded(dispatcher, context)) {
|
|
3693
3693
|
safeDispatch(dispatcher, context, _this__u8e3s4);
|
|
@@ -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.uh_1 = cause;
|
|
3705
3705
|
delete this.cause;
|
|
3706
3706
|
}
|
|
3707
3707
|
protoOf(DispatchException).e = function () {
|
|
3708
|
-
return this.
|
|
3708
|
+
return this.uh_1;
|
|
3709
3709
|
};
|
|
3710
3710
|
function resumeUnconfined(_this__u8e3s4) {
|
|
3711
|
-
var eventLoop = ThreadLocalEventLoop_getInstance().
|
|
3712
|
-
if (eventLoop.
|
|
3713
|
-
eventLoop.
|
|
3711
|
+
var eventLoop = ThreadLocalEventLoop_getInstance().ii();
|
|
3712
|
+
if (eventLoop.ci()) {
|
|
3713
|
+
eventLoop.bi(_this__u8e3s4);
|
|
3714
3714
|
} else {
|
|
3715
3715
|
// Inline function 'kotlinx.coroutines.runUnconfinedEventLoop' call
|
|
3716
|
-
eventLoop.
|
|
3716
|
+
eventLoop.ei(true);
|
|
3717
3717
|
try {
|
|
3718
|
-
resume(_this__u8e3s4, _this__u8e3s4.
|
|
3719
|
-
$l$loop: while (eventLoop.
|
|
3718
|
+
resume(_this__u8e3s4, _this__u8e3s4.ag(), true);
|
|
3719
|
+
$l$loop: while (eventLoop.ai()) {
|
|
3720
3720
|
}
|
|
3721
3721
|
} catch ($p) {
|
|
3722
3722
|
if ($p instanceof Error) {
|
|
3723
3723
|
var e = $p;
|
|
3724
|
-
_this__u8e3s4.
|
|
3724
|
+
_this__u8e3s4.wg(e);
|
|
3725
3725
|
} else {
|
|
3726
3726
|
throw $p;
|
|
3727
3727
|
}
|
|
3728
3728
|
}
|
|
3729
3729
|
finally {
|
|
3730
|
-
eventLoop.
|
|
3730
|
+
eventLoop.fi(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.bg();
|
|
3736
|
+
var exception = _this__u8e3s4.tg(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.jg(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.cf_1;
|
|
3751
3751
|
// Inline function 'kotlinx.coroutines.withContinuationContext' call
|
|
3752
|
-
this_0.
|
|
3753
|
-
this_0.
|
|
3752
|
+
this_0.ef_1;
|
|
3753
|
+
this_0.cf_1.l5(result);
|
|
3754
3754
|
} else {
|
|
3755
3755
|
delegate.l5(result);
|
|
3756
3756
|
}
|
|
3757
3757
|
}
|
|
3758
3758
|
function ScopeCoroutine(context, uCont) {
|
|
3759
3759
|
AbstractCoroutine.call(this, context, true, true);
|
|
3760
|
-
this.
|
|
3760
|
+
this.rl_1 = uCont;
|
|
3761
3761
|
}
|
|
3762
|
-
protoOf(ScopeCoroutine).
|
|
3762
|
+
protoOf(ScopeCoroutine).wb = function () {
|
|
3763
3763
|
return true;
|
|
3764
3764
|
};
|
|
3765
|
-
protoOf(ScopeCoroutine).
|
|
3766
|
-
resumeCancellableWithInternal(intercepted(this.
|
|
3765
|
+
protoOf(ScopeCoroutine).ua = function (state) {
|
|
3766
|
+
resumeCancellableWithInternal(intercepted(this.rl_1), recoverResult(state, this.rl_1));
|
|
3767
3767
|
};
|
|
3768
|
-
protoOf(ScopeCoroutine).
|
|
3768
|
+
protoOf(ScopeCoroutine).sl = function () {
|
|
3769
3769
|
};
|
|
3770
|
-
protoOf(ScopeCoroutine).
|
|
3771
|
-
this.
|
|
3770
|
+
protoOf(ScopeCoroutine).ta = function (state) {
|
|
3771
|
+
this.rl_1.l5(recoverResult(state, this.rl_1));
|
|
3772
3772
|
};
|
|
3773
3773
|
function Symbol(symbol) {
|
|
3774
|
-
this.
|
|
3774
|
+
this.tl_1 = symbol;
|
|
3775
3775
|
}
|
|
3776
3776
|
protoOf(Symbol).toString = function () {
|
|
3777
|
-
return '<' + this.
|
|
3777
|
+
return '<' + this.tl_1 + '>';
|
|
3778
3778
|
};
|
|
3779
3779
|
function systemProp(propertyName, defaultValue, minValue, maxValue) {
|
|
3780
3780
|
minValue = minValue === VOID ? 1 : minValue;
|
|
@@ -3846,7 +3846,7 @@
|
|
|
3846
3846
|
function dispatcherFailure(completion, e) {
|
|
3847
3847
|
var tmp;
|
|
3848
3848
|
if (e instanceof DispatchException) {
|
|
3849
|
-
tmp = e.
|
|
3849
|
+
tmp = e.uh_1;
|
|
3850
3850
|
} else {
|
|
3851
3851
|
tmp = e;
|
|
3852
3852
|
}
|
|
@@ -3882,18 +3882,18 @@
|
|
|
3882
3882
|
var result = tmp;
|
|
3883
3883
|
if (result === get_COROUTINE_SUSPENDED())
|
|
3884
3884
|
return get_COROUTINE_SUSPENDED();
|
|
3885
|
-
var state = _this__u8e3s4.
|
|
3885
|
+
var state = _this__u8e3s4.sa(result);
|
|
3886
3886
|
if (state === get_COMPLETING_WAITING_CHILDREN())
|
|
3887
3887
|
return get_COROUTINE_SUSPENDED();
|
|
3888
|
-
_this__u8e3s4.
|
|
3888
|
+
_this__u8e3s4.sl();
|
|
3889
3889
|
var tmp_1;
|
|
3890
3890
|
if (state instanceof CompletedExceptionally) {
|
|
3891
3891
|
var tmp_2;
|
|
3892
|
-
if (alwaysRethrow || notOwnTimeout(_this__u8e3s4, state.
|
|
3893
|
-
throw recoverStackTrace(state.
|
|
3892
|
+
if (alwaysRethrow || notOwnTimeout(_this__u8e3s4, state.pa_1)) {
|
|
3893
|
+
throw recoverStackTrace(state.pa_1, _this__u8e3s4.rl_1);
|
|
3894
3894
|
} else {
|
|
3895
3895
|
if (result instanceof CompletedExceptionally) {
|
|
3896
|
-
throw recoverStackTrace(result.
|
|
3896
|
+
throw recoverStackTrace(result.pa_1, _this__u8e3s4.rl_1);
|
|
3897
3897
|
} else {
|
|
3898
3898
|
tmp_2 = result;
|
|
3899
3899
|
}
|
|
@@ -3905,15 +3905,15 @@
|
|
|
3905
3905
|
return tmp_1;
|
|
3906
3906
|
}
|
|
3907
3907
|
function dispatchExceptionAndMakeCompleting(_this__u8e3s4, e) {
|
|
3908
|
-
_this__u8e3s4.
|
|
3909
|
-
throw recoverStackTrace(e.
|
|
3908
|
+
_this__u8e3s4.tb(new CompletedExceptionally(e.uh_1));
|
|
3909
|
+
throw recoverStackTrace(e.uh_1, _this__u8e3s4.rl_1);
|
|
3910
3910
|
}
|
|
3911
3911
|
function notOwnTimeout(_this__u8e3s4, cause) {
|
|
3912
3912
|
var tmp;
|
|
3913
3913
|
if (!(cause instanceof TimeoutCancellationException)) {
|
|
3914
3914
|
tmp = true;
|
|
3915
3915
|
} else {
|
|
3916
|
-
tmp = !(cause.
|
|
3916
|
+
tmp = !(cause.ul_1 === _this__u8e3s4);
|
|
3917
3917
|
}
|
|
3918
3918
|
return tmp;
|
|
3919
3919
|
}
|
|
@@ -3933,7 +3933,7 @@
|
|
|
3933
3933
|
var e = $p;
|
|
3934
3934
|
var tmp_1;
|
|
3935
3935
|
if (e instanceof DispatchException) {
|
|
3936
|
-
tmp_1 = e.
|
|
3936
|
+
tmp_1 = e.uh_1;
|
|
3937
3937
|
} else {
|
|
3938
3938
|
tmp_1 = e;
|
|
3939
3939
|
}
|
|
@@ -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.em_1.kotlinx$atomicfu$value = this$1.hm_1;
|
|
3975
|
+
this$0.jm(this$1.hm_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.jm(this$1.hm_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.km())
|
|
3988
3988
|
return 0;
|
|
3989
|
-
var curOwner = $this.
|
|
3989
|
+
var curOwner = $this.em_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.ig();
|
|
4004
4004
|
throw e;
|
|
4005
4005
|
} else {
|
|
4006
4006
|
throw $p;
|
|
4007
4007
|
}
|
|
4008
4008
|
}
|
|
4009
|
-
return cancellable.
|
|
4009
|
+
return cancellable.de();
|
|
4010
4010
|
}
|
|
4011
4011
|
function tryLockImpl($this, owner) {
|
|
4012
4012
|
$l$loop: while (true) {
|
|
4013
|
-
if ($this.
|
|
4013
|
+
if ($this.sm()) {
|
|
4014
4014
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
4015
|
-
$this.
|
|
4015
|
+
$this.em_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.im_1 = $outer;
|
|
4033
|
+
this.gm_1 = cont;
|
|
4034
|
+
this.hm_1 = owner;
|
|
4035
4035
|
}
|
|
4036
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4036
|
+
protoOf(CancellableContinuationWithOwner).tm = function (value, idempotent, onCancellation) {
|
|
4037
4037
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
4038
|
-
var token = this.
|
|
4038
|
+
var token = this.gm_1.we(value, idempotent, MutexImpl$CancellableContinuationWithOwner$tryResume$lambda(this.im_1, this));
|
|
4039
4039
|
if (!(token == null)) {
|
|
4040
4040
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
4041
|
-
this.
|
|
4041
|
+
this.im_1.em_1.kotlinx$atomicfu$value = this.hm_1;
|
|
4042
4042
|
}
|
|
4043
4043
|
return token;
|
|
4044
4044
|
};
|
|
4045
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4046
|
-
return this.
|
|
4045
|
+
protoOf(CancellableContinuationWithOwner).we = function (value, idempotent, onCancellation) {
|
|
4046
|
+
return this.tm(value instanceof Unit ? value : THROW_CCE(), idempotent, onCancellation);
|
|
4047
4047
|
};
|
|
4048
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4048
|
+
protoOf(CancellableContinuationWithOwner).um = function (value, onCancellation) {
|
|
4049
4049
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
4050
|
-
this.
|
|
4051
|
-
this.
|
|
4050
|
+
this.im_1.em_1.kotlinx$atomicfu$value = this.hm_1;
|
|
4051
|
+
this.gm_1.mg(Unit_instance, MutexImpl$CancellableContinuationWithOwner$resume$lambda(this.im_1, this));
|
|
4052
4052
|
};
|
|
4053
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4054
|
-
return this.
|
|
4053
|
+
protoOf(CancellableContinuationWithOwner).xe = function (value, onCancellation) {
|
|
4054
|
+
return this.um(value instanceof Unit ? value : THROW_CCE(), onCancellation);
|
|
4055
4055
|
};
|
|
4056
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4057
|
-
return this.
|
|
4056
|
+
protoOf(CancellableContinuationWithOwner).eb = function () {
|
|
4057
|
+
return this.gm_1.eb();
|
|
4058
4058
|
};
|
|
4059
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4060
|
-
return this.
|
|
4059
|
+
protoOf(CancellableContinuationWithOwner).hd = function (exception) {
|
|
4060
|
+
return this.gm_1.hd(exception);
|
|
4061
4061
|
};
|
|
4062
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4063
|
-
this.
|
|
4062
|
+
protoOf(CancellableContinuationWithOwner).id = function (token) {
|
|
4063
|
+
this.gm_1.id(token);
|
|
4064
4064
|
};
|
|
4065
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4066
|
-
this.
|
|
4065
|
+
protoOf(CancellableContinuationWithOwner).og = function (segment, index) {
|
|
4066
|
+
this.gm_1.og(segment, index);
|
|
4067
4067
|
};
|
|
4068
|
-
protoOf(CancellableContinuationWithOwner).
|
|
4069
|
-
this.
|
|
4068
|
+
protoOf(CancellableContinuationWithOwner).vm = function (result) {
|
|
4069
|
+
this.gm_1.l5(result);
|
|
4070
4070
|
};
|
|
4071
4071
|
protoOf(CancellableContinuationWithOwner).l5 = function (result) {
|
|
4072
|
-
return this.
|
|
4072
|
+
return this.vm(result);
|
|
4073
4073
|
};
|
|
4074
4074
|
protoOf(CancellableContinuationWithOwner).g5 = function () {
|
|
4075
|
-
return this.
|
|
4075
|
+
return this.gm_1.g5();
|
|
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.jm($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.em_1 = atomic$ref$1(locked ? null : get_NO_OWNER());
|
|
4091
4091
|
var tmp = this;
|
|
4092
|
-
tmp.
|
|
4092
|
+
tmp.fm_1 = MutexImpl$onSelectCancellationUnlockConstructor$lambda(this);
|
|
4093
4093
|
}
|
|
4094
|
-
protoOf(MutexImpl).
|
|
4095
|
-
return this.
|
|
4094
|
+
protoOf(MutexImpl).km = function () {
|
|
4095
|
+
return this.wm() === 0;
|
|
4096
4096
|
};
|
|
4097
|
-
protoOf(MutexImpl).
|
|
4098
|
-
if (this.
|
|
4097
|
+
protoOf(MutexImpl).xm = function (owner, $completion) {
|
|
4098
|
+
if (this.ym(owner))
|
|
4099
4099
|
return Unit_instance;
|
|
4100
4100
|
return lockSuspend(this, owner, $completion);
|
|
4101
4101
|
};
|
|
4102
|
-
protoOf(MutexImpl).
|
|
4102
|
+
protoOf(MutexImpl).ym = 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).jm = function (owner) {
|
|
4125
4125
|
$l$loop_0: while (true) {
|
|
4126
4126
|
// Inline function 'kotlin.check' call
|
|
4127
|
-
if (!this.
|
|
4127
|
+
if (!this.km()) {
|
|
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.em_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.em_1.atomicfu$compareAndSet(curOwner, get_NO_OWNER()))
|
|
4140
4140
|
continue $l$loop_0;
|
|
4141
|
-
this.
|
|
4141
|
+
this.zm();
|
|
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.km() + ',owner=' + toString_0(this.em_1.kotlinx$atomicfu$value) + ']';
|
|
4147
4147
|
};
|
|
4148
4148
|
var properties_initialized_Mutex_kt_yv4p3j;
|
|
4149
4149
|
function _init_properties_Mutex_kt__jod56b() {
|
|
@@ -4203,36 +4203,36 @@
|
|
|
4203
4203
|
} catch ($p) {
|
|
4204
4204
|
if ($p instanceof Error) {
|
|
4205
4205
|
var e = $p;
|
|
4206
|
-
cancellable.
|
|
4206
|
+
cancellable.ig();
|
|
4207
4207
|
throw e;
|
|
4208
4208
|
} else {
|
|
4209
4209
|
throw $p;
|
|
4210
4210
|
}
|
|
4211
4211
|
}
|
|
4212
|
-
return cancellable.
|
|
4212
|
+
return cancellable.de();
|
|
4213
4213
|
}
|
|
4214
4214
|
function decPermits($this) {
|
|
4215
4215
|
$l$loop: while (true) {
|
|
4216
|
-
var p = $this.
|
|
4217
|
-
if (p > $this.
|
|
4216
|
+
var p = $this.qm_1.atomicfu$getAndDecrement();
|
|
4217
|
+
if (p > $this.lm_1)
|
|
4218
4218
|
continue $l$loop;
|
|
4219
4219
|
return p;
|
|
4220
4220
|
}
|
|
4221
4221
|
}
|
|
4222
4222
|
function coerceAvailablePermitsAtMaximum($this) {
|
|
4223
4223
|
$l$loop_0: while (true) {
|
|
4224
|
-
var cur = $this.
|
|
4225
|
-
if (cur <= $this.
|
|
4224
|
+
var cur = $this.qm_1.kotlinx$atomicfu$value;
|
|
4225
|
+
if (cur <= $this.lm_1)
|
|
4226
4226
|
break $l$loop_0;
|
|
4227
|
-
if ($this.
|
|
4227
|
+
if ($this.qm_1.atomicfu$compareAndSet(cur, $this.lm_1))
|
|
4228
4228
|
break $l$loop_0;
|
|
4229
4229
|
}
|
|
4230
4230
|
}
|
|
4231
4231
|
function addAcquireToQueue($this, waiter) {
|
|
4232
|
-
var curTail = $this.
|
|
4233
|
-
var enqIdx = $this.
|
|
4232
|
+
var curTail = $this.om_1.kotlinx$atomicfu$value;
|
|
4233
|
+
var enqIdx = $this.pm_1.atomicfu$getAndIncrement$long();
|
|
4234
4234
|
var createNewSegment = createSegment$ref();
|
|
4235
|
-
var tmp0 = $this.
|
|
4235
|
+
var tmp0 = $this.om_1;
|
|
4236
4236
|
// Inline function 'kotlin.Long.div' call
|
|
4237
4237
|
var other = get_SEGMENT_SIZE();
|
|
4238
4238
|
var tmp2 = divide(enqIdx, fromInt(other));
|
|
@@ -4253,22 +4253,22 @@
|
|
|
4253
4253
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
4254
4254
|
while (true) {
|
|
4255
4255
|
var cur = tmp0.kotlinx$atomicfu$value;
|
|
4256
|
-
if (compare(cur.
|
|
4256
|
+
if (compare(cur.nf_1, tmp2_0.nf_1) >= 0) {
|
|
4257
4257
|
tmp$ret$2 = true;
|
|
4258
4258
|
break $l$block_1;
|
|
4259
4259
|
}
|
|
4260
|
-
if (!tmp2_0.
|
|
4260
|
+
if (!tmp2_0.gl()) {
|
|
4261
4261
|
tmp$ret$2 = false;
|
|
4262
4262
|
break $l$block_1;
|
|
4263
4263
|
}
|
|
4264
4264
|
if (tmp0.atomicfu$compareAndSet(cur, tmp2_0)) {
|
|
4265
|
-
if (cur.
|
|
4265
|
+
if (cur.hl()) {
|
|
4266
4266
|
cur.o1();
|
|
4267
4267
|
}
|
|
4268
4268
|
tmp$ret$2 = true;
|
|
4269
4269
|
break $l$block_1;
|
|
4270
4270
|
}
|
|
4271
|
-
if (tmp2_0.
|
|
4271
|
+
if (tmp2_0.hl()) {
|
|
4272
4272
|
tmp2_0.o1();
|
|
4273
4273
|
}
|
|
4274
4274
|
}
|
|
@@ -4288,21 +4288,21 @@
|
|
|
4288
4288
|
var tmp$ret$5 = modulo(enqIdx, fromInt(other_0));
|
|
4289
4289
|
var i = convertToInt(tmp$ret$5);
|
|
4290
4290
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.cas' call
|
|
4291
|
-
if (segment.
|
|
4292
|
-
waiter.
|
|
4291
|
+
if (segment.fn_1.atomicfu$get(i).atomicfu$compareAndSet(null, waiter)) {
|
|
4292
|
+
waiter.og(segment, i);
|
|
4293
4293
|
return true;
|
|
4294
4294
|
}
|
|
4295
4295
|
var tmp4 = get_PERMIT();
|
|
4296
4296
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.cas' call
|
|
4297
4297
|
var value = get_TAKEN();
|
|
4298
|
-
if (segment.
|
|
4298
|
+
if (segment.fn_1.atomicfu$get(i).atomicfu$compareAndSet(tmp4, value)) {
|
|
4299
4299
|
if (isInterface(waiter, CancellableContinuation)) {
|
|
4300
4300
|
if (!isInterface(waiter, CancellableContinuation))
|
|
4301
4301
|
THROW_CCE();
|
|
4302
|
-
waiter.
|
|
4302
|
+
waiter.xe(Unit_instance, $this.rm_1);
|
|
4303
4303
|
} else {
|
|
4304
4304
|
if (isInterface(waiter, SelectInstance)) {
|
|
4305
|
-
waiter.
|
|
4305
|
+
waiter.wl(Unit_instance);
|
|
4306
4306
|
} else {
|
|
4307
4307
|
// Inline function 'kotlin.error' call
|
|
4308
4308
|
var message = 'unexpected: ' + toString(waiter);
|
|
@@ -4315,13 +4315,13 @@
|
|
|
4315
4315
|
return false;
|
|
4316
4316
|
}
|
|
4317
4317
|
function tryResumeNextFromQueue($this) {
|
|
4318
|
-
var curHead = $this.
|
|
4319
|
-
var deqIdx = $this.
|
|
4318
|
+
var curHead = $this.mm_1.kotlinx$atomicfu$value;
|
|
4319
|
+
var deqIdx = $this.nm_1.atomicfu$getAndIncrement$long();
|
|
4320
4320
|
// Inline function 'kotlin.Long.div' call
|
|
4321
4321
|
var other = get_SEGMENT_SIZE();
|
|
4322
4322
|
var id = divide(deqIdx, fromInt(other));
|
|
4323
4323
|
var createNewSegment = createSegment$ref_0();
|
|
4324
|
-
var tmp0 = $this.
|
|
4324
|
+
var tmp0 = $this.mm_1;
|
|
4325
4325
|
var tmp$ret$1;
|
|
4326
4326
|
$l$block_2: {
|
|
4327
4327
|
// Inline function 'kotlinx.coroutines.internal.findSegmentAndMoveForward' call
|
|
@@ -4339,22 +4339,22 @@
|
|
|
4339
4339
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
4340
4340
|
while (true) {
|
|
4341
4341
|
var cur = tmp0.kotlinx$atomicfu$value;
|
|
4342
|
-
if (compare(cur.
|
|
4342
|
+
if (compare(cur.nf_1, tmp2.nf_1) >= 0) {
|
|
4343
4343
|
tmp$ret$2 = true;
|
|
4344
4344
|
break $l$block_1;
|
|
4345
4345
|
}
|
|
4346
|
-
if (!tmp2.
|
|
4346
|
+
if (!tmp2.gl()) {
|
|
4347
4347
|
tmp$ret$2 = false;
|
|
4348
4348
|
break $l$block_1;
|
|
4349
4349
|
}
|
|
4350
4350
|
if (tmp0.atomicfu$compareAndSet(cur, tmp2)) {
|
|
4351
|
-
if (cur.
|
|
4351
|
+
if (cur.hl()) {
|
|
4352
4352
|
cur.o1();
|
|
4353
4353
|
}
|
|
4354
4354
|
tmp$ret$2 = true;
|
|
4355
4355
|
break $l$block_1;
|
|
4356
4356
|
}
|
|
4357
|
-
if (tmp2.
|
|
4357
|
+
if (tmp2.hl()) {
|
|
4358
4358
|
tmp2.o1();
|
|
4359
4359
|
}
|
|
4360
4360
|
}
|
|
@@ -4369,8 +4369,8 @@
|
|
|
4369
4369
|
}
|
|
4370
4370
|
}
|
|
4371
4371
|
var segment = _SegmentOrClosed___get_segment__impl__jvcr9l(tmp$ret$1);
|
|
4372
|
-
segment.
|
|
4373
|
-
if (compare(segment.
|
|
4372
|
+
segment.ml();
|
|
4373
|
+
if (compare(segment.nf_1, id) > 0)
|
|
4374
4374
|
return false;
|
|
4375
4375
|
// Inline function 'kotlin.Long.rem' call
|
|
4376
4376
|
var other_0 = get_SEGMENT_SIZE();
|
|
@@ -4378,7 +4378,7 @@
|
|
|
4378
4378
|
var i = convertToInt(tmp$ret$5);
|
|
4379
4379
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.getAndSet' call
|
|
4380
4380
|
var value = get_PERMIT();
|
|
4381
|
-
var cellState = segment.
|
|
4381
|
+
var cellState = segment.fn_1.atomicfu$get(i).atomicfu$getAndSet(value);
|
|
4382
4382
|
if (cellState === null) {
|
|
4383
4383
|
// Inline function 'kotlin.repeat' call
|
|
4384
4384
|
var times = get_MAX_SPIN_CYCLES();
|
|
@@ -4388,14 +4388,14 @@
|
|
|
4388
4388
|
var index = inductionVariable;
|
|
4389
4389
|
inductionVariable = inductionVariable + 1 | 0;
|
|
4390
4390
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.get' call
|
|
4391
|
-
if (segment.
|
|
4391
|
+
if (segment.fn_1.atomicfu$get(i).kotlinx$atomicfu$value === get_TAKEN())
|
|
4392
4392
|
return true;
|
|
4393
4393
|
}
|
|
4394
4394
|
while (inductionVariable < times);
|
|
4395
4395
|
var tmp4 = get_PERMIT();
|
|
4396
4396
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.cas' call
|
|
4397
4397
|
var value_0 = get_BROKEN();
|
|
4398
|
-
return !segment.
|
|
4398
|
+
return !segment.fn_1.atomicfu$get(i).atomicfu$compareAndSet(tmp4, value_0);
|
|
4399
4399
|
} else if (cellState === get_CANCELLED())
|
|
4400
4400
|
return false;
|
|
4401
4401
|
else
|
|
@@ -4406,10 +4406,10 @@
|
|
|
4406
4406
|
if (isInterface($receiver, CancellableContinuation)) {
|
|
4407
4407
|
if (!isInterface($receiver, CancellableContinuation))
|
|
4408
4408
|
THROW_CCE();
|
|
4409
|
-
var token = $receiver.
|
|
4409
|
+
var token = $receiver.we(Unit_instance, null, $this.rm_1);
|
|
4410
4410
|
var tmp_0;
|
|
4411
4411
|
if (!(token == null)) {
|
|
4412
|
-
$receiver.
|
|
4412
|
+
$receiver.id(token);
|
|
4413
4413
|
tmp_0 = true;
|
|
4414
4414
|
} else {
|
|
4415
4415
|
tmp_0 = false;
|
|
@@ -4417,7 +4417,7 @@
|
|
|
4417
4417
|
tmp = tmp_0;
|
|
4418
4418
|
} else {
|
|
4419
4419
|
if (isInterface($receiver, SelectInstance)) {
|
|
4420
|
-
tmp = $receiver.
|
|
4420
|
+
tmp = $receiver.vl($this, Unit_instance);
|
|
4421
4421
|
} else {
|
|
4422
4422
|
// Inline function 'kotlin.error' call
|
|
4423
4423
|
var message = 'unexpected: ' + toString($receiver);
|
|
@@ -4428,7 +4428,7 @@
|
|
|
4428
4428
|
}
|
|
4429
4429
|
function SemaphoreAndMutexImpl$onCancellationRelease$lambda(this$0) {
|
|
4430
4430
|
return function (_unused_var__etf5q3, _unused_var__etf5q3_0, _unused_var__etf5q3_1) {
|
|
4431
|
-
this$0.
|
|
4431
|
+
this$0.zm();
|
|
4432
4432
|
return Unit_instance;
|
|
4433
4433
|
};
|
|
4434
4434
|
}
|
|
@@ -4447,45 +4447,45 @@
|
|
|
4447
4447
|
return l;
|
|
4448
4448
|
}
|
|
4449
4449
|
function SemaphoreAndMutexImpl(permits, acquiredPermits) {
|
|
4450
|
-
this.
|
|
4451
|
-
this.
|
|
4452
|
-
this.
|
|
4450
|
+
this.lm_1 = permits;
|
|
4451
|
+
this.nm_1 = atomic$long$1(new Long(0, 0));
|
|
4452
|
+
this.pm_1 = atomic$long$1(new Long(0, 0));
|
|
4453
4453
|
// Inline function 'kotlin.require' call
|
|
4454
|
-
if (!(this.
|
|
4455
|
-
var message = 'Semaphore should have at least 1 permit, but had ' + this.
|
|
4454
|
+
if (!(this.lm_1 > 0)) {
|
|
4455
|
+
var message = 'Semaphore should have at least 1 permit, but had ' + this.lm_1;
|
|
4456
4456
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
4457
4457
|
}
|
|
4458
4458
|
// Inline function 'kotlin.require' call
|
|
4459
|
-
if (!(0 <= acquiredPermits ? acquiredPermits <= this.
|
|
4460
|
-
var message_0 = 'The number of acquired permits should be in 0..' + this.
|
|
4459
|
+
if (!(0 <= acquiredPermits ? acquiredPermits <= this.lm_1 : false)) {
|
|
4460
|
+
var message_0 = 'The number of acquired permits should be in 0..' + this.lm_1;
|
|
4461
4461
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
4462
4462
|
}
|
|
4463
4463
|
var s = new SemaphoreSegment(new Long(0, 0), null, 2);
|
|
4464
|
-
this.
|
|
4465
|
-
this.
|
|
4466
|
-
this.
|
|
4464
|
+
this.mm_1 = atomic$ref$1(s);
|
|
4465
|
+
this.om_1 = atomic$ref$1(s);
|
|
4466
|
+
this.qm_1 = atomic$int$1(this.lm_1 - acquiredPermits | 0);
|
|
4467
4467
|
var tmp = this;
|
|
4468
|
-
tmp.
|
|
4468
|
+
tmp.rm_1 = SemaphoreAndMutexImpl$onCancellationRelease$lambda(this);
|
|
4469
4469
|
}
|
|
4470
|
-
protoOf(SemaphoreAndMutexImpl).
|
|
4470
|
+
protoOf(SemaphoreAndMutexImpl).wm = function () {
|
|
4471
4471
|
// Inline function 'kotlin.math.max' call
|
|
4472
|
-
var a = this.
|
|
4472
|
+
var a = this.qm_1.kotlinx$atomicfu$value;
|
|
4473
4473
|
return Math.max(a, 0);
|
|
4474
4474
|
};
|
|
4475
|
-
protoOf(SemaphoreAndMutexImpl).
|
|
4475
|
+
protoOf(SemaphoreAndMutexImpl).sm = function () {
|
|
4476
4476
|
$l$loop: while (true) {
|
|
4477
|
-
var p = this.
|
|
4478
|
-
if (p > this.
|
|
4477
|
+
var p = this.qm_1.kotlinx$atomicfu$value;
|
|
4478
|
+
if (p > this.lm_1) {
|
|
4479
4479
|
coerceAvailablePermitsAtMaximum(this);
|
|
4480
4480
|
continue $l$loop;
|
|
4481
4481
|
}
|
|
4482
4482
|
if (p <= 0)
|
|
4483
4483
|
return false;
|
|
4484
|
-
if (this.
|
|
4484
|
+
if (this.qm_1.atomicfu$compareAndSet(p, p - 1 | 0))
|
|
4485
4485
|
return true;
|
|
4486
4486
|
}
|
|
4487
4487
|
};
|
|
4488
|
-
protoOf(SemaphoreAndMutexImpl).
|
|
4488
|
+
protoOf(SemaphoreAndMutexImpl).an = function ($completion) {
|
|
4489
4489
|
var p = decPermits(this);
|
|
4490
4490
|
if (p > 0)
|
|
4491
4491
|
return Unit_instance;
|
|
@@ -4498,7 +4498,7 @@
|
|
|
4498
4498
|
while (true) {
|
|
4499
4499
|
var p = decPermits(this);
|
|
4500
4500
|
if (p > 0) {
|
|
4501
|
-
waiter.
|
|
4501
|
+
waiter.xe(Unit_instance, this.rm_1);
|
|
4502
4502
|
tmp$ret$0 = Unit_instance;
|
|
4503
4503
|
break $l$block_0;
|
|
4504
4504
|
}
|
|
@@ -4511,13 +4511,13 @@
|
|
|
4511
4511
|
}
|
|
4512
4512
|
return tmp$ret$0;
|
|
4513
4513
|
};
|
|
4514
|
-
protoOf(SemaphoreAndMutexImpl).
|
|
4514
|
+
protoOf(SemaphoreAndMutexImpl).zm = function () {
|
|
4515
4515
|
while (true) {
|
|
4516
|
-
var p = this.
|
|
4517
|
-
if (p >= this.
|
|
4516
|
+
var p = this.qm_1.atomicfu$getAndIncrement();
|
|
4517
|
+
if (p >= this.lm_1) {
|
|
4518
4518
|
coerceAvailablePermitsAtMaximum(this);
|
|
4519
4519
|
// Inline function 'kotlin.error' call
|
|
4520
|
-
var message = 'The number of released permits cannot be greater than ' + this.
|
|
4520
|
+
var message = 'The number of released permits cannot be greater than ' + this.lm_1;
|
|
4521
4521
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
4522
4522
|
}
|
|
4523
4523
|
if (p >= 0)
|
|
@@ -4528,19 +4528,19 @@
|
|
|
4528
4528
|
};
|
|
4529
4529
|
function SemaphoreSegment(id, prev, pointers) {
|
|
4530
4530
|
Segment.call(this, id, prev, pointers);
|
|
4531
|
-
this.
|
|
4531
|
+
this.fn_1 = atomicfu$AtomicRefArray$ofNulls(get_SEGMENT_SIZE());
|
|
4532
4532
|
}
|
|
4533
|
-
protoOf(SemaphoreSegment).
|
|
4533
|
+
protoOf(SemaphoreSegment).bl = function () {
|
|
4534
4534
|
return get_SEGMENT_SIZE();
|
|
4535
4535
|
};
|
|
4536
|
-
protoOf(SemaphoreSegment).
|
|
4536
|
+
protoOf(SemaphoreSegment).pf = function (index, cause, context) {
|
|
4537
4537
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.set' call
|
|
4538
4538
|
var value = get_CANCELLED();
|
|
4539
|
-
this.
|
|
4540
|
-
this.
|
|
4539
|
+
this.fn_1.atomicfu$get(index).kotlinx$atomicfu$value = value;
|
|
4540
|
+
this.il();
|
|
4541
4541
|
};
|
|
4542
4542
|
protoOf(SemaphoreSegment).toString = function () {
|
|
4543
|
-
return 'SemaphoreSegment[id=' + this.
|
|
4543
|
+
return 'SemaphoreSegment[id=' + this.nf_1.toString() + ', hashCode=' + hashCode(this) + ']';
|
|
4544
4544
|
};
|
|
4545
4545
|
function createSegment(id, prev) {
|
|
4546
4546
|
_init_properties_Semaphore_kt__t514r6();
|
|
@@ -4616,8 +4616,8 @@
|
|
|
4616
4616
|
NodeDispatcher_instance = this;
|
|
4617
4617
|
SetTimeoutBasedDispatcher.call(this);
|
|
4618
4618
|
}
|
|
4619
|
-
protoOf(NodeDispatcher).
|
|
4620
|
-
process.nextTick(this.
|
|
4619
|
+
protoOf(NodeDispatcher).in = function () {
|
|
4620
|
+
process.nextTick(this.pn_1.nn_1);
|
|
4621
4621
|
};
|
|
4622
4622
|
var NodeDispatcher_instance;
|
|
4623
4623
|
function NodeDispatcher_getInstance() {
|
|
@@ -4627,31 +4627,31 @@
|
|
|
4627
4627
|
}
|
|
4628
4628
|
function ScheduledMessageQueue$processQueue$lambda(this$0) {
|
|
4629
4629
|
return function () {
|
|
4630
|
-
this$0.
|
|
4630
|
+
this$0.tn();
|
|
4631
4631
|
return Unit_instance;
|
|
4632
4632
|
};
|
|
4633
4633
|
}
|
|
4634
4634
|
function ScheduledMessageQueue(dispatcher) {
|
|
4635
4635
|
MessageQueue.call(this);
|
|
4636
|
-
this.
|
|
4636
|
+
this.mn_1 = dispatcher;
|
|
4637
4637
|
var tmp = this;
|
|
4638
|
-
tmp.
|
|
4638
|
+
tmp.nn_1 = ScheduledMessageQueue$processQueue$lambda(this);
|
|
4639
4639
|
}
|
|
4640
|
-
protoOf(ScheduledMessageQueue).
|
|
4641
|
-
this.
|
|
4640
|
+
protoOf(ScheduledMessageQueue).un = function () {
|
|
4641
|
+
this.mn_1.in();
|
|
4642
4642
|
};
|
|
4643
|
-
protoOf(ScheduledMessageQueue).
|
|
4644
|
-
setTimeout(this.
|
|
4643
|
+
protoOf(ScheduledMessageQueue).vn = function () {
|
|
4644
|
+
setTimeout(this.nn_1, 0);
|
|
4645
4645
|
};
|
|
4646
|
-
protoOf(ScheduledMessageQueue).
|
|
4647
|
-
setTimeout(this.
|
|
4646
|
+
protoOf(ScheduledMessageQueue).wn = function (timeout) {
|
|
4647
|
+
setTimeout(this.nn_1, timeout);
|
|
4648
4648
|
};
|
|
4649
4649
|
function WindowMessageQueue$lambda(this$0) {
|
|
4650
4650
|
return function (event) {
|
|
4651
4651
|
var tmp;
|
|
4652
|
-
if (event.source == this$0.
|
|
4652
|
+
if (event.source == this$0.co_1 && event.data == this$0.do_1) {
|
|
4653
4653
|
event.stopPropagation();
|
|
4654
|
-
this$0.
|
|
4654
|
+
this$0.tn();
|
|
4655
4655
|
tmp = Unit_instance;
|
|
4656
4656
|
}
|
|
4657
4657
|
return Unit_instance;
|
|
@@ -4659,22 +4659,22 @@
|
|
|
4659
4659
|
}
|
|
4660
4660
|
function WindowMessageQueue$schedule$lambda(this$0) {
|
|
4661
4661
|
return function (it) {
|
|
4662
|
-
this$0.
|
|
4662
|
+
this$0.tn();
|
|
4663
4663
|
return Unit_instance;
|
|
4664
4664
|
};
|
|
4665
4665
|
}
|
|
4666
4666
|
function WindowMessageQueue(window_0) {
|
|
4667
4667
|
MessageQueue.call(this);
|
|
4668
|
-
this.
|
|
4669
|
-
this.
|
|
4670
|
-
this.
|
|
4668
|
+
this.co_1 = window_0;
|
|
4669
|
+
this.do_1 = 'dispatchCoroutine';
|
|
4670
|
+
this.co_1.addEventListener('message', WindowMessageQueue$lambda(this), true);
|
|
4671
4671
|
}
|
|
4672
|
-
protoOf(WindowMessageQueue).
|
|
4672
|
+
protoOf(WindowMessageQueue).un = function () {
|
|
4673
4673
|
var tmp = Promise.resolve(Unit_instance);
|
|
4674
4674
|
tmp.then(WindowMessageQueue$schedule$lambda(this));
|
|
4675
4675
|
};
|
|
4676
|
-
protoOf(WindowMessageQueue).
|
|
4677
|
-
this.
|
|
4676
|
+
protoOf(WindowMessageQueue).vn = function () {
|
|
4677
|
+
this.co_1.postMessage(this.do_1, '*');
|
|
4678
4678
|
};
|
|
4679
4679
|
function toThrowable(_this__u8e3s4) {
|
|
4680
4680
|
var tmp0_elvis_lhs = _this__u8e3s4 instanceof Error ? _this__u8e3s4 : null;
|
|
@@ -4702,22 +4702,22 @@
|
|
|
4702
4702
|
return toString(_this__u8e3s4);
|
|
4703
4703
|
}
|
|
4704
4704
|
function newCoroutineContext(_this__u8e3s4, context) {
|
|
4705
|
-
var combined = _this__u8e3s4.
|
|
4706
|
-
return !(combined === Dispatchers_getInstance().
|
|
4705
|
+
var combined = _this__u8e3s4.ja().s8(context);
|
|
4706
|
+
return !(combined === Dispatchers_getInstance().tk_1) && combined.n5(Key_instance) == null ? combined.s8(Dispatchers_getInstance().tk_1) : combined;
|
|
4707
4707
|
}
|
|
4708
4708
|
function get_coroutineName(_this__u8e3s4) {
|
|
4709
4709
|
return null;
|
|
4710
4710
|
}
|
|
4711
4711
|
function Dispatchers() {
|
|
4712
4712
|
Dispatchers_instance = this;
|
|
4713
|
-
this.
|
|
4714
|
-
this.
|
|
4715
|
-
this.
|
|
4716
|
-
this.
|
|
4713
|
+
this.tk_1 = createDefaultDispatcher();
|
|
4714
|
+
this.uk_1 = Unconfined_getInstance();
|
|
4715
|
+
this.vk_1 = new JsMainDispatcher(this.tk_1, false);
|
|
4716
|
+
this.wk_1 = null;
|
|
4717
4717
|
}
|
|
4718
|
-
protoOf(Dispatchers).
|
|
4719
|
-
var tmp0_elvis_lhs = this.
|
|
4720
|
-
return tmp0_elvis_lhs == null ? this.
|
|
4718
|
+
protoOf(Dispatchers).xk = function () {
|
|
4719
|
+
var tmp0_elvis_lhs = this.wk_1;
|
|
4720
|
+
return tmp0_elvis_lhs == null ? this.vk_1 : tmp0_elvis_lhs;
|
|
4721
4721
|
};
|
|
4722
4722
|
var Dispatchers_instance;
|
|
4723
4723
|
function Dispatchers_getInstance() {
|
|
@@ -4727,30 +4727,30 @@
|
|
|
4727
4727
|
}
|
|
4728
4728
|
function JsMainDispatcher(delegate, invokeImmediately) {
|
|
4729
4729
|
MainCoroutineDispatcher.call(this);
|
|
4730
|
-
this.
|
|
4731
|
-
this.
|
|
4732
|
-
this.
|
|
4730
|
+
this.fo_1 = delegate;
|
|
4731
|
+
this.go_1 = invokeImmediately;
|
|
4732
|
+
this.ho_1 = this.go_1 ? this : new JsMainDispatcher(this.fo_1, true);
|
|
4733
4733
|
}
|
|
4734
|
-
protoOf(JsMainDispatcher).
|
|
4735
|
-
return this.
|
|
4734
|
+
protoOf(JsMainDispatcher).rk = function () {
|
|
4735
|
+
return this.ho_1;
|
|
4736
4736
|
};
|
|
4737
|
-
protoOf(JsMainDispatcher).
|
|
4738
|
-
return !this.
|
|
4737
|
+
protoOf(JsMainDispatcher).rh = function (context) {
|
|
4738
|
+
return !this.go_1;
|
|
4739
4739
|
};
|
|
4740
|
-
protoOf(JsMainDispatcher).
|
|
4741
|
-
return this.
|
|
4740
|
+
protoOf(JsMainDispatcher).sh = function (context, block) {
|
|
4741
|
+
return this.fo_1.sh(context, block);
|
|
4742
4742
|
};
|
|
4743
4743
|
protoOf(JsMainDispatcher).toString = function () {
|
|
4744
|
-
var tmp0_elvis_lhs = this.
|
|
4745
|
-
return tmp0_elvis_lhs == null ? this.
|
|
4744
|
+
var tmp0_elvis_lhs = this.sk();
|
|
4745
|
+
return tmp0_elvis_lhs == null ? this.fo_1.toString() : tmp0_elvis_lhs;
|
|
4746
4746
|
};
|
|
4747
4747
|
function JobCancellationException(message, cause, job) {
|
|
4748
4748
|
CancellationException_init_$Init$(message, cause, this);
|
|
4749
4749
|
captureStack(this, JobCancellationException);
|
|
4750
|
-
this.
|
|
4750
|
+
this.io_1 = job;
|
|
4751
4751
|
}
|
|
4752
4752
|
protoOf(JobCancellationException).toString = function () {
|
|
4753
|
-
return protoOf(CancellationException).toString.call(this) + '; job=' + toString(this.
|
|
4753
|
+
return protoOf(CancellationException).toString.call(this) + '; job=' + toString(this.io_1);
|
|
4754
4754
|
};
|
|
4755
4755
|
protoOf(JobCancellationException).equals = function (other) {
|
|
4756
4756
|
var tmp;
|
|
@@ -4766,7 +4766,7 @@
|
|
|
4766
4766
|
tmp_2 = false;
|
|
4767
4767
|
}
|
|
4768
4768
|
if (tmp_2) {
|
|
4769
|
-
tmp_1 = equals(other.
|
|
4769
|
+
tmp_1 = equals(other.io_1, this.io_1);
|
|
4770
4770
|
} else {
|
|
4771
4771
|
tmp_1 = false;
|
|
4772
4772
|
}
|
|
@@ -4780,7 +4780,7 @@
|
|
|
4780
4780
|
return tmp;
|
|
4781
4781
|
};
|
|
4782
4782
|
protoOf(JobCancellationException).hashCode = function () {
|
|
4783
|
-
var tmp = imul(imul(getStringHashCode(ensureNotNull(this.message)), 31) + hashCode(this.
|
|
4783
|
+
var tmp = imul(imul(getStringHashCode(ensureNotNull(this.message)), 31) + hashCode(this.io_1) | 0, 31);
|
|
4784
4784
|
var tmp0_safe_receiver = this.cause;
|
|
4785
4785
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
|
|
4786
4786
|
return tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
|
|
@@ -4817,46 +4817,46 @@
|
|
|
4817
4817
|
LockFreeLinkedListNode.call(this);
|
|
4818
4818
|
}
|
|
4819
4819
|
function LockFreeLinkedListNode() {
|
|
4820
|
-
this.
|
|
4821
|
-
this.
|
|
4822
|
-
this.
|
|
4820
|
+
this.pd_1 = this;
|
|
4821
|
+
this.qd_1 = this;
|
|
4822
|
+
this.rd_1 = false;
|
|
4823
4823
|
}
|
|
4824
|
-
protoOf(LockFreeLinkedListNode).
|
|
4825
|
-
var prev = this.
|
|
4824
|
+
protoOf(LockFreeLinkedListNode).sd = function (node, permissionsBitmask) {
|
|
4825
|
+
var prev = this.qd_1;
|
|
4826
4826
|
var tmp;
|
|
4827
4827
|
if (prev instanceof ListClosed) {
|
|
4828
|
-
tmp = ((prev.
|
|
4828
|
+
tmp = ((prev.mo_1 & permissionsBitmask) === 0 && prev.sd(node, permissionsBitmask));
|
|
4829
4829
|
} else {
|
|
4830
|
-
node.
|
|
4831
|
-
node.
|
|
4832
|
-
prev.
|
|
4833
|
-
this.
|
|
4830
|
+
node.pd_1 = this;
|
|
4831
|
+
node.qd_1 = prev;
|
|
4832
|
+
prev.pd_1 = node;
|
|
4833
|
+
this.qd_1 = node;
|
|
4834
4834
|
tmp = true;
|
|
4835
4835
|
}
|
|
4836
4836
|
return tmp;
|
|
4837
4837
|
};
|
|
4838
|
-
protoOf(LockFreeLinkedListNode).
|
|
4839
|
-
this.
|
|
4838
|
+
protoOf(LockFreeLinkedListNode).ri = function (forbiddenElementsBit) {
|
|
4839
|
+
this.sd(new ListClosed(forbiddenElementsBit), forbiddenElementsBit);
|
|
4840
4840
|
};
|
|
4841
|
-
protoOf(LockFreeLinkedListNode).
|
|
4842
|
-
if (this.
|
|
4841
|
+
protoOf(LockFreeLinkedListNode).td = function () {
|
|
4842
|
+
if (this.rd_1)
|
|
4843
4843
|
return false;
|
|
4844
|
-
var prev = this.
|
|
4845
|
-
var next = this.
|
|
4846
|
-
prev.
|
|
4847
|
-
next.
|
|
4848
|
-
this.
|
|
4844
|
+
var prev = this.qd_1;
|
|
4845
|
+
var next = this.pd_1;
|
|
4846
|
+
prev.pd_1 = next;
|
|
4847
|
+
next.qd_1 = prev;
|
|
4848
|
+
this.rd_1 = true;
|
|
4849
4849
|
return true;
|
|
4850
4850
|
};
|
|
4851
|
-
protoOf(LockFreeLinkedListNode).
|
|
4852
|
-
if (!(this.
|
|
4851
|
+
protoOf(LockFreeLinkedListNode).ud = function (node) {
|
|
4852
|
+
if (!(this.pd_1 === this))
|
|
4853
4853
|
return false;
|
|
4854
|
-
this.
|
|
4854
|
+
this.sd(node, -2147483648);
|
|
4855
4855
|
return true;
|
|
4856
4856
|
};
|
|
4857
4857
|
function ListClosed(forbiddenElementsBitmask) {
|
|
4858
4858
|
LockFreeLinkedListNode.call(this);
|
|
4859
|
-
this.
|
|
4859
|
+
this.mo_1 = forbiddenElementsBitmask;
|
|
4860
4860
|
}
|
|
4861
4861
|
function unwrap(exception) {
|
|
4862
4862
|
return exception;
|
|
@@ -4873,13 +4873,13 @@
|
|
|
4873
4873
|
return 0;
|
|
4874
4874
|
}
|
|
4875
4875
|
function CommonThreadLocal() {
|
|
4876
|
-
this.
|
|
4876
|
+
this.ji_1 = null;
|
|
4877
4877
|
}
|
|
4878
|
-
protoOf(CommonThreadLocal).
|
|
4879
|
-
return this.
|
|
4878
|
+
protoOf(CommonThreadLocal).ki = function () {
|
|
4879
|
+
return this.ji_1;
|
|
4880
4880
|
};
|
|
4881
|
-
protoOf(CommonThreadLocal).
|
|
4882
|
-
this.
|
|
4881
|
+
protoOf(CommonThreadLocal).li = function (value) {
|
|
4882
|
+
this.ji_1 = value;
|
|
4883
4883
|
};
|
|
4884
4884
|
function commonThreadLocal(name) {
|
|
4885
4885
|
return new CommonThreadLocal();
|
|
@@ -4890,7 +4890,7 @@
|
|
|
4890
4890
|
function UnconfinedEventLoop() {
|
|
4891
4891
|
EventLoop.call(this);
|
|
4892
4892
|
}
|
|
4893
|
-
protoOf(UnconfinedEventLoop).
|
|
4893
|
+
protoOf(UnconfinedEventLoop).sh = function (context, block) {
|
|
4894
4894
|
unsupported();
|
|
4895
4895
|
};
|
|
4896
4896
|
function unsupported() {
|
|
@@ -4903,10 +4903,10 @@
|
|
|
4903
4903
|
}
|
|
4904
4904
|
function await_0(_this__u8e3s4, $completion) {
|
|
4905
4905
|
var cancellable = new CancellableContinuationImpl(intercepted($completion), 1);
|
|
4906
|
-
cancellable.
|
|
4906
|
+
cancellable.ce();
|
|
4907
4907
|
var tmp = await$lambda(cancellable);
|
|
4908
4908
|
_this__u8e3s4.then(tmp, await$lambda_0(cancellable));
|
|
4909
|
-
return cancellable.
|
|
4909
|
+
return cancellable.de();
|
|
4910
4910
|
}
|
|
4911
4911
|
function asPromise(_this__u8e3s4) {
|
|
4912
4912
|
var promise = new Promise(asPromise$lambda(_this__u8e3s4));
|
|
@@ -4943,19 +4943,19 @@
|
|
|
4943
4943
|
}
|
|
4944
4944
|
function asPromise$lambda$lambda($this_asPromise, $reject, $resolve) {
|
|
4945
4945
|
return function (it) {
|
|
4946
|
-
var e = $this_asPromise.
|
|
4946
|
+
var e = $this_asPromise.ac();
|
|
4947
4947
|
var tmp;
|
|
4948
4948
|
if (!(e == null)) {
|
|
4949
4949
|
tmp = $reject(toJsPromiseError(e));
|
|
4950
4950
|
} else {
|
|
4951
|
-
tmp = $resolve($this_asPromise.
|
|
4951
|
+
tmp = $resolve($this_asPromise.gd());
|
|
4952
4952
|
}
|
|
4953
4953
|
return Unit_instance;
|
|
4954
4954
|
};
|
|
4955
4955
|
}
|
|
4956
4956
|
function asPromise$lambda($this_asPromise) {
|
|
4957
4957
|
return function (resolve, reject) {
|
|
4958
|
-
$this_asPromise.
|
|
4958
|
+
$this_asPromise.kb(asPromise$lambda$lambda($this_asPromise, reject, resolve));
|
|
4959
4959
|
return Unit_instance;
|
|
4960
4960
|
};
|
|
4961
4961
|
}
|
|
@@ -4983,8 +4983,8 @@
|
|
|
4983
4983
|
SetTimeoutDispatcher_instance = this;
|
|
4984
4984
|
SetTimeoutBasedDispatcher.call(this);
|
|
4985
4985
|
}
|
|
4986
|
-
protoOf(SetTimeoutDispatcher).
|
|
4987
|
-
this.
|
|
4986
|
+
protoOf(SetTimeoutDispatcher).in = function () {
|
|
4987
|
+
this.pn_1.wn(0);
|
|
4988
4988
|
};
|
|
4989
4989
|
var SetTimeoutDispatcher_instance;
|
|
4990
4990
|
function SetTimeoutDispatcher_getInstance() {
|
|
@@ -4994,27 +4994,27 @@
|
|
|
4994
4994
|
}
|
|
4995
4995
|
function SetTimeoutBasedDispatcher() {
|
|
4996
4996
|
CoroutineDispatcher.call(this);
|
|
4997
|
-
this.
|
|
4997
|
+
this.pn_1 = new ScheduledMessageQueue(this);
|
|
4998
4998
|
}
|
|
4999
|
-
protoOf(SetTimeoutBasedDispatcher).
|
|
5000
|
-
this.
|
|
4999
|
+
protoOf(SetTimeoutBasedDispatcher).sh = function (context, block) {
|
|
5000
|
+
this.pn_1.xn(block);
|
|
5001
5001
|
};
|
|
5002
5002
|
function MessageQueue() {
|
|
5003
|
-
this.
|
|
5004
|
-
this.
|
|
5005
|
-
this.
|
|
5003
|
+
this.qn_1 = ArrayDeque_init_$Create$();
|
|
5004
|
+
this.rn_1 = 16;
|
|
5005
|
+
this.sn_1 = false;
|
|
5006
5006
|
}
|
|
5007
|
-
protoOf(MessageQueue).
|
|
5008
|
-
this.
|
|
5009
|
-
if (!this.
|
|
5010
|
-
this.
|
|
5011
|
-
this.
|
|
5007
|
+
protoOf(MessageQueue).xn = function (element) {
|
|
5008
|
+
this.yn(element);
|
|
5009
|
+
if (!this.sn_1) {
|
|
5010
|
+
this.sn_1 = true;
|
|
5011
|
+
this.un();
|
|
5012
5012
|
}
|
|
5013
5013
|
};
|
|
5014
|
-
protoOf(MessageQueue).
|
|
5014
|
+
protoOf(MessageQueue).tn = function () {
|
|
5015
5015
|
try {
|
|
5016
5016
|
// Inline function 'kotlin.repeat' call
|
|
5017
|
-
var times = this.
|
|
5017
|
+
var times = this.rn_1;
|
|
5018
5018
|
var inductionVariable = 0;
|
|
5019
5019
|
if (inductionVariable < times)
|
|
5020
5020
|
do {
|
|
@@ -5028,45 +5028,45 @@
|
|
|
5028
5028
|
tmp = tmp0_elvis_lhs;
|
|
5029
5029
|
}
|
|
5030
5030
|
var element = tmp;
|
|
5031
|
-
element.
|
|
5031
|
+
element.vg();
|
|
5032
5032
|
}
|
|
5033
5033
|
while (inductionVariable < times);
|
|
5034
5034
|
}finally {
|
|
5035
5035
|
if (this.n()) {
|
|
5036
|
-
this.
|
|
5036
|
+
this.sn_1 = false;
|
|
5037
5037
|
} else {
|
|
5038
|
-
this.
|
|
5038
|
+
this.vn();
|
|
5039
5039
|
}
|
|
5040
5040
|
}
|
|
5041
5041
|
};
|
|
5042
|
-
protoOf(MessageQueue).
|
|
5043
|
-
return this.
|
|
5042
|
+
protoOf(MessageQueue).yn = function (element) {
|
|
5043
|
+
return this.qn_1.l(element);
|
|
5044
5044
|
};
|
|
5045
5045
|
protoOf(MessageQueue).l = function (element) {
|
|
5046
|
-
return this.
|
|
5046
|
+
return this.yn((!(element == null) ? isInterface(element, Runnable) : false) ? element : THROW_CCE());
|
|
5047
5047
|
};
|
|
5048
5048
|
protoOf(MessageQueue).q1 = function (index) {
|
|
5049
|
-
return this.
|
|
5049
|
+
return this.qn_1.q1(index);
|
|
5050
5050
|
};
|
|
5051
5051
|
protoOf(MessageQueue).n = function () {
|
|
5052
|
-
return this.
|
|
5052
|
+
return this.qn_1.n();
|
|
5053
5053
|
};
|
|
5054
5054
|
protoOf(MessageQueue).g = function () {
|
|
5055
|
-
return this.
|
|
5055
|
+
return this.qn_1.g();
|
|
5056
5056
|
};
|
|
5057
5057
|
protoOf(MessageQueue).k = function (index) {
|
|
5058
|
-
return this.
|
|
5058
|
+
return this.qn_1.k(index);
|
|
5059
5059
|
};
|
|
5060
5060
|
protoOf(MessageQueue).j = function () {
|
|
5061
|
-
return this.
|
|
5061
|
+
return this.qn_1.b8_1;
|
|
5062
5062
|
};
|
|
5063
5063
|
function WindowDispatcher(window_0) {
|
|
5064
5064
|
CoroutineDispatcher.call(this);
|
|
5065
|
-
this.
|
|
5066
|
-
this.
|
|
5065
|
+
this.uo_1 = window_0;
|
|
5066
|
+
this.vo_1 = new WindowMessageQueue(this.uo_1);
|
|
5067
5067
|
}
|
|
5068
|
-
protoOf(WindowDispatcher).
|
|
5069
|
-
return this.
|
|
5068
|
+
protoOf(WindowDispatcher).sh = function (context, block) {
|
|
5069
|
+
return this.vo_1.xn(block);
|
|
5070
5070
|
};
|
|
5071
5071
|
//region block: post-declaration
|
|
5072
5072
|
protoOf(JobSupport).s8 = plus;
|