arrow-resilience-kit 0.11.0 → 0.11.2
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/arrow-arrow-fx-stm.js +84 -84
- package/arrow-arrow-resilience.js +282 -282
- package/arrow-arrow-resilience.js.map +1 -1
- package/arrow-resilience-kit.js +3865 -3336
- package/arrow-resilience-kit.js.map +1 -1
- package/kotlin-logging.js +110 -110
- package/kotlinx-coroutines-core.js +1024 -887
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +148 -148
- package/package.json +1 -1
|
@@ -21,21 +21,23 @@
|
|
|
21
21
|
var Continuation = kotlin_kotlin.$_$.u3;
|
|
22
22
|
var initMetadataForClass = kotlin_kotlin.$_$.g5;
|
|
23
23
|
var VOID = kotlin_kotlin.$_$.a;
|
|
24
|
+
var Key_instance = kotlin_kotlin.$_$.t;
|
|
25
|
+
var equals = kotlin_kotlin.$_$.a5;
|
|
24
26
|
var EmptyCoroutineContext_getInstance = kotlin_kotlin.$_$.u;
|
|
27
|
+
var toString = kotlin_kotlin.$_$.t5;
|
|
28
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.v1;
|
|
29
|
+
var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
|
|
30
|
+
var intercepted = kotlin_kotlin.$_$.n3;
|
|
31
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.l3;
|
|
25
32
|
var createCoroutineUnintercepted = kotlin_kotlin.$_$.m3;
|
|
26
33
|
var THROW_CCE = kotlin_kotlin.$_$.v6;
|
|
27
34
|
var isInterface = kotlin_kotlin.$_$.n5;
|
|
28
35
|
var initMetadataForInterface = kotlin_kotlin.$_$.k5;
|
|
29
36
|
var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.b2;
|
|
30
|
-
var toString = kotlin_kotlin.$_$.t5;
|
|
31
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.v1;
|
|
32
37
|
var toString_0 = kotlin_kotlin.$_$.g7;
|
|
33
|
-
var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
|
|
34
38
|
var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
|
|
35
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.l3;
|
|
36
39
|
var initMetadataForObject = kotlin_kotlin.$_$.m5;
|
|
37
40
|
var hashCode = kotlin_kotlin.$_$.f5;
|
|
38
|
-
var equals = kotlin_kotlin.$_$.a5;
|
|
39
41
|
var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.b;
|
|
40
42
|
var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.l;
|
|
41
43
|
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.n;
|
|
@@ -44,7 +46,6 @@
|
|
|
44
46
|
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.k;
|
|
45
47
|
var createFailure = kotlin_kotlin.$_$.z6;
|
|
46
48
|
var AbstractCoroutineContextKey = kotlin_kotlin.$_$.q3;
|
|
47
|
-
var Key_instance = kotlin_kotlin.$_$.t;
|
|
48
49
|
var AbstractCoroutineContextElement = kotlin_kotlin.$_$.p3;
|
|
49
50
|
var get = kotlin_kotlin.$_$.r3;
|
|
50
51
|
var minusKey = kotlin_kotlin.$_$.s3;
|
|
@@ -62,7 +63,6 @@
|
|
|
62
63
|
var Duration__plus_impl_yu9v8f = kotlin_kotlin.$_$.f;
|
|
63
64
|
var _Duration___get_inWholeMilliseconds__impl__msfiry = kotlin_kotlin.$_$.d;
|
|
64
65
|
var compare = kotlin_kotlin.$_$.h4;
|
|
65
|
-
var intercepted = kotlin_kotlin.$_$.n3;
|
|
66
66
|
var ArrayDeque_init_$Create$ = kotlin_kotlin.$_$.d1;
|
|
67
67
|
var add = kotlin_kotlin.$_$.g4;
|
|
68
68
|
var subtract = kotlin_kotlin.$_$.o4;
|
|
@@ -142,6 +142,8 @@
|
|
|
142
142
|
initMetadataForClass(JobSupport, 'JobSupport', VOID, VOID, [Job, ParentJob], [0]);
|
|
143
143
|
initMetadataForInterface(CoroutineScope, 'CoroutineScope');
|
|
144
144
|
initMetadataForClass(AbstractCoroutine, 'AbstractCoroutine', VOID, JobSupport, [Job, Continuation, CoroutineScope], [0]);
|
|
145
|
+
initMetadataForClass(ScopeCoroutine, 'ScopeCoroutine', VOID, AbstractCoroutine, VOID, [0]);
|
|
146
|
+
initMetadataForClass(DispatchedCoroutine, 'DispatchedCoroutine', VOID, ScopeCoroutine, VOID, [0]);
|
|
145
147
|
initMetadataForClass(StandaloneCoroutine, 'StandaloneCoroutine', VOID, AbstractCoroutine, VOID, [0]);
|
|
146
148
|
initMetadataForClass(LazyStandaloneCoroutine, 'LazyStandaloneCoroutine', VOID, StandaloneCoroutine, VOID, [0]);
|
|
147
149
|
initMetadataForClass(DeferredCoroutine, 'DeferredCoroutine', VOID, AbstractCoroutine, [Job], [0]);
|
|
@@ -169,7 +171,7 @@
|
|
|
169
171
|
initMetadataForObject(Key_1, 'Key');
|
|
170
172
|
initMetadataForClass(CoroutineStart, 'CoroutineStart', VOID, Enum);
|
|
171
173
|
function invokeOnTimeout(timeMillis, block, context) {
|
|
172
|
-
return get_DefaultDelay().
|
|
174
|
+
return get_DefaultDelay().em(timeMillis, block, context);
|
|
173
175
|
}
|
|
174
176
|
initMetadataForInterface(Delay, 'Delay', VOID, VOID, VOID, [1]);
|
|
175
177
|
initMetadataForInterface(DelayWithTimeoutDiagnostics, 'DelayWithTimeoutDiagnostics', VOID, VOID, [Delay], [1]);
|
|
@@ -194,9 +196,9 @@
|
|
|
194
196
|
initMetadataForClass(IncompleteStateBox, 'IncompleteStateBox');
|
|
195
197
|
initMetadataForClass(JobImpl, 'JobImpl', VOID, JobSupport, [Job], [0]);
|
|
196
198
|
initMetadataForClass(MainCoroutineDispatcher, 'MainCoroutineDispatcher', VOID, CoroutineDispatcher);
|
|
199
|
+
initMetadataForObject(NonCancellable, 'NonCancellable', VOID, AbstractCoroutineContextElement, [Job], [0]);
|
|
197
200
|
initMetadataForClass(SupervisorJobImpl, 'SupervisorJobImpl', VOID, JobImpl, VOID, [0]);
|
|
198
201
|
initMetadataForClass(TimeoutCancellationException, 'TimeoutCancellationException', VOID, CancellationException);
|
|
199
|
-
initMetadataForClass(ScopeCoroutine, 'ScopeCoroutine', VOID, AbstractCoroutine, VOID, [0]);
|
|
200
202
|
initMetadataForClass(TimeoutCoroutine, 'TimeoutCoroutine', VOID, ScopeCoroutine, [Runnable], [0]);
|
|
201
203
|
initMetadataForCoroutine($withTimeoutOrNullCOROUTINE$, CoroutineImpl);
|
|
202
204
|
initMetadataForObject(Unconfined, 'Unconfined', VOID, CoroutineDispatcher);
|
|
@@ -226,6 +228,7 @@
|
|
|
226
228
|
initMetadataForClass(MessageQueue, 'MessageQueue', VOID, VOID, [MutableIterable, KtList, Collection]);
|
|
227
229
|
initMetadataForClass(ScheduledMessageQueue, 'ScheduledMessageQueue', VOID, MessageQueue);
|
|
228
230
|
initMetadataForClass(WindowMessageQueue, 'WindowMessageQueue', VOID, MessageQueue);
|
|
231
|
+
initMetadataForClass(UndispatchedCoroutine, 'UndispatchedCoroutine', VOID, ScopeCoroutine, VOID, [0]);
|
|
229
232
|
initMetadataForObject(Dispatchers, 'Dispatchers');
|
|
230
233
|
initMetadataForClass(JsMainDispatcher, 'JsMainDispatcher', VOID, MainCoroutineDispatcher);
|
|
231
234
|
initMetadataForClass(JobCancellationException, 'JobCancellationException', VOID, CancellationException);
|
|
@@ -294,22 +297,104 @@
|
|
|
294
297
|
protoOf(AbstractCoroutine).lg = function (start, receiver, block) {
|
|
295
298
|
start.og(block, receiver, this);
|
|
296
299
|
};
|
|
300
|
+
function withContext(context, block, $completion) {
|
|
301
|
+
var tmp$ret$0;
|
|
302
|
+
$l$block_0: {
|
|
303
|
+
var oldContext = $completion.v6();
|
|
304
|
+
var newContext = newCoroutineContext(oldContext, context);
|
|
305
|
+
ensureActive(newContext);
|
|
306
|
+
if (newContext === oldContext) {
|
|
307
|
+
var coroutine = new ScopeCoroutine(newContext, $completion);
|
|
308
|
+
tmp$ret$0 = startUndispatchedOrReturn(coroutine, coroutine, block);
|
|
309
|
+
break $l$block_0;
|
|
310
|
+
}
|
|
311
|
+
if (equals(newContext.c7(Key_instance), oldContext.c7(Key_instance))) {
|
|
312
|
+
var coroutine_0 = new UndispatchedCoroutine(newContext, $completion);
|
|
313
|
+
// Inline function 'kotlinx.coroutines.withCoroutineContext' call
|
|
314
|
+
coroutine_0.wf_1;
|
|
315
|
+
tmp$ret$0 = startUndispatchedOrReturn(coroutine_0, coroutine_0, block);
|
|
316
|
+
break $l$block_0;
|
|
317
|
+
}
|
|
318
|
+
var coroutine_1 = new DispatchedCoroutine(newContext, $completion);
|
|
319
|
+
startCoroutineCancellable(block, coroutine_1, coroutine_1);
|
|
320
|
+
tmp$ret$0 = coroutine_1.yh();
|
|
321
|
+
}
|
|
322
|
+
return tmp$ret$0;
|
|
323
|
+
}
|
|
297
324
|
function launch(_this__u8e3s4, context, start, block) {
|
|
298
325
|
context = context === VOID ? EmptyCoroutineContext_getInstance() : context;
|
|
299
326
|
start = start === VOID ? CoroutineStart_DEFAULT_getInstance() : start;
|
|
300
|
-
var newContext =
|
|
301
|
-
var coroutine = start.
|
|
327
|
+
var newContext = newCoroutineContext_0(_this__u8e3s4, context);
|
|
328
|
+
var coroutine = start.zh() ? new LazyStandaloneCoroutine(newContext, block) : new StandaloneCoroutine(newContext, true);
|
|
302
329
|
coroutine.lg(start, coroutine, block);
|
|
303
330
|
return coroutine;
|
|
304
331
|
}
|
|
305
332
|
function async(_this__u8e3s4, context, start, block) {
|
|
306
333
|
context = context === VOID ? EmptyCoroutineContext_getInstance() : context;
|
|
307
334
|
start = start === VOID ? CoroutineStart_DEFAULT_getInstance() : start;
|
|
308
|
-
var newContext =
|
|
309
|
-
var coroutine = start.
|
|
335
|
+
var newContext = newCoroutineContext_0(_this__u8e3s4, context);
|
|
336
|
+
var coroutine = start.zh() ? new LazyDeferredCoroutine(newContext, block) : new DeferredCoroutine(newContext, true);
|
|
310
337
|
coroutine.lg(start, coroutine, block);
|
|
311
338
|
return coroutine;
|
|
312
339
|
}
|
|
340
|
+
function trySuspend($this) {
|
|
341
|
+
// Inline function 'kotlinx.atomicfu.loop' call
|
|
342
|
+
var this_0 = $this.xh_1;
|
|
343
|
+
while (true) {
|
|
344
|
+
switch (this_0.kotlinx$atomicfu$value) {
|
|
345
|
+
case 0:
|
|
346
|
+
if ($this.xh_1.atomicfu$compareAndSet(0, 1))
|
|
347
|
+
return true;
|
|
348
|
+
break;
|
|
349
|
+
case 2:
|
|
350
|
+
return false;
|
|
351
|
+
default:
|
|
352
|
+
// Inline function 'kotlin.error' call
|
|
353
|
+
|
|
354
|
+
var message = 'Already suspended';
|
|
355
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
function tryResume($this) {
|
|
360
|
+
// Inline function 'kotlinx.atomicfu.loop' call
|
|
361
|
+
var this_0 = $this.xh_1;
|
|
362
|
+
while (true) {
|
|
363
|
+
switch (this_0.kotlinx$atomicfu$value) {
|
|
364
|
+
case 0:
|
|
365
|
+
if ($this.xh_1.atomicfu$compareAndSet(0, 2))
|
|
366
|
+
return true;
|
|
367
|
+
break;
|
|
368
|
+
case 1:
|
|
369
|
+
return false;
|
|
370
|
+
default:
|
|
371
|
+
// Inline function 'kotlin.error' call
|
|
372
|
+
|
|
373
|
+
var message = 'Already resumed';
|
|
374
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
function DispatchedCoroutine(context, uCont) {
|
|
379
|
+
ScopeCoroutine.call(this, context, uCont);
|
|
380
|
+
this.xh_1 = atomic$int$1(0);
|
|
381
|
+
}
|
|
382
|
+
protoOf(DispatchedCoroutine).ig = function (state) {
|
|
383
|
+
this.hg(state);
|
|
384
|
+
};
|
|
385
|
+
protoOf(DispatchedCoroutine).hg = function (state) {
|
|
386
|
+
if (tryResume(this))
|
|
387
|
+
return Unit_instance;
|
|
388
|
+
resumeCancellableWithInternal(intercepted(this.di_1), recoverResult(state, this.di_1));
|
|
389
|
+
};
|
|
390
|
+
protoOf(DispatchedCoroutine).yh = function () {
|
|
391
|
+
if (trySuspend(this))
|
|
392
|
+
return get_COROUTINE_SUSPENDED();
|
|
393
|
+
var state = unboxState(this.rg());
|
|
394
|
+
if (state instanceof CompletedExceptionally)
|
|
395
|
+
throw state.dg_1;
|
|
396
|
+
return state;
|
|
397
|
+
};
|
|
313
398
|
function StandaloneCoroutine(parentContext, active) {
|
|
314
399
|
AbstractCoroutine.call(this, parentContext, true, active);
|
|
315
400
|
}
|
|
@@ -319,31 +404,31 @@
|
|
|
319
404
|
};
|
|
320
405
|
function LazyStandaloneCoroutine(parentContext, block) {
|
|
321
406
|
StandaloneCoroutine.call(this, parentContext, false);
|
|
322
|
-
this.
|
|
407
|
+
this.li_1 = createCoroutineUnintercepted(block, this, this);
|
|
323
408
|
}
|
|
324
409
|
protoOf(LazyStandaloneCoroutine).ug = function () {
|
|
325
|
-
startCoroutineCancellable_0(this.
|
|
410
|
+
startCoroutineCancellable_0(this.li_1, this);
|
|
326
411
|
};
|
|
327
412
|
function DeferredCoroutine(parentContext, active) {
|
|
328
413
|
AbstractCoroutine.call(this, parentContext, true, active);
|
|
329
414
|
}
|
|
330
|
-
protoOf(DeferredCoroutine).
|
|
415
|
+
protoOf(DeferredCoroutine).pi = function () {
|
|
331
416
|
var tmp = this.sh();
|
|
332
417
|
return isInterface(tmp, SelectClause1) ? tmp : THROW_CCE();
|
|
333
418
|
};
|
|
334
419
|
function LazyDeferredCoroutine(parentContext, block) {
|
|
335
420
|
DeferredCoroutine.call(this, parentContext, false);
|
|
336
|
-
this.
|
|
421
|
+
this.ti_1 = createCoroutineUnintercepted(block, this, this);
|
|
337
422
|
}
|
|
338
423
|
protoOf(LazyDeferredCoroutine).ug = function () {
|
|
339
|
-
startCoroutineCancellable_0(this.
|
|
424
|
+
startCoroutineCancellable_0(this.ti_1, this);
|
|
340
425
|
};
|
|
341
426
|
function CancellableContinuation() {
|
|
342
427
|
}
|
|
343
428
|
function invokeOnCancellation(_this__u8e3s4, handler) {
|
|
344
429
|
var tmp;
|
|
345
430
|
if (_this__u8e3s4 instanceof CancellableContinuationImpl) {
|
|
346
|
-
_this__u8e3s4.
|
|
431
|
+
_this__u8e3s4.ej(handler);
|
|
347
432
|
tmp = Unit_instance;
|
|
348
433
|
} else {
|
|
349
434
|
throw UnsupportedOperationException_init_$Create$('third-party implementation of CancellableContinuation is not supported');
|
|
@@ -354,14 +439,14 @@
|
|
|
354
439
|
if (!(delegate instanceof DispatchedContinuation)) {
|
|
355
440
|
return new CancellableContinuationImpl(delegate, 1);
|
|
356
441
|
}
|
|
357
|
-
var tmp0_safe_receiver = delegate.
|
|
442
|
+
var tmp0_safe_receiver = delegate.lj();
|
|
358
443
|
var tmp;
|
|
359
444
|
if (tmp0_safe_receiver == null) {
|
|
360
445
|
tmp = null;
|
|
361
446
|
} else {
|
|
362
447
|
// Inline function 'kotlin.takeIf' call
|
|
363
448
|
var tmp_0;
|
|
364
|
-
if (tmp0_safe_receiver.
|
|
449
|
+
if (tmp0_safe_receiver.mj()) {
|
|
365
450
|
tmp_0 = tmp0_safe_receiver;
|
|
366
451
|
} else {
|
|
367
452
|
tmp_0 = null;
|
|
@@ -383,7 +468,7 @@
|
|
|
383
468
|
}
|
|
384
469
|
var RESUME_TOKEN;
|
|
385
470
|
function _get_parentHandle__f8dcex($this) {
|
|
386
|
-
return $this.
|
|
471
|
+
return $this.dj_1.kotlinx$atomicfu$value;
|
|
387
472
|
}
|
|
388
473
|
function _get_stateDebugRepresentation__bf18u4($this) {
|
|
389
474
|
var tmp0_subject = $this.rg();
|
|
@@ -401,9 +486,9 @@
|
|
|
401
486
|
}
|
|
402
487
|
function isReusable($this) {
|
|
403
488
|
var tmp;
|
|
404
|
-
if (get_isReusableMode($this.
|
|
405
|
-
var tmp_0 = $this.
|
|
406
|
-
tmp = (tmp_0 instanceof DispatchedContinuation ? tmp_0 : THROW_CCE()).
|
|
489
|
+
if (get_isReusableMode($this.oj_1)) {
|
|
490
|
+
var tmp_0 = $this.zi_1;
|
|
491
|
+
tmp = (tmp_0 instanceof DispatchedContinuation ? tmp_0 : THROW_CCE()).nj();
|
|
407
492
|
} else {
|
|
408
493
|
tmp = false;
|
|
409
494
|
}
|
|
@@ -412,13 +497,13 @@
|
|
|
412
497
|
function cancelLater($this, cause) {
|
|
413
498
|
if (!isReusable($this))
|
|
414
499
|
return false;
|
|
415
|
-
var tmp = $this.
|
|
500
|
+
var tmp = $this.zi_1;
|
|
416
501
|
var dispatched = tmp instanceof DispatchedContinuation ? tmp : THROW_CCE();
|
|
417
|
-
return dispatched.
|
|
502
|
+
return dispatched.pj(cause);
|
|
418
503
|
}
|
|
419
504
|
function callSegmentOnCancellation($this, segment, cause) {
|
|
420
505
|
// Inline function 'kotlinx.coroutines.index' call
|
|
421
|
-
var index = $this.
|
|
506
|
+
var index = $this.bj_1.kotlinx$atomicfu$value & 536870911;
|
|
422
507
|
// Inline function 'kotlin.check' call
|
|
423
508
|
if (!!(index === 536870911)) {
|
|
424
509
|
var message = 'The index for Segment.onCancellation(..) is broken';
|
|
@@ -426,7 +511,7 @@
|
|
|
426
511
|
}
|
|
427
512
|
// Inline function 'kotlinx.coroutines.CancellableContinuationImpl.callCancelHandlerSafely' call
|
|
428
513
|
try {
|
|
429
|
-
segment.
|
|
514
|
+
segment.uj(index, cause, $this.v6());
|
|
430
515
|
} catch ($p) {
|
|
431
516
|
if ($p instanceof Error) {
|
|
432
517
|
var ex = $p;
|
|
@@ -436,9 +521,9 @@
|
|
|
436
521
|
}
|
|
437
522
|
}
|
|
438
523
|
}
|
|
439
|
-
function
|
|
524
|
+
function trySuspend_0($this) {
|
|
440
525
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
441
|
-
var this_0 = $this.
|
|
526
|
+
var this_0 = $this.bj_1;
|
|
442
527
|
while (true) {
|
|
443
528
|
var cur = this_0.kotlinx$atomicfu$value;
|
|
444
529
|
// Inline function 'kotlinx.coroutines.decision' call
|
|
@@ -449,7 +534,7 @@
|
|
|
449
534
|
// Inline function 'kotlinx.coroutines.decisionAndIndex' call
|
|
450
535
|
|
|
451
536
|
var tmp$ret$4 = (1 << 29) + (cur & 536870911) | 0;
|
|
452
|
-
if ($this.
|
|
537
|
+
if ($this.bj_1.atomicfu$compareAndSet(cur, tmp$ret$4))
|
|
453
538
|
return true;
|
|
454
539
|
break;
|
|
455
540
|
case 2:
|
|
@@ -462,9 +547,9 @@
|
|
|
462
547
|
}
|
|
463
548
|
}
|
|
464
549
|
}
|
|
465
|
-
function
|
|
550
|
+
function tryResume_0($this) {
|
|
466
551
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
467
|
-
var this_0 = $this.
|
|
552
|
+
var this_0 = $this.bj_1;
|
|
468
553
|
while (true) {
|
|
469
554
|
var cur = this_0.kotlinx$atomicfu$value;
|
|
470
555
|
// Inline function 'kotlinx.coroutines.decision' call
|
|
@@ -475,7 +560,7 @@
|
|
|
475
560
|
// Inline function 'kotlinx.coroutines.decisionAndIndex' call
|
|
476
561
|
|
|
477
562
|
var tmp$ret$4 = (2 << 29) + (cur & 536870911) | 0;
|
|
478
|
-
if ($this.
|
|
563
|
+
if ($this.bj_1.atomicfu$compareAndSet(cur, tmp$ret$4))
|
|
479
564
|
return true;
|
|
480
565
|
break;
|
|
481
566
|
case 1:
|
|
@@ -498,17 +583,17 @@
|
|
|
498
583
|
}
|
|
499
584
|
var parent = tmp;
|
|
500
585
|
var handle = invokeOnCompletion(parent, VOID, new ChildContinuation($this));
|
|
501
|
-
$this.
|
|
586
|
+
$this.dj_1.atomicfu$compareAndSet(null, handle);
|
|
502
587
|
return handle;
|
|
503
588
|
}
|
|
504
589
|
function invokeOnCancellationImpl($this, handler) {
|
|
505
590
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
506
591
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
507
|
-
var this_0 = $this.
|
|
592
|
+
var this_0 = $this.cj_1;
|
|
508
593
|
while (true) {
|
|
509
594
|
var state = this_0.kotlinx$atomicfu$value;
|
|
510
595
|
if (state instanceof Active) {
|
|
511
|
-
if ($this.
|
|
596
|
+
if ($this.cj_1.atomicfu$compareAndSet(state, handler))
|
|
512
597
|
return Unit_instance;
|
|
513
598
|
} else {
|
|
514
599
|
var tmp;
|
|
@@ -521,14 +606,14 @@
|
|
|
521
606
|
multipleHandlersError($this, handler, state);
|
|
522
607
|
} else {
|
|
523
608
|
if (state instanceof CompletedExceptionally) {
|
|
524
|
-
if (!state.
|
|
609
|
+
if (!state.dk()) {
|
|
525
610
|
multipleHandlersError($this, handler, state);
|
|
526
611
|
}
|
|
527
612
|
if (state instanceof CancelledContinuation) {
|
|
528
613
|
var tmp1_safe_receiver = state instanceof CompletedExceptionally ? state : null;
|
|
529
614
|
var cause = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.dg_1;
|
|
530
615
|
if (isInterface(handler, CancelHandler)) {
|
|
531
|
-
$this.
|
|
616
|
+
$this.ak(handler, cause);
|
|
532
617
|
} else {
|
|
533
618
|
var segment = handler instanceof Segment ? handler : THROW_CCE();
|
|
534
619
|
callSegmentOnCancellation($this, segment, cause);
|
|
@@ -537,19 +622,19 @@
|
|
|
537
622
|
return Unit_instance;
|
|
538
623
|
} else {
|
|
539
624
|
if (state instanceof CompletedContinuation) {
|
|
540
|
-
if (!(state.
|
|
625
|
+
if (!(state.wj_1 == null)) {
|
|
541
626
|
multipleHandlersError($this, handler, state);
|
|
542
627
|
}
|
|
543
628
|
if (handler instanceof Segment)
|
|
544
629
|
return Unit_instance;
|
|
545
630
|
if (!isInterface(handler, CancelHandler))
|
|
546
631
|
THROW_CCE();
|
|
547
|
-
if (state.
|
|
548
|
-
$this.
|
|
632
|
+
if (state.bk()) {
|
|
633
|
+
$this.ak(handler, state.zj_1);
|
|
549
634
|
return Unit_instance;
|
|
550
635
|
}
|
|
551
|
-
var update = state.
|
|
552
|
-
if ($this.
|
|
636
|
+
var update = state.ck(VOID, handler);
|
|
637
|
+
if ($this.cj_1.atomicfu$compareAndSet(state, update))
|
|
553
638
|
return Unit_instance;
|
|
554
639
|
} else {
|
|
555
640
|
if (handler instanceof Segment)
|
|
@@ -557,7 +642,7 @@
|
|
|
557
642
|
if (!isInterface(handler, CancelHandler))
|
|
558
643
|
THROW_CCE();
|
|
559
644
|
var update_0 = new CompletedContinuation(state, handler);
|
|
560
|
-
if ($this.
|
|
645
|
+
if ($this.cj_1.atomicfu$compareAndSet(state, update_0))
|
|
561
646
|
return Unit_instance;
|
|
562
647
|
}
|
|
563
648
|
}
|
|
@@ -571,7 +656,7 @@
|
|
|
571
656
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
572
657
|
}
|
|
573
658
|
function dispatchResume($this, mode) {
|
|
574
|
-
if (
|
|
659
|
+
if (tryResume_0($this))
|
|
575
660
|
return Unit_instance;
|
|
576
661
|
dispatch($this, mode);
|
|
577
662
|
}
|
|
@@ -608,13 +693,13 @@
|
|
|
608
693
|
}
|
|
609
694
|
function tryResumeImpl($this, proposedUpdate, idempotent, onCancellation) {
|
|
610
695
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
611
|
-
var this_0 = $this.
|
|
696
|
+
var this_0 = $this.cj_1;
|
|
612
697
|
while (true) {
|
|
613
698
|
var tmp0 = this_0.kotlinx$atomicfu$value;
|
|
614
699
|
$l$block: {
|
|
615
700
|
if (!(tmp0 == null) ? isInterface(tmp0, NotCompleted) : false) {
|
|
616
|
-
var update = resumedState($this, tmp0, proposedUpdate, $this.
|
|
617
|
-
if (!$this.
|
|
701
|
+
var update = resumedState($this, tmp0, proposedUpdate, $this.oj_1, onCancellation, idempotent);
|
|
702
|
+
if (!$this.cj_1.atomicfu$compareAndSet(tmp0, update)) {
|
|
618
703
|
break $l$block;
|
|
619
704
|
}
|
|
620
705
|
detachChildIfNonReusable($this);
|
|
@@ -622,7 +707,7 @@
|
|
|
622
707
|
} else {
|
|
623
708
|
if (tmp0 instanceof CompletedContinuation) {
|
|
624
709
|
var tmp;
|
|
625
|
-
if (!(idempotent == null) && tmp0.
|
|
710
|
+
if (!(idempotent == null) && tmp0.yj_1 === idempotent) {
|
|
626
711
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
627
712
|
tmp = get_RESUME_TOKEN();
|
|
628
713
|
} else {
|
|
@@ -643,35 +728,35 @@
|
|
|
643
728
|
}
|
|
644
729
|
function detachChildIfNonReusable($this) {
|
|
645
730
|
if (!isReusable($this)) {
|
|
646
|
-
$this.
|
|
731
|
+
$this.ek();
|
|
647
732
|
}
|
|
648
733
|
}
|
|
649
734
|
function CancellableContinuationImpl(delegate, resumeMode) {
|
|
650
735
|
DispatchedTask.call(this, resumeMode);
|
|
651
|
-
this.
|
|
736
|
+
this.zi_1 = delegate;
|
|
652
737
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
653
|
-
this.
|
|
738
|
+
this.aj_1 = this.zi_1.v6();
|
|
654
739
|
var tmp = this;
|
|
655
740
|
// Inline function 'kotlinx.coroutines.decisionAndIndex' call
|
|
656
741
|
var tmp$ret$1 = (0 << 29) + 536870911 | 0;
|
|
657
|
-
tmp.
|
|
658
|
-
this.
|
|
659
|
-
this.
|
|
742
|
+
tmp.bj_1 = atomic$int$1(tmp$ret$1);
|
|
743
|
+
this.cj_1 = atomic$ref$1(Active_instance);
|
|
744
|
+
this.dj_1 = atomic$ref$1(null);
|
|
660
745
|
}
|
|
661
|
-
protoOf(CancellableContinuationImpl).
|
|
662
|
-
return this.
|
|
746
|
+
protoOf(CancellableContinuationImpl).fk = function () {
|
|
747
|
+
return this.zi_1;
|
|
663
748
|
};
|
|
664
749
|
protoOf(CancellableContinuationImpl).v6 = function () {
|
|
665
|
-
return this.
|
|
750
|
+
return this.aj_1;
|
|
666
751
|
};
|
|
667
752
|
protoOf(CancellableContinuationImpl).rg = function () {
|
|
668
|
-
return this.
|
|
753
|
+
return this.cj_1.kotlinx$atomicfu$value;
|
|
669
754
|
};
|
|
670
755
|
protoOf(CancellableContinuationImpl).sg = function () {
|
|
671
756
|
var tmp = this.rg();
|
|
672
757
|
return !(!(tmp == null) ? isInterface(tmp, NotCompleted) : false);
|
|
673
758
|
};
|
|
674
|
-
protoOf(CancellableContinuationImpl).
|
|
759
|
+
protoOf(CancellableContinuationImpl).gk = function () {
|
|
675
760
|
var tmp0_elvis_lhs = installParentHandle(this);
|
|
676
761
|
var tmp;
|
|
677
762
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -681,38 +766,38 @@
|
|
|
681
766
|
}
|
|
682
767
|
var handle = tmp;
|
|
683
768
|
if (this.sg()) {
|
|
684
|
-
handle.
|
|
685
|
-
this.
|
|
769
|
+
handle.hk();
|
|
770
|
+
this.dj_1.kotlinx$atomicfu$value = NonDisposableHandle_instance;
|
|
686
771
|
}
|
|
687
772
|
};
|
|
688
|
-
protoOf(CancellableContinuationImpl).
|
|
773
|
+
protoOf(CancellableContinuationImpl).mj = function () {
|
|
689
774
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
690
775
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
691
|
-
var state = this.
|
|
776
|
+
var state = this.cj_1.kotlinx$atomicfu$value;
|
|
692
777
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
693
778
|
var tmp;
|
|
694
779
|
if (state instanceof CompletedContinuation) {
|
|
695
|
-
tmp = !(state.
|
|
780
|
+
tmp = !(state.yj_1 == null);
|
|
696
781
|
} else {
|
|
697
782
|
tmp = false;
|
|
698
783
|
}
|
|
699
784
|
if (tmp) {
|
|
700
|
-
this.
|
|
785
|
+
this.ek();
|
|
701
786
|
return false;
|
|
702
787
|
}
|
|
703
|
-
var tmp_0 = this.
|
|
788
|
+
var tmp_0 = this.bj_1;
|
|
704
789
|
// Inline function 'kotlinx.coroutines.decisionAndIndex' call
|
|
705
790
|
tmp_0.kotlinx$atomicfu$value = (0 << 29) + 536870911 | 0;
|
|
706
|
-
this.
|
|
791
|
+
this.cj_1.kotlinx$atomicfu$value = Active_instance;
|
|
707
792
|
return true;
|
|
708
793
|
};
|
|
709
|
-
protoOf(CancellableContinuationImpl).
|
|
794
|
+
protoOf(CancellableContinuationImpl).ik = function () {
|
|
710
795
|
return this.rg();
|
|
711
796
|
};
|
|
712
|
-
protoOf(CancellableContinuationImpl).
|
|
797
|
+
protoOf(CancellableContinuationImpl).jk = function (takenState, cause) {
|
|
713
798
|
var tmp$ret$0;
|
|
714
799
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
715
|
-
var this_0 = this.
|
|
800
|
+
var this_0 = this.cj_1;
|
|
716
801
|
while (true) {
|
|
717
802
|
var state = this_0.kotlinx$atomicfu$value;
|
|
718
803
|
if (!(state == null) ? isInterface(state, NotCompleted) : false) {
|
|
@@ -725,17 +810,17 @@
|
|
|
725
810
|
else {
|
|
726
811
|
if (state instanceof CompletedContinuation) {
|
|
727
812
|
// Inline function 'kotlin.check' call
|
|
728
|
-
if (!!state.
|
|
813
|
+
if (!!state.bk()) {
|
|
729
814
|
var message_0 = 'Must be called at most once';
|
|
730
815
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
731
816
|
}
|
|
732
|
-
var update = state.
|
|
733
|
-
if (this.
|
|
734
|
-
state.
|
|
817
|
+
var update = state.ck(VOID, VOID, VOID, VOID, cause);
|
|
818
|
+
if (this.cj_1.atomicfu$compareAndSet(state, update)) {
|
|
819
|
+
state.kk(this, cause);
|
|
735
820
|
return Unit_instance;
|
|
736
821
|
}
|
|
737
822
|
} else {
|
|
738
|
-
if (this.
|
|
823
|
+
if (this.cj_1.atomicfu$compareAndSet(state, new CompletedContinuation(state, VOID, VOID, VOID, cause))) {
|
|
739
824
|
return Unit_instance;
|
|
740
825
|
}
|
|
741
826
|
}
|
|
@@ -744,9 +829,9 @@
|
|
|
744
829
|
}
|
|
745
830
|
return tmp$ret$0;
|
|
746
831
|
};
|
|
747
|
-
protoOf(CancellableContinuationImpl).
|
|
832
|
+
protoOf(CancellableContinuationImpl).lk = function (cause) {
|
|
748
833
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
749
|
-
var this_0 = this.
|
|
834
|
+
var this_0 = this.cj_1;
|
|
750
835
|
while (true) {
|
|
751
836
|
var tmp0 = this_0.kotlinx$atomicfu$value;
|
|
752
837
|
$l$block: {
|
|
@@ -759,32 +844,32 @@
|
|
|
759
844
|
tmp = tmp0 instanceof Segment;
|
|
760
845
|
}
|
|
761
846
|
var update = new CancelledContinuation(this, cause, tmp);
|
|
762
|
-
if (!this.
|
|
847
|
+
if (!this.cj_1.atomicfu$compareAndSet(tmp0, update)) {
|
|
763
848
|
break $l$block;
|
|
764
849
|
}
|
|
765
850
|
if (isInterface(tmp0, CancelHandler)) {
|
|
766
|
-
this.
|
|
851
|
+
this.ak(tmp0, cause);
|
|
767
852
|
} else {
|
|
768
853
|
if (tmp0 instanceof Segment) {
|
|
769
854
|
callSegmentOnCancellation(this, tmp0, cause);
|
|
770
855
|
}
|
|
771
856
|
}
|
|
772
857
|
detachChildIfNonReusable(this);
|
|
773
|
-
dispatchResume(this, this.
|
|
858
|
+
dispatchResume(this, this.oj_1);
|
|
774
859
|
return true;
|
|
775
860
|
}
|
|
776
861
|
}
|
|
777
862
|
};
|
|
778
|
-
protoOf(CancellableContinuationImpl).
|
|
863
|
+
protoOf(CancellableContinuationImpl).mk = function (cause) {
|
|
779
864
|
if (cancelLater(this, cause))
|
|
780
865
|
return Unit_instance;
|
|
781
|
-
this.
|
|
866
|
+
this.lk(cause);
|
|
782
867
|
detachChildIfNonReusable(this);
|
|
783
868
|
};
|
|
784
|
-
protoOf(CancellableContinuationImpl).
|
|
869
|
+
protoOf(CancellableContinuationImpl).ak = function (handler, cause) {
|
|
785
870
|
// Inline function 'kotlinx.coroutines.CancellableContinuationImpl.callCancelHandlerSafely' call
|
|
786
871
|
try {
|
|
787
|
-
handler.
|
|
872
|
+
handler.nk(cause);
|
|
788
873
|
} catch ($p) {
|
|
789
874
|
if ($p instanceof Error) {
|
|
790
875
|
var ex = $p;
|
|
@@ -795,7 +880,7 @@
|
|
|
795
880
|
}
|
|
796
881
|
return Unit_instance;
|
|
797
882
|
};
|
|
798
|
-
protoOf(CancellableContinuationImpl).
|
|
883
|
+
protoOf(CancellableContinuationImpl).ok = function (onCancellation, cause, value) {
|
|
799
884
|
try {
|
|
800
885
|
onCancellation(cause, value, this.v6());
|
|
801
886
|
} catch ($p) {
|
|
@@ -807,40 +892,40 @@
|
|
|
807
892
|
}
|
|
808
893
|
}
|
|
809
894
|
};
|
|
810
|
-
protoOf(CancellableContinuationImpl).
|
|
895
|
+
protoOf(CancellableContinuationImpl).pk = function (parent) {
|
|
811
896
|
return parent.vg();
|
|
812
897
|
};
|
|
813
|
-
protoOf(CancellableContinuationImpl).
|
|
898
|
+
protoOf(CancellableContinuationImpl).yh = function () {
|
|
814
899
|
var isReusable_0 = isReusable(this);
|
|
815
|
-
if (
|
|
900
|
+
if (trySuspend_0(this)) {
|
|
816
901
|
if (_get_parentHandle__f8dcex(this) == null) {
|
|
817
902
|
installParentHandle(this);
|
|
818
903
|
}
|
|
819
904
|
if (isReusable_0) {
|
|
820
|
-
this.
|
|
905
|
+
this.qk();
|
|
821
906
|
}
|
|
822
907
|
return get_COROUTINE_SUSPENDED();
|
|
823
908
|
}
|
|
824
909
|
if (isReusable_0) {
|
|
825
|
-
this.
|
|
910
|
+
this.qk();
|
|
826
911
|
}
|
|
827
912
|
var state = this.rg();
|
|
828
913
|
if (state instanceof CompletedExceptionally)
|
|
829
914
|
throw recoverStackTrace(state.dg_1, this);
|
|
830
|
-
if (get_isCancellableMode(this.
|
|
915
|
+
if (get_isCancellableMode(this.oj_1)) {
|
|
831
916
|
var job = this.v6().c7(Key_instance_3);
|
|
832
917
|
if (!(job == null) && !job.yf()) {
|
|
833
918
|
var cause = job.vg();
|
|
834
|
-
this.
|
|
919
|
+
this.jk(state, cause);
|
|
835
920
|
throw recoverStackTrace(cause, this);
|
|
836
921
|
}
|
|
837
922
|
}
|
|
838
|
-
return this.
|
|
923
|
+
return this.rk(state);
|
|
839
924
|
};
|
|
840
|
-
protoOf(CancellableContinuationImpl).
|
|
841
|
-
var tmp = this.
|
|
925
|
+
protoOf(CancellableContinuationImpl).qk = function () {
|
|
926
|
+
var tmp = this.zi_1;
|
|
842
927
|
var tmp0_safe_receiver = tmp instanceof DispatchedContinuation ? tmp : null;
|
|
843
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
928
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.sk(this);
|
|
844
929
|
var tmp_0;
|
|
845
930
|
if (tmp1_elvis_lhs == null) {
|
|
846
931
|
return Unit_instance;
|
|
@@ -848,17 +933,17 @@
|
|
|
848
933
|
tmp_0 = tmp1_elvis_lhs;
|
|
849
934
|
}
|
|
850
935
|
var cancellationCause = tmp_0;
|
|
851
|
-
this.
|
|
852
|
-
this.
|
|
936
|
+
this.ek();
|
|
937
|
+
this.lk(cancellationCause);
|
|
853
938
|
};
|
|
854
939
|
protoOf(CancellableContinuationImpl).a7 = function (result) {
|
|
855
|
-
return this.
|
|
940
|
+
return this.tk(toState_0(result, this), this.oj_1);
|
|
856
941
|
};
|
|
857
|
-
protoOf(CancellableContinuationImpl).
|
|
858
|
-
return this.
|
|
942
|
+
protoOf(CancellableContinuationImpl).xi = function (value, onCancellation) {
|
|
943
|
+
return this.uk(value, this.oj_1, onCancellation);
|
|
859
944
|
};
|
|
860
|
-
protoOf(CancellableContinuationImpl).
|
|
861
|
-
var tmp0 = this.
|
|
945
|
+
protoOf(CancellableContinuationImpl).vk = function (segment, index) {
|
|
946
|
+
var tmp0 = this.bj_1;
|
|
862
947
|
$l$block: {
|
|
863
948
|
// Inline function 'kotlinx.atomicfu.update' call
|
|
864
949
|
while (true) {
|
|
@@ -879,18 +964,18 @@
|
|
|
879
964
|
}
|
|
880
965
|
invokeOnCancellationImpl(this, segment);
|
|
881
966
|
};
|
|
882
|
-
protoOf(CancellableContinuationImpl).
|
|
967
|
+
protoOf(CancellableContinuationImpl).ej = function (handler) {
|
|
883
968
|
return invokeOnCancellationImpl(this, handler);
|
|
884
969
|
};
|
|
885
|
-
protoOf(CancellableContinuationImpl).
|
|
970
|
+
protoOf(CancellableContinuationImpl).uk = function (proposedUpdate, resumeMode, onCancellation) {
|
|
886
971
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
887
|
-
var this_0 = this.
|
|
972
|
+
var this_0 = this.cj_1;
|
|
888
973
|
while (true) {
|
|
889
974
|
var tmp0 = this_0.kotlinx$atomicfu$value;
|
|
890
975
|
$l$block: {
|
|
891
976
|
if (!(tmp0 == null) ? isInterface(tmp0, NotCompleted) : false) {
|
|
892
977
|
var update = resumedState(this, tmp0, proposedUpdate, resumeMode, onCancellation, null);
|
|
893
|
-
if (!this.
|
|
978
|
+
if (!this.cj_1.atomicfu$compareAndSet(tmp0, update)) {
|
|
894
979
|
break $l$block;
|
|
895
980
|
}
|
|
896
981
|
detachChildIfNonReusable(this);
|
|
@@ -898,12 +983,12 @@
|
|
|
898
983
|
return Unit_instance;
|
|
899
984
|
} else {
|
|
900
985
|
if (tmp0 instanceof CancelledContinuation) {
|
|
901
|
-
if (tmp0.
|
|
986
|
+
if (tmp0.zk()) {
|
|
902
987
|
if (onCancellation == null)
|
|
903
988
|
null;
|
|
904
989
|
else {
|
|
905
990
|
// Inline function 'kotlin.let' call
|
|
906
|
-
this.
|
|
991
|
+
this.ok(onCancellation, tmp0.dg_1, proposedUpdate);
|
|
907
992
|
}
|
|
908
993
|
return Unit_instance;
|
|
909
994
|
}
|
|
@@ -913,18 +998,18 @@
|
|
|
913
998
|
}
|
|
914
999
|
}
|
|
915
1000
|
};
|
|
916
|
-
protoOf(CancellableContinuationImpl).
|
|
1001
|
+
protoOf(CancellableContinuationImpl).tk = function (proposedUpdate, resumeMode, onCancellation, $super) {
|
|
917
1002
|
onCancellation = onCancellation === VOID ? null : onCancellation;
|
|
918
1003
|
var tmp;
|
|
919
1004
|
if ($super === VOID) {
|
|
920
|
-
this.
|
|
1005
|
+
this.uk(proposedUpdate, resumeMode, onCancellation);
|
|
921
1006
|
tmp = Unit_instance;
|
|
922
1007
|
} else {
|
|
923
|
-
tmp = $super.
|
|
1008
|
+
tmp = $super.uk.call(this, proposedUpdate, resumeMode, onCancellation);
|
|
924
1009
|
}
|
|
925
1010
|
return tmp;
|
|
926
1011
|
};
|
|
927
|
-
protoOf(CancellableContinuationImpl).
|
|
1012
|
+
protoOf(CancellableContinuationImpl).ek = function () {
|
|
928
1013
|
var tmp0_elvis_lhs = _get_parentHandle__f8dcex(this);
|
|
929
1014
|
var tmp;
|
|
930
1015
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -933,51 +1018,51 @@
|
|
|
933
1018
|
tmp = tmp0_elvis_lhs;
|
|
934
1019
|
}
|
|
935
1020
|
var handle = tmp;
|
|
936
|
-
handle.
|
|
937
|
-
this.
|
|
1021
|
+
handle.hk();
|
|
1022
|
+
this.dj_1.kotlinx$atomicfu$value = NonDisposableHandle_instance;
|
|
938
1023
|
};
|
|
939
|
-
protoOf(CancellableContinuationImpl).
|
|
1024
|
+
protoOf(CancellableContinuationImpl).ui = function (value, idempotent, onCancellation) {
|
|
940
1025
|
return tryResumeImpl(this, value, idempotent, onCancellation);
|
|
941
1026
|
};
|
|
942
|
-
protoOf(CancellableContinuationImpl).
|
|
1027
|
+
protoOf(CancellableContinuationImpl).vi = function (token) {
|
|
943
1028
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
944
|
-
dispatchResume(this, this.
|
|
1029
|
+
dispatchResume(this, this.oj_1);
|
|
945
1030
|
};
|
|
946
|
-
protoOf(CancellableContinuationImpl).
|
|
947
|
-
var tmp = this.
|
|
1031
|
+
protoOf(CancellableContinuationImpl).wi = function (_this__u8e3s4, value) {
|
|
1032
|
+
var tmp = this.zi_1;
|
|
948
1033
|
var dc = tmp instanceof DispatchedContinuation ? tmp : null;
|
|
949
1034
|
var tmp_0;
|
|
950
|
-
if ((dc == null ? null : dc.
|
|
1035
|
+
if ((dc == null ? null : dc.gj_1) === _this__u8e3s4) {
|
|
951
1036
|
tmp_0 = 4;
|
|
952
1037
|
} else {
|
|
953
|
-
tmp_0 = this.
|
|
1038
|
+
tmp_0 = this.oj_1;
|
|
954
1039
|
}
|
|
955
|
-
this.
|
|
1040
|
+
this.tk(value, tmp_0);
|
|
956
1041
|
};
|
|
957
|
-
protoOf(CancellableContinuationImpl).
|
|
1042
|
+
protoOf(CancellableContinuationImpl).rk = function (state) {
|
|
958
1043
|
var tmp;
|
|
959
1044
|
if (state instanceof CompletedContinuation) {
|
|
960
|
-
tmp = state.
|
|
1045
|
+
tmp = state.vj_1;
|
|
961
1046
|
} else {
|
|
962
1047
|
tmp = state;
|
|
963
1048
|
}
|
|
964
1049
|
return tmp;
|
|
965
1050
|
};
|
|
966
|
-
protoOf(CancellableContinuationImpl).
|
|
967
|
-
var tmp0_safe_receiver = protoOf(DispatchedTask).
|
|
1051
|
+
protoOf(CancellableContinuationImpl).al = function (state) {
|
|
1052
|
+
var tmp0_safe_receiver = protoOf(DispatchedTask).al.call(this, state);
|
|
968
1053
|
var tmp;
|
|
969
1054
|
if (tmp0_safe_receiver == null) {
|
|
970
1055
|
tmp = null;
|
|
971
1056
|
} else {
|
|
972
1057
|
// Inline function 'kotlin.let' call
|
|
973
|
-
tmp = recoverStackTrace(tmp0_safe_receiver, this.
|
|
1058
|
+
tmp = recoverStackTrace(tmp0_safe_receiver, this.zi_1);
|
|
974
1059
|
}
|
|
975
1060
|
return tmp;
|
|
976
1061
|
};
|
|
977
1062
|
protoOf(CancellableContinuationImpl).toString = function () {
|
|
978
|
-
return this.
|
|
1063
|
+
return this.bl() + '(' + toDebugString(this.zi_1) + '){' + _get_stateDebugRepresentation__bf18u4(this) + '}@' + get_hexAddress(this);
|
|
979
1064
|
};
|
|
980
|
-
protoOf(CancellableContinuationImpl).
|
|
1065
|
+
protoOf(CancellableContinuationImpl).bl = function () {
|
|
981
1066
|
return 'CancellableContinuation';
|
|
982
1067
|
};
|
|
983
1068
|
function NotCompleted() {
|
|
@@ -998,51 +1083,51 @@
|
|
|
998
1083
|
onCancellation = onCancellation === VOID ? null : onCancellation;
|
|
999
1084
|
idempotentResume = idempotentResume === VOID ? null : idempotentResume;
|
|
1000
1085
|
cancelCause = cancelCause === VOID ? null : cancelCause;
|
|
1001
|
-
this.
|
|
1002
|
-
this.
|
|
1003
|
-
this.
|
|
1004
|
-
this.
|
|
1005
|
-
this.
|
|
1086
|
+
this.vj_1 = result;
|
|
1087
|
+
this.wj_1 = cancelHandler;
|
|
1088
|
+
this.xj_1 = onCancellation;
|
|
1089
|
+
this.yj_1 = idempotentResume;
|
|
1090
|
+
this.zj_1 = cancelCause;
|
|
1006
1091
|
}
|
|
1007
|
-
protoOf(CompletedContinuation).
|
|
1008
|
-
return !(this.
|
|
1092
|
+
protoOf(CompletedContinuation).bk = function () {
|
|
1093
|
+
return !(this.zj_1 == null);
|
|
1009
1094
|
};
|
|
1010
|
-
protoOf(CompletedContinuation).
|
|
1011
|
-
var tmp0_safe_receiver = this.
|
|
1095
|
+
protoOf(CompletedContinuation).kk = function (cont, cause) {
|
|
1096
|
+
var tmp0_safe_receiver = this.wj_1;
|
|
1012
1097
|
if (tmp0_safe_receiver == null)
|
|
1013
1098
|
null;
|
|
1014
1099
|
else {
|
|
1015
1100
|
// Inline function 'kotlin.let' call
|
|
1016
|
-
cont.
|
|
1101
|
+
cont.ak(tmp0_safe_receiver, cause);
|
|
1017
1102
|
}
|
|
1018
|
-
var tmp1_safe_receiver = this.
|
|
1103
|
+
var tmp1_safe_receiver = this.xj_1;
|
|
1019
1104
|
if (tmp1_safe_receiver == null)
|
|
1020
1105
|
null;
|
|
1021
1106
|
else {
|
|
1022
1107
|
// Inline function 'kotlin.let' call
|
|
1023
|
-
cont.
|
|
1108
|
+
cont.ok(tmp1_safe_receiver, cause, this.vj_1);
|
|
1024
1109
|
}
|
|
1025
1110
|
};
|
|
1026
|
-
protoOf(CompletedContinuation).
|
|
1111
|
+
protoOf(CompletedContinuation).el = function (result, cancelHandler, onCancellation, idempotentResume, cancelCause) {
|
|
1027
1112
|
return new CompletedContinuation(result, cancelHandler, onCancellation, idempotentResume, cancelCause);
|
|
1028
1113
|
};
|
|
1029
|
-
protoOf(CompletedContinuation).
|
|
1030
|
-
result = result === VOID ? this.
|
|
1031
|
-
cancelHandler = cancelHandler === VOID ? this.
|
|
1032
|
-
onCancellation = onCancellation === VOID ? this.
|
|
1033
|
-
idempotentResume = idempotentResume === VOID ? this.
|
|
1034
|
-
cancelCause = cancelCause === VOID ? this.
|
|
1035
|
-
return $super === VOID ? this.
|
|
1114
|
+
protoOf(CompletedContinuation).ck = function (result, cancelHandler, onCancellation, idempotentResume, cancelCause, $super) {
|
|
1115
|
+
result = result === VOID ? this.vj_1 : result;
|
|
1116
|
+
cancelHandler = cancelHandler === VOID ? this.wj_1 : cancelHandler;
|
|
1117
|
+
onCancellation = onCancellation === VOID ? this.xj_1 : onCancellation;
|
|
1118
|
+
idempotentResume = idempotentResume === VOID ? this.yj_1 : idempotentResume;
|
|
1119
|
+
cancelCause = cancelCause === VOID ? this.zj_1 : cancelCause;
|
|
1120
|
+
return $super === VOID ? this.el(result, cancelHandler, onCancellation, idempotentResume, cancelCause) : $super.el.call(this, result, cancelHandler, onCancellation, idempotentResume, cancelCause);
|
|
1036
1121
|
};
|
|
1037
1122
|
protoOf(CompletedContinuation).toString = function () {
|
|
1038
|
-
return 'CompletedContinuation(result=' + toString_0(this.
|
|
1123
|
+
return 'CompletedContinuation(result=' + toString_0(this.vj_1) + ', cancelHandler=' + toString_0(this.wj_1) + ', onCancellation=' + toString_0(this.xj_1) + ', idempotentResume=' + toString_0(this.yj_1) + ', cancelCause=' + toString_0(this.zj_1) + ')';
|
|
1039
1124
|
};
|
|
1040
1125
|
protoOf(CompletedContinuation).hashCode = function () {
|
|
1041
|
-
var result = this.
|
|
1042
|
-
result = imul(result, 31) + (this.
|
|
1043
|
-
result = imul(result, 31) + (this.
|
|
1044
|
-
result = imul(result, 31) + (this.
|
|
1045
|
-
result = imul(result, 31) + (this.
|
|
1126
|
+
var result = this.vj_1 == null ? 0 : hashCode(this.vj_1);
|
|
1127
|
+
result = imul(result, 31) + (this.wj_1 == null ? 0 : hashCode(this.wj_1)) | 0;
|
|
1128
|
+
result = imul(result, 31) + (this.xj_1 == null ? 0 : hashCode(this.xj_1)) | 0;
|
|
1129
|
+
result = imul(result, 31) + (this.yj_1 == null ? 0 : hashCode(this.yj_1)) | 0;
|
|
1130
|
+
result = imul(result, 31) + (this.zj_1 == null ? 0 : hashCode(this.zj_1)) | 0;
|
|
1046
1131
|
return result;
|
|
1047
1132
|
};
|
|
1048
1133
|
protoOf(CompletedContinuation).equals = function (other) {
|
|
@@ -1050,27 +1135,27 @@
|
|
|
1050
1135
|
return true;
|
|
1051
1136
|
if (!(other instanceof CompletedContinuation))
|
|
1052
1137
|
return false;
|
|
1053
|
-
if (!equals(this.
|
|
1138
|
+
if (!equals(this.vj_1, other.vj_1))
|
|
1054
1139
|
return false;
|
|
1055
|
-
if (!equals(this.
|
|
1140
|
+
if (!equals(this.wj_1, other.wj_1))
|
|
1056
1141
|
return false;
|
|
1057
|
-
if (!equals(this.
|
|
1142
|
+
if (!equals(this.xj_1, other.xj_1))
|
|
1058
1143
|
return false;
|
|
1059
|
-
if (!equals(this.
|
|
1144
|
+
if (!equals(this.yj_1, other.yj_1))
|
|
1060
1145
|
return false;
|
|
1061
|
-
if (!equals(this.
|
|
1146
|
+
if (!equals(this.zj_1, other.zj_1))
|
|
1062
1147
|
return false;
|
|
1063
1148
|
return true;
|
|
1064
1149
|
};
|
|
1065
1150
|
function ChildContinuation(child) {
|
|
1066
1151
|
JobNode.call(this);
|
|
1067
|
-
this.
|
|
1152
|
+
this.jl_1 = child;
|
|
1068
1153
|
}
|
|
1069
|
-
protoOf(ChildContinuation).
|
|
1154
|
+
protoOf(ChildContinuation).kl = function () {
|
|
1070
1155
|
return true;
|
|
1071
1156
|
};
|
|
1072
|
-
protoOf(ChildContinuation).
|
|
1073
|
-
this.
|
|
1157
|
+
protoOf(ChildContinuation).nk = function (cause) {
|
|
1158
|
+
this.jl_1.mk(this.jl_1.pk(this.pl()));
|
|
1074
1159
|
};
|
|
1075
1160
|
var properties_initialized_CancellableContinuationImpl_kt_xtzb03;
|
|
1076
1161
|
function _init_properties_CancellableContinuationImpl_kt__6rrtdd() {
|
|
@@ -1087,7 +1172,7 @@
|
|
|
1087
1172
|
protoOf(CompletedExceptionally).fg = function () {
|
|
1088
1173
|
return this.eg_1.kotlinx$atomicfu$value;
|
|
1089
1174
|
};
|
|
1090
|
-
protoOf(CompletedExceptionally).
|
|
1175
|
+
protoOf(CompletedExceptionally).dk = function () {
|
|
1091
1176
|
return this.eg_1.atomicfu$compareAndSet(false, true);
|
|
1092
1177
|
};
|
|
1093
1178
|
protoOf(CompletedExceptionally).toString = function () {
|
|
@@ -1106,10 +1191,10 @@
|
|
|
1106
1191
|
}
|
|
1107
1192
|
function CancelledContinuation(continuation, cause, handled) {
|
|
1108
1193
|
CompletedExceptionally.call(this, cause == null ? CancellationException_init_$Create$('Continuation ' + toString(continuation) + ' was cancelled normally') : cause, handled);
|
|
1109
|
-
this.
|
|
1194
|
+
this.yk_1 = atomic$boolean$1(false);
|
|
1110
1195
|
}
|
|
1111
|
-
protoOf(CancelledContinuation).
|
|
1112
|
-
return this.
|
|
1196
|
+
protoOf(CancelledContinuation).zk = function () {
|
|
1197
|
+
return this.yk_1.atomicfu$compareAndSet(false, true);
|
|
1113
1198
|
};
|
|
1114
1199
|
function toState_0(_this__u8e3s4, caller) {
|
|
1115
1200
|
// Inline function 'kotlin.getOrElse' call
|
|
@@ -1152,7 +1237,7 @@
|
|
|
1152
1237
|
Key_getInstance();
|
|
1153
1238
|
AbstractCoroutineContextElement.call(this, Key_instance);
|
|
1154
1239
|
}
|
|
1155
|
-
protoOf(CoroutineDispatcher).
|
|
1240
|
+
protoOf(CoroutineDispatcher).yl = function (context) {
|
|
1156
1241
|
return true;
|
|
1157
1242
|
};
|
|
1158
1243
|
protoOf(CoroutineDispatcher).d7 = function (continuation) {
|
|
@@ -1160,7 +1245,7 @@
|
|
|
1160
1245
|
};
|
|
1161
1246
|
protoOf(CoroutineDispatcher).e7 = function (continuation) {
|
|
1162
1247
|
var dispatched = continuation instanceof DispatchedContinuation ? continuation : THROW_CCE();
|
|
1163
|
-
dispatched.
|
|
1248
|
+
dispatched.am();
|
|
1164
1249
|
};
|
|
1165
1250
|
protoOf(CoroutineDispatcher).toString = function () {
|
|
1166
1251
|
return get_classSimpleName(this) + '@' + get_hexAddress(this);
|
|
@@ -1174,7 +1259,7 @@
|
|
|
1174
1259
|
function handleCoroutineException(context, exception) {
|
|
1175
1260
|
var tmp;
|
|
1176
1261
|
if (exception instanceof DispatchException) {
|
|
1177
|
-
tmp = exception.
|
|
1262
|
+
tmp = exception.bm_1;
|
|
1178
1263
|
} else {
|
|
1179
1264
|
tmp = exception;
|
|
1180
1265
|
}
|
|
@@ -1185,7 +1270,7 @@
|
|
|
1185
1270
|
null;
|
|
1186
1271
|
else {
|
|
1187
1272
|
// Inline function 'kotlin.let' call
|
|
1188
|
-
tmp0_safe_receiver.
|
|
1273
|
+
tmp0_safe_receiver.cm(context, reportException);
|
|
1189
1274
|
return Unit_instance;
|
|
1190
1275
|
}
|
|
1191
1276
|
} catch ($p) {
|
|
@@ -1268,7 +1353,7 @@
|
|
|
1268
1353
|
}
|
|
1269
1354
|
return tmp;
|
|
1270
1355
|
};
|
|
1271
|
-
protoOf(CoroutineStart).
|
|
1356
|
+
protoOf(CoroutineStart).zh = function () {
|
|
1272
1357
|
return this === CoroutineStart_LAZY_getInstance();
|
|
1273
1358
|
};
|
|
1274
1359
|
function CoroutineStart_DEFAULT_getInstance() {
|
|
@@ -1315,23 +1400,23 @@
|
|
|
1315
1400
|
if (compare(timeMillis, new Long(0, 0)) <= 0)
|
|
1316
1401
|
return Unit_instance;
|
|
1317
1402
|
var cancellable = new CancellableContinuationImpl(intercepted($completion), 1);
|
|
1318
|
-
cancellable.
|
|
1403
|
+
cancellable.gk();
|
|
1319
1404
|
if (compare(timeMillis, new Long(-1, 2147483647)) < 0) {
|
|
1320
|
-
get_delay(cancellable.v6()).
|
|
1405
|
+
get_delay(cancellable.v6()).dm(timeMillis, cancellable);
|
|
1321
1406
|
}
|
|
1322
|
-
return cancellable.
|
|
1407
|
+
return cancellable.yh();
|
|
1323
1408
|
}
|
|
1324
1409
|
function delta($this, unconfined) {
|
|
1325
1410
|
return unconfined ? new Long(0, 1) : new Long(1, 0);
|
|
1326
1411
|
}
|
|
1327
1412
|
function EventLoop() {
|
|
1328
1413
|
CoroutineDispatcher.call(this);
|
|
1329
|
-
this.
|
|
1330
|
-
this.
|
|
1331
|
-
this.
|
|
1414
|
+
this.hm_1 = new Long(0, 0);
|
|
1415
|
+
this.im_1 = false;
|
|
1416
|
+
this.jm_1 = null;
|
|
1332
1417
|
}
|
|
1333
|
-
protoOf(EventLoop).
|
|
1334
|
-
var tmp0_elvis_lhs = this.
|
|
1418
|
+
protoOf(EventLoop).km = function () {
|
|
1419
|
+
var tmp0_elvis_lhs = this.jm_1;
|
|
1335
1420
|
var tmp;
|
|
1336
1421
|
if (tmp0_elvis_lhs == null) {
|
|
1337
1422
|
return false;
|
|
@@ -1347,16 +1432,16 @@
|
|
|
1347
1432
|
tmp_0 = tmp1_elvis_lhs;
|
|
1348
1433
|
}
|
|
1349
1434
|
var task = tmp_0;
|
|
1350
|
-
task.
|
|
1435
|
+
task.cl();
|
|
1351
1436
|
return true;
|
|
1352
1437
|
};
|
|
1353
|
-
protoOf(EventLoop).
|
|
1354
|
-
var tmp0_elvis_lhs = this.
|
|
1438
|
+
protoOf(EventLoop).lm = function (task) {
|
|
1439
|
+
var tmp0_elvis_lhs = this.jm_1;
|
|
1355
1440
|
var tmp;
|
|
1356
1441
|
if (tmp0_elvis_lhs == null) {
|
|
1357
1442
|
// Inline function 'kotlin.also' call
|
|
1358
1443
|
var this_0 = ArrayDeque_init_$Create$();
|
|
1359
|
-
this.
|
|
1444
|
+
this.jm_1 = this_0;
|
|
1360
1445
|
tmp = this_0;
|
|
1361
1446
|
} else {
|
|
1362
1447
|
tmp = tmp0_elvis_lhs;
|
|
@@ -1364,41 +1449,41 @@
|
|
|
1364
1449
|
var queue = tmp;
|
|
1365
1450
|
queue.oa(task);
|
|
1366
1451
|
};
|
|
1367
|
-
protoOf(EventLoop).
|
|
1368
|
-
return compare(this.
|
|
1452
|
+
protoOf(EventLoop).mm = function () {
|
|
1453
|
+
return compare(this.hm_1, delta(this, true)) >= 0;
|
|
1369
1454
|
};
|
|
1370
|
-
protoOf(EventLoop).
|
|
1371
|
-
var tmp0_safe_receiver = this.
|
|
1455
|
+
protoOf(EventLoop).nm = function () {
|
|
1456
|
+
var tmp0_safe_receiver = this.jm_1;
|
|
1372
1457
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q();
|
|
1373
1458
|
return tmp1_elvis_lhs == null ? true : tmp1_elvis_lhs;
|
|
1374
1459
|
};
|
|
1375
|
-
protoOf(EventLoop).
|
|
1376
|
-
this.
|
|
1460
|
+
protoOf(EventLoop).om = function (unconfined) {
|
|
1461
|
+
this.hm_1 = add(this.hm_1, delta(this, unconfined));
|
|
1377
1462
|
if (!unconfined)
|
|
1378
|
-
this.
|
|
1463
|
+
this.im_1 = true;
|
|
1379
1464
|
};
|
|
1380
|
-
protoOf(EventLoop).
|
|
1381
|
-
this.
|
|
1382
|
-
if (compare(this.
|
|
1465
|
+
protoOf(EventLoop).pm = function (unconfined) {
|
|
1466
|
+
this.hm_1 = subtract(this.hm_1, delta(this, unconfined));
|
|
1467
|
+
if (compare(this.hm_1, new Long(0, 0)) > 0)
|
|
1383
1468
|
return Unit_instance;
|
|
1384
1469
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
1385
|
-
if (this.
|
|
1386
|
-
this.
|
|
1470
|
+
if (this.im_1) {
|
|
1471
|
+
this.qm();
|
|
1387
1472
|
}
|
|
1388
1473
|
};
|
|
1389
|
-
protoOf(EventLoop).
|
|
1474
|
+
protoOf(EventLoop).qm = function () {
|
|
1390
1475
|
};
|
|
1391
1476
|
function ThreadLocalEventLoop() {
|
|
1392
1477
|
ThreadLocalEventLoop_instance = this;
|
|
1393
|
-
this.
|
|
1478
|
+
this.rm_1 = commonThreadLocal(new Symbol('ThreadLocalEventLoop'));
|
|
1394
1479
|
}
|
|
1395
|
-
protoOf(ThreadLocalEventLoop).
|
|
1396
|
-
var tmp0_elvis_lhs = this.
|
|
1480
|
+
protoOf(ThreadLocalEventLoop).sm = function () {
|
|
1481
|
+
var tmp0_elvis_lhs = this.rm_1.ef();
|
|
1397
1482
|
var tmp;
|
|
1398
1483
|
if (tmp0_elvis_lhs == null) {
|
|
1399
1484
|
// Inline function 'kotlin.also' call
|
|
1400
1485
|
var this_0 = createEventLoop();
|
|
1401
|
-
ThreadLocalEventLoop_getInstance().
|
|
1486
|
+
ThreadLocalEventLoop_getInstance().rm_1.um(this_0);
|
|
1402
1487
|
tmp = this_0;
|
|
1403
1488
|
} else {
|
|
1404
1489
|
tmp = tmp0_elvis_lhs;
|
|
@@ -1433,7 +1518,7 @@
|
|
|
1433
1518
|
}
|
|
1434
1519
|
function NonDisposableHandle() {
|
|
1435
1520
|
}
|
|
1436
|
-
protoOf(NonDisposableHandle).
|
|
1521
|
+
protoOf(NonDisposableHandle).hk = function () {
|
|
1437
1522
|
};
|
|
1438
1523
|
protoOf(NonDisposableHandle).hh = function (cause) {
|
|
1439
1524
|
return false;
|
|
@@ -1459,7 +1544,7 @@
|
|
|
1459
1544
|
if (_this__u8e3s4 instanceof JobSupport) {
|
|
1460
1545
|
tmp = _this__u8e3s4.ah(invokeImmediately, handler);
|
|
1461
1546
|
} else {
|
|
1462
|
-
var tmp_0 = handler.
|
|
1547
|
+
var tmp_0 = handler.kl();
|
|
1463
1548
|
tmp = _this__u8e3s4.zg(tmp_0, invokeImmediately, JobNode$invoke$ref(handler));
|
|
1464
1549
|
}
|
|
1465
1550
|
return tmp;
|
|
@@ -1468,22 +1553,27 @@
|
|
|
1468
1553
|
if (!_this__u8e3s4.yf())
|
|
1469
1554
|
throw _this__u8e3s4.vg();
|
|
1470
1555
|
}
|
|
1471
|
-
function
|
|
1472
|
-
|
|
1556
|
+
function get_isActive_0(_this__u8e3s4) {
|
|
1557
|
+
var tmp0_safe_receiver = _this__u8e3s4.c7(Key_instance_3);
|
|
1558
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yf();
|
|
1559
|
+
return tmp1_elvis_lhs == null ? true : tmp1_elvis_lhs;
|
|
1473
1560
|
}
|
|
1474
1561
|
function Job_0(parent) {
|
|
1475
1562
|
parent = parent === VOID ? null : parent;
|
|
1476
1563
|
return new JobImpl(parent);
|
|
1477
1564
|
}
|
|
1565
|
+
function disposeOnCompletion(_this__u8e3s4, handle) {
|
|
1566
|
+
return invokeOnCompletion(_this__u8e3s4, VOID, new DisposeOnCompletion(handle));
|
|
1567
|
+
}
|
|
1478
1568
|
function DisposeOnCompletion(handle) {
|
|
1479
1569
|
JobNode.call(this);
|
|
1480
|
-
this.
|
|
1570
|
+
this.zm_1 = handle;
|
|
1481
1571
|
}
|
|
1482
|
-
protoOf(DisposeOnCompletion).
|
|
1572
|
+
protoOf(DisposeOnCompletion).kl = function () {
|
|
1483
1573
|
return false;
|
|
1484
1574
|
};
|
|
1485
|
-
protoOf(DisposeOnCompletion).
|
|
1486
|
-
return this.
|
|
1575
|
+
protoOf(DisposeOnCompletion).nk = function (cause) {
|
|
1576
|
+
return this.zm_1.hk();
|
|
1487
1577
|
};
|
|
1488
1578
|
function get_COMPLETING_ALREADY() {
|
|
1489
1579
|
_init_properties_JobSupport_kt__68f172();
|
|
@@ -1521,16 +1611,16 @@
|
|
|
1521
1611
|
}
|
|
1522
1612
|
var EMPTY_ACTIVE;
|
|
1523
1613
|
function Empty(isActive) {
|
|
1524
|
-
this.
|
|
1614
|
+
this.an_1 = isActive;
|
|
1525
1615
|
}
|
|
1526
1616
|
protoOf(Empty).yf = function () {
|
|
1527
|
-
return this.
|
|
1617
|
+
return this.an_1;
|
|
1528
1618
|
};
|
|
1529
|
-
protoOf(Empty).
|
|
1619
|
+
protoOf(Empty).ql = function () {
|
|
1530
1620
|
return null;
|
|
1531
1621
|
};
|
|
1532
1622
|
protoOf(Empty).toString = function () {
|
|
1533
|
-
return 'Empty{' + (this.
|
|
1623
|
+
return 'Empty{' + (this.an_1 ? 'Active' : 'New') + '}';
|
|
1534
1624
|
};
|
|
1535
1625
|
function Incomplete() {
|
|
1536
1626
|
}
|
|
@@ -1540,10 +1630,10 @@
|
|
|
1540
1630
|
protoOf(NodeList).yf = function () {
|
|
1541
1631
|
return true;
|
|
1542
1632
|
};
|
|
1543
|
-
protoOf(NodeList).
|
|
1633
|
+
protoOf(NodeList).ql = function () {
|
|
1544
1634
|
return this;
|
|
1545
1635
|
};
|
|
1546
|
-
protoOf(NodeList).
|
|
1636
|
+
protoOf(NodeList).en = function (state) {
|
|
1547
1637
|
// Inline function 'kotlin.text.buildString' call
|
|
1548
1638
|
// Inline function 'kotlin.apply' call
|
|
1549
1639
|
var this_0 = StringBuilder_init_$Create$();
|
|
@@ -1552,7 +1642,7 @@
|
|
|
1552
1642
|
this_0.r5('}[');
|
|
1553
1643
|
var first = true;
|
|
1554
1644
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListHead.forEach' call
|
|
1555
|
-
var cur = this.
|
|
1645
|
+
var cur = this.rl_1;
|
|
1556
1646
|
while (!equals(cur, this)) {
|
|
1557
1647
|
var node = cur;
|
|
1558
1648
|
if (node instanceof JobNode) {
|
|
@@ -1562,19 +1652,19 @@
|
|
|
1562
1652
|
this_0.r5(', ');
|
|
1563
1653
|
this_0.q5(node);
|
|
1564
1654
|
}
|
|
1565
|
-
cur = cur.
|
|
1655
|
+
cur = cur.rl_1;
|
|
1566
1656
|
}
|
|
1567
1657
|
this_0.r5(']');
|
|
1568
1658
|
return this_0.toString();
|
|
1569
1659
|
};
|
|
1570
1660
|
protoOf(NodeList).toString = function () {
|
|
1571
|
-
return get_DEBUG() ? this.
|
|
1661
|
+
return get_DEBUG() ? this.en('Active') : protoOf(LockFreeLinkedListHead).toString.call(this);
|
|
1572
1662
|
};
|
|
1573
1663
|
function JobNode() {
|
|
1574
1664
|
LockFreeLinkedListNode.call(this);
|
|
1575
1665
|
}
|
|
1576
|
-
protoOf(JobNode).
|
|
1577
|
-
var tmp = this.
|
|
1666
|
+
protoOf(JobNode).pl = function () {
|
|
1667
|
+
var tmp = this.ol_1;
|
|
1578
1668
|
if (!(tmp == null))
|
|
1579
1669
|
return tmp;
|
|
1580
1670
|
else {
|
|
@@ -1584,20 +1674,20 @@
|
|
|
1584
1674
|
protoOf(JobNode).yf = function () {
|
|
1585
1675
|
return true;
|
|
1586
1676
|
};
|
|
1587
|
-
protoOf(JobNode).
|
|
1677
|
+
protoOf(JobNode).ql = function () {
|
|
1588
1678
|
return null;
|
|
1589
1679
|
};
|
|
1590
|
-
protoOf(JobNode).
|
|
1591
|
-
return this.
|
|
1680
|
+
protoOf(JobNode).hk = function () {
|
|
1681
|
+
return this.pl().bh(this);
|
|
1592
1682
|
};
|
|
1593
1683
|
protoOf(JobNode).toString = function () {
|
|
1594
|
-
return get_classSimpleName(this) + '@' + get_hexAddress(this) + '[job@' + get_hexAddress(this.
|
|
1684
|
+
return get_classSimpleName(this) + '@' + get_hexAddress(this) + '[job@' + get_hexAddress(this.pl()) + ']';
|
|
1595
1685
|
};
|
|
1596
1686
|
function _set_exceptionsHolder__tqm22h($this, value) {
|
|
1597
|
-
$this.
|
|
1687
|
+
$this.jn_1.kotlinx$atomicfu$value = value;
|
|
1598
1688
|
}
|
|
1599
1689
|
function _get_exceptionsHolder__nhszp($this) {
|
|
1600
|
-
return $this.
|
|
1690
|
+
return $this.jn_1.kotlinx$atomicfu$value;
|
|
1601
1691
|
}
|
|
1602
1692
|
function allocateList($this) {
|
|
1603
1693
|
return ArrayList_init_$Create$(4);
|
|
@@ -1611,8 +1701,8 @@
|
|
|
1611
1701
|
var wasCancelling;
|
|
1612
1702
|
// Inline function 'kotlinx.coroutines.internal.synchronized' call
|
|
1613
1703
|
// Inline function 'kotlinx.coroutines.internal.synchronizedImpl' call
|
|
1614
|
-
wasCancelling = state.
|
|
1615
|
-
var exceptions = state.
|
|
1704
|
+
wasCancelling = state.kn();
|
|
1705
|
+
var exceptions = state.ln(proposedException);
|
|
1616
1706
|
var finalCause = getFinalRootCause($this, state, exceptions);
|
|
1617
1707
|
if (!(finalCause == null)) {
|
|
1618
1708
|
addSuppressedExceptions($this, finalCause, exceptions);
|
|
@@ -1622,7 +1712,7 @@
|
|
|
1622
1712
|
if (!(finalException == null)) {
|
|
1623
1713
|
var handled = cancelParent($this, finalException) || $this.qh(finalException);
|
|
1624
1714
|
if (handled) {
|
|
1625
|
-
(finalState instanceof CompletedExceptionally ? finalState : THROW_CCE()).
|
|
1715
|
+
(finalState instanceof CompletedExceptionally ? finalState : THROW_CCE()).dk();
|
|
1626
1716
|
}
|
|
1627
1717
|
}
|
|
1628
1718
|
if (!wasCancelling) {
|
|
@@ -1636,7 +1726,7 @@
|
|
|
1636
1726
|
}
|
|
1637
1727
|
function getFinalRootCause($this, state, exceptions) {
|
|
1638
1728
|
if (exceptions.q()) {
|
|
1639
|
-
if (state.
|
|
1729
|
+
if (state.kn()) {
|
|
1640
1730
|
// Inline function 'kotlinx.coroutines.JobSupport.defaultCancellationException' call
|
|
1641
1731
|
return new JobCancellationException(null == null ? $this.bg() : null, null, $this);
|
|
1642
1732
|
}
|
|
@@ -1727,14 +1817,14 @@
|
|
|
1727
1817
|
null;
|
|
1728
1818
|
else {
|
|
1729
1819
|
// Inline function 'kotlin.let' call
|
|
1730
|
-
tmp0_safe_receiver.
|
|
1820
|
+
tmp0_safe_receiver.hk();
|
|
1731
1821
|
$this.pg(NonDisposableHandle_instance);
|
|
1732
1822
|
}
|
|
1733
1823
|
var tmp1_safe_receiver = update instanceof CompletedExceptionally ? update : null;
|
|
1734
1824
|
var cause = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.dg_1;
|
|
1735
1825
|
if (state instanceof JobNode) {
|
|
1736
1826
|
try {
|
|
1737
|
-
state.
|
|
1827
|
+
state.nk(cause);
|
|
1738
1828
|
} catch ($p) {
|
|
1739
1829
|
if ($p instanceof Error) {
|
|
1740
1830
|
var ex = $p;
|
|
@@ -1744,7 +1834,7 @@
|
|
|
1744
1834
|
}
|
|
1745
1835
|
}
|
|
1746
1836
|
} else {
|
|
1747
|
-
var tmp2_safe_receiver = state.
|
|
1837
|
+
var tmp2_safe_receiver = state.ql();
|
|
1748
1838
|
if (tmp2_safe_receiver == null)
|
|
1749
1839
|
null;
|
|
1750
1840
|
else {
|
|
@@ -1754,22 +1844,22 @@
|
|
|
1754
1844
|
}
|
|
1755
1845
|
function notifyCancelling($this, list, cause) {
|
|
1756
1846
|
$this.nh(cause);
|
|
1757
|
-
list.
|
|
1847
|
+
list.fn(4);
|
|
1758
1848
|
// Inline function 'kotlinx.coroutines.JobSupport.notifyHandlers' call
|
|
1759
1849
|
var exception = null;
|
|
1760
1850
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListHead.forEach' call
|
|
1761
|
-
var cur = list.
|
|
1851
|
+
var cur = list.rl_1;
|
|
1762
1852
|
while (!equals(cur, list)) {
|
|
1763
1853
|
var node = cur;
|
|
1764
1854
|
var tmp;
|
|
1765
1855
|
if (node instanceof JobNode) {
|
|
1766
|
-
tmp = node.
|
|
1856
|
+
tmp = node.kl();
|
|
1767
1857
|
} else {
|
|
1768
1858
|
tmp = false;
|
|
1769
1859
|
}
|
|
1770
1860
|
if (tmp) {
|
|
1771
1861
|
try {
|
|
1772
|
-
node.
|
|
1862
|
+
node.nk(cause);
|
|
1773
1863
|
} catch ($p) {
|
|
1774
1864
|
if ($p instanceof Error) {
|
|
1775
1865
|
var ex = $p;
|
|
@@ -1791,7 +1881,7 @@
|
|
|
1791
1881
|
}
|
|
1792
1882
|
}
|
|
1793
1883
|
}
|
|
1794
|
-
cur = cur.
|
|
1884
|
+
cur = cur.rl_1;
|
|
1795
1885
|
}
|
|
1796
1886
|
var tmp0_safe_receiver_0 = exception;
|
|
1797
1887
|
if (tmp0_safe_receiver_0 == null)
|
|
@@ -1813,11 +1903,11 @@
|
|
|
1813
1903
|
return parent.hh(cause) || isCancellation;
|
|
1814
1904
|
}
|
|
1815
1905
|
function notifyCompletion($this, $receiver, cause) {
|
|
1816
|
-
$receiver.
|
|
1906
|
+
$receiver.fn(1);
|
|
1817
1907
|
// Inline function 'kotlinx.coroutines.JobSupport.notifyHandlers' call
|
|
1818
1908
|
var exception = null;
|
|
1819
1909
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListHead.forEach' call
|
|
1820
|
-
var cur = $receiver.
|
|
1910
|
+
var cur = $receiver.rl_1;
|
|
1821
1911
|
while (!equals(cur, $receiver)) {
|
|
1822
1912
|
var node = cur;
|
|
1823
1913
|
var tmp;
|
|
@@ -1828,7 +1918,7 @@
|
|
|
1828
1918
|
}
|
|
1829
1919
|
if (tmp) {
|
|
1830
1920
|
try {
|
|
1831
|
-
node.
|
|
1921
|
+
node.nk(cause);
|
|
1832
1922
|
} catch ($p) {
|
|
1833
1923
|
if ($p instanceof Error) {
|
|
1834
1924
|
var ex = $p;
|
|
@@ -1850,7 +1940,7 @@
|
|
|
1850
1940
|
}
|
|
1851
1941
|
}
|
|
1852
1942
|
}
|
|
1853
|
-
cur = cur.
|
|
1943
|
+
cur = cur.rl_1;
|
|
1854
1944
|
}
|
|
1855
1945
|
var tmp0_safe_receiver_0 = exception;
|
|
1856
1946
|
if (tmp0_safe_receiver_0 == null)
|
|
@@ -1862,7 +1952,7 @@
|
|
|
1862
1952
|
}
|
|
1863
1953
|
function startInternal($this, state) {
|
|
1864
1954
|
if (state instanceof Empty) {
|
|
1865
|
-
if (state.
|
|
1955
|
+
if (state.an_1)
|
|
1866
1956
|
return 0;
|
|
1867
1957
|
if (!$this.rf_1.atomicfu$compareAndSet(state, get_EMPTY_ACTIVE()))
|
|
1868
1958
|
return -1;
|
|
@@ -1870,7 +1960,7 @@
|
|
|
1870
1960
|
return 1;
|
|
1871
1961
|
} else {
|
|
1872
1962
|
if (state instanceof InactiveNodeList) {
|
|
1873
|
-
if (!$this.rf_1.atomicfu$compareAndSet(state, state.
|
|
1963
|
+
if (!$this.rf_1.atomicfu$compareAndSet(state, state.mn_1))
|
|
1874
1964
|
return -1;
|
|
1875
1965
|
$this.ug();
|
|
1876
1966
|
return 1;
|
|
@@ -1881,13 +1971,13 @@
|
|
|
1881
1971
|
}
|
|
1882
1972
|
function promoteEmptyToNodeList($this, state) {
|
|
1883
1973
|
var list = new NodeList();
|
|
1884
|
-
var update = state.
|
|
1974
|
+
var update = state.an_1 ? list : new InactiveNodeList(list);
|
|
1885
1975
|
$this.rf_1.atomicfu$compareAndSet(state, update);
|
|
1886
1976
|
}
|
|
1887
1977
|
function promoteSingleToNodeList($this, state) {
|
|
1888
|
-
state.
|
|
1978
|
+
state.wl(new NodeList());
|
|
1889
1979
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.nextNode' call
|
|
1890
|
-
var list = state.
|
|
1980
|
+
var list = state.rl_1;
|
|
1891
1981
|
$this.rf_1.atomicfu$compareAndSet(state, list);
|
|
1892
1982
|
}
|
|
1893
1983
|
function cancelMakeCompleting($this, cause) {
|
|
@@ -1900,7 +1990,7 @@
|
|
|
1900
1990
|
} else {
|
|
1901
1991
|
var tmp_0;
|
|
1902
1992
|
if (state instanceof Finishing) {
|
|
1903
|
-
tmp_0 = state.
|
|
1993
|
+
tmp_0 = state.nn();
|
|
1904
1994
|
} else {
|
|
1905
1995
|
tmp_0 = false;
|
|
1906
1996
|
}
|
|
@@ -1940,9 +2030,9 @@
|
|
|
1940
2030
|
if (tmp0 instanceof Finishing) {
|
|
1941
2031
|
// Inline function 'kotlinx.coroutines.internal.synchronized' call
|
|
1942
2032
|
// Inline function 'kotlinx.coroutines.internal.synchronizedImpl' call
|
|
1943
|
-
if (tmp0.
|
|
2033
|
+
if (tmp0.on())
|
|
1944
2034
|
return get_TOO_LATE_TO_CANCEL();
|
|
1945
|
-
var wasCancelling = tmp0.
|
|
2035
|
+
var wasCancelling = tmp0.kn();
|
|
1946
2036
|
if (!(cause == null) || !wasCancelling) {
|
|
1947
2037
|
var tmp0_elvis_lhs = causeExceptionCache;
|
|
1948
2038
|
var tmp;
|
|
@@ -1955,10 +2045,10 @@
|
|
|
1955
2045
|
tmp = tmp0_elvis_lhs;
|
|
1956
2046
|
}
|
|
1957
2047
|
var causeException = tmp;
|
|
1958
|
-
tmp0.
|
|
2048
|
+
tmp0.pn(causeException);
|
|
1959
2049
|
}
|
|
1960
2050
|
// Inline function 'kotlin.takeIf' call
|
|
1961
|
-
var this_1 = tmp0.
|
|
2051
|
+
var this_1 = tmp0.qn();
|
|
1962
2052
|
var tmp_0;
|
|
1963
2053
|
if (!wasCancelling) {
|
|
1964
2054
|
tmp_0 = this_1;
|
|
@@ -1970,7 +2060,7 @@
|
|
|
1970
2060
|
null;
|
|
1971
2061
|
else {
|
|
1972
2062
|
// Inline function 'kotlin.let' call
|
|
1973
|
-
notifyCancelling($this, tmp0.
|
|
2063
|
+
notifyCancelling($this, tmp0.gn_1, notifyRootCause);
|
|
1974
2064
|
}
|
|
1975
2065
|
return get_COMPLETING_ALREADY();
|
|
1976
2066
|
} else {
|
|
@@ -2008,7 +2098,7 @@
|
|
|
2008
2098
|
}
|
|
2009
2099
|
}
|
|
2010
2100
|
function getOrPromoteCancellingList($this, state) {
|
|
2011
|
-
var tmp0_elvis_lhs = state.
|
|
2101
|
+
var tmp0_elvis_lhs = state.ql();
|
|
2012
2102
|
var tmp;
|
|
2013
2103
|
if (tmp0_elvis_lhs == null) {
|
|
2014
2104
|
var tmp_0;
|
|
@@ -2090,24 +2180,24 @@
|
|
|
2090
2180
|
var notifyRootCause;
|
|
2091
2181
|
// Inline function 'kotlinx.coroutines.internal.synchronized' call
|
|
2092
2182
|
// Inline function 'kotlinx.coroutines.internal.synchronizedImpl' call
|
|
2093
|
-
if (finishing.
|
|
2183
|
+
if (finishing.nn())
|
|
2094
2184
|
return get_COMPLETING_ALREADY();
|
|
2095
|
-
finishing.
|
|
2185
|
+
finishing.rn(true);
|
|
2096
2186
|
if (!(finishing === state)) {
|
|
2097
2187
|
if (!$this.rf_1.atomicfu$compareAndSet(state, finishing))
|
|
2098
2188
|
return get_COMPLETING_RETRY();
|
|
2099
2189
|
}
|
|
2100
2190
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
2101
|
-
var wasCancelling = finishing.
|
|
2191
|
+
var wasCancelling = finishing.kn();
|
|
2102
2192
|
var tmp0_safe_receiver = proposedUpdate instanceof CompletedExceptionally ? proposedUpdate : null;
|
|
2103
2193
|
if (tmp0_safe_receiver == null)
|
|
2104
2194
|
null;
|
|
2105
2195
|
else {
|
|
2106
2196
|
// Inline function 'kotlin.let' call
|
|
2107
|
-
finishing.
|
|
2197
|
+
finishing.pn(tmp0_safe_receiver.dg_1);
|
|
2108
2198
|
}
|
|
2109
2199
|
// Inline function 'kotlin.takeIf' call
|
|
2110
|
-
var this_0 = finishing.
|
|
2200
|
+
var this_0 = finishing.qn();
|
|
2111
2201
|
var tmp_0;
|
|
2112
2202
|
if (!wasCancelling) {
|
|
2113
2203
|
tmp_0 = this_0;
|
|
@@ -2124,7 +2214,7 @@
|
|
|
2124
2214
|
var child = nextChild($this, list);
|
|
2125
2215
|
if (!(child == null) && tryWaitForChild($this, finishing, child, proposedUpdate))
|
|
2126
2216
|
return get_COMPLETING_WAITING_CHILDREN();
|
|
2127
|
-
list.
|
|
2217
|
+
list.fn(2);
|
|
2128
2218
|
var anotherChild = nextChild($this, list);
|
|
2129
2219
|
if (!(anotherChild == null) && tryWaitForChild($this, finishing, anotherChild, proposedUpdate))
|
|
2130
2220
|
return get_COMPLETING_WAITING_CHILDREN();
|
|
@@ -2141,7 +2231,7 @@
|
|
|
2141
2231
|
var proposedUpdate_0 = proposedUpdate;
|
|
2142
2232
|
$l$1: do {
|
|
2143
2233
|
$l$0: do {
|
|
2144
|
-
var handle = invokeOnCompletion(child_0.
|
|
2234
|
+
var handle = invokeOnCompletion(child_0.wn_1, false, new ChildCompletion($this_0, state_0, child_0, proposedUpdate_0));
|
|
2145
2235
|
if (!(handle === NonDisposableHandle_instance))
|
|
2146
2236
|
return true;
|
|
2147
2237
|
var tmp0_elvis_lhs = nextChild($this_0, child_0);
|
|
@@ -2170,7 +2260,7 @@
|
|
|
2170
2260
|
var waitChild = nextChild($this, lastChild);
|
|
2171
2261
|
if (!(waitChild == null) && tryWaitForChild($this, state, waitChild, proposedUpdate))
|
|
2172
2262
|
return Unit_instance;
|
|
2173
|
-
state.
|
|
2263
|
+
state.gn_1.fn(2);
|
|
2174
2264
|
var waitChildAgain = nextChild($this, lastChild);
|
|
2175
2265
|
if (!(waitChildAgain == null) && tryWaitForChild($this, state, waitChildAgain, proposedUpdate)) {
|
|
2176
2266
|
return Unit_instance;
|
|
@@ -2182,17 +2272,17 @@
|
|
|
2182
2272
|
var cur = $receiver;
|
|
2183
2273
|
$l$loop: while (true) {
|
|
2184
2274
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.isRemoved' call
|
|
2185
|
-
if (!cur.
|
|
2275
|
+
if (!cur.tl_1) {
|
|
2186
2276
|
break $l$loop;
|
|
2187
2277
|
}
|
|
2188
2278
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.prevNode' call
|
|
2189
|
-
cur = cur.
|
|
2279
|
+
cur = cur.sl_1;
|
|
2190
2280
|
}
|
|
2191
2281
|
$l$loop_0: while (true) {
|
|
2192
2282
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.nextNode' call
|
|
2193
|
-
cur = cur.
|
|
2283
|
+
cur = cur.rl_1;
|
|
2194
2284
|
// Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.isRemoved' call
|
|
2195
|
-
if (cur.
|
|
2285
|
+
if (cur.tl_1)
|
|
2196
2286
|
continue $l$loop_0;
|
|
2197
2287
|
if (cur instanceof ChildHandleNode)
|
|
2198
2288
|
return cur;
|
|
@@ -2203,7 +2293,7 @@
|
|
|
2203
2293
|
function stateString($this, state) {
|
|
2204
2294
|
var tmp;
|
|
2205
2295
|
if (state instanceof Finishing) {
|
|
2206
|
-
tmp = state.
|
|
2296
|
+
tmp = state.kn() ? 'Cancelling' : state.nn() ? 'Completing' : 'Active';
|
|
2207
2297
|
} else {
|
|
2208
2298
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2209
2299
|
tmp = state.yf() ? 'Active' : 'New';
|
|
@@ -2219,36 +2309,36 @@
|
|
|
2219
2309
|
}
|
|
2220
2310
|
function Finishing(list, isCompleting, rootCause) {
|
|
2221
2311
|
SynchronizedObject.call(this);
|
|
2222
|
-
this.
|
|
2223
|
-
this.
|
|
2224
|
-
this.
|
|
2225
|
-
this.
|
|
2312
|
+
this.gn_1 = list;
|
|
2313
|
+
this.hn_1 = atomic$boolean$1(isCompleting);
|
|
2314
|
+
this.in_1 = atomic$ref$1(rootCause);
|
|
2315
|
+
this.jn_1 = atomic$ref$1(null);
|
|
2226
2316
|
}
|
|
2227
|
-
protoOf(Finishing).
|
|
2228
|
-
return this.
|
|
2317
|
+
protoOf(Finishing).ql = function () {
|
|
2318
|
+
return this.gn_1;
|
|
2229
2319
|
};
|
|
2230
|
-
protoOf(Finishing).
|
|
2231
|
-
this.
|
|
2320
|
+
protoOf(Finishing).rn = function (value) {
|
|
2321
|
+
this.hn_1.kotlinx$atomicfu$value = value;
|
|
2232
2322
|
};
|
|
2233
|
-
protoOf(Finishing).
|
|
2234
|
-
return this.
|
|
2323
|
+
protoOf(Finishing).nn = function () {
|
|
2324
|
+
return this.hn_1.kotlinx$atomicfu$value;
|
|
2235
2325
|
};
|
|
2236
|
-
protoOf(Finishing).
|
|
2237
|
-
this.
|
|
2326
|
+
protoOf(Finishing).xn = function (value) {
|
|
2327
|
+
this.in_1.kotlinx$atomicfu$value = value;
|
|
2238
2328
|
};
|
|
2239
|
-
protoOf(Finishing).
|
|
2240
|
-
return this.
|
|
2329
|
+
protoOf(Finishing).qn = function () {
|
|
2330
|
+
return this.in_1.kotlinx$atomicfu$value;
|
|
2241
2331
|
};
|
|
2242
|
-
protoOf(Finishing).
|
|
2332
|
+
protoOf(Finishing).on = function () {
|
|
2243
2333
|
return _get_exceptionsHolder__nhszp(this) === get_SEALED();
|
|
2244
2334
|
};
|
|
2245
|
-
protoOf(Finishing).
|
|
2246
|
-
return !(this.
|
|
2335
|
+
protoOf(Finishing).kn = function () {
|
|
2336
|
+
return !(this.qn() == null);
|
|
2247
2337
|
};
|
|
2248
2338
|
protoOf(Finishing).yf = function () {
|
|
2249
|
-
return this.
|
|
2339
|
+
return this.qn() == null;
|
|
2250
2340
|
};
|
|
2251
|
-
protoOf(Finishing).
|
|
2341
|
+
protoOf(Finishing).ln = function (proposedException) {
|
|
2252
2342
|
var eh = _get_exceptionsHolder__nhszp(this);
|
|
2253
2343
|
var tmp;
|
|
2254
2344
|
if (eh == null) {
|
|
@@ -2270,7 +2360,7 @@
|
|
|
2270
2360
|
}
|
|
2271
2361
|
}
|
|
2272
2362
|
var list = tmp;
|
|
2273
|
-
var rootCause = this.
|
|
2363
|
+
var rootCause = this.qn();
|
|
2274
2364
|
if (rootCause == null)
|
|
2275
2365
|
null;
|
|
2276
2366
|
else {
|
|
@@ -2283,10 +2373,10 @@
|
|
|
2283
2373
|
_set_exceptionsHolder__tqm22h(this, get_SEALED());
|
|
2284
2374
|
return list;
|
|
2285
2375
|
};
|
|
2286
|
-
protoOf(Finishing).
|
|
2287
|
-
var rootCause = this.
|
|
2376
|
+
protoOf(Finishing).pn = function (exception) {
|
|
2377
|
+
var rootCause = this.qn();
|
|
2288
2378
|
if (rootCause == null) {
|
|
2289
|
-
this.
|
|
2379
|
+
this.xn(exception);
|
|
2290
2380
|
return Unit_instance;
|
|
2291
2381
|
}
|
|
2292
2382
|
if (exception === rootCause)
|
|
@@ -2315,20 +2405,20 @@
|
|
|
2315
2405
|
}
|
|
2316
2406
|
};
|
|
2317
2407
|
protoOf(Finishing).toString = function () {
|
|
2318
|
-
return 'Finishing[cancelling=' + this.
|
|
2408
|
+
return 'Finishing[cancelling=' + this.kn() + ', completing=' + this.nn() + ', rootCause=' + toString_0(this.qn()) + ', exceptions=' + toString_0(_get_exceptionsHolder__nhszp(this)) + ', list=' + this.gn_1.toString() + ']';
|
|
2319
2409
|
};
|
|
2320
2410
|
function ChildCompletion(parent, state, child, proposedUpdate) {
|
|
2321
2411
|
JobNode.call(this);
|
|
2322
|
-
this.
|
|
2323
|
-
this.
|
|
2324
|
-
this.
|
|
2325
|
-
this.
|
|
2412
|
+
this.co_1 = parent;
|
|
2413
|
+
this.do_1 = state;
|
|
2414
|
+
this.eo_1 = child;
|
|
2415
|
+
this.fo_1 = proposedUpdate;
|
|
2326
2416
|
}
|
|
2327
|
-
protoOf(ChildCompletion).
|
|
2417
|
+
protoOf(ChildCompletion).kl = function () {
|
|
2328
2418
|
return false;
|
|
2329
2419
|
};
|
|
2330
|
-
protoOf(ChildCompletion).
|
|
2331
|
-
continueCompleting(this.
|
|
2420
|
+
protoOf(ChildCompletion).nk = function (cause) {
|
|
2421
|
+
continueCompleting(this.co_1, this.do_1, this.eo_1, this.fo_1);
|
|
2332
2422
|
};
|
|
2333
2423
|
function onAwaitInternalRegFunc($this, select, ignoredParam) {
|
|
2334
2424
|
$l$loop: while (true) {
|
|
@@ -2341,14 +2431,14 @@
|
|
|
2341
2431
|
tmp = unboxState(state);
|
|
2342
2432
|
}
|
|
2343
2433
|
var result = tmp;
|
|
2344
|
-
select.
|
|
2434
|
+
select.go(result);
|
|
2345
2435
|
return Unit_instance;
|
|
2346
2436
|
}
|
|
2347
2437
|
if (startInternal($this, state) >= 0)
|
|
2348
2438
|
break $l$loop;
|
|
2349
2439
|
}
|
|
2350
2440
|
var disposableHandle = invokeOnCompletion($this, VOID, new SelectOnAwaitCompletionHandler($this, select));
|
|
2351
|
-
select.
|
|
2441
|
+
select.ho(disposableHandle);
|
|
2352
2442
|
}
|
|
2353
2443
|
function onAwaitInternalProcessResFunc($this, ignoredParam, result) {
|
|
2354
2444
|
if (result instanceof CompletedExceptionally)
|
|
@@ -2356,15 +2446,15 @@
|
|
|
2356
2446
|
return result;
|
|
2357
2447
|
}
|
|
2358
2448
|
function SelectOnAwaitCompletionHandler($outer, select) {
|
|
2359
|
-
this.
|
|
2449
|
+
this.no_1 = $outer;
|
|
2360
2450
|
JobNode.call(this);
|
|
2361
|
-
this.
|
|
2451
|
+
this.mo_1 = select;
|
|
2362
2452
|
}
|
|
2363
|
-
protoOf(SelectOnAwaitCompletionHandler).
|
|
2453
|
+
protoOf(SelectOnAwaitCompletionHandler).kl = function () {
|
|
2364
2454
|
return false;
|
|
2365
2455
|
};
|
|
2366
|
-
protoOf(SelectOnAwaitCompletionHandler).
|
|
2367
|
-
var state = this.
|
|
2456
|
+
protoOf(SelectOnAwaitCompletionHandler).nk = function (cause) {
|
|
2457
|
+
var state = this.no_1.rg();
|
|
2368
2458
|
var tmp;
|
|
2369
2459
|
if (state instanceof CompletedExceptionally) {
|
|
2370
2460
|
tmp = state;
|
|
@@ -2372,7 +2462,7 @@
|
|
|
2372
2462
|
tmp = unboxState(state);
|
|
2373
2463
|
}
|
|
2374
2464
|
var result = tmp;
|
|
2375
|
-
this.
|
|
2465
|
+
this.mo_1.oo(this.no_1, result);
|
|
2376
2466
|
};
|
|
2377
2467
|
function JobSupport$onAwaitInternalRegFunc$ref() {
|
|
2378
2468
|
return constructCallableReference(function (p0, p1, p2) {
|
|
@@ -2408,7 +2498,7 @@
|
|
|
2408
2498
|
var handle = parent.mh(this);
|
|
2409
2499
|
this.pg(handle);
|
|
2410
2500
|
if (this.sg()) {
|
|
2411
|
-
handle.
|
|
2501
|
+
handle.hk();
|
|
2412
2502
|
this.pg(NonDisposableHandle_instance);
|
|
2413
2503
|
}
|
|
2414
2504
|
};
|
|
@@ -2446,7 +2536,7 @@
|
|
|
2446
2536
|
var state = this.rg();
|
|
2447
2537
|
var tmp;
|
|
2448
2538
|
if (state instanceof Finishing) {
|
|
2449
|
-
var tmp0_safe_receiver = state.
|
|
2539
|
+
var tmp0_safe_receiver = state.qn();
|
|
2450
2540
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.wg(tmp0_safe_receiver, get_classSimpleName(this) + ' is cancelling');
|
|
2451
2541
|
var tmp_0;
|
|
2452
2542
|
if (tmp1_elvis_lhs == null) {
|
|
@@ -2500,7 +2590,7 @@
|
|
|
2500
2590
|
return this.ah(invokeImmediately, tmp);
|
|
2501
2591
|
};
|
|
2502
2592
|
protoOf(JobSupport).ah = function (invokeImmediately, node) {
|
|
2503
|
-
node.
|
|
2593
|
+
node.ol_1 = this;
|
|
2504
2594
|
var tmp$ret$0;
|
|
2505
2595
|
$l$block_1: {
|
|
2506
2596
|
// Inline function 'kotlinx.coroutines.JobSupport.tryPutNodeIntoList' call
|
|
@@ -2508,7 +2598,7 @@
|
|
|
2508
2598
|
while (true) {
|
|
2509
2599
|
var state = this.rg();
|
|
2510
2600
|
if (state instanceof Empty) {
|
|
2511
|
-
if (state.
|
|
2601
|
+
if (state.an_1) {
|
|
2512
2602
|
if (this.rf_1.atomicfu$compareAndSet(state, node)) {
|
|
2513
2603
|
tmp$ret$0 = true;
|
|
2514
2604
|
break $l$block_1;
|
|
@@ -2518,26 +2608,26 @@
|
|
|
2518
2608
|
}
|
|
2519
2609
|
} else {
|
|
2520
2610
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2521
|
-
var list = state.
|
|
2611
|
+
var list = state.ql();
|
|
2522
2612
|
if (list == null) {
|
|
2523
2613
|
promoteSingleToNodeList(this, state instanceof JobNode ? state : THROW_CCE());
|
|
2524
2614
|
} else {
|
|
2525
2615
|
var tmp;
|
|
2526
|
-
if (node.
|
|
2616
|
+
if (node.kl()) {
|
|
2527
2617
|
var tmp0_safe_receiver = state instanceof Finishing ? state : null;
|
|
2528
|
-
var rootCause = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2618
|
+
var rootCause = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qn();
|
|
2529
2619
|
var tmp_0;
|
|
2530
2620
|
if (rootCause == null) {
|
|
2531
|
-
tmp_0 = list.
|
|
2621
|
+
tmp_0 = list.ul(node, 5);
|
|
2532
2622
|
} else {
|
|
2533
2623
|
if (invokeImmediately) {
|
|
2534
|
-
node.
|
|
2624
|
+
node.nk(rootCause);
|
|
2535
2625
|
}
|
|
2536
2626
|
return NonDisposableHandle_instance;
|
|
2537
2627
|
}
|
|
2538
2628
|
tmp = tmp_0;
|
|
2539
2629
|
} else {
|
|
2540
|
-
tmp = list.
|
|
2630
|
+
tmp = list.ul(node, 1);
|
|
2541
2631
|
}
|
|
2542
2632
|
if (tmp) {
|
|
2543
2633
|
tmp$ret$0 = true;
|
|
@@ -2557,7 +2647,7 @@
|
|
|
2557
2647
|
else if (invokeImmediately) {
|
|
2558
2648
|
var tmp_1 = this.rg();
|
|
2559
2649
|
var tmp0_safe_receiver_0 = tmp_1 instanceof CompletedExceptionally ? tmp_1 : null;
|
|
2560
|
-
node.
|
|
2650
|
+
node.nk(tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.dg_1);
|
|
2561
2651
|
}
|
|
2562
2652
|
return NonDisposableHandle_instance;
|
|
2563
2653
|
};
|
|
@@ -2572,8 +2662,8 @@
|
|
|
2572
2662
|
return Unit_instance;
|
|
2573
2663
|
} else {
|
|
2574
2664
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2575
|
-
if (!(state.
|
|
2576
|
-
node.
|
|
2665
|
+
if (!(state.ql() == null)) {
|
|
2666
|
+
node.vl();
|
|
2577
2667
|
}
|
|
2578
2668
|
return Unit_instance;
|
|
2579
2669
|
} else {
|
|
@@ -2639,7 +2729,7 @@
|
|
|
2639
2729
|
var state = this.rg();
|
|
2640
2730
|
var tmp;
|
|
2641
2731
|
if (state instanceof Finishing) {
|
|
2642
|
-
tmp = state.
|
|
2732
|
+
tmp = state.qn();
|
|
2643
2733
|
} else {
|
|
2644
2734
|
if (state instanceof CompletedExceptionally) {
|
|
2645
2735
|
tmp = state.dg_1;
|
|
@@ -2694,7 +2784,7 @@
|
|
|
2694
2784
|
protoOf(JobSupport).mh = function (child) {
|
|
2695
2785
|
// Inline function 'kotlin.also' call
|
|
2696
2786
|
var this_0 = new ChildHandleNode(child);
|
|
2697
|
-
this_0.
|
|
2787
|
+
this_0.ol_1 = this;
|
|
2698
2788
|
var node = this_0;
|
|
2699
2789
|
var tmp$ret$2;
|
|
2700
2790
|
$l$block_1: {
|
|
@@ -2703,7 +2793,7 @@
|
|
|
2703
2793
|
while (true) {
|
|
2704
2794
|
var state = this.rg();
|
|
2705
2795
|
if (state instanceof Empty) {
|
|
2706
|
-
if (state.
|
|
2796
|
+
if (state.an_1) {
|
|
2707
2797
|
if (this.rf_1.atomicfu$compareAndSet(state, node)) {
|
|
2708
2798
|
tmp$ret$2 = true;
|
|
2709
2799
|
break $l$block_1;
|
|
@@ -2713,27 +2803,27 @@
|
|
|
2713
2803
|
}
|
|
2714
2804
|
} else {
|
|
2715
2805
|
if (!(state == null) ? isInterface(state, Incomplete) : false) {
|
|
2716
|
-
var list = state.
|
|
2806
|
+
var list = state.ql();
|
|
2717
2807
|
if (list == null) {
|
|
2718
2808
|
promoteSingleToNodeList(this, state instanceof JobNode ? state : THROW_CCE());
|
|
2719
2809
|
} else {
|
|
2720
|
-
var addedBeforeCancellation = list.
|
|
2810
|
+
var addedBeforeCancellation = list.ul(node, 7);
|
|
2721
2811
|
var tmp;
|
|
2722
2812
|
if (addedBeforeCancellation) {
|
|
2723
2813
|
tmp = true;
|
|
2724
2814
|
} else {
|
|
2725
|
-
var addedBeforeCompletion = list.
|
|
2815
|
+
var addedBeforeCompletion = list.ul(node, 3);
|
|
2726
2816
|
var latestState = this.rg();
|
|
2727
2817
|
var tmp_0;
|
|
2728
2818
|
if (latestState instanceof Finishing) {
|
|
2729
|
-
tmp_0 = latestState.
|
|
2819
|
+
tmp_0 = latestState.qn();
|
|
2730
2820
|
} else {
|
|
2731
2821
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
2732
2822
|
var tmp0_safe_receiver = latestState instanceof CompletedExceptionally ? latestState : null;
|
|
2733
2823
|
tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dg_1;
|
|
2734
2824
|
}
|
|
2735
2825
|
var rootCause = tmp_0;
|
|
2736
|
-
node.
|
|
2826
|
+
node.nk(rootCause);
|
|
2737
2827
|
var tmp_1;
|
|
2738
2828
|
if (addedBeforeCompletion) {
|
|
2739
2829
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
@@ -2760,7 +2850,7 @@
|
|
|
2760
2850
|
return node;
|
|
2761
2851
|
var tmp_2 = this.rg();
|
|
2762
2852
|
var tmp0_safe_receiver_0 = tmp_2 instanceof CompletedExceptionally ? tmp_2 : null;
|
|
2763
|
-
node.
|
|
2853
|
+
node.nk(tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.dg_1);
|
|
2764
2854
|
return NonDisposableHandle_instance;
|
|
2765
2855
|
};
|
|
2766
2856
|
protoOf(JobSupport).jg = function (exception) {
|
|
@@ -2807,65 +2897,65 @@
|
|
|
2807
2897
|
return tmp;
|
|
2808
2898
|
}
|
|
2809
2899
|
function InactiveNodeList(list) {
|
|
2810
|
-
this.
|
|
2900
|
+
this.mn_1 = list;
|
|
2811
2901
|
}
|
|
2812
|
-
protoOf(InactiveNodeList).
|
|
2813
|
-
return this.
|
|
2902
|
+
protoOf(InactiveNodeList).ql = function () {
|
|
2903
|
+
return this.mn_1;
|
|
2814
2904
|
};
|
|
2815
2905
|
protoOf(InactiveNodeList).yf = function () {
|
|
2816
2906
|
return false;
|
|
2817
2907
|
};
|
|
2818
2908
|
protoOf(InactiveNodeList).toString = function () {
|
|
2819
|
-
return get_DEBUG() ? this.
|
|
2909
|
+
return get_DEBUG() ? this.mn_1.en('New') : anyToString(this);
|
|
2820
2910
|
};
|
|
2821
2911
|
function InvokeOnCompletion(handler) {
|
|
2822
2912
|
JobNode.call(this);
|
|
2823
|
-
this.
|
|
2913
|
+
this.to_1 = handler;
|
|
2824
2914
|
}
|
|
2825
|
-
protoOf(InvokeOnCompletion).
|
|
2915
|
+
protoOf(InvokeOnCompletion).kl = function () {
|
|
2826
2916
|
return false;
|
|
2827
2917
|
};
|
|
2828
|
-
protoOf(InvokeOnCompletion).
|
|
2829
|
-
return this.
|
|
2918
|
+
protoOf(InvokeOnCompletion).nk = function (cause) {
|
|
2919
|
+
return this.to_1(cause);
|
|
2830
2920
|
};
|
|
2831
2921
|
function InvokeOnCancelling(handler) {
|
|
2832
2922
|
JobNode.call(this);
|
|
2833
|
-
this.
|
|
2834
|
-
this.
|
|
2923
|
+
this.yo_1 = handler;
|
|
2924
|
+
this.zo_1 = atomic$boolean$1(false);
|
|
2835
2925
|
}
|
|
2836
|
-
protoOf(InvokeOnCancelling).
|
|
2926
|
+
protoOf(InvokeOnCancelling).kl = function () {
|
|
2837
2927
|
return true;
|
|
2838
2928
|
};
|
|
2839
|
-
protoOf(InvokeOnCancelling).
|
|
2840
|
-
if (this.
|
|
2841
|
-
this.
|
|
2929
|
+
protoOf(InvokeOnCancelling).nk = function (cause) {
|
|
2930
|
+
if (this.zo_1.atomicfu$compareAndSet(false, true))
|
|
2931
|
+
this.yo_1(cause);
|
|
2842
2932
|
};
|
|
2843
2933
|
function ChildHandleNode(childJob) {
|
|
2844
2934
|
JobNode.call(this);
|
|
2845
|
-
this.
|
|
2935
|
+
this.wn_1 = childJob;
|
|
2846
2936
|
}
|
|
2847
|
-
protoOf(ChildHandleNode).
|
|
2937
|
+
protoOf(ChildHandleNode).kl = function () {
|
|
2848
2938
|
return true;
|
|
2849
2939
|
};
|
|
2850
|
-
protoOf(ChildHandleNode).
|
|
2851
|
-
return this.
|
|
2940
|
+
protoOf(ChildHandleNode).nk = function (cause) {
|
|
2941
|
+
return this.wn_1.gh(this.pl());
|
|
2852
2942
|
};
|
|
2853
2943
|
protoOf(ChildHandleNode).hh = function (cause) {
|
|
2854
|
-
return this.
|
|
2944
|
+
return this.pl().hh(cause);
|
|
2855
2945
|
};
|
|
2856
2946
|
function unboxState(_this__u8e3s4) {
|
|
2857
2947
|
_init_properties_JobSupport_kt__68f172();
|
|
2858
2948
|
var tmp0_safe_receiver = _this__u8e3s4 instanceof IncompleteStateBox ? _this__u8e3s4 : null;
|
|
2859
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2949
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ap_1;
|
|
2860
2950
|
return tmp1_elvis_lhs == null ? _this__u8e3s4 : tmp1_elvis_lhs;
|
|
2861
2951
|
}
|
|
2862
2952
|
function IncompleteStateBox(state) {
|
|
2863
|
-
this.
|
|
2953
|
+
this.ap_1 = state;
|
|
2864
2954
|
}
|
|
2865
2955
|
function handlesExceptionF($this) {
|
|
2866
2956
|
var tmp = $this.qg();
|
|
2867
2957
|
var tmp0_safe_receiver = tmp instanceof ChildHandleNode ? tmp : null;
|
|
2868
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2958
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pl();
|
|
2869
2959
|
var tmp_0;
|
|
2870
2960
|
if (tmp1_elvis_lhs == null) {
|
|
2871
2961
|
return false;
|
|
@@ -2878,7 +2968,7 @@
|
|
|
2878
2968
|
return true;
|
|
2879
2969
|
var tmp_1 = parentJob.qg();
|
|
2880
2970
|
var tmp2_safe_receiver = tmp_1 instanceof ChildHandleNode ? tmp_1 : null;
|
|
2881
|
-
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.
|
|
2971
|
+
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.pl();
|
|
2882
2972
|
var tmp_2;
|
|
2883
2973
|
if (tmp3_elvis_lhs == null) {
|
|
2884
2974
|
return false;
|
|
@@ -2891,13 +2981,13 @@
|
|
|
2891
2981
|
function JobImpl(parent) {
|
|
2892
2982
|
JobSupport.call(this, true);
|
|
2893
2983
|
this.tf(parent);
|
|
2894
|
-
this.
|
|
2984
|
+
this.dp_1 = handlesExceptionF(this);
|
|
2895
2985
|
}
|
|
2896
2986
|
protoOf(JobImpl).ch = function () {
|
|
2897
2987
|
return true;
|
|
2898
2988
|
};
|
|
2899
2989
|
protoOf(JobImpl).ph = function () {
|
|
2900
|
-
return this.
|
|
2990
|
+
return this.dp_1;
|
|
2901
2991
|
};
|
|
2902
2992
|
var properties_initialized_JobSupport_kt_5iq8a4;
|
|
2903
2993
|
function _init_properties_JobSupport_kt__68f172() {
|
|
@@ -2914,7 +3004,7 @@
|
|
|
2914
3004
|
}
|
|
2915
3005
|
function JobNode$invoke$ref(p0) {
|
|
2916
3006
|
return constructCallableReference(function (p0_0) {
|
|
2917
|
-
p0.
|
|
3007
|
+
p0.nk(p0_0);
|
|
2918
3008
|
return Unit_instance;
|
|
2919
3009
|
}, 1, 0, 2, 'invoke', [p0]);
|
|
2920
3010
|
}
|
|
@@ -2922,16 +3012,16 @@
|
|
|
2922
3012
|
CoroutineDispatcher.call(this);
|
|
2923
3013
|
}
|
|
2924
3014
|
protoOf(MainCoroutineDispatcher).toString = function () {
|
|
2925
|
-
var tmp0_elvis_lhs = this.
|
|
3015
|
+
var tmp0_elvis_lhs = this.gp();
|
|
2926
3016
|
return tmp0_elvis_lhs == null ? get_classSimpleName(this) + '@' + get_hexAddress(this) : tmp0_elvis_lhs;
|
|
2927
3017
|
};
|
|
2928
|
-
protoOf(MainCoroutineDispatcher).
|
|
2929
|
-
var main = Dispatchers_getInstance().
|
|
3018
|
+
protoOf(MainCoroutineDispatcher).gp = function () {
|
|
3019
|
+
var main = Dispatchers_getInstance().lp();
|
|
2930
3020
|
if (this === main)
|
|
2931
3021
|
return 'Dispatchers.Main';
|
|
2932
3022
|
var tmp;
|
|
2933
3023
|
try {
|
|
2934
|
-
tmp = main.
|
|
3024
|
+
tmp = main.fp();
|
|
2935
3025
|
} catch ($p) {
|
|
2936
3026
|
var tmp_0;
|
|
2937
3027
|
if ($p instanceof UnsupportedOperationException) {
|
|
@@ -2947,6 +3037,40 @@
|
|
|
2947
3037
|
return 'Dispatchers.Main.immediate';
|
|
2948
3038
|
return null;
|
|
2949
3039
|
};
|
|
3040
|
+
function NonCancellable() {
|
|
3041
|
+
NonCancellable_instance = this;
|
|
3042
|
+
AbstractCoroutineContextElement.call(this, Key_instance_3);
|
|
3043
|
+
this.np_1 = "NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited";
|
|
3044
|
+
}
|
|
3045
|
+
protoOf(NonCancellable).yf = function () {
|
|
3046
|
+
return true;
|
|
3047
|
+
};
|
|
3048
|
+
protoOf(NonCancellable).tg = function () {
|
|
3049
|
+
return false;
|
|
3050
|
+
};
|
|
3051
|
+
protoOf(NonCancellable).vg = function () {
|
|
3052
|
+
throw IllegalStateException_init_$Create$('This job is always active');
|
|
3053
|
+
};
|
|
3054
|
+
protoOf(NonCancellable).yg = function (handler) {
|
|
3055
|
+
return NonDisposableHandle_instance;
|
|
3056
|
+
};
|
|
3057
|
+
protoOf(NonCancellable).zg = function (onCancelling, invokeImmediately, handler) {
|
|
3058
|
+
return NonDisposableHandle_instance;
|
|
3059
|
+
};
|
|
3060
|
+
protoOf(NonCancellable).dh = function (cause) {
|
|
3061
|
+
};
|
|
3062
|
+
protoOf(NonCancellable).mh = function (child) {
|
|
3063
|
+
return NonDisposableHandle_instance;
|
|
3064
|
+
};
|
|
3065
|
+
protoOf(NonCancellable).toString = function () {
|
|
3066
|
+
return 'NonCancellable';
|
|
3067
|
+
};
|
|
3068
|
+
var NonCancellable_instance;
|
|
3069
|
+
function NonCancellable_getInstance() {
|
|
3070
|
+
if (NonCancellable_instance == null)
|
|
3071
|
+
new NonCancellable();
|
|
3072
|
+
return NonCancellable_instance;
|
|
3073
|
+
}
|
|
2950
3074
|
function SupervisorJob(parent) {
|
|
2951
3075
|
parent = parent === VOID ? null : parent;
|
|
2952
3076
|
return new SupervisorJobImpl(parent);
|
|
@@ -2969,7 +3093,7 @@
|
|
|
2969
3093
|
function TimeoutCancellationException(message, coroutine) {
|
|
2970
3094
|
CancellationException_init_$Init$(message, this);
|
|
2971
3095
|
captureStack(this, TimeoutCancellationException);
|
|
2972
|
-
this.
|
|
3096
|
+
this.rp_1 = coroutine;
|
|
2973
3097
|
}
|
|
2974
3098
|
function withTimeoutOrNull(timeout, block, $completion) {
|
|
2975
3099
|
return withTimeoutOrNull_0(toDelayMillis(timeout), block, $completion);
|
|
@@ -2990,21 +3114,21 @@
|
|
|
2990
3114
|
}
|
|
2991
3115
|
function TimeoutCoroutine(time, uCont) {
|
|
2992
3116
|
ScopeCoroutine.call(this, uCont.v6(), uCont);
|
|
2993
|
-
this.
|
|
3117
|
+
this.hq_1 = time;
|
|
2994
3118
|
}
|
|
2995
|
-
protoOf(TimeoutCoroutine).
|
|
3119
|
+
protoOf(TimeoutCoroutine).cl = function () {
|
|
2996
3120
|
var delay = get_delay(this.wf_1);
|
|
2997
3121
|
var tmp0_safe_receiver = this.wf_1.c7(Key_instance_2);
|
|
2998
|
-
var name = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2999
|
-
this.ih(TimeoutCancellationException_0(this.
|
|
3122
|
+
var name = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.jq_1;
|
|
3123
|
+
this.ih(TimeoutCancellationException_0(this.hq_1, delay, this, name));
|
|
3000
3124
|
};
|
|
3001
3125
|
protoOf(TimeoutCoroutine).kg = function () {
|
|
3002
|
-
return protoOf(ScopeCoroutine).kg.call(this) + '(timeMillis=' + this.
|
|
3126
|
+
return protoOf(ScopeCoroutine).kg.call(this) + '(timeMillis=' + this.hq_1.toString() + ')';
|
|
3003
3127
|
};
|
|
3004
3128
|
function setupTimeout(coroutine, block) {
|
|
3005
|
-
var cont = coroutine.
|
|
3129
|
+
var cont = coroutine.di_1;
|
|
3006
3130
|
var context = cont.v6();
|
|
3007
|
-
disposeOnCompletion(coroutine, get_delay(context).
|
|
3131
|
+
disposeOnCompletion(coroutine, get_delay(context).em(coroutine.hq_1, coroutine, coroutine.wf_1));
|
|
3008
3132
|
return startUndispatchedOrReturnIgnoreTimeout(coroutine, coroutine, block);
|
|
3009
3133
|
}
|
|
3010
3134
|
function TimeoutCancellationException_0(time, delay, coroutine, coroutineName) {
|
|
@@ -3016,7 +3140,7 @@
|
|
|
3016
3140
|
// Inline function 'kotlin.time.Companion.milliseconds' call
|
|
3017
3141
|
Companion_getInstance();
|
|
3018
3142
|
var tmp$ret$0 = toDuration(time, DurationUnit_MILLISECONDS_getInstance());
|
|
3019
|
-
tmp = tmp0_safe_receiver.
|
|
3143
|
+
tmp = tmp0_safe_receiver.fm(tmp$ret$0);
|
|
3020
3144
|
}
|
|
3021
3145
|
var tmp1_elvis_lhs = tmp;
|
|
3022
3146
|
var baseMessage = tmp1_elvis_lhs == null ? 'Timed out waiting for ' + time.toString() + ' ms' : tmp1_elvis_lhs;
|
|
@@ -3048,8 +3172,8 @@
|
|
|
3048
3172
|
}
|
|
3049
3173
|
function $withTimeoutOrNullCOROUTINE$(timeMillis, block, resultContinuation) {
|
|
3050
3174
|
CoroutineImpl.call(this, resultContinuation);
|
|
3051
|
-
this.
|
|
3052
|
-
this.
|
|
3175
|
+
this.aq_1 = timeMillis;
|
|
3176
|
+
this.bq_1 = block;
|
|
3053
3177
|
}
|
|
3054
3178
|
protoOf($withTimeoutOrNullCOROUTINE$).x6 = function () {
|
|
3055
3179
|
var suspendResult = this.r6_1;
|
|
@@ -3059,14 +3183,14 @@
|
|
|
3059
3183
|
switch (tmp) {
|
|
3060
3184
|
case 0:
|
|
3061
3185
|
this.q6_1 = 3;
|
|
3062
|
-
if (compare(this.
|
|
3186
|
+
if (compare(this.aq_1, new Long(0, 0)) <= 0)
|
|
3063
3187
|
return null;
|
|
3064
|
-
this.
|
|
3188
|
+
this.cq_1 = {_v: null};
|
|
3065
3189
|
this.q6_1 = 2;
|
|
3066
3190
|
this.p6_1 = 1;
|
|
3067
|
-
var timeoutCoroutine = new TimeoutCoroutine(this.
|
|
3068
|
-
this.
|
|
3069
|
-
suspendResult = returnIfSuspended(setupTimeout(timeoutCoroutine, this.
|
|
3191
|
+
var timeoutCoroutine = new TimeoutCoroutine(this.aq_1, this);
|
|
3192
|
+
this.cq_1._v = timeoutCoroutine;
|
|
3193
|
+
suspendResult = returnIfSuspended(setupTimeout(timeoutCoroutine, this.bq_1), this);
|
|
3070
3194
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3071
3195
|
return suspendResult;
|
|
3072
3196
|
}
|
|
@@ -3079,7 +3203,7 @@
|
|
|
3079
3203
|
var tmp_0 = this.s6_1;
|
|
3080
3204
|
if (tmp_0 instanceof TimeoutCancellationException) {
|
|
3081
3205
|
var e = this.s6_1;
|
|
3082
|
-
if (e.
|
|
3206
|
+
if (e.rp_1 === this.cq_1._v) {
|
|
3083
3207
|
return null;
|
|
3084
3208
|
}
|
|
3085
3209
|
throw e;
|
|
@@ -3105,13 +3229,13 @@
|
|
|
3105
3229
|
Unconfined_instance = this;
|
|
3106
3230
|
CoroutineDispatcher.call(this);
|
|
3107
3231
|
}
|
|
3108
|
-
protoOf(Unconfined).
|
|
3232
|
+
protoOf(Unconfined).yl = function (context) {
|
|
3109
3233
|
return false;
|
|
3110
3234
|
};
|
|
3111
|
-
protoOf(Unconfined).
|
|
3235
|
+
protoOf(Unconfined).zl = function (context, block) {
|
|
3112
3236
|
var yieldContext = context.c7(Key_instance_4);
|
|
3113
3237
|
if (!(yieldContext == null)) {
|
|
3114
|
-
yieldContext.
|
|
3238
|
+
yieldContext.mq_1 = true;
|
|
3115
3239
|
return Unit_instance;
|
|
3116
3240
|
}
|
|
3117
3241
|
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.');
|
|
@@ -3140,20 +3264,20 @@
|
|
|
3140
3264
|
var CLOSED;
|
|
3141
3265
|
function Segment(id, prev, pointers) {
|
|
3142
3266
|
ConcurrentLinkedListNode.call(this, prev);
|
|
3143
|
-
this.
|
|
3144
|
-
this.
|
|
3267
|
+
this.sj_1 = id;
|
|
3268
|
+
this.tj_1 = atomic$int$1(pointers << 16);
|
|
3145
3269
|
}
|
|
3146
|
-
protoOf(Segment).
|
|
3147
|
-
return this.
|
|
3270
|
+
protoOf(Segment).oq = function () {
|
|
3271
|
+
return this.tj_1.kotlinx$atomicfu$value === this.nq() && !this.rq();
|
|
3148
3272
|
};
|
|
3149
|
-
protoOf(Segment).
|
|
3150
|
-
var tmp0 = this.
|
|
3273
|
+
protoOf(Segment).sq = function () {
|
|
3274
|
+
var tmp0 = this.tj_1;
|
|
3151
3275
|
var tmp$ret$0;
|
|
3152
3276
|
$l$block_0: {
|
|
3153
3277
|
// Inline function 'kotlinx.coroutines.internal.addConditionally' call
|
|
3154
3278
|
while (true) {
|
|
3155
3279
|
var cur = tmp0.kotlinx$atomicfu$value;
|
|
3156
|
-
if (!(!(cur === this.
|
|
3280
|
+
if (!(!(cur === this.nq()) || this.rq())) {
|
|
3157
3281
|
tmp$ret$0 = false;
|
|
3158
3282
|
break $l$block_0;
|
|
3159
3283
|
}
|
|
@@ -3165,11 +3289,11 @@
|
|
|
3165
3289
|
}
|
|
3166
3290
|
return tmp$ret$0;
|
|
3167
3291
|
};
|
|
3168
|
-
protoOf(Segment).
|
|
3169
|
-
return this.
|
|
3292
|
+
protoOf(Segment).tq = function () {
|
|
3293
|
+
return this.tj_1.atomicfu$addAndGet(-65536) === this.nq() && !this.rq();
|
|
3170
3294
|
};
|
|
3171
|
-
protoOf(Segment).
|
|
3172
|
-
if (this.
|
|
3295
|
+
protoOf(Segment).uq = function () {
|
|
3296
|
+
if (this.tj_1.atomicfu$incrementAndGet() === this.nq()) {
|
|
3173
3297
|
this.h2();
|
|
3174
3298
|
}
|
|
3175
3299
|
};
|
|
@@ -3195,19 +3319,19 @@
|
|
|
3195
3319
|
return tmp;
|
|
3196
3320
|
}
|
|
3197
3321
|
function _get_nextOrClosed__w0gmuv($this) {
|
|
3198
|
-
return $this.
|
|
3322
|
+
return $this.pq_1.kotlinx$atomicfu$value;
|
|
3199
3323
|
}
|
|
3200
3324
|
function _get_aliveSegmentLeft__mr4ndu($this) {
|
|
3201
|
-
var cur = $this.
|
|
3202
|
-
while (!(cur === null) && cur.
|
|
3203
|
-
cur = cur.
|
|
3325
|
+
var cur = $this.xq();
|
|
3326
|
+
while (!(cur === null) && cur.oq())
|
|
3327
|
+
cur = cur.qq_1.kotlinx$atomicfu$value;
|
|
3204
3328
|
return cur;
|
|
3205
3329
|
}
|
|
3206
3330
|
function _get_aliveSegmentRight__7ulr0b($this) {
|
|
3207
3331
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3208
|
-
var cur = ensureNotNull($this.
|
|
3209
|
-
while (cur.
|
|
3210
|
-
var tmp0_elvis_lhs = cur.
|
|
3332
|
+
var cur = ensureNotNull($this.vq());
|
|
3333
|
+
while (cur.oq()) {
|
|
3334
|
+
var tmp0_elvis_lhs = cur.vq();
|
|
3211
3335
|
var tmp;
|
|
3212
3336
|
if (tmp0_elvis_lhs == null) {
|
|
3213
3337
|
return cur;
|
|
@@ -3222,10 +3346,10 @@
|
|
|
3222
3346
|
return _get_nextOrClosed__w0gmuv($this);
|
|
3223
3347
|
}
|
|
3224
3348
|
function ConcurrentLinkedListNode(prev) {
|
|
3225
|
-
this.
|
|
3226
|
-
this.
|
|
3349
|
+
this.pq_1 = atomic$ref$1(null);
|
|
3350
|
+
this.qq_1 = atomic$ref$1(prev);
|
|
3227
3351
|
}
|
|
3228
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3352
|
+
protoOf(ConcurrentLinkedListNode).vq = function () {
|
|
3229
3353
|
// Inline function 'kotlinx.coroutines.internal.ConcurrentLinkedListNode.nextOrIfClosed' call
|
|
3230
3354
|
// Inline function 'kotlin.let' call
|
|
3231
3355
|
var it = access$_get_nextOrClosed__ywzond(this);
|
|
@@ -3237,27 +3361,27 @@
|
|
|
3237
3361
|
}
|
|
3238
3362
|
return tmp;
|
|
3239
3363
|
};
|
|
3240
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3241
|
-
return this.
|
|
3364
|
+
protoOf(ConcurrentLinkedListNode).wq = function (value) {
|
|
3365
|
+
return this.pq_1.atomicfu$compareAndSet(null, value);
|
|
3242
3366
|
};
|
|
3243
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3244
|
-
return this.
|
|
3367
|
+
protoOf(ConcurrentLinkedListNode).rq = function () {
|
|
3368
|
+
return this.vq() == null;
|
|
3245
3369
|
};
|
|
3246
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3247
|
-
return this.
|
|
3370
|
+
protoOf(ConcurrentLinkedListNode).xq = function () {
|
|
3371
|
+
return this.qq_1.kotlinx$atomicfu$value;
|
|
3248
3372
|
};
|
|
3249
|
-
protoOf(ConcurrentLinkedListNode).
|
|
3373
|
+
protoOf(ConcurrentLinkedListNode).yq = function () {
|
|
3250
3374
|
// Inline function 'kotlinx.atomicfu.AtomicRef.lazySet' call
|
|
3251
|
-
this.
|
|
3375
|
+
this.qq_1.kotlinx$atomicfu$value = null;
|
|
3252
3376
|
};
|
|
3253
3377
|
protoOf(ConcurrentLinkedListNode).h2 = function () {
|
|
3254
3378
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3255
|
-
if (this.
|
|
3379
|
+
if (this.rq())
|
|
3256
3380
|
return Unit_instance;
|
|
3257
3381
|
$l$loop_0: while (true) {
|
|
3258
3382
|
var prev = _get_aliveSegmentLeft__mr4ndu(this);
|
|
3259
3383
|
var next = _get_aliveSegmentRight__7ulr0b(this);
|
|
3260
|
-
var tmp0 = next.
|
|
3384
|
+
var tmp0 = next.qq_1;
|
|
3261
3385
|
$l$block: {
|
|
3262
3386
|
// Inline function 'kotlinx.atomicfu.update' call
|
|
3263
3387
|
while (true) {
|
|
@@ -3269,10 +3393,10 @@
|
|
|
3269
3393
|
}
|
|
3270
3394
|
}
|
|
3271
3395
|
if (!(prev === null))
|
|
3272
|
-
prev.
|
|
3273
|
-
if (next.
|
|
3396
|
+
prev.pq_1.kotlinx$atomicfu$value = next;
|
|
3397
|
+
if (next.oq() && !next.rq())
|
|
3274
3398
|
continue $l$loop_0;
|
|
3275
|
-
if (!(prev === null) && prev.
|
|
3399
|
+
if (!(prev === null) && prev.oq())
|
|
3276
3400
|
continue $l$loop_0;
|
|
3277
3401
|
return Unit_instance;
|
|
3278
3402
|
}
|
|
@@ -3280,7 +3404,7 @@
|
|
|
3280
3404
|
function findSegmentInternal(_this__u8e3s4, id, createNewSegment) {
|
|
3281
3405
|
_init_properties_ConcurrentLinkedList_kt__5gcgzy();
|
|
3282
3406
|
var cur = _this__u8e3s4;
|
|
3283
|
-
$l$loop: while (compare(cur.
|
|
3407
|
+
$l$loop: while (compare(cur.sj_1, id) < 0 || cur.oq()) {
|
|
3284
3408
|
// Inline function 'kotlinx.coroutines.internal.ConcurrentLinkedListNode.nextOrIfClosed' call
|
|
3285
3409
|
var this_0 = cur;
|
|
3286
3410
|
// Inline function 'kotlin.let' call
|
|
@@ -3297,10 +3421,10 @@
|
|
|
3297
3421
|
continue $l$loop;
|
|
3298
3422
|
}
|
|
3299
3423
|
// Inline function 'kotlin.Long.plus' call
|
|
3300
|
-
var this_1 = cur.
|
|
3424
|
+
var this_1 = cur.sj_1;
|
|
3301
3425
|
var newTail = createNewSegment(add(this_1, fromInt(1)), cur);
|
|
3302
|
-
if (cur.
|
|
3303
|
-
if (cur.
|
|
3426
|
+
if (cur.wq(newTail)) {
|
|
3427
|
+
if (cur.oq()) {
|
|
3304
3428
|
cur.h2();
|
|
3305
3429
|
}
|
|
3306
3430
|
cur = newTail;
|
|
@@ -3323,7 +3447,7 @@
|
|
|
3323
3447
|
while (_iterator__ex2g4s.i()) {
|
|
3324
3448
|
var handler = _iterator__ex2g4s.j();
|
|
3325
3449
|
try {
|
|
3326
|
-
handler.
|
|
3450
|
+
handler.cm(context, exception);
|
|
3327
3451
|
} catch ($p) {
|
|
3328
3452
|
if ($p instanceof ExceptionSuccessfullyProcessed) {
|
|
3329
3453
|
var _unused_var__etf5q3 = $p;
|
|
@@ -3364,7 +3488,7 @@
|
|
|
3364
3488
|
function safeDispatch(_this__u8e3s4, context, runnable) {
|
|
3365
3489
|
_init_properties_DispatchedContinuation_kt__tnmqc0();
|
|
3366
3490
|
try {
|
|
3367
|
-
_this__u8e3s4.
|
|
3491
|
+
_this__u8e3s4.zl(context, runnable);
|
|
3368
3492
|
} catch ($p) {
|
|
3369
3493
|
if ($p instanceof Error) {
|
|
3370
3494
|
var e = $p;
|
|
@@ -3375,48 +3499,48 @@
|
|
|
3375
3499
|
}
|
|
3376
3500
|
}
|
|
3377
3501
|
function _get_reusableCancellableContinuation__9qex09($this) {
|
|
3378
|
-
var tmp = $this.
|
|
3502
|
+
var tmp = $this.kj_1.kotlinx$atomicfu$value;
|
|
3379
3503
|
return tmp instanceof CancellableContinuationImpl ? tmp : null;
|
|
3380
3504
|
}
|
|
3381
3505
|
function DispatchedContinuation(dispatcher, continuation) {
|
|
3382
3506
|
DispatchedTask.call(this, -1);
|
|
3383
|
-
this.
|
|
3384
|
-
this.
|
|
3385
|
-
this.
|
|
3386
|
-
this.
|
|
3387
|
-
this.
|
|
3507
|
+
this.gj_1 = dispatcher;
|
|
3508
|
+
this.hj_1 = continuation;
|
|
3509
|
+
this.ij_1 = get_UNDEFINED();
|
|
3510
|
+
this.jj_1 = threadContextElements(this.v6());
|
|
3511
|
+
this.kj_1 = atomic$ref$1(null);
|
|
3388
3512
|
}
|
|
3389
|
-
protoOf(DispatchedContinuation).
|
|
3390
|
-
return !(this.
|
|
3513
|
+
protoOf(DispatchedContinuation).nj = function () {
|
|
3514
|
+
return !(this.kj_1.kotlinx$atomicfu$value == null);
|
|
3391
3515
|
};
|
|
3392
|
-
protoOf(DispatchedContinuation).
|
|
3516
|
+
protoOf(DispatchedContinuation).zq = function () {
|
|
3393
3517
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
3394
|
-
var this_0 = this.
|
|
3518
|
+
var this_0 = this.kj_1;
|
|
3395
3519
|
while (true) {
|
|
3396
3520
|
if (!(this_0.kotlinx$atomicfu$value === get_REUSABLE_CLAIMED()))
|
|
3397
3521
|
return Unit_instance;
|
|
3398
3522
|
}
|
|
3399
3523
|
};
|
|
3400
|
-
protoOf(DispatchedContinuation).
|
|
3401
|
-
this.
|
|
3524
|
+
protoOf(DispatchedContinuation).am = function () {
|
|
3525
|
+
this.zq();
|
|
3402
3526
|
var tmp0_safe_receiver = _get_reusableCancellableContinuation__9qex09(this);
|
|
3403
3527
|
if (tmp0_safe_receiver == null)
|
|
3404
3528
|
null;
|
|
3405
3529
|
else {
|
|
3406
|
-
tmp0_safe_receiver.
|
|
3530
|
+
tmp0_safe_receiver.ek();
|
|
3407
3531
|
}
|
|
3408
3532
|
};
|
|
3409
|
-
protoOf(DispatchedContinuation).
|
|
3533
|
+
protoOf(DispatchedContinuation).lj = function () {
|
|
3410
3534
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
3411
|
-
var this_0 = this.
|
|
3535
|
+
var this_0 = this.kj_1;
|
|
3412
3536
|
while (true) {
|
|
3413
3537
|
var state = this_0.kotlinx$atomicfu$value;
|
|
3414
3538
|
if (state === null) {
|
|
3415
|
-
this.
|
|
3539
|
+
this.kj_1.kotlinx$atomicfu$value = get_REUSABLE_CLAIMED();
|
|
3416
3540
|
return null;
|
|
3417
3541
|
} else {
|
|
3418
3542
|
if (state instanceof CancellableContinuationImpl) {
|
|
3419
|
-
if (this.
|
|
3543
|
+
if (this.kj_1.atomicfu$compareAndSet(state, get_REUSABLE_CLAIMED())) {
|
|
3420
3544
|
return state instanceof CancellableContinuationImpl ? state : THROW_CCE();
|
|
3421
3545
|
}
|
|
3422
3546
|
} else {
|
|
@@ -3431,19 +3555,19 @@
|
|
|
3431
3555
|
}
|
|
3432
3556
|
}
|
|
3433
3557
|
};
|
|
3434
|
-
protoOf(DispatchedContinuation).
|
|
3558
|
+
protoOf(DispatchedContinuation).sk = function (continuation) {
|
|
3435
3559
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
3436
|
-
var this_0 = this.
|
|
3560
|
+
var this_0 = this.kj_1;
|
|
3437
3561
|
while (true) {
|
|
3438
3562
|
var state = this_0.kotlinx$atomicfu$value;
|
|
3439
3563
|
if (state === get_REUSABLE_CLAIMED()) {
|
|
3440
|
-
if (this.
|
|
3564
|
+
if (this.kj_1.atomicfu$compareAndSet(get_REUSABLE_CLAIMED(), continuation))
|
|
3441
3565
|
return null;
|
|
3442
3566
|
} else {
|
|
3443
3567
|
if (state instanceof Error) {
|
|
3444
3568
|
// Inline function 'kotlin.require' call
|
|
3445
3569
|
// Inline function 'kotlin.require' call
|
|
3446
|
-
if (!this.
|
|
3570
|
+
if (!this.kj_1.atomicfu$compareAndSet(state, null)) {
|
|
3447
3571
|
var message = 'Failed requirement.';
|
|
3448
3572
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
3449
3573
|
}
|
|
@@ -3456,73 +3580,73 @@
|
|
|
3456
3580
|
}
|
|
3457
3581
|
}
|
|
3458
3582
|
};
|
|
3459
|
-
protoOf(DispatchedContinuation).
|
|
3583
|
+
protoOf(DispatchedContinuation).pj = function (cause) {
|
|
3460
3584
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
3461
|
-
var this_0 = this.
|
|
3585
|
+
var this_0 = this.kj_1;
|
|
3462
3586
|
while (true) {
|
|
3463
3587
|
var state = this_0.kotlinx$atomicfu$value;
|
|
3464
3588
|
if (equals(state, get_REUSABLE_CLAIMED())) {
|
|
3465
|
-
if (this.
|
|
3589
|
+
if (this.kj_1.atomicfu$compareAndSet(get_REUSABLE_CLAIMED(), cause))
|
|
3466
3590
|
return true;
|
|
3467
3591
|
} else {
|
|
3468
3592
|
if (state instanceof Error)
|
|
3469
3593
|
return true;
|
|
3470
3594
|
else {
|
|
3471
|
-
if (this.
|
|
3595
|
+
if (this.kj_1.atomicfu$compareAndSet(state, null))
|
|
3472
3596
|
return false;
|
|
3473
3597
|
}
|
|
3474
3598
|
}
|
|
3475
3599
|
}
|
|
3476
3600
|
};
|
|
3477
|
-
protoOf(DispatchedContinuation).
|
|
3478
|
-
var state = this.
|
|
3601
|
+
protoOf(DispatchedContinuation).ik = function () {
|
|
3602
|
+
var state = this.ij_1;
|
|
3479
3603
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3480
|
-
this.
|
|
3604
|
+
this.ij_1 = get_UNDEFINED();
|
|
3481
3605
|
return state;
|
|
3482
3606
|
};
|
|
3483
|
-
protoOf(DispatchedContinuation).
|
|
3607
|
+
protoOf(DispatchedContinuation).fk = function () {
|
|
3484
3608
|
return this;
|
|
3485
3609
|
};
|
|
3486
3610
|
protoOf(DispatchedContinuation).a7 = function (result) {
|
|
3487
3611
|
var state = toState(result);
|
|
3488
|
-
if (safeIsDispatchNeeded(this.
|
|
3489
|
-
this.
|
|
3490
|
-
this.
|
|
3491
|
-
safeDispatch(this.
|
|
3612
|
+
if (safeIsDispatchNeeded(this.gj_1, this.v6())) {
|
|
3613
|
+
this.ij_1 = state;
|
|
3614
|
+
this.oj_1 = 0;
|
|
3615
|
+
safeDispatch(this.gj_1, this.v6(), this);
|
|
3492
3616
|
} else {
|
|
3493
3617
|
$l$block: {
|
|
3494
3618
|
// Inline function 'kotlinx.coroutines.internal.executeUnconfined' call
|
|
3495
3619
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3496
|
-
var eventLoop = ThreadLocalEventLoop_getInstance().
|
|
3497
|
-
if (false && eventLoop.
|
|
3620
|
+
var eventLoop = ThreadLocalEventLoop_getInstance().sm();
|
|
3621
|
+
if (false && eventLoop.nm()) {
|
|
3498
3622
|
break $l$block;
|
|
3499
3623
|
}
|
|
3500
3624
|
var tmp;
|
|
3501
|
-
if (eventLoop.
|
|
3502
|
-
this.
|
|
3503
|
-
this.
|
|
3504
|
-
eventLoop.
|
|
3625
|
+
if (eventLoop.mm()) {
|
|
3626
|
+
this.ij_1 = state;
|
|
3627
|
+
this.oj_1 = 0;
|
|
3628
|
+
eventLoop.lm(this);
|
|
3505
3629
|
tmp = true;
|
|
3506
3630
|
} else {
|
|
3507
3631
|
// Inline function 'kotlinx.coroutines.runUnconfinedEventLoop' call
|
|
3508
|
-
eventLoop.
|
|
3632
|
+
eventLoop.om(true);
|
|
3509
3633
|
try {
|
|
3510
3634
|
this.v6();
|
|
3511
3635
|
// Inline function 'kotlinx.coroutines.withCoroutineContext' call
|
|
3512
|
-
this.
|
|
3513
|
-
this.
|
|
3514
|
-
$l$loop: while (eventLoop.
|
|
3636
|
+
this.jj_1;
|
|
3637
|
+
this.hj_1.a7(result);
|
|
3638
|
+
$l$loop: while (eventLoop.km()) {
|
|
3515
3639
|
}
|
|
3516
3640
|
} catch ($p) {
|
|
3517
3641
|
if ($p instanceof Error) {
|
|
3518
3642
|
var e = $p;
|
|
3519
|
-
this.
|
|
3643
|
+
this.dl(e);
|
|
3520
3644
|
} else {
|
|
3521
3645
|
throw $p;
|
|
3522
3646
|
}
|
|
3523
3647
|
}
|
|
3524
3648
|
finally {
|
|
3525
|
-
eventLoop.
|
|
3649
|
+
eventLoop.pm(true);
|
|
3526
3650
|
}
|
|
3527
3651
|
tmp = false;
|
|
3528
3652
|
}
|
|
@@ -3530,15 +3654,15 @@
|
|
|
3530
3654
|
}
|
|
3531
3655
|
};
|
|
3532
3656
|
protoOf(DispatchedContinuation).toString = function () {
|
|
3533
|
-
return 'DispatchedContinuation[' + this.
|
|
3657
|
+
return 'DispatchedContinuation[' + this.gj_1.toString() + ', ' + toDebugString(this.hj_1) + ']';
|
|
3534
3658
|
};
|
|
3535
3659
|
protoOf(DispatchedContinuation).v6 = function () {
|
|
3536
|
-
return this.
|
|
3660
|
+
return this.hj_1.v6();
|
|
3537
3661
|
};
|
|
3538
3662
|
function safeIsDispatchNeeded(_this__u8e3s4, context) {
|
|
3539
3663
|
_init_properties_DispatchedContinuation_kt__tnmqc0();
|
|
3540
3664
|
try {
|
|
3541
|
-
return _this__u8e3s4.
|
|
3665
|
+
return _this__u8e3s4.yl(context);
|
|
3542
3666
|
} catch ($p) {
|
|
3543
3667
|
if ($p instanceof Error) {
|
|
3544
3668
|
var e = $p;
|
|
@@ -3554,27 +3678,27 @@
|
|
|
3554
3678
|
if (_this__u8e3s4 instanceof DispatchedContinuation) {
|
|
3555
3679
|
// Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeCancellableWith' call
|
|
3556
3680
|
var state = toState(result);
|
|
3557
|
-
if (safeIsDispatchNeeded(_this__u8e3s4.
|
|
3558
|
-
_this__u8e3s4.
|
|
3559
|
-
_this__u8e3s4.
|
|
3560
|
-
safeDispatch(_this__u8e3s4.
|
|
3681
|
+
if (safeIsDispatchNeeded(_this__u8e3s4.gj_1, _this__u8e3s4.v6())) {
|
|
3682
|
+
_this__u8e3s4.ij_1 = state;
|
|
3683
|
+
_this__u8e3s4.oj_1 = 1;
|
|
3684
|
+
safeDispatch(_this__u8e3s4.gj_1, _this__u8e3s4.v6(), _this__u8e3s4);
|
|
3561
3685
|
} else {
|
|
3562
3686
|
$l$block: {
|
|
3563
3687
|
// Inline function 'kotlinx.coroutines.internal.executeUnconfined' call
|
|
3564
3688
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3565
|
-
var eventLoop = ThreadLocalEventLoop_getInstance().
|
|
3566
|
-
if (false && eventLoop.
|
|
3689
|
+
var eventLoop = ThreadLocalEventLoop_getInstance().sm();
|
|
3690
|
+
if (false && eventLoop.nm()) {
|
|
3567
3691
|
break $l$block;
|
|
3568
3692
|
}
|
|
3569
3693
|
var tmp_0;
|
|
3570
|
-
if (eventLoop.
|
|
3571
|
-
_this__u8e3s4.
|
|
3572
|
-
_this__u8e3s4.
|
|
3573
|
-
eventLoop.
|
|
3694
|
+
if (eventLoop.mm()) {
|
|
3695
|
+
_this__u8e3s4.ij_1 = state;
|
|
3696
|
+
_this__u8e3s4.oj_1 = 1;
|
|
3697
|
+
eventLoop.lm(_this__u8e3s4);
|
|
3574
3698
|
tmp_0 = true;
|
|
3575
3699
|
} else {
|
|
3576
3700
|
// Inline function 'kotlinx.coroutines.runUnconfinedEventLoop' call
|
|
3577
|
-
eventLoop.
|
|
3701
|
+
eventLoop.om(true);
|
|
3578
3702
|
try {
|
|
3579
3703
|
var tmp$ret$5;
|
|
3580
3704
|
$l$block_0: {
|
|
@@ -3582,7 +3706,7 @@
|
|
|
3582
3706
|
var job = _this__u8e3s4.v6().c7(Key_instance_3);
|
|
3583
3707
|
if (!(job == null) && !job.yf()) {
|
|
3584
3708
|
var cause = job.vg();
|
|
3585
|
-
_this__u8e3s4.
|
|
3709
|
+
_this__u8e3s4.jk(state, cause);
|
|
3586
3710
|
// Inline function 'kotlin.coroutines.resumeWithException' call
|
|
3587
3711
|
// Inline function 'kotlin.Companion.failure' call
|
|
3588
3712
|
var tmp$ret$7 = _Result___init__impl__xyqfz8(createFailure(cause));
|
|
@@ -3594,23 +3718,23 @@
|
|
|
3594
3718
|
}
|
|
3595
3719
|
if (!tmp$ret$5) {
|
|
3596
3720
|
// Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeUndispatchedWith' call
|
|
3597
|
-
_this__u8e3s4.
|
|
3721
|
+
_this__u8e3s4.hj_1;
|
|
3598
3722
|
// Inline function 'kotlinx.coroutines.withContinuationContext' call
|
|
3599
|
-
_this__u8e3s4.
|
|
3600
|
-
_this__u8e3s4.
|
|
3723
|
+
_this__u8e3s4.jj_1;
|
|
3724
|
+
_this__u8e3s4.hj_1.a7(result);
|
|
3601
3725
|
}
|
|
3602
|
-
$l$loop: while (eventLoop.
|
|
3726
|
+
$l$loop: while (eventLoop.km()) {
|
|
3603
3727
|
}
|
|
3604
3728
|
} catch ($p) {
|
|
3605
3729
|
if ($p instanceof Error) {
|
|
3606
3730
|
var e = $p;
|
|
3607
|
-
_this__u8e3s4.
|
|
3731
|
+
_this__u8e3s4.dl(e);
|
|
3608
3732
|
} else {
|
|
3609
3733
|
throw $p;
|
|
3610
3734
|
}
|
|
3611
3735
|
}
|
|
3612
3736
|
finally {
|
|
3613
|
-
eventLoop.
|
|
3737
|
+
eventLoop.pm(true);
|
|
3614
3738
|
}
|
|
3615
3739
|
tmp_0 = false;
|
|
3616
3740
|
}
|
|
@@ -3634,40 +3758,40 @@
|
|
|
3634
3758
|
function DispatchException(cause, dispatcher, context) {
|
|
3635
3759
|
Exception_init_$Init$('Coroutine dispatcher ' + dispatcher.toString() + ' threw an exception, context = ' + toString(context), cause, this);
|
|
3636
3760
|
captureStack(this, DispatchException);
|
|
3637
|
-
this.
|
|
3761
|
+
this.bm_1 = cause;
|
|
3638
3762
|
delete this.cause;
|
|
3639
3763
|
}
|
|
3640
3764
|
protoOf(DispatchException).e = function () {
|
|
3641
|
-
return this.
|
|
3765
|
+
return this.bm_1;
|
|
3642
3766
|
};
|
|
3643
3767
|
function DispatchedTask(resumeMode) {
|
|
3644
3768
|
SchedulerTask.call(this);
|
|
3645
|
-
this.
|
|
3769
|
+
this.oj_1 = resumeMode;
|
|
3646
3770
|
}
|
|
3647
|
-
protoOf(DispatchedTask).
|
|
3771
|
+
protoOf(DispatchedTask).jk = function (takenState, cause) {
|
|
3648
3772
|
};
|
|
3649
|
-
protoOf(DispatchedTask).
|
|
3773
|
+
protoOf(DispatchedTask).rk = function (state) {
|
|
3650
3774
|
return state;
|
|
3651
3775
|
};
|
|
3652
|
-
protoOf(DispatchedTask).
|
|
3776
|
+
protoOf(DispatchedTask).al = function (state) {
|
|
3653
3777
|
var tmp0_safe_receiver = state instanceof CompletedExceptionally ? state : null;
|
|
3654
3778
|
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dg_1;
|
|
3655
3779
|
};
|
|
3656
|
-
protoOf(DispatchedTask).
|
|
3780
|
+
protoOf(DispatchedTask).cl = function () {
|
|
3657
3781
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3658
3782
|
try {
|
|
3659
|
-
var tmp = this.
|
|
3783
|
+
var tmp = this.fk();
|
|
3660
3784
|
var delegate = tmp instanceof DispatchedContinuation ? tmp : THROW_CCE();
|
|
3661
|
-
var continuation = delegate.
|
|
3785
|
+
var continuation = delegate.hj_1;
|
|
3662
3786
|
// Inline function 'kotlinx.coroutines.withContinuationContext' call
|
|
3663
|
-
delegate.
|
|
3787
|
+
delegate.jj_1;
|
|
3664
3788
|
var context = continuation.v6();
|
|
3665
|
-
var state = this.
|
|
3666
|
-
var exception = this.
|
|
3667
|
-
var job = exception == null && get_isCancellableMode(this.
|
|
3789
|
+
var state = this.ik();
|
|
3790
|
+
var exception = this.al(state);
|
|
3791
|
+
var job = exception == null && get_isCancellableMode(this.oj_1) ? context.c7(Key_instance_3) : null;
|
|
3668
3792
|
if (!(job == null) && !job.yf()) {
|
|
3669
3793
|
var cause = job.vg();
|
|
3670
|
-
this.
|
|
3794
|
+
this.jk(state, cause);
|
|
3671
3795
|
// Inline function 'kotlinx.coroutines.resumeWithStackTrace' call
|
|
3672
3796
|
// Inline function 'kotlin.Companion.failure' call
|
|
3673
3797
|
var exception_0 = recoverStackTrace(cause, continuation);
|
|
@@ -3682,7 +3806,7 @@
|
|
|
3682
3806
|
} else {
|
|
3683
3807
|
// Inline function 'kotlin.coroutines.resume' call
|
|
3684
3808
|
// Inline function 'kotlin.Companion.success' call
|
|
3685
|
-
var value = this.
|
|
3809
|
+
var value = this.rk(state);
|
|
3686
3810
|
var tmp$ret$8 = _Result___init__impl__xyqfz8(value);
|
|
3687
3811
|
continuation.a7(tmp$ret$8);
|
|
3688
3812
|
}
|
|
@@ -3690,20 +3814,20 @@
|
|
|
3690
3814
|
} catch ($p) {
|
|
3691
3815
|
if ($p instanceof DispatchException) {
|
|
3692
3816
|
var e = $p;
|
|
3693
|
-
handleCoroutineException(this.
|
|
3817
|
+
handleCoroutineException(this.fk().v6(), e.bm_1);
|
|
3694
3818
|
} else {
|
|
3695
3819
|
if ($p instanceof Error) {
|
|
3696
3820
|
var e_0 = $p;
|
|
3697
|
-
this.
|
|
3821
|
+
this.dl(e_0);
|
|
3698
3822
|
} else {
|
|
3699
3823
|
throw $p;
|
|
3700
3824
|
}
|
|
3701
3825
|
}
|
|
3702
3826
|
}
|
|
3703
3827
|
};
|
|
3704
|
-
protoOf(DispatchedTask).
|
|
3828
|
+
protoOf(DispatchedTask).dl = function (exception) {
|
|
3705
3829
|
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);
|
|
3706
|
-
handleCoroutineException(this.
|
|
3830
|
+
handleCoroutineException(this.fk().v6(), reason);
|
|
3707
3831
|
};
|
|
3708
3832
|
function get_isCancellableMode(_this__u8e3s4) {
|
|
3709
3833
|
return _this__u8e3s4 === 1 || _this__u8e3s4 === 2;
|
|
@@ -3713,7 +3837,7 @@
|
|
|
3713
3837
|
}
|
|
3714
3838
|
function dispatch(_this__u8e3s4, mode) {
|
|
3715
3839
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
3716
|
-
var delegate = _this__u8e3s4.
|
|
3840
|
+
var delegate = _this__u8e3s4.fk();
|
|
3717
3841
|
var undispatched = mode === 4;
|
|
3718
3842
|
var tmp;
|
|
3719
3843
|
var tmp_0;
|
|
@@ -3723,12 +3847,12 @@
|
|
|
3723
3847
|
tmp_0 = false;
|
|
3724
3848
|
}
|
|
3725
3849
|
if (tmp_0) {
|
|
3726
|
-
tmp = get_isCancellableMode(mode) === get_isCancellableMode(_this__u8e3s4.
|
|
3850
|
+
tmp = get_isCancellableMode(mode) === get_isCancellableMode(_this__u8e3s4.oj_1);
|
|
3727
3851
|
} else {
|
|
3728
3852
|
tmp = false;
|
|
3729
3853
|
}
|
|
3730
3854
|
if (tmp) {
|
|
3731
|
-
var dispatcher = delegate.
|
|
3855
|
+
var dispatcher = delegate.gj_1;
|
|
3732
3856
|
var context = delegate.v6();
|
|
3733
3857
|
if (safeIsDispatchNeeded(dispatcher, context)) {
|
|
3734
3858
|
safeDispatch(dispatcher, context, _this__u8e3s4);
|
|
@@ -3740,82 +3864,82 @@
|
|
|
3740
3864
|
}
|
|
3741
3865
|
}
|
|
3742
3866
|
function resumeUnconfined(_this__u8e3s4) {
|
|
3743
|
-
var eventLoop = ThreadLocalEventLoop_getInstance().
|
|
3744
|
-
if (eventLoop.
|
|
3745
|
-
eventLoop.
|
|
3867
|
+
var eventLoop = ThreadLocalEventLoop_getInstance().sm();
|
|
3868
|
+
if (eventLoop.mm()) {
|
|
3869
|
+
eventLoop.lm(_this__u8e3s4);
|
|
3746
3870
|
} else {
|
|
3747
3871
|
// Inline function 'kotlinx.coroutines.runUnconfinedEventLoop' call
|
|
3748
|
-
eventLoop.
|
|
3872
|
+
eventLoop.om(true);
|
|
3749
3873
|
try {
|
|
3750
|
-
resume(_this__u8e3s4, _this__u8e3s4.
|
|
3751
|
-
$l$loop: while (eventLoop.
|
|
3874
|
+
resume(_this__u8e3s4, _this__u8e3s4.fk(), true);
|
|
3875
|
+
$l$loop: while (eventLoop.km()) {
|
|
3752
3876
|
}
|
|
3753
3877
|
} catch ($p) {
|
|
3754
3878
|
if ($p instanceof Error) {
|
|
3755
3879
|
var e = $p;
|
|
3756
|
-
_this__u8e3s4.
|
|
3880
|
+
_this__u8e3s4.dl(e);
|
|
3757
3881
|
} else {
|
|
3758
3882
|
throw $p;
|
|
3759
3883
|
}
|
|
3760
3884
|
}
|
|
3761
3885
|
finally {
|
|
3762
|
-
eventLoop.
|
|
3886
|
+
eventLoop.pm(true);
|
|
3763
3887
|
}
|
|
3764
3888
|
}
|
|
3765
3889
|
}
|
|
3766
3890
|
function resume(_this__u8e3s4, delegate, undispatched) {
|
|
3767
|
-
var state = _this__u8e3s4.
|
|
3768
|
-
var exception = _this__u8e3s4.
|
|
3891
|
+
var state = _this__u8e3s4.ik();
|
|
3892
|
+
var exception = _this__u8e3s4.al(state);
|
|
3769
3893
|
var tmp;
|
|
3770
3894
|
if (!(exception == null)) {
|
|
3771
3895
|
// Inline function 'kotlin.Companion.failure' call
|
|
3772
3896
|
tmp = _Result___init__impl__xyqfz8(createFailure(exception));
|
|
3773
3897
|
} else {
|
|
3774
3898
|
// Inline function 'kotlin.Companion.success' call
|
|
3775
|
-
var value = _this__u8e3s4.
|
|
3899
|
+
var value = _this__u8e3s4.rk(state);
|
|
3776
3900
|
tmp = _Result___init__impl__xyqfz8(value);
|
|
3777
3901
|
}
|
|
3778
3902
|
var result = tmp;
|
|
3779
3903
|
if (undispatched) {
|
|
3780
3904
|
// Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeUndispatchedWith' call
|
|
3781
3905
|
var this_0 = delegate instanceof DispatchedContinuation ? delegate : THROW_CCE();
|
|
3782
|
-
this_0.
|
|
3906
|
+
this_0.hj_1;
|
|
3783
3907
|
// Inline function 'kotlinx.coroutines.withContinuationContext' call
|
|
3784
|
-
this_0.
|
|
3785
|
-
this_0.
|
|
3908
|
+
this_0.jj_1;
|
|
3909
|
+
this_0.hj_1.a7(result);
|
|
3786
3910
|
} else {
|
|
3787
3911
|
delegate.a7(result);
|
|
3788
3912
|
}
|
|
3789
3913
|
}
|
|
3790
3914
|
function ScopeCoroutine(context, uCont) {
|
|
3791
3915
|
AbstractCoroutine.call(this, context, true, true);
|
|
3792
|
-
this.
|
|
3916
|
+
this.di_1 = uCont;
|
|
3793
3917
|
}
|
|
3794
3918
|
protoOf(ScopeCoroutine).oh = function () {
|
|
3795
3919
|
return true;
|
|
3796
3920
|
};
|
|
3797
3921
|
protoOf(ScopeCoroutine).ig = function (state) {
|
|
3798
|
-
resumeCancellableWithInternal(intercepted(this.
|
|
3922
|
+
resumeCancellableWithInternal(intercepted(this.di_1), recoverResult(state, this.di_1));
|
|
3799
3923
|
};
|
|
3800
|
-
protoOf(ScopeCoroutine).
|
|
3924
|
+
protoOf(ScopeCoroutine).ei = function () {
|
|
3801
3925
|
};
|
|
3802
3926
|
protoOf(ScopeCoroutine).hg = function (state) {
|
|
3803
|
-
this.
|
|
3927
|
+
this.di_1.a7(recoverResult(state, this.di_1));
|
|
3804
3928
|
};
|
|
3805
3929
|
function ContextScope(context) {
|
|
3806
|
-
this.
|
|
3930
|
+
this.ar_1 = context;
|
|
3807
3931
|
}
|
|
3808
3932
|
protoOf(ContextScope).xf = function () {
|
|
3809
|
-
return this.
|
|
3933
|
+
return this.ar_1;
|
|
3810
3934
|
};
|
|
3811
3935
|
protoOf(ContextScope).toString = function () {
|
|
3812
|
-
return 'CoroutineScope(coroutineContext=' + toString(this.
|
|
3936
|
+
return 'CoroutineScope(coroutineContext=' + toString(this.ar_1) + ')';
|
|
3813
3937
|
};
|
|
3814
3938
|
function Symbol(symbol) {
|
|
3815
|
-
this.
|
|
3939
|
+
this.br_1 = symbol;
|
|
3816
3940
|
}
|
|
3817
3941
|
protoOf(Symbol).toString = function () {
|
|
3818
|
-
return '<' + this.
|
|
3942
|
+
return '<' + this.br_1 + '>';
|
|
3819
3943
|
};
|
|
3820
3944
|
function systemProp(propertyName, defaultValue, minValue, maxValue) {
|
|
3821
3945
|
minValue = minValue === VOID ? 1 : minValue;
|
|
@@ -3887,7 +4011,7 @@
|
|
|
3887
4011
|
function dispatcherFailure(completion, e) {
|
|
3888
4012
|
var tmp;
|
|
3889
4013
|
if (e instanceof DispatchException) {
|
|
3890
|
-
tmp = e.
|
|
4014
|
+
tmp = e.bm_1;
|
|
3891
4015
|
} else {
|
|
3892
4016
|
tmp = e;
|
|
3893
4017
|
}
|
|
@@ -3897,12 +4021,12 @@
|
|
|
3897
4021
|
completion.a7(tmp$ret$0);
|
|
3898
4022
|
throw reportException;
|
|
3899
4023
|
}
|
|
3900
|
-
function startUndispatchedOrReturnIgnoreTimeout(_this__u8e3s4, receiver, block) {
|
|
3901
|
-
return startUndispatched(_this__u8e3s4, false, receiver, block);
|
|
3902
|
-
}
|
|
3903
4024
|
function startUndispatchedOrReturn(_this__u8e3s4, receiver, block) {
|
|
3904
4025
|
return startUndispatched(_this__u8e3s4, true, receiver, block);
|
|
3905
4026
|
}
|
|
4027
|
+
function startUndispatchedOrReturnIgnoreTimeout(_this__u8e3s4, receiver, block) {
|
|
4028
|
+
return startUndispatched(_this__u8e3s4, false, receiver, block);
|
|
4029
|
+
}
|
|
3906
4030
|
function startUndispatched(_this__u8e3s4, alwaysRethrow, receiver, block) {
|
|
3907
4031
|
var tmp;
|
|
3908
4032
|
try {
|
|
@@ -3929,15 +4053,15 @@
|
|
|
3929
4053
|
var state = _this__u8e3s4.gg(result);
|
|
3930
4054
|
if (state === get_COMPLETING_WAITING_CHILDREN())
|
|
3931
4055
|
return get_COROUTINE_SUSPENDED();
|
|
3932
|
-
_this__u8e3s4.
|
|
4056
|
+
_this__u8e3s4.ei();
|
|
3933
4057
|
var tmp_1;
|
|
3934
4058
|
if (state instanceof CompletedExceptionally) {
|
|
3935
4059
|
var tmp_2;
|
|
3936
4060
|
if (alwaysRethrow || notOwnTimeout(_this__u8e3s4, state.dg_1)) {
|
|
3937
|
-
throw recoverStackTrace(state.dg_1, _this__u8e3s4.
|
|
4061
|
+
throw recoverStackTrace(state.dg_1, _this__u8e3s4.di_1);
|
|
3938
4062
|
} else {
|
|
3939
4063
|
if (result instanceof CompletedExceptionally) {
|
|
3940
|
-
throw recoverStackTrace(result.dg_1, _this__u8e3s4.
|
|
4064
|
+
throw recoverStackTrace(result.dg_1, _this__u8e3s4.di_1);
|
|
3941
4065
|
} else {
|
|
3942
4066
|
tmp_2 = result;
|
|
3943
4067
|
}
|
|
@@ -3949,15 +4073,15 @@
|
|
|
3949
4073
|
return tmp_1;
|
|
3950
4074
|
}
|
|
3951
4075
|
function dispatchExceptionAndMakeCompleting(_this__u8e3s4, e) {
|
|
3952
|
-
_this__u8e3s4.lh(new CompletedExceptionally(e.
|
|
3953
|
-
throw recoverStackTrace(e.
|
|
4076
|
+
_this__u8e3s4.lh(new CompletedExceptionally(e.bm_1));
|
|
4077
|
+
throw recoverStackTrace(e.bm_1, _this__u8e3s4.di_1);
|
|
3954
4078
|
}
|
|
3955
4079
|
function notOwnTimeout(_this__u8e3s4, cause) {
|
|
3956
4080
|
var tmp;
|
|
3957
4081
|
if (!(cause instanceof TimeoutCancellationException)) {
|
|
3958
4082
|
tmp = true;
|
|
3959
4083
|
} else {
|
|
3960
|
-
tmp = !(cause.
|
|
4084
|
+
tmp = !(cause.rp_1 === _this__u8e3s4);
|
|
3961
4085
|
}
|
|
3962
4086
|
return tmp;
|
|
3963
4087
|
}
|
|
@@ -3977,7 +4101,7 @@
|
|
|
3977
4101
|
var e = $p;
|
|
3978
4102
|
var tmp_1;
|
|
3979
4103
|
if (e instanceof DispatchException) {
|
|
3980
|
-
tmp_1 = e.
|
|
4104
|
+
tmp_1 = e.bm_1;
|
|
3981
4105
|
} else {
|
|
3982
4106
|
tmp_1 = e;
|
|
3983
4107
|
}
|
|
@@ -4031,27 +4155,27 @@
|
|
|
4031
4155
|
}
|
|
4032
4156
|
function SelectClause1Impl(clauseObject, regFunc, processResFunc, onCancellationConstructor) {
|
|
4033
4157
|
onCancellationConstructor = onCancellationConstructor === VOID ? null : onCancellationConstructor;
|
|
4034
|
-
this.
|
|
4035
|
-
this.
|
|
4036
|
-
this.
|
|
4037
|
-
this.
|
|
4158
|
+
this.gr_1 = clauseObject;
|
|
4159
|
+
this.hr_1 = regFunc;
|
|
4160
|
+
this.ir_1 = processResFunc;
|
|
4161
|
+
this.jr_1 = onCancellationConstructor;
|
|
4038
4162
|
}
|
|
4039
|
-
protoOf(SelectClause1Impl).
|
|
4040
|
-
return this.
|
|
4163
|
+
protoOf(SelectClause1Impl).cr = function () {
|
|
4164
|
+
return this.gr_1;
|
|
4041
4165
|
};
|
|
4042
|
-
protoOf(SelectClause1Impl).
|
|
4043
|
-
return this.
|
|
4166
|
+
protoOf(SelectClause1Impl).dr = function () {
|
|
4167
|
+
return this.hr_1;
|
|
4044
4168
|
};
|
|
4045
|
-
protoOf(SelectClause1Impl).
|
|
4046
|
-
return this.
|
|
4169
|
+
protoOf(SelectClause1Impl).er = function () {
|
|
4170
|
+
return this.ir_1;
|
|
4047
4171
|
};
|
|
4048
|
-
protoOf(SelectClause1Impl).
|
|
4049
|
-
return this.
|
|
4172
|
+
protoOf(SelectClause1Impl).fr = function () {
|
|
4173
|
+
return this.jr_1;
|
|
4050
4174
|
};
|
|
4051
4175
|
function $invokeBlockCOROUTINE$(_this__u8e3s4, argument, resultContinuation) {
|
|
4052
4176
|
CoroutineImpl.call(this, resultContinuation);
|
|
4053
|
-
this.
|
|
4054
|
-
this.
|
|
4177
|
+
this.sr_1 = _this__u8e3s4;
|
|
4178
|
+
this.tr_1 = argument;
|
|
4055
4179
|
}
|
|
4056
4180
|
protoOf($invokeBlockCOROUTINE$).x6 = function () {
|
|
4057
4181
|
var suspendResult = this.r6_1;
|
|
@@ -4061,8 +4185,8 @@
|
|
|
4061
4185
|
switch (tmp) {
|
|
4062
4186
|
case 0:
|
|
4063
4187
|
this.q6_1 = 4;
|
|
4064
|
-
var block = this.
|
|
4065
|
-
if (this.
|
|
4188
|
+
var block = this.sr_1.zr_1;
|
|
4189
|
+
if (this.sr_1.yr_1 === get_PARAM_CLAUSE_0()) {
|
|
4066
4190
|
if (!isSuspendFunction(block, 0))
|
|
4067
4191
|
THROW_CCE();
|
|
4068
4192
|
this.p6_1 = 2;
|
|
@@ -4075,7 +4199,7 @@
|
|
|
4075
4199
|
if (!isSuspendFunction(block, 1))
|
|
4076
4200
|
THROW_CCE();
|
|
4077
4201
|
this.p6_1 = 1;
|
|
4078
|
-
suspendResult = block(this.
|
|
4202
|
+
suspendResult = block(this.tr_1, this);
|
|
4079
4203
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4080
4204
|
return suspendResult;
|
|
4081
4205
|
}
|
|
@@ -4083,15 +4207,15 @@
|
|
|
4083
4207
|
}
|
|
4084
4208
|
|
|
4085
4209
|
case 1:
|
|
4086
|
-
this.
|
|
4210
|
+
this.ur_1 = suspendResult;
|
|
4087
4211
|
this.p6_1 = 3;
|
|
4088
4212
|
continue $sm;
|
|
4089
4213
|
case 2:
|
|
4090
|
-
this.
|
|
4214
|
+
this.ur_1 = suspendResult;
|
|
4091
4215
|
this.p6_1 = 3;
|
|
4092
4216
|
continue $sm;
|
|
4093
4217
|
case 3:
|
|
4094
|
-
return this.
|
|
4218
|
+
return this.ur_1;
|
|
4095
4219
|
case 4:
|
|
4096
4220
|
throw this.s6_1;
|
|
4097
4221
|
}
|
|
@@ -4107,7 +4231,7 @@
|
|
|
4107
4231
|
while (true);
|
|
4108
4232
|
};
|
|
4109
4233
|
function _get_isSelected__uy0hmu($this) {
|
|
4110
|
-
var tmp = $this.
|
|
4234
|
+
var tmp = $this.fs_1.kotlinx$atomicfu$value;
|
|
4111
4235
|
return tmp instanceof ClauseData;
|
|
4112
4236
|
}
|
|
4113
4237
|
function doSelectSuspend($this, $completion) {
|
|
@@ -4117,7 +4241,7 @@
|
|
|
4117
4241
|
return tmp.x6();
|
|
4118
4242
|
}
|
|
4119
4243
|
function checkClauseObject($this, clauseObject) {
|
|
4120
|
-
var clauses = ensureNotNull($this.
|
|
4244
|
+
var clauses = ensureNotNull($this.gs_1);
|
|
4121
4245
|
var tmp$ret$0;
|
|
4122
4246
|
$l$block_0: {
|
|
4123
4247
|
// Inline function 'kotlin.collections.none' call
|
|
@@ -4134,7 +4258,7 @@
|
|
|
4134
4258
|
var _iterator__ex2g4s = clauses.h();
|
|
4135
4259
|
while (_iterator__ex2g4s.i()) {
|
|
4136
4260
|
var element = _iterator__ex2g4s.j();
|
|
4137
|
-
if (element.
|
|
4261
|
+
if (element.vr_1 === clauseObject) {
|
|
4138
4262
|
tmp$ret$0 = false;
|
|
4139
4263
|
break $l$block_0;
|
|
4140
4264
|
}
|
|
@@ -4149,20 +4273,20 @@
|
|
|
4149
4273
|
}
|
|
4150
4274
|
function waitUntilSelected($this, $completion) {
|
|
4151
4275
|
var cancellable = new CancellableContinuationImpl(intercepted($completion), 1);
|
|
4152
|
-
cancellable.
|
|
4276
|
+
cancellable.gk();
|
|
4153
4277
|
$l$block_0: {
|
|
4154
4278
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
4155
|
-
var this_0 = $this.
|
|
4279
|
+
var this_0 = $this.fs_1;
|
|
4156
4280
|
while (true) {
|
|
4157
4281
|
var curState = this_0.kotlinx$atomicfu$value;
|
|
4158
4282
|
if (curState === get_STATE_REG()) {
|
|
4159
|
-
if ($this.
|
|
4283
|
+
if ($this.fs_1.atomicfu$compareAndSet(curState, cancellable)) {
|
|
4160
4284
|
invokeOnCancellation(cancellable, $this);
|
|
4161
4285
|
break $l$block_0;
|
|
4162
4286
|
}
|
|
4163
4287
|
} else {
|
|
4164
4288
|
if (isInterface(curState, KtList)) {
|
|
4165
|
-
if ($this.
|
|
4289
|
+
if ($this.fs_1.atomicfu$compareAndSet(curState, get_STATE_REG())) {
|
|
4166
4290
|
if (!isInterface(curState, KtList))
|
|
4167
4291
|
THROW_CCE();
|
|
4168
4292
|
// Inline function 'kotlin.collections.forEach' call
|
|
@@ -4174,7 +4298,7 @@
|
|
|
4174
4298
|
}
|
|
4175
4299
|
} else {
|
|
4176
4300
|
if (curState instanceof ClauseData) {
|
|
4177
|
-
cancellable.
|
|
4301
|
+
cancellable.xi(Unit_instance, curState.ts($this, $this.js_1));
|
|
4178
4302
|
break $l$block_0;
|
|
4179
4303
|
} else {
|
|
4180
4304
|
// Inline function 'kotlin.error' call
|
|
@@ -4185,17 +4309,17 @@
|
|
|
4185
4309
|
}
|
|
4186
4310
|
}
|
|
4187
4311
|
}
|
|
4188
|
-
return cancellable.
|
|
4312
|
+
return cancellable.yh();
|
|
4189
4313
|
}
|
|
4190
4314
|
function reregisterClause($this, clauseObject) {
|
|
4191
4315
|
var clause = ensureNotNull(findClause($this, clauseObject));
|
|
4192
|
-
clause.
|
|
4193
|
-
clause.
|
|
4194
|
-
$this.
|
|
4316
|
+
clause.bs_1 = null;
|
|
4317
|
+
clause.cs_1 = -1;
|
|
4318
|
+
$this.us(clause, true);
|
|
4195
4319
|
}
|
|
4196
4320
|
function trySelectInternal($this, clauseObject, internalResult) {
|
|
4197
4321
|
$l$loop: while (true) {
|
|
4198
|
-
var curState = $this.
|
|
4322
|
+
var curState = $this.fs_1.kotlinx$atomicfu$value;
|
|
4199
4323
|
if (isInterface(curState, CancellableContinuation)) {
|
|
4200
4324
|
var tmp0_elvis_lhs = findClause($this, clauseObject);
|
|
4201
4325
|
var tmp;
|
|
@@ -4205,13 +4329,13 @@
|
|
|
4205
4329
|
tmp = tmp0_elvis_lhs;
|
|
4206
4330
|
}
|
|
4207
4331
|
var clause = tmp;
|
|
4208
|
-
var onCancellation = clause.
|
|
4209
|
-
if ($this.
|
|
4332
|
+
var onCancellation = clause.ts($this, internalResult);
|
|
4333
|
+
if ($this.fs_1.atomicfu$compareAndSet(curState, clause)) {
|
|
4210
4334
|
var cont = isInterface(curState, CancellableContinuation) ? curState : THROW_CCE();
|
|
4211
|
-
$this.
|
|
4212
|
-
if (
|
|
4335
|
+
$this.js_1 = internalResult;
|
|
4336
|
+
if (tryResume_1(cont, onCancellation))
|
|
4213
4337
|
return 0;
|
|
4214
|
-
$this.
|
|
4338
|
+
$this.js_1 = get_NO_RESULT();
|
|
4215
4339
|
return 2;
|
|
4216
4340
|
}
|
|
4217
4341
|
} else {
|
|
@@ -4228,11 +4352,11 @@
|
|
|
4228
4352
|
return 2;
|
|
4229
4353
|
else {
|
|
4230
4354
|
if (equals(curState, get_STATE_REG())) {
|
|
4231
|
-
if ($this.
|
|
4355
|
+
if ($this.fs_1.atomicfu$compareAndSet(curState, listOf(clauseObject)))
|
|
4232
4356
|
return 1;
|
|
4233
4357
|
} else {
|
|
4234
4358
|
if (isInterface(curState, KtList)) {
|
|
4235
|
-
if ($this.
|
|
4359
|
+
if ($this.fs_1.atomicfu$compareAndSet(curState, plus_0(curState, clauseObject)))
|
|
4236
4360
|
return 1;
|
|
4237
4361
|
} else {
|
|
4238
4362
|
// Inline function 'kotlin.error' call
|
|
@@ -4246,7 +4370,7 @@
|
|
|
4246
4370
|
}
|
|
4247
4371
|
}
|
|
4248
4372
|
function findClause($this, clauseObject) {
|
|
4249
|
-
var tmp0_elvis_lhs = $this.
|
|
4373
|
+
var tmp0_elvis_lhs = $this.gs_1;
|
|
4250
4374
|
var tmp;
|
|
4251
4375
|
if (tmp0_elvis_lhs == null) {
|
|
4252
4376
|
return null;
|
|
@@ -4261,7 +4385,7 @@
|
|
|
4261
4385
|
var _iterator__ex2g4s = clauses.h();
|
|
4262
4386
|
while (_iterator__ex2g4s.i()) {
|
|
4263
4387
|
var element = _iterator__ex2g4s.j();
|
|
4264
|
-
if (element.
|
|
4388
|
+
if (element.vr_1 === clauseObject) {
|
|
4265
4389
|
tmp$ret$1 = element;
|
|
4266
4390
|
break $l$block;
|
|
4267
4391
|
}
|
|
@@ -4293,7 +4417,7 @@
|
|
|
4293
4417
|
}
|
|
4294
4418
|
function cleanup($this, selectedClause) {
|
|
4295
4419
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
4296
|
-
var tmp0_elvis_lhs = $this.
|
|
4420
|
+
var tmp0_elvis_lhs = $this.gs_1;
|
|
4297
4421
|
var tmp;
|
|
4298
4422
|
if (tmp0_elvis_lhs == null) {
|
|
4299
4423
|
return Unit_instance;
|
|
@@ -4306,45 +4430,45 @@
|
|
|
4306
4430
|
while (_iterator__ex2g4s.i()) {
|
|
4307
4431
|
var element = _iterator__ex2g4s.j();
|
|
4308
4432
|
if (!(element === selectedClause)) {
|
|
4309
|
-
element.
|
|
4433
|
+
element.hk();
|
|
4310
4434
|
}
|
|
4311
4435
|
}
|
|
4312
|
-
$this.
|
|
4313
|
-
$this.
|
|
4314
|
-
$this.
|
|
4436
|
+
$this.fs_1.kotlinx$atomicfu$value = get_STATE_COMPLETED();
|
|
4437
|
+
$this.js_1 = get_NO_RESULT();
|
|
4438
|
+
$this.gs_1 = null;
|
|
4315
4439
|
}
|
|
4316
4440
|
function ClauseData($outer, clauseObject, regFunc, processResFunc, param, block, onCancellationConstructor) {
|
|
4317
|
-
this.
|
|
4318
|
-
this.
|
|
4319
|
-
this.
|
|
4320
|
-
this.
|
|
4321
|
-
this.
|
|
4322
|
-
this.
|
|
4323
|
-
this.
|
|
4324
|
-
this.
|
|
4325
|
-
this.
|
|
4326
|
-
}
|
|
4327
|
-
protoOf(ClauseData).
|
|
4441
|
+
this.ds_1 = $outer;
|
|
4442
|
+
this.vr_1 = clauseObject;
|
|
4443
|
+
this.wr_1 = regFunc;
|
|
4444
|
+
this.xr_1 = processResFunc;
|
|
4445
|
+
this.yr_1 = param;
|
|
4446
|
+
this.zr_1 = block;
|
|
4447
|
+
this.as_1 = onCancellationConstructor;
|
|
4448
|
+
this.bs_1 = null;
|
|
4449
|
+
this.cs_1 = -1;
|
|
4450
|
+
}
|
|
4451
|
+
protoOf(ClauseData).rt = function (select) {
|
|
4328
4452
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
4329
4453
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
4330
|
-
this.
|
|
4331
|
-
return select.
|
|
4454
|
+
this.wr_1(this.vr_1, select, this.yr_1);
|
|
4455
|
+
return select.js_1 === get_NO_RESULT();
|
|
4332
4456
|
};
|
|
4333
|
-
protoOf(ClauseData).
|
|
4334
|
-
return this.
|
|
4457
|
+
protoOf(ClauseData).st = function (result) {
|
|
4458
|
+
return this.xr_1(this.vr_1, this.yr_1, result);
|
|
4335
4459
|
};
|
|
4336
|
-
protoOf(ClauseData).
|
|
4460
|
+
protoOf(ClauseData).tt = function (argument, $completion) {
|
|
4337
4461
|
var tmp = new $invokeBlockCOROUTINE$(this, argument, $completion);
|
|
4338
4462
|
tmp.r6_1 = Unit_instance;
|
|
4339
4463
|
tmp.s6_1 = null;
|
|
4340
4464
|
return tmp.x6();
|
|
4341
4465
|
};
|
|
4342
|
-
protoOf(ClauseData).
|
|
4466
|
+
protoOf(ClauseData).hk = function () {
|
|
4343
4467
|
// Inline function 'kotlin.with' call
|
|
4344
|
-
var $this$with = this.
|
|
4468
|
+
var $this$with = this.bs_1;
|
|
4345
4469
|
var tmp;
|
|
4346
4470
|
if ($this$with instanceof Segment) {
|
|
4347
|
-
$this$with.
|
|
4471
|
+
$this$with.uj(this.cs_1, null, this.ds_1.v6());
|
|
4348
4472
|
tmp = Unit_instance;
|
|
4349
4473
|
} else {
|
|
4350
4474
|
var tmp0_safe_receiver = (!($this$with == null) ? isInterface($this$with, DisposableHandle) : false) ? $this$with : null;
|
|
@@ -4352,19 +4476,19 @@
|
|
|
4352
4476
|
if (tmp0_safe_receiver == null) {
|
|
4353
4477
|
tmp_0 = null;
|
|
4354
4478
|
} else {
|
|
4355
|
-
tmp0_safe_receiver.
|
|
4479
|
+
tmp0_safe_receiver.hk();
|
|
4356
4480
|
tmp_0 = Unit_instance;
|
|
4357
4481
|
}
|
|
4358
4482
|
tmp = tmp_0;
|
|
4359
4483
|
}
|
|
4360
4484
|
};
|
|
4361
|
-
protoOf(ClauseData).
|
|
4362
|
-
var tmp0_safe_receiver = this.
|
|
4363
|
-
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver(select, this.
|
|
4485
|
+
protoOf(ClauseData).ts = function (select, internalResult) {
|
|
4486
|
+
var tmp0_safe_receiver = this.as_1;
|
|
4487
|
+
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver(select, this.yr_1, internalResult);
|
|
4364
4488
|
};
|
|
4365
4489
|
function $doSelectCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
4366
4490
|
CoroutineImpl.call(this, resultContinuation);
|
|
4367
|
-
this.
|
|
4491
|
+
this.cu_1 = _this__u8e3s4;
|
|
4368
4492
|
}
|
|
4369
4493
|
protoOf($doSelectCOROUTINE$).x6 = function () {
|
|
4370
4494
|
var suspendResult = this.r6_1;
|
|
@@ -4374,16 +4498,16 @@
|
|
|
4374
4498
|
switch (tmp) {
|
|
4375
4499
|
case 0:
|
|
4376
4500
|
this.q6_1 = 4;
|
|
4377
|
-
if (_get_isSelected__uy0hmu(this.
|
|
4501
|
+
if (_get_isSelected__uy0hmu(this.cu_1)) {
|
|
4378
4502
|
this.p6_1 = 2;
|
|
4379
|
-
suspendResult = complete(this.
|
|
4503
|
+
suspendResult = complete(this.cu_1, this);
|
|
4380
4504
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4381
4505
|
return suspendResult;
|
|
4382
4506
|
}
|
|
4383
4507
|
continue $sm;
|
|
4384
4508
|
} else {
|
|
4385
4509
|
this.p6_1 = 1;
|
|
4386
|
-
suspendResult = doSelectSuspend(this.
|
|
4510
|
+
suspendResult = doSelectSuspend(this.cu_1, this);
|
|
4387
4511
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4388
4512
|
return suspendResult;
|
|
4389
4513
|
}
|
|
@@ -4391,15 +4515,15 @@
|
|
|
4391
4515
|
}
|
|
4392
4516
|
|
|
4393
4517
|
case 1:
|
|
4394
|
-
this.
|
|
4518
|
+
this.du_1 = suspendResult;
|
|
4395
4519
|
this.p6_1 = 3;
|
|
4396
4520
|
continue $sm;
|
|
4397
4521
|
case 2:
|
|
4398
|
-
this.
|
|
4522
|
+
this.du_1 = suspendResult;
|
|
4399
4523
|
this.p6_1 = 3;
|
|
4400
4524
|
continue $sm;
|
|
4401
4525
|
case 3:
|
|
4402
|
-
return this.
|
|
4526
|
+
return this.du_1;
|
|
4403
4527
|
case 4:
|
|
4404
4528
|
throw this.s6_1;
|
|
4405
4529
|
}
|
|
@@ -4416,7 +4540,7 @@
|
|
|
4416
4540
|
};
|
|
4417
4541
|
function $doSelectSuspendCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
4418
4542
|
CoroutineImpl.call(this, resultContinuation);
|
|
4419
|
-
this.
|
|
4543
|
+
this.ss_1 = _this__u8e3s4;
|
|
4420
4544
|
}
|
|
4421
4545
|
protoOf($doSelectSuspendCOROUTINE$).x6 = function () {
|
|
4422
4546
|
var suspendResult = this.r6_1;
|
|
@@ -4427,7 +4551,7 @@
|
|
|
4427
4551
|
case 0:
|
|
4428
4552
|
this.q6_1 = 3;
|
|
4429
4553
|
this.p6_1 = 1;
|
|
4430
|
-
suspendResult = waitUntilSelected(this.
|
|
4554
|
+
suspendResult = waitUntilSelected(this.ss_1, this);
|
|
4431
4555
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4432
4556
|
return suspendResult;
|
|
4433
4557
|
}
|
|
@@ -4435,7 +4559,7 @@
|
|
|
4435
4559
|
continue $sm;
|
|
4436
4560
|
case 1:
|
|
4437
4561
|
this.p6_1 = 2;
|
|
4438
|
-
suspendResult = complete(this.
|
|
4562
|
+
suspendResult = complete(this.ss_1, this);
|
|
4439
4563
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4440
4564
|
return suspendResult;
|
|
4441
4565
|
}
|
|
@@ -4459,7 +4583,7 @@
|
|
|
4459
4583
|
};
|
|
4460
4584
|
function $completeCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
4461
4585
|
CoroutineImpl.call(this, resultContinuation);
|
|
4462
|
-
this.
|
|
4586
|
+
this.dt_1 = _this__u8e3s4;
|
|
4463
4587
|
}
|
|
4464
4588
|
protoOf($completeCOROUTINE$).x6 = function () {
|
|
4465
4589
|
var suspendResult = this.r6_1;
|
|
@@ -4469,21 +4593,21 @@
|
|
|
4469
4593
|
switch (tmp) {
|
|
4470
4594
|
case 0:
|
|
4471
4595
|
this.q6_1 = 4;
|
|
4472
|
-
var tmp_0 = this.
|
|
4596
|
+
var tmp_0 = this.dt_1.fs_1.kotlinx$atomicfu$value;
|
|
4473
4597
|
var selectedClause = tmp_0 instanceof ClauseData ? tmp_0 : THROW_CCE();
|
|
4474
|
-
var internalResult = this.
|
|
4475
|
-
cleanup(this.
|
|
4598
|
+
var internalResult = this.dt_1.js_1;
|
|
4599
|
+
cleanup(this.dt_1, selectedClause);
|
|
4476
4600
|
if (!get_RECOVER_STACK_TRACES()) {
|
|
4477
|
-
var blockArgument = selectedClause.
|
|
4601
|
+
var blockArgument = selectedClause.st(internalResult);
|
|
4478
4602
|
this.p6_1 = 2;
|
|
4479
|
-
suspendResult = selectedClause.
|
|
4603
|
+
suspendResult = selectedClause.tt(blockArgument, this);
|
|
4480
4604
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4481
4605
|
return suspendResult;
|
|
4482
4606
|
}
|
|
4483
4607
|
continue $sm;
|
|
4484
4608
|
} else {
|
|
4485
4609
|
this.p6_1 = 1;
|
|
4486
|
-
suspendResult = processResultAndInvokeBlockRecoveringException(this.
|
|
4610
|
+
suspendResult = processResultAndInvokeBlockRecoveringException(this.dt_1, selectedClause, internalResult, this);
|
|
4487
4611
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4488
4612
|
return suspendResult;
|
|
4489
4613
|
}
|
|
@@ -4491,15 +4615,15 @@
|
|
|
4491
4615
|
}
|
|
4492
4616
|
|
|
4493
4617
|
case 1:
|
|
4494
|
-
this.
|
|
4618
|
+
this.et_1 = suspendResult;
|
|
4495
4619
|
this.p6_1 = 3;
|
|
4496
4620
|
continue $sm;
|
|
4497
4621
|
case 2:
|
|
4498
|
-
this.
|
|
4622
|
+
this.et_1 = suspendResult;
|
|
4499
4623
|
this.p6_1 = 3;
|
|
4500
4624
|
continue $sm;
|
|
4501
4625
|
case 3:
|
|
4502
|
-
return this.
|
|
4626
|
+
return this.et_1;
|
|
4503
4627
|
case 4:
|
|
4504
4628
|
throw this.s6_1;
|
|
4505
4629
|
}
|
|
@@ -4516,9 +4640,9 @@
|
|
|
4516
4640
|
};
|
|
4517
4641
|
function $processResultAndInvokeBlockRecoveringExceptionCOROUTINE$(_this__u8e3s4, clause, internalResult, resultContinuation) {
|
|
4518
4642
|
CoroutineImpl.call(this, resultContinuation);
|
|
4519
|
-
this.
|
|
4520
|
-
this.
|
|
4521
|
-
this.
|
|
4643
|
+
this.nt_1 = _this__u8e3s4;
|
|
4644
|
+
this.ot_1 = clause;
|
|
4645
|
+
this.pt_1 = internalResult;
|
|
4522
4646
|
}
|
|
4523
4647
|
protoOf($processResultAndInvokeBlockRecoveringExceptionCOROUTINE$).x6 = function () {
|
|
4524
4648
|
var suspendResult = this.r6_1;
|
|
@@ -4529,16 +4653,16 @@
|
|
|
4529
4653
|
case 0:
|
|
4530
4654
|
this.q6_1 = 3;
|
|
4531
4655
|
this.q6_1 = 2;
|
|
4532
|
-
var blockArgument = this.
|
|
4656
|
+
var blockArgument = this.ot_1.st(this.pt_1);
|
|
4533
4657
|
this.p6_1 = 1;
|
|
4534
|
-
suspendResult = this.
|
|
4658
|
+
suspendResult = this.ot_1.tt(blockArgument, this);
|
|
4535
4659
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4536
4660
|
return suspendResult;
|
|
4537
4661
|
}
|
|
4538
4662
|
|
|
4539
4663
|
continue $sm;
|
|
4540
4664
|
case 1:
|
|
4541
|
-
this.
|
|
4665
|
+
this.qt_1 = suspendResult;
|
|
4542
4666
|
this.q6_1 = 3;
|
|
4543
4667
|
this.p6_1 = 4;
|
|
4544
4668
|
continue $sm;
|
|
@@ -4557,7 +4681,7 @@
|
|
|
4557
4681
|
throw this.s6_1;
|
|
4558
4682
|
case 4:
|
|
4559
4683
|
this.q6_1 = 3;
|
|
4560
|
-
return this.
|
|
4684
|
+
return this.qt_1;
|
|
4561
4685
|
}
|
|
4562
4686
|
} catch ($p) {
|
|
4563
4687
|
var e_0 = $p;
|
|
@@ -4571,72 +4695,72 @@
|
|
|
4571
4695
|
while (true);
|
|
4572
4696
|
};
|
|
4573
4697
|
function SelectImplementation(context) {
|
|
4574
|
-
this.
|
|
4575
|
-
this.
|
|
4576
|
-
this.
|
|
4577
|
-
this.
|
|
4578
|
-
this.
|
|
4579
|
-
this.
|
|
4698
|
+
this.es_1 = context;
|
|
4699
|
+
this.fs_1 = atomic$ref$1(get_STATE_REG());
|
|
4700
|
+
this.gs_1 = ArrayList_init_$Create$(2);
|
|
4701
|
+
this.hs_1 = null;
|
|
4702
|
+
this.is_1 = -1;
|
|
4703
|
+
this.js_1 = get_NO_RESULT();
|
|
4580
4704
|
}
|
|
4581
4705
|
protoOf(SelectImplementation).v6 = function () {
|
|
4582
|
-
return this.
|
|
4706
|
+
return this.es_1;
|
|
4583
4707
|
};
|
|
4584
|
-
protoOf(SelectImplementation).
|
|
4708
|
+
protoOf(SelectImplementation).eu = function ($completion) {
|
|
4585
4709
|
var tmp = new $doSelectCOROUTINE$(this, $completion);
|
|
4586
4710
|
tmp.r6_1 = Unit_instance;
|
|
4587
4711
|
tmp.s6_1 = null;
|
|
4588
4712
|
return tmp.x6();
|
|
4589
4713
|
};
|
|
4590
|
-
protoOf(SelectImplementation).
|
|
4591
|
-
return this.
|
|
4714
|
+
protoOf(SelectImplementation).fu = function (_this__u8e3s4, block) {
|
|
4715
|
+
return this.gu(new ClauseData(this, _this__u8e3s4.cr(), _this__u8e3s4.dr(), _this__u8e3s4.er(), null, block, _this__u8e3s4.fr()));
|
|
4592
4716
|
};
|
|
4593
|
-
protoOf(SelectImplementation).
|
|
4717
|
+
protoOf(SelectImplementation).us = function (_this__u8e3s4, reregister) {
|
|
4594
4718
|
// Inline function 'kotlinx.coroutines.assert' call
|
|
4595
4719
|
// Inline function 'kotlin.let' call
|
|
4596
|
-
if (this.
|
|
4720
|
+
if (this.fs_1.kotlinx$atomicfu$value instanceof ClauseData)
|
|
4597
4721
|
return Unit_instance;
|
|
4598
4722
|
if (!reregister) {
|
|
4599
|
-
checkClauseObject(this, _this__u8e3s4.
|
|
4723
|
+
checkClauseObject(this, _this__u8e3s4.vr_1);
|
|
4600
4724
|
}
|
|
4601
|
-
if (_this__u8e3s4.
|
|
4725
|
+
if (_this__u8e3s4.rt(this)) {
|
|
4602
4726
|
if (!reregister) {
|
|
4603
4727
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
4604
|
-
ensureNotNull(this.
|
|
4728
|
+
ensureNotNull(this.gs_1).g(_this__u8e3s4);
|
|
4605
4729
|
}
|
|
4606
|
-
_this__u8e3s4.
|
|
4607
|
-
_this__u8e3s4.
|
|
4608
|
-
this.
|
|
4609
|
-
this.
|
|
4730
|
+
_this__u8e3s4.bs_1 = this.hs_1;
|
|
4731
|
+
_this__u8e3s4.cs_1 = this.is_1;
|
|
4732
|
+
this.hs_1 = null;
|
|
4733
|
+
this.is_1 = -1;
|
|
4610
4734
|
} else {
|
|
4611
|
-
this.
|
|
4735
|
+
this.fs_1.kotlinx$atomicfu$value = _this__u8e3s4;
|
|
4612
4736
|
}
|
|
4613
4737
|
};
|
|
4614
|
-
protoOf(SelectImplementation).
|
|
4738
|
+
protoOf(SelectImplementation).gu = function (_this__u8e3s4, reregister, $super) {
|
|
4615
4739
|
reregister = reregister === VOID ? false : reregister;
|
|
4616
4740
|
var tmp;
|
|
4617
4741
|
if ($super === VOID) {
|
|
4618
|
-
this.
|
|
4742
|
+
this.us(_this__u8e3s4, reregister);
|
|
4619
4743
|
tmp = Unit_instance;
|
|
4620
4744
|
} else {
|
|
4621
|
-
tmp = $super.
|
|
4745
|
+
tmp = $super.us.call(this, _this__u8e3s4, reregister);
|
|
4622
4746
|
}
|
|
4623
4747
|
return tmp;
|
|
4624
4748
|
};
|
|
4625
|
-
protoOf(SelectImplementation).
|
|
4626
|
-
this.
|
|
4749
|
+
protoOf(SelectImplementation).ho = function (disposableHandle) {
|
|
4750
|
+
this.hs_1 = disposableHandle;
|
|
4627
4751
|
};
|
|
4628
|
-
protoOf(SelectImplementation).
|
|
4629
|
-
this.
|
|
4630
|
-
this.
|
|
4752
|
+
protoOf(SelectImplementation).vk = function (segment, index) {
|
|
4753
|
+
this.hs_1 = segment;
|
|
4754
|
+
this.is_1 = index;
|
|
4631
4755
|
};
|
|
4632
|
-
protoOf(SelectImplementation).
|
|
4633
|
-
this.
|
|
4756
|
+
protoOf(SelectImplementation).go = function (internalResult) {
|
|
4757
|
+
this.js_1 = internalResult;
|
|
4634
4758
|
};
|
|
4635
|
-
protoOf(SelectImplementation).
|
|
4759
|
+
protoOf(SelectImplementation).oo = function (clauseObject, result) {
|
|
4636
4760
|
return trySelectInternal(this, clauseObject, result) === 0;
|
|
4637
4761
|
};
|
|
4638
|
-
protoOf(SelectImplementation).
|
|
4639
|
-
var tmp0 = this.
|
|
4762
|
+
protoOf(SelectImplementation).nk = function (cause) {
|
|
4763
|
+
var tmp0 = this.fs_1;
|
|
4640
4764
|
$l$block: {
|
|
4641
4765
|
// Inline function 'kotlinx.atomicfu.update' call
|
|
4642
4766
|
while (true) {
|
|
@@ -4649,7 +4773,7 @@
|
|
|
4649
4773
|
}
|
|
4650
4774
|
}
|
|
4651
4775
|
}
|
|
4652
|
-
var tmp0_elvis_lhs = this.
|
|
4776
|
+
var tmp0_elvis_lhs = this.gs_1;
|
|
4653
4777
|
var tmp;
|
|
4654
4778
|
if (tmp0_elvis_lhs == null) {
|
|
4655
4779
|
return Unit_instance;
|
|
@@ -4661,14 +4785,14 @@
|
|
|
4661
4785
|
var _iterator__ex2g4s = clauses.h();
|
|
4662
4786
|
while (_iterator__ex2g4s.i()) {
|
|
4663
4787
|
var element = _iterator__ex2g4s.j();
|
|
4664
|
-
element.
|
|
4788
|
+
element.hk();
|
|
4665
4789
|
}
|
|
4666
|
-
this.
|
|
4667
|
-
this.
|
|
4790
|
+
this.js_1 = get_NO_RESULT();
|
|
4791
|
+
this.gs_1 = null;
|
|
4668
4792
|
};
|
|
4669
|
-
function
|
|
4793
|
+
function tryResume_1(_this__u8e3s4, onCancellation) {
|
|
4670
4794
|
_init_properties_Select_kt__zhm2jg();
|
|
4671
|
-
var tmp0_elvis_lhs = _this__u8e3s4.
|
|
4795
|
+
var tmp0_elvis_lhs = _this__u8e3s4.ui(Unit_instance, null, onCancellation);
|
|
4672
4796
|
var tmp;
|
|
4673
4797
|
if (tmp0_elvis_lhs == null) {
|
|
4674
4798
|
return false;
|
|
@@ -4676,7 +4800,7 @@
|
|
|
4676
4800
|
tmp = tmp0_elvis_lhs;
|
|
4677
4801
|
}
|
|
4678
4802
|
var token = tmp;
|
|
4679
|
-
_this__u8e3s4.
|
|
4803
|
+
_this__u8e3s4.vi(token);
|
|
4680
4804
|
return true;
|
|
4681
4805
|
}
|
|
4682
4806
|
function DUMMY_PROCESS_RESULT_FUNCTION$lambda(_unused_var__etf5q3, _unused_var__etf5q3_0, _unused_var__etf5q3_1) {
|
|
@@ -4745,36 +4869,36 @@
|
|
|
4745
4869
|
} catch ($p) {
|
|
4746
4870
|
if ($p instanceof Error) {
|
|
4747
4871
|
var e = $p;
|
|
4748
|
-
cancellable.
|
|
4872
|
+
cancellable.qk();
|
|
4749
4873
|
throw e;
|
|
4750
4874
|
} else {
|
|
4751
4875
|
throw $p;
|
|
4752
4876
|
}
|
|
4753
4877
|
}
|
|
4754
|
-
return cancellable.
|
|
4878
|
+
return cancellable.yh();
|
|
4755
4879
|
}
|
|
4756
4880
|
function decPermits($this) {
|
|
4757
4881
|
$l$loop: while (true) {
|
|
4758
|
-
var p = $this.
|
|
4759
|
-
if (p > $this.
|
|
4882
|
+
var p = $this.mu_1.atomicfu$getAndDecrement();
|
|
4883
|
+
if (p > $this.hu_1)
|
|
4760
4884
|
continue $l$loop;
|
|
4761
4885
|
return p;
|
|
4762
4886
|
}
|
|
4763
4887
|
}
|
|
4764
4888
|
function coerceAvailablePermitsAtMaximum($this) {
|
|
4765
4889
|
$l$loop_0: while (true) {
|
|
4766
|
-
var cur = $this.
|
|
4767
|
-
if (cur <= $this.
|
|
4890
|
+
var cur = $this.mu_1.kotlinx$atomicfu$value;
|
|
4891
|
+
if (cur <= $this.hu_1)
|
|
4768
4892
|
break $l$loop_0;
|
|
4769
|
-
if ($this.
|
|
4893
|
+
if ($this.mu_1.atomicfu$compareAndSet(cur, $this.hu_1))
|
|
4770
4894
|
break $l$loop_0;
|
|
4771
4895
|
}
|
|
4772
4896
|
}
|
|
4773
4897
|
function addAcquireToQueue($this, waiter) {
|
|
4774
|
-
var curTail = $this.
|
|
4775
|
-
var enqIdx = $this.
|
|
4898
|
+
var curTail = $this.ku_1.kotlinx$atomicfu$value;
|
|
4899
|
+
var enqIdx = $this.lu_1.atomicfu$getAndIncrement$long();
|
|
4776
4900
|
var createNewSegment = createSegment$ref();
|
|
4777
|
-
var tmp0 = $this.
|
|
4901
|
+
var tmp0 = $this.ku_1;
|
|
4778
4902
|
// Inline function 'kotlin.Long.div' call
|
|
4779
4903
|
var other = get_SEGMENT_SIZE();
|
|
4780
4904
|
var tmp2 = divide(enqIdx, fromInt(other));
|
|
@@ -4795,22 +4919,22 @@
|
|
|
4795
4919
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
4796
4920
|
while (true) {
|
|
4797
4921
|
var cur = tmp0.kotlinx$atomicfu$value;
|
|
4798
|
-
if (compare(cur.
|
|
4922
|
+
if (compare(cur.sj_1, tmp2_0.sj_1) >= 0) {
|
|
4799
4923
|
tmp$ret$2 = true;
|
|
4800
4924
|
break $l$block_1;
|
|
4801
4925
|
}
|
|
4802
|
-
if (!tmp2_0.
|
|
4926
|
+
if (!tmp2_0.sq()) {
|
|
4803
4927
|
tmp$ret$2 = false;
|
|
4804
4928
|
break $l$block_1;
|
|
4805
4929
|
}
|
|
4806
4930
|
if (tmp0.atomicfu$compareAndSet(cur, tmp2_0)) {
|
|
4807
|
-
if (cur.
|
|
4931
|
+
if (cur.tq()) {
|
|
4808
4932
|
cur.h2();
|
|
4809
4933
|
}
|
|
4810
4934
|
tmp$ret$2 = true;
|
|
4811
4935
|
break $l$block_1;
|
|
4812
4936
|
}
|
|
4813
|
-
if (tmp2_0.
|
|
4937
|
+
if (tmp2_0.tq()) {
|
|
4814
4938
|
tmp2_0.h2();
|
|
4815
4939
|
}
|
|
4816
4940
|
}
|
|
@@ -4830,21 +4954,21 @@
|
|
|
4830
4954
|
var tmp$ret$5 = modulo(enqIdx, fromInt(other_0));
|
|
4831
4955
|
var i = convertToInt(tmp$ret$5);
|
|
4832
4956
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.cas' call
|
|
4833
|
-
if (segment.
|
|
4834
|
-
waiter.
|
|
4957
|
+
if (segment.uu_1.atomicfu$get(i).atomicfu$compareAndSet(null, waiter)) {
|
|
4958
|
+
waiter.vk(segment, i);
|
|
4835
4959
|
return true;
|
|
4836
4960
|
}
|
|
4837
4961
|
var tmp4 = get_PERMIT();
|
|
4838
4962
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.cas' call
|
|
4839
4963
|
var value = get_TAKEN();
|
|
4840
|
-
if (segment.
|
|
4964
|
+
if (segment.uu_1.atomicfu$get(i).atomicfu$compareAndSet(tmp4, value)) {
|
|
4841
4965
|
if (isInterface(waiter, CancellableContinuation)) {
|
|
4842
4966
|
if (!isInterface(waiter, CancellableContinuation))
|
|
4843
4967
|
THROW_CCE();
|
|
4844
|
-
waiter.
|
|
4968
|
+
waiter.xi(Unit_instance, $this.nu_1);
|
|
4845
4969
|
} else {
|
|
4846
4970
|
if (isInterface(waiter, SelectInstance)) {
|
|
4847
|
-
waiter.
|
|
4971
|
+
waiter.go(Unit_instance);
|
|
4848
4972
|
} else {
|
|
4849
4973
|
// Inline function 'kotlin.error' call
|
|
4850
4974
|
var message = 'unexpected: ' + toString(waiter);
|
|
@@ -4857,13 +4981,13 @@
|
|
|
4857
4981
|
return false;
|
|
4858
4982
|
}
|
|
4859
4983
|
function tryResumeNextFromQueue($this) {
|
|
4860
|
-
var curHead = $this.
|
|
4861
|
-
var deqIdx = $this.
|
|
4984
|
+
var curHead = $this.iu_1.kotlinx$atomicfu$value;
|
|
4985
|
+
var deqIdx = $this.ju_1.atomicfu$getAndIncrement$long();
|
|
4862
4986
|
// Inline function 'kotlin.Long.div' call
|
|
4863
4987
|
var other = get_SEGMENT_SIZE();
|
|
4864
4988
|
var id = divide(deqIdx, fromInt(other));
|
|
4865
4989
|
var createNewSegment = createSegment$ref();
|
|
4866
|
-
var tmp0 = $this.
|
|
4990
|
+
var tmp0 = $this.iu_1;
|
|
4867
4991
|
var tmp$ret$1;
|
|
4868
4992
|
$l$block_2: {
|
|
4869
4993
|
// Inline function 'kotlinx.coroutines.internal.findSegmentAndMoveForward' call
|
|
@@ -4881,22 +5005,22 @@
|
|
|
4881
5005
|
// Inline function 'kotlinx.atomicfu.loop' call
|
|
4882
5006
|
while (true) {
|
|
4883
5007
|
var cur = tmp0.kotlinx$atomicfu$value;
|
|
4884
|
-
if (compare(cur.
|
|
5008
|
+
if (compare(cur.sj_1, tmp2.sj_1) >= 0) {
|
|
4885
5009
|
tmp$ret$2 = true;
|
|
4886
5010
|
break $l$block_1;
|
|
4887
5011
|
}
|
|
4888
|
-
if (!tmp2.
|
|
5012
|
+
if (!tmp2.sq()) {
|
|
4889
5013
|
tmp$ret$2 = false;
|
|
4890
5014
|
break $l$block_1;
|
|
4891
5015
|
}
|
|
4892
5016
|
if (tmp0.atomicfu$compareAndSet(cur, tmp2)) {
|
|
4893
|
-
if (cur.
|
|
5017
|
+
if (cur.tq()) {
|
|
4894
5018
|
cur.h2();
|
|
4895
5019
|
}
|
|
4896
5020
|
tmp$ret$2 = true;
|
|
4897
5021
|
break $l$block_1;
|
|
4898
5022
|
}
|
|
4899
|
-
if (tmp2.
|
|
5023
|
+
if (tmp2.tq()) {
|
|
4900
5024
|
tmp2.h2();
|
|
4901
5025
|
}
|
|
4902
5026
|
}
|
|
@@ -4911,8 +5035,8 @@
|
|
|
4911
5035
|
}
|
|
4912
5036
|
}
|
|
4913
5037
|
var segment = _SegmentOrClosed___get_segment__impl__jvcr9l(tmp$ret$1);
|
|
4914
|
-
segment.
|
|
4915
|
-
if (compare(segment.
|
|
5038
|
+
segment.yq();
|
|
5039
|
+
if (compare(segment.sj_1, id) > 0)
|
|
4916
5040
|
return false;
|
|
4917
5041
|
// Inline function 'kotlin.Long.rem' call
|
|
4918
5042
|
var other_0 = get_SEGMENT_SIZE();
|
|
@@ -4920,7 +5044,7 @@
|
|
|
4920
5044
|
var i = convertToInt(tmp$ret$5);
|
|
4921
5045
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.getAndSet' call
|
|
4922
5046
|
var value = get_PERMIT();
|
|
4923
|
-
var cellState = segment.
|
|
5047
|
+
var cellState = segment.uu_1.atomicfu$get(i).atomicfu$getAndSet(value);
|
|
4924
5048
|
if (cellState === null) {
|
|
4925
5049
|
// Inline function 'kotlin.repeat' call
|
|
4926
5050
|
var times = get_MAX_SPIN_CYCLES();
|
|
@@ -4930,14 +5054,14 @@
|
|
|
4930
5054
|
var index = inductionVariable;
|
|
4931
5055
|
inductionVariable = inductionVariable + 1 | 0;
|
|
4932
5056
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.get' call
|
|
4933
|
-
if (segment.
|
|
5057
|
+
if (segment.uu_1.atomicfu$get(i).kotlinx$atomicfu$value === get_TAKEN())
|
|
4934
5058
|
return true;
|
|
4935
5059
|
}
|
|
4936
5060
|
while (inductionVariable < times);
|
|
4937
5061
|
var tmp4 = get_PERMIT();
|
|
4938
5062
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.cas' call
|
|
4939
5063
|
var value_0 = get_BROKEN();
|
|
4940
|
-
return !segment.
|
|
5064
|
+
return !segment.uu_1.atomicfu$get(i).atomicfu$compareAndSet(tmp4, value_0);
|
|
4941
5065
|
} else if (cellState === get_CANCELLED())
|
|
4942
5066
|
return false;
|
|
4943
5067
|
else
|
|
@@ -4948,10 +5072,10 @@
|
|
|
4948
5072
|
if (isInterface($receiver, CancellableContinuation)) {
|
|
4949
5073
|
if (!isInterface($receiver, CancellableContinuation))
|
|
4950
5074
|
THROW_CCE();
|
|
4951
|
-
var token = $receiver.
|
|
5075
|
+
var token = $receiver.ui(Unit_instance, null, $this.nu_1);
|
|
4952
5076
|
var tmp_0;
|
|
4953
5077
|
if (!(token == null)) {
|
|
4954
|
-
$receiver.
|
|
5078
|
+
$receiver.vi(token);
|
|
4955
5079
|
tmp_0 = true;
|
|
4956
5080
|
} else {
|
|
4957
5081
|
tmp_0 = false;
|
|
@@ -4959,7 +5083,7 @@
|
|
|
4959
5083
|
tmp = tmp_0;
|
|
4960
5084
|
} else {
|
|
4961
5085
|
if (isInterface($receiver, SelectInstance)) {
|
|
4962
|
-
tmp = $receiver.
|
|
5086
|
+
tmp = $receiver.oo($this, Unit_instance);
|
|
4963
5087
|
} else {
|
|
4964
5088
|
// Inline function 'kotlin.error' call
|
|
4965
5089
|
var message = 'unexpected: ' + toString($receiver);
|
|
@@ -4970,7 +5094,7 @@
|
|
|
4970
5094
|
}
|
|
4971
5095
|
function SemaphoreAndMutexImpl$onCancellationRelease$lambda(this$0) {
|
|
4972
5096
|
return function (_unused_var__etf5q3, _unused_var__etf5q3_0, _unused_var__etf5q3_1) {
|
|
4973
|
-
this$0.
|
|
5097
|
+
this$0.pu();
|
|
4974
5098
|
return Unit_instance;
|
|
4975
5099
|
};
|
|
4976
5100
|
}
|
|
@@ -4980,27 +5104,27 @@
|
|
|
4980
5104
|
}, 2, 0, 3, 'createSegment');
|
|
4981
5105
|
}
|
|
4982
5106
|
function SemaphoreAndMutexImpl(permits, acquiredPermits) {
|
|
4983
|
-
this.
|
|
4984
|
-
this.
|
|
4985
|
-
this.
|
|
5107
|
+
this.hu_1 = permits;
|
|
5108
|
+
this.ju_1 = atomic$long$1(new Long(0, 0));
|
|
5109
|
+
this.lu_1 = atomic$long$1(new Long(0, 0));
|
|
4986
5110
|
// Inline function 'kotlin.require' call
|
|
4987
|
-
if (!(this.
|
|
4988
|
-
var message = 'Semaphore should have at least 1 permit, but had ' + this.
|
|
5111
|
+
if (!(this.hu_1 > 0)) {
|
|
5112
|
+
var message = 'Semaphore should have at least 1 permit, but had ' + this.hu_1;
|
|
4989
5113
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
4990
5114
|
}
|
|
4991
5115
|
// Inline function 'kotlin.require' call
|
|
4992
|
-
if (!(0 <= acquiredPermits ? acquiredPermits <= this.
|
|
4993
|
-
var message_0 = 'The number of acquired permits should be in 0..' + this.
|
|
5116
|
+
if (!(0 <= acquiredPermits ? acquiredPermits <= this.hu_1 : false)) {
|
|
5117
|
+
var message_0 = 'The number of acquired permits should be in 0..' + this.hu_1;
|
|
4994
5118
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
4995
5119
|
}
|
|
4996
5120
|
var s = new SemaphoreSegment(new Long(0, 0), null, 2);
|
|
4997
|
-
this.
|
|
4998
|
-
this.
|
|
4999
|
-
this.
|
|
5121
|
+
this.iu_1 = atomic$ref$1(s);
|
|
5122
|
+
this.ku_1 = atomic$ref$1(s);
|
|
5123
|
+
this.mu_1 = atomic$int$1(this.hu_1 - acquiredPermits | 0);
|
|
5000
5124
|
var tmp = this;
|
|
5001
|
-
tmp.
|
|
5125
|
+
tmp.nu_1 = SemaphoreAndMutexImpl$onCancellationRelease$lambda(this);
|
|
5002
5126
|
}
|
|
5003
|
-
protoOf(SemaphoreAndMutexImpl).
|
|
5127
|
+
protoOf(SemaphoreAndMutexImpl).ou = function ($completion) {
|
|
5004
5128
|
var p = decPermits(this);
|
|
5005
5129
|
if (p > 0)
|
|
5006
5130
|
return Unit_instance;
|
|
@@ -5013,7 +5137,7 @@
|
|
|
5013
5137
|
while (true) {
|
|
5014
5138
|
var p = decPermits(this);
|
|
5015
5139
|
if (p > 0) {
|
|
5016
|
-
waiter.
|
|
5140
|
+
waiter.xi(Unit_instance, this.nu_1);
|
|
5017
5141
|
tmp$ret$0 = Unit_instance;
|
|
5018
5142
|
break $l$block_0;
|
|
5019
5143
|
}
|
|
@@ -5026,13 +5150,13 @@
|
|
|
5026
5150
|
}
|
|
5027
5151
|
return tmp$ret$0;
|
|
5028
5152
|
};
|
|
5029
|
-
protoOf(SemaphoreAndMutexImpl).
|
|
5153
|
+
protoOf(SemaphoreAndMutexImpl).pu = function () {
|
|
5030
5154
|
while (true) {
|
|
5031
|
-
var p = this.
|
|
5032
|
-
if (p >= this.
|
|
5155
|
+
var p = this.mu_1.atomicfu$getAndIncrement();
|
|
5156
|
+
if (p >= this.hu_1) {
|
|
5033
5157
|
coerceAvailablePermitsAtMaximum(this);
|
|
5034
5158
|
// Inline function 'kotlin.error' call
|
|
5035
|
-
var message = 'The number of released permits cannot be greater than ' + this.
|
|
5159
|
+
var message = 'The number of released permits cannot be greater than ' + this.hu_1;
|
|
5036
5160
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
5037
5161
|
}
|
|
5038
5162
|
if (p >= 0)
|
|
@@ -5043,19 +5167,19 @@
|
|
|
5043
5167
|
};
|
|
5044
5168
|
function SemaphoreSegment(id, prev, pointers) {
|
|
5045
5169
|
Segment.call(this, id, prev, pointers);
|
|
5046
|
-
this.
|
|
5170
|
+
this.uu_1 = atomicfu$AtomicRefArray$ofNulls(get_SEGMENT_SIZE());
|
|
5047
5171
|
}
|
|
5048
|
-
protoOf(SemaphoreSegment).
|
|
5172
|
+
protoOf(SemaphoreSegment).nq = function () {
|
|
5049
5173
|
return get_SEGMENT_SIZE();
|
|
5050
5174
|
};
|
|
5051
|
-
protoOf(SemaphoreSegment).
|
|
5175
|
+
protoOf(SemaphoreSegment).uj = function (index, cause, context) {
|
|
5052
5176
|
// Inline function 'kotlinx.coroutines.sync.SemaphoreSegment.set' call
|
|
5053
5177
|
var value = get_CANCELLED();
|
|
5054
|
-
this.
|
|
5055
|
-
this.
|
|
5178
|
+
this.uu_1.atomicfu$get(index).kotlinx$atomicfu$value = value;
|
|
5179
|
+
this.uq();
|
|
5056
5180
|
};
|
|
5057
5181
|
protoOf(SemaphoreSegment).toString = function () {
|
|
5058
|
-
return 'SemaphoreSegment[id=' + this.
|
|
5182
|
+
return 'SemaphoreSegment[id=' + this.sj_1.toString() + ', hashCode=' + hashCode(this) + ']';
|
|
5059
5183
|
};
|
|
5060
5184
|
function createSegment(id, prev) {
|
|
5061
5185
|
_init_properties_Semaphore_kt__t514r6();
|
|
@@ -5131,8 +5255,8 @@
|
|
|
5131
5255
|
NodeDispatcher_instance = this;
|
|
5132
5256
|
SetTimeoutBasedDispatcher.call(this);
|
|
5133
5257
|
}
|
|
5134
|
-
protoOf(NodeDispatcher).
|
|
5135
|
-
process.nextTick(this.
|
|
5258
|
+
protoOf(NodeDispatcher).xu = function () {
|
|
5259
|
+
process.nextTick(this.ev_1.cv_1);
|
|
5136
5260
|
};
|
|
5137
5261
|
var NodeDispatcher_instance;
|
|
5138
5262
|
function NodeDispatcher_getInstance() {
|
|
@@ -5142,24 +5266,24 @@
|
|
|
5142
5266
|
}
|
|
5143
5267
|
function ScheduledMessageQueue$processQueue$lambda(this$0) {
|
|
5144
5268
|
return function () {
|
|
5145
|
-
this$0.
|
|
5269
|
+
this$0.iv();
|
|
5146
5270
|
return Unit_instance;
|
|
5147
5271
|
};
|
|
5148
5272
|
}
|
|
5149
5273
|
function ScheduledMessageQueue(dispatcher) {
|
|
5150
5274
|
MessageQueue.call(this);
|
|
5151
|
-
this.
|
|
5275
|
+
this.bv_1 = dispatcher;
|
|
5152
5276
|
var tmp = this;
|
|
5153
|
-
tmp.
|
|
5277
|
+
tmp.cv_1 = ScheduledMessageQueue$processQueue$lambda(this);
|
|
5154
5278
|
}
|
|
5155
|
-
protoOf(ScheduledMessageQueue).
|
|
5156
|
-
this.
|
|
5279
|
+
protoOf(ScheduledMessageQueue).jv = function () {
|
|
5280
|
+
this.bv_1.xu();
|
|
5157
5281
|
};
|
|
5158
|
-
protoOf(ScheduledMessageQueue).
|
|
5159
|
-
setTimeout(this.
|
|
5282
|
+
protoOf(ScheduledMessageQueue).kv = function () {
|
|
5283
|
+
setTimeout(this.cv_1, 0);
|
|
5160
5284
|
};
|
|
5161
|
-
protoOf(ScheduledMessageQueue).
|
|
5162
|
-
setTimeout(this.
|
|
5285
|
+
protoOf(ScheduledMessageQueue).lv = function (timeout) {
|
|
5286
|
+
setTimeout(this.cv_1, timeout);
|
|
5163
5287
|
};
|
|
5164
5288
|
function w3cSetTimeout(handler, timeout) {
|
|
5165
5289
|
return setTimeout(handler, timeout);
|
|
@@ -5167,9 +5291,9 @@
|
|
|
5167
5291
|
function WindowMessageQueue$lambda(this$0) {
|
|
5168
5292
|
return function (event) {
|
|
5169
5293
|
var tmp;
|
|
5170
|
-
if (event.source == this$0.
|
|
5294
|
+
if (event.source == this$0.tv_1 && event.data == this$0.uv_1) {
|
|
5171
5295
|
event.stopPropagation();
|
|
5172
|
-
this$0.
|
|
5296
|
+
this$0.iv();
|
|
5173
5297
|
tmp = Unit_instance;
|
|
5174
5298
|
}
|
|
5175
5299
|
return Unit_instance;
|
|
@@ -5177,22 +5301,22 @@
|
|
|
5177
5301
|
}
|
|
5178
5302
|
function WindowMessageQueue$schedule$lambda(this$0) {
|
|
5179
5303
|
return function (it) {
|
|
5180
|
-
this$0.
|
|
5304
|
+
this$0.iv();
|
|
5181
5305
|
return Unit_instance;
|
|
5182
5306
|
};
|
|
5183
5307
|
}
|
|
5184
5308
|
function WindowMessageQueue(window_0) {
|
|
5185
5309
|
MessageQueue.call(this);
|
|
5186
|
-
this.
|
|
5187
|
-
this.
|
|
5188
|
-
this.
|
|
5310
|
+
this.tv_1 = window_0;
|
|
5311
|
+
this.uv_1 = 'dispatchCoroutine';
|
|
5312
|
+
this.tv_1.addEventListener('message', WindowMessageQueue$lambda(this), true);
|
|
5189
5313
|
}
|
|
5190
|
-
protoOf(WindowMessageQueue).
|
|
5314
|
+
protoOf(WindowMessageQueue).jv = function () {
|
|
5191
5315
|
var tmp = Promise.resolve(Unit_instance);
|
|
5192
5316
|
tmp.then(WindowMessageQueue$schedule$lambda(this));
|
|
5193
5317
|
};
|
|
5194
|
-
protoOf(WindowMessageQueue).
|
|
5195
|
-
this.
|
|
5318
|
+
protoOf(WindowMessageQueue).kv = function () {
|
|
5319
|
+
this.tv_1.postMessage(this.uv_1, '*');
|
|
5196
5320
|
};
|
|
5197
5321
|
function w3cSetTimeout_0(window_0, handler, timeout) {
|
|
5198
5322
|
return setTimeout_0(window_0, handler, timeout);
|
|
@@ -5229,26 +5353,35 @@
|
|
|
5229
5353
|
return toString(_this__u8e3s4);
|
|
5230
5354
|
}
|
|
5231
5355
|
function get_DefaultDelay() {
|
|
5232
|
-
var tmp = Dispatchers_getInstance().
|
|
5356
|
+
var tmp = Dispatchers_getInstance().hp_1;
|
|
5233
5357
|
return isInterface(tmp, Delay) ? tmp : THROW_CCE();
|
|
5234
5358
|
}
|
|
5235
|
-
function newCoroutineContext(_this__u8e3s4,
|
|
5359
|
+
function newCoroutineContext(_this__u8e3s4, addedContext) {
|
|
5360
|
+
return _this__u8e3s4.rb(addedContext);
|
|
5361
|
+
}
|
|
5362
|
+
function UndispatchedCoroutine(context, uCont) {
|
|
5363
|
+
ScopeCoroutine.call(this, context, uCont);
|
|
5364
|
+
}
|
|
5365
|
+
protoOf(UndispatchedCoroutine).hg = function (state) {
|
|
5366
|
+
return this.di_1.a7(recoverResult(state, this.di_1));
|
|
5367
|
+
};
|
|
5368
|
+
function newCoroutineContext_0(_this__u8e3s4, context) {
|
|
5236
5369
|
var combined = _this__u8e3s4.xf().rb(context);
|
|
5237
|
-
return !(combined === Dispatchers_getInstance().
|
|
5370
|
+
return !(combined === Dispatchers_getInstance().hp_1) && combined.c7(Key_instance) == null ? combined.rb(Dispatchers_getInstance().hp_1) : combined;
|
|
5238
5371
|
}
|
|
5239
5372
|
function get_coroutineName(_this__u8e3s4) {
|
|
5240
5373
|
return null;
|
|
5241
5374
|
}
|
|
5242
5375
|
function Dispatchers() {
|
|
5243
5376
|
Dispatchers_instance = this;
|
|
5244
|
-
this.
|
|
5245
|
-
this.
|
|
5246
|
-
this.
|
|
5247
|
-
this.
|
|
5377
|
+
this.hp_1 = createDefaultDispatcher();
|
|
5378
|
+
this.ip_1 = Unconfined_getInstance();
|
|
5379
|
+
this.jp_1 = new JsMainDispatcher(this.hp_1, false);
|
|
5380
|
+
this.kp_1 = null;
|
|
5248
5381
|
}
|
|
5249
|
-
protoOf(Dispatchers).
|
|
5250
|
-
var tmp0_elvis_lhs = this.
|
|
5251
|
-
return tmp0_elvis_lhs == null ? this.
|
|
5382
|
+
protoOf(Dispatchers).lp = function () {
|
|
5383
|
+
var tmp0_elvis_lhs = this.kp_1;
|
|
5384
|
+
return tmp0_elvis_lhs == null ? this.jp_1 : tmp0_elvis_lhs;
|
|
5252
5385
|
};
|
|
5253
5386
|
var Dispatchers_instance;
|
|
5254
5387
|
function Dispatchers_getInstance() {
|
|
@@ -5258,22 +5391,22 @@
|
|
|
5258
5391
|
}
|
|
5259
5392
|
function JsMainDispatcher(delegate, invokeImmediately) {
|
|
5260
5393
|
MainCoroutineDispatcher.call(this);
|
|
5261
|
-
this.
|
|
5262
|
-
this.
|
|
5263
|
-
this.
|
|
5394
|
+
this.aw_1 = delegate;
|
|
5395
|
+
this.bw_1 = invokeImmediately;
|
|
5396
|
+
this.cw_1 = this.bw_1 ? this : new JsMainDispatcher(this.aw_1, true);
|
|
5264
5397
|
}
|
|
5265
|
-
protoOf(JsMainDispatcher).
|
|
5266
|
-
return this.
|
|
5398
|
+
protoOf(JsMainDispatcher).fp = function () {
|
|
5399
|
+
return this.cw_1;
|
|
5267
5400
|
};
|
|
5268
|
-
protoOf(JsMainDispatcher).
|
|
5269
|
-
return !this.
|
|
5401
|
+
protoOf(JsMainDispatcher).yl = function (context) {
|
|
5402
|
+
return !this.bw_1;
|
|
5270
5403
|
};
|
|
5271
|
-
protoOf(JsMainDispatcher).
|
|
5272
|
-
return this.
|
|
5404
|
+
protoOf(JsMainDispatcher).zl = function (context, block) {
|
|
5405
|
+
return this.aw_1.zl(context, block);
|
|
5273
5406
|
};
|
|
5274
5407
|
protoOf(JsMainDispatcher).toString = function () {
|
|
5275
|
-
var tmp0_elvis_lhs = this.
|
|
5276
|
-
return tmp0_elvis_lhs == null ? this.
|
|
5408
|
+
var tmp0_elvis_lhs = this.gp();
|
|
5409
|
+
return tmp0_elvis_lhs == null ? this.aw_1.toString() : tmp0_elvis_lhs;
|
|
5277
5410
|
};
|
|
5278
5411
|
function get_RECOVER_STACK_TRACES() {
|
|
5279
5412
|
return RECOVER_STACK_TRACES;
|
|
@@ -5282,10 +5415,10 @@
|
|
|
5282
5415
|
function JobCancellationException(message, cause, job) {
|
|
5283
5416
|
CancellationException_init_$Init$_0(message, cause, this);
|
|
5284
5417
|
captureStack(this, JobCancellationException);
|
|
5285
|
-
this.
|
|
5418
|
+
this.dw_1 = job;
|
|
5286
5419
|
}
|
|
5287
5420
|
protoOf(JobCancellationException).toString = function () {
|
|
5288
|
-
return protoOf(CancellationException).toString.call(this) + '; job=' + toString(this.
|
|
5421
|
+
return protoOf(CancellationException).toString.call(this) + '; job=' + toString(this.dw_1);
|
|
5289
5422
|
};
|
|
5290
5423
|
protoOf(JobCancellationException).equals = function (other) {
|
|
5291
5424
|
var tmp;
|
|
@@ -5301,7 +5434,7 @@
|
|
|
5301
5434
|
tmp_2 = false;
|
|
5302
5435
|
}
|
|
5303
5436
|
if (tmp_2) {
|
|
5304
|
-
tmp_1 = equals(other.
|
|
5437
|
+
tmp_1 = equals(other.dw_1, this.dw_1);
|
|
5305
5438
|
} else {
|
|
5306
5439
|
tmp_1 = false;
|
|
5307
5440
|
}
|
|
@@ -5315,7 +5448,7 @@
|
|
|
5315
5448
|
return tmp;
|
|
5316
5449
|
};
|
|
5317
5450
|
protoOf(JobCancellationException).hashCode = function () {
|
|
5318
|
-
var tmp = imul(imul(getStringHashCode(ensureNotNull(this.message)), 31) + hashCode(this.
|
|
5451
|
+
var tmp = imul(imul(getStringHashCode(ensureNotNull(this.message)), 31) + hashCode(this.dw_1) | 0, 31);
|
|
5319
5452
|
var tmp0_safe_receiver = this.cause;
|
|
5320
5453
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
|
|
5321
5454
|
return tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
|
|
@@ -5324,7 +5457,7 @@
|
|
|
5324
5457
|
}
|
|
5325
5458
|
function Runnable$run$ref(p0) {
|
|
5326
5459
|
return constructCallableReference(function () {
|
|
5327
|
-
p0.
|
|
5460
|
+
p0.cl();
|
|
5328
5461
|
return Unit_instance;
|
|
5329
5462
|
}, 0, 0, 4, 'run', [p0]);
|
|
5330
5463
|
}
|
|
@@ -5358,46 +5491,46 @@
|
|
|
5358
5491
|
LockFreeLinkedListNode.call(this);
|
|
5359
5492
|
}
|
|
5360
5493
|
function LockFreeLinkedListNode() {
|
|
5361
|
-
this.
|
|
5362
|
-
this.
|
|
5363
|
-
this.
|
|
5494
|
+
this.rl_1 = this;
|
|
5495
|
+
this.sl_1 = this;
|
|
5496
|
+
this.tl_1 = false;
|
|
5364
5497
|
}
|
|
5365
|
-
protoOf(LockFreeLinkedListNode).
|
|
5366
|
-
var prev = this.
|
|
5498
|
+
protoOf(LockFreeLinkedListNode).ul = function (node, permissionsBitmask) {
|
|
5499
|
+
var prev = this.sl_1;
|
|
5367
5500
|
var tmp;
|
|
5368
5501
|
if (prev instanceof ListClosed) {
|
|
5369
|
-
tmp = ((prev.
|
|
5502
|
+
tmp = ((prev.hw_1 & permissionsBitmask) === 0 && prev.ul(node, permissionsBitmask));
|
|
5370
5503
|
} else {
|
|
5371
|
-
node.
|
|
5372
|
-
node.
|
|
5373
|
-
prev.
|
|
5374
|
-
this.
|
|
5504
|
+
node.rl_1 = this;
|
|
5505
|
+
node.sl_1 = prev;
|
|
5506
|
+
prev.rl_1 = node;
|
|
5507
|
+
this.sl_1 = node;
|
|
5375
5508
|
tmp = true;
|
|
5376
5509
|
}
|
|
5377
5510
|
return tmp;
|
|
5378
5511
|
};
|
|
5379
|
-
protoOf(LockFreeLinkedListNode).
|
|
5380
|
-
this.
|
|
5512
|
+
protoOf(LockFreeLinkedListNode).fn = function (forbiddenElementsBit) {
|
|
5513
|
+
this.ul(new ListClosed(forbiddenElementsBit), forbiddenElementsBit);
|
|
5381
5514
|
};
|
|
5382
|
-
protoOf(LockFreeLinkedListNode).
|
|
5383
|
-
if (this.
|
|
5515
|
+
protoOf(LockFreeLinkedListNode).vl = function () {
|
|
5516
|
+
if (this.tl_1)
|
|
5384
5517
|
return false;
|
|
5385
|
-
var prev = this.
|
|
5386
|
-
var next = this.
|
|
5387
|
-
prev.
|
|
5388
|
-
next.
|
|
5389
|
-
this.
|
|
5518
|
+
var prev = this.sl_1;
|
|
5519
|
+
var next = this.rl_1;
|
|
5520
|
+
prev.rl_1 = next;
|
|
5521
|
+
next.sl_1 = prev;
|
|
5522
|
+
this.tl_1 = true;
|
|
5390
5523
|
return true;
|
|
5391
5524
|
};
|
|
5392
|
-
protoOf(LockFreeLinkedListNode).
|
|
5393
|
-
if (!(this.
|
|
5525
|
+
protoOf(LockFreeLinkedListNode).wl = function (node) {
|
|
5526
|
+
if (!(this.rl_1 === this))
|
|
5394
5527
|
return false;
|
|
5395
|
-
this.
|
|
5528
|
+
this.ul(node, -2147483648);
|
|
5396
5529
|
return true;
|
|
5397
5530
|
};
|
|
5398
5531
|
function ListClosed(forbiddenElementsBitmask) {
|
|
5399
5532
|
LockFreeLinkedListNode.call(this);
|
|
5400
|
-
this.
|
|
5533
|
+
this.hw_1 = forbiddenElementsBitmask;
|
|
5401
5534
|
}
|
|
5402
5535
|
function unwrap(exception) {
|
|
5403
5536
|
return exception;
|
|
@@ -5414,13 +5547,13 @@
|
|
|
5414
5547
|
return 0;
|
|
5415
5548
|
}
|
|
5416
5549
|
function CommonThreadLocal() {
|
|
5417
|
-
this.
|
|
5550
|
+
this.tm_1 = null;
|
|
5418
5551
|
}
|
|
5419
5552
|
protoOf(CommonThreadLocal).ef = function () {
|
|
5420
|
-
return this.
|
|
5553
|
+
return this.tm_1;
|
|
5421
5554
|
};
|
|
5422
|
-
protoOf(CommonThreadLocal).
|
|
5423
|
-
this.
|
|
5555
|
+
protoOf(CommonThreadLocal).um = function (value) {
|
|
5556
|
+
this.tm_1 = value;
|
|
5424
5557
|
};
|
|
5425
5558
|
function commonThreadLocal(name) {
|
|
5426
5559
|
return new CommonThreadLocal();
|
|
@@ -5431,7 +5564,7 @@
|
|
|
5431
5564
|
function UnconfinedEventLoop() {
|
|
5432
5565
|
EventLoop.call(this);
|
|
5433
5566
|
}
|
|
5434
|
-
protoOf(UnconfinedEventLoop).
|
|
5567
|
+
protoOf(UnconfinedEventLoop).zl = function (context, block) {
|
|
5435
5568
|
unsupported();
|
|
5436
5569
|
};
|
|
5437
5570
|
function unsupported() {
|
|
@@ -5439,10 +5572,10 @@
|
|
|
5439
5572
|
}
|
|
5440
5573
|
function await_0(_this__u8e3s4, $completion) {
|
|
5441
5574
|
var cancellable = new CancellableContinuationImpl(intercepted($completion), 1);
|
|
5442
|
-
cancellable.
|
|
5575
|
+
cancellable.gk();
|
|
5443
5576
|
var tmp = await$lambda(cancellable);
|
|
5444
5577
|
_this__u8e3s4.then(tmp, await$lambda_0(cancellable));
|
|
5445
|
-
return cancellable.
|
|
5578
|
+
return cancellable.yh();
|
|
5446
5579
|
}
|
|
5447
5580
|
function await$lambda($cont) {
|
|
5448
5581
|
return function (it) {
|
|
@@ -5489,8 +5622,8 @@
|
|
|
5489
5622
|
SetTimeoutDispatcher_instance = this;
|
|
5490
5623
|
SetTimeoutBasedDispatcher.call(this);
|
|
5491
5624
|
}
|
|
5492
|
-
protoOf(SetTimeoutDispatcher).
|
|
5493
|
-
this.
|
|
5625
|
+
protoOf(SetTimeoutDispatcher).xu = function () {
|
|
5626
|
+
this.ev_1.lv(0);
|
|
5494
5627
|
};
|
|
5495
5628
|
var SetTimeoutDispatcher_instance;
|
|
5496
5629
|
function SetTimeoutDispatcher_getInstance() {
|
|
@@ -5500,48 +5633,48 @@
|
|
|
5500
5633
|
}
|
|
5501
5634
|
function SetTimeoutBasedDispatcher$invokeOnTimeout$lambda($block) {
|
|
5502
5635
|
return function () {
|
|
5503
|
-
$block.
|
|
5636
|
+
$block.cl();
|
|
5504
5637
|
return Unit_instance;
|
|
5505
5638
|
};
|
|
5506
5639
|
}
|
|
5507
5640
|
function SetTimeoutBasedDispatcher$scheduleResumeAfterDelay$lambda($continuation, this$0) {
|
|
5508
5641
|
return function () {
|
|
5509
5642
|
// Inline function 'kotlin.with' call
|
|
5510
|
-
$continuation.
|
|
5643
|
+
$continuation.wi(this$0, Unit_instance);
|
|
5511
5644
|
return Unit_instance;
|
|
5512
5645
|
};
|
|
5513
5646
|
}
|
|
5514
5647
|
function SetTimeoutBasedDispatcher() {
|
|
5515
5648
|
CoroutineDispatcher.call(this);
|
|
5516
|
-
this.
|
|
5649
|
+
this.ev_1 = new ScheduledMessageQueue(this);
|
|
5517
5650
|
}
|
|
5518
|
-
protoOf(SetTimeoutBasedDispatcher).
|
|
5519
|
-
this.
|
|
5651
|
+
protoOf(SetTimeoutBasedDispatcher).zl = function (context, block) {
|
|
5652
|
+
this.ev_1.mv(block);
|
|
5520
5653
|
};
|
|
5521
|
-
protoOf(SetTimeoutBasedDispatcher).
|
|
5654
|
+
protoOf(SetTimeoutBasedDispatcher).em = function (timeMillis, block, context) {
|
|
5522
5655
|
var handle = w3cSetTimeout(SetTimeoutBasedDispatcher$invokeOnTimeout$lambda(block), delayToInt(timeMillis));
|
|
5523
5656
|
return new ClearTimeout(handle);
|
|
5524
5657
|
};
|
|
5525
|
-
protoOf(SetTimeoutBasedDispatcher).
|
|
5658
|
+
protoOf(SetTimeoutBasedDispatcher).dm = function (timeMillis, continuation) {
|
|
5526
5659
|
var handle = w3cSetTimeout(SetTimeoutBasedDispatcher$scheduleResumeAfterDelay$lambda(continuation, this), delayToInt(timeMillis));
|
|
5527
5660
|
invokeOnCancellation(continuation, new ClearTimeout(handle));
|
|
5528
5661
|
};
|
|
5529
5662
|
function MessageQueue() {
|
|
5530
|
-
this.
|
|
5531
|
-
this.
|
|
5532
|
-
this.
|
|
5663
|
+
this.fv_1 = ArrayDeque_init_$Create$();
|
|
5664
|
+
this.gv_1 = 16;
|
|
5665
|
+
this.hv_1 = false;
|
|
5533
5666
|
}
|
|
5534
|
-
protoOf(MessageQueue).
|
|
5535
|
-
this.
|
|
5536
|
-
if (!this.
|
|
5537
|
-
this.
|
|
5538
|
-
this.
|
|
5667
|
+
protoOf(MessageQueue).mv = function (element) {
|
|
5668
|
+
this.nv(element);
|
|
5669
|
+
if (!this.hv_1) {
|
|
5670
|
+
this.hv_1 = true;
|
|
5671
|
+
this.jv();
|
|
5539
5672
|
}
|
|
5540
5673
|
};
|
|
5541
|
-
protoOf(MessageQueue).
|
|
5674
|
+
protoOf(MessageQueue).iv = function () {
|
|
5542
5675
|
try {
|
|
5543
5676
|
// Inline function 'kotlin.repeat' call
|
|
5544
|
-
var times = this.
|
|
5677
|
+
var times = this.gv_1;
|
|
5545
5678
|
var inductionVariable = 0;
|
|
5546
5679
|
if (inductionVariable < times)
|
|
5547
5680
|
do {
|
|
@@ -5555,101 +5688,101 @@
|
|
|
5555
5688
|
tmp = tmp0_elvis_lhs;
|
|
5556
5689
|
}
|
|
5557
5690
|
var element = tmp;
|
|
5558
|
-
element.
|
|
5691
|
+
element.cl();
|
|
5559
5692
|
}
|
|
5560
5693
|
while (inductionVariable < times);
|
|
5561
5694
|
}finally {
|
|
5562
5695
|
if (this.q()) {
|
|
5563
|
-
this.
|
|
5696
|
+
this.hv_1 = false;
|
|
5564
5697
|
} else {
|
|
5565
|
-
this.
|
|
5698
|
+
this.kv();
|
|
5566
5699
|
}
|
|
5567
5700
|
}
|
|
5568
5701
|
};
|
|
5569
|
-
protoOf(MessageQueue).
|
|
5570
|
-
return this.
|
|
5702
|
+
protoOf(MessageQueue).nv = function (element) {
|
|
5703
|
+
return this.fv_1.g(element);
|
|
5571
5704
|
};
|
|
5572
5705
|
protoOf(MessageQueue).g = function (element) {
|
|
5573
|
-
return this.
|
|
5706
|
+
return this.nv((!(element == null) ? isInterface(element, Runnable) : false) ? element : THROW_CCE());
|
|
5574
5707
|
};
|
|
5575
|
-
protoOf(MessageQueue).
|
|
5576
|
-
return this.
|
|
5708
|
+
protoOf(MessageQueue).ov = function (element) {
|
|
5709
|
+
return this.fv_1.f2(element);
|
|
5577
5710
|
};
|
|
5578
5711
|
protoOf(MessageQueue).f2 = function (element) {
|
|
5579
5712
|
if (!(!(element == null) ? isInterface(element, Runnable) : false))
|
|
5580
5713
|
return false;
|
|
5581
|
-
return this.
|
|
5714
|
+
return this.ov((!(element == null) ? isInterface(element, Runnable) : false) ? element : THROW_CCE());
|
|
5582
5715
|
};
|
|
5583
5716
|
protoOf(MessageQueue).m2 = function (index) {
|
|
5584
|
-
return this.
|
|
5717
|
+
return this.fv_1.m2(index);
|
|
5585
5718
|
};
|
|
5586
5719
|
protoOf(MessageQueue).r = function (index) {
|
|
5587
|
-
return this.
|
|
5720
|
+
return this.fv_1.r(index);
|
|
5588
5721
|
};
|
|
5589
5722
|
protoOf(MessageQueue).q = function () {
|
|
5590
|
-
return this.
|
|
5723
|
+
return this.fv_1.q();
|
|
5591
5724
|
};
|
|
5592
|
-
protoOf(MessageQueue).
|
|
5593
|
-
return this.
|
|
5725
|
+
protoOf(MessageQueue).pv = function (element) {
|
|
5726
|
+
return this.fv_1.y(element);
|
|
5594
5727
|
};
|
|
5595
5728
|
protoOf(MessageQueue).y = function (element) {
|
|
5596
5729
|
if (!(!(element == null) ? isInterface(element, Runnable) : false))
|
|
5597
5730
|
return false;
|
|
5598
|
-
return this.
|
|
5731
|
+
return this.pv((!(element == null) ? isInterface(element, Runnable) : false) ? element : THROW_CCE());
|
|
5599
5732
|
};
|
|
5600
5733
|
protoOf(MessageQueue).h = function () {
|
|
5601
|
-
return this.
|
|
5734
|
+
return this.fv_1.h();
|
|
5602
5735
|
};
|
|
5603
5736
|
protoOf(MessageQueue).p = function (index) {
|
|
5604
|
-
return this.
|
|
5737
|
+
return this.fv_1.p(index);
|
|
5605
5738
|
};
|
|
5606
5739
|
protoOf(MessageQueue).k = function () {
|
|
5607
|
-
return this.
|
|
5740
|
+
return this.fv_1.ka_1;
|
|
5608
5741
|
};
|
|
5609
5742
|
function WindowClearTimeout($outer, handle) {
|
|
5610
|
-
this.
|
|
5743
|
+
this.pw_1 = $outer;
|
|
5611
5744
|
ClearTimeout.call(this, handle);
|
|
5612
5745
|
}
|
|
5613
|
-
protoOf(WindowClearTimeout).
|
|
5614
|
-
w3cClearTimeout(this.
|
|
5746
|
+
protoOf(WindowClearTimeout).hk = function () {
|
|
5747
|
+
w3cClearTimeout(this.pw_1.rw_1, this.tw_1);
|
|
5615
5748
|
};
|
|
5616
5749
|
function WindowDispatcher$scheduleResumeAfterDelay$lambda($continuation, this$0) {
|
|
5617
5750
|
return function () {
|
|
5618
5751
|
// Inline function 'kotlin.with' call
|
|
5619
|
-
$continuation.
|
|
5752
|
+
$continuation.wi(this$0, Unit_instance);
|
|
5620
5753
|
return Unit_instance;
|
|
5621
5754
|
};
|
|
5622
5755
|
}
|
|
5623
5756
|
function WindowDispatcher(window_0) {
|
|
5624
5757
|
CoroutineDispatcher.call(this);
|
|
5625
|
-
this.
|
|
5626
|
-
this.
|
|
5758
|
+
this.rw_1 = window_0;
|
|
5759
|
+
this.sw_1 = new WindowMessageQueue(this.rw_1);
|
|
5627
5760
|
}
|
|
5628
|
-
protoOf(WindowDispatcher).
|
|
5629
|
-
return this.
|
|
5761
|
+
protoOf(WindowDispatcher).zl = function (context, block) {
|
|
5762
|
+
return this.sw_1.mv(block);
|
|
5630
5763
|
};
|
|
5631
|
-
protoOf(WindowDispatcher).
|
|
5632
|
-
var handle = w3cSetTimeout_0(this.
|
|
5764
|
+
protoOf(WindowDispatcher).dm = function (timeMillis, continuation) {
|
|
5765
|
+
var handle = w3cSetTimeout_0(this.rw_1, WindowDispatcher$scheduleResumeAfterDelay$lambda(continuation, this), delayToInt(timeMillis));
|
|
5633
5766
|
invokeOnCancellation(continuation, new WindowClearTimeout(this, handle));
|
|
5634
5767
|
};
|
|
5635
|
-
protoOf(WindowDispatcher).
|
|
5636
|
-
var handle = w3cSetTimeout_0(this.
|
|
5768
|
+
protoOf(WindowDispatcher).em = function (timeMillis, block, context) {
|
|
5769
|
+
var handle = w3cSetTimeout_0(this.rw_1, Runnable$run$ref(block), delayToInt(timeMillis));
|
|
5637
5770
|
return new WindowClearTimeout(this, handle);
|
|
5638
5771
|
};
|
|
5639
5772
|
function delayToInt(timeMillis) {
|
|
5640
5773
|
return convertToInt(coerceIn(timeMillis, new Long(0, 0), new Long(2147483647, 0)));
|
|
5641
5774
|
}
|
|
5642
5775
|
function ClearTimeout(handle) {
|
|
5643
|
-
this.
|
|
5776
|
+
this.tw_1 = handle;
|
|
5644
5777
|
}
|
|
5645
|
-
protoOf(ClearTimeout).
|
|
5646
|
-
w3cClearTimeout_0(this.
|
|
5778
|
+
protoOf(ClearTimeout).hk = function () {
|
|
5779
|
+
w3cClearTimeout_0(this.tw_1);
|
|
5647
5780
|
};
|
|
5648
|
-
protoOf(ClearTimeout).
|
|
5649
|
-
this.
|
|
5781
|
+
protoOf(ClearTimeout).nk = function (cause) {
|
|
5782
|
+
this.hk();
|
|
5650
5783
|
};
|
|
5651
5784
|
protoOf(ClearTimeout).toString = function () {
|
|
5652
|
-
return 'ClearTimeout[' + this.
|
|
5785
|
+
return 'ClearTimeout[' + this.tw_1 + ']';
|
|
5653
5786
|
};
|
|
5654
5787
|
//region block: post-declaration
|
|
5655
5788
|
protoOf(JobSupport).eh = cancel$default;
|
|
@@ -5659,6 +5792,7 @@
|
|
|
5659
5792
|
protoOf(JobSupport).pb = minusKey_0;
|
|
5660
5793
|
protoOf(CoroutineDispatcher).c7 = get;
|
|
5661
5794
|
protoOf(CoroutineDispatcher).pb = minusKey;
|
|
5795
|
+
protoOf(NonCancellable).eh = cancel$default;
|
|
5662
5796
|
defineProp(protoOf(DispatchException), 'cause', function () {
|
|
5663
5797
|
return this.e();
|
|
5664
5798
|
});
|
|
@@ -5677,22 +5811,25 @@
|
|
|
5677
5811
|
//region block: exports
|
|
5678
5812
|
_.$_$ = _.$_$ || {};
|
|
5679
5813
|
_.$_$.a = Dispatchers_getInstance;
|
|
5680
|
-
_.$_$.b =
|
|
5681
|
-
_.$_$.c =
|
|
5682
|
-
_.$_$.d =
|
|
5683
|
-
_.$_$.e =
|
|
5684
|
-
_.$_$.f =
|
|
5685
|
-
_.$_$.g =
|
|
5686
|
-
_.$_$.h =
|
|
5687
|
-
_.$_$.i =
|
|
5688
|
-
_.$_$.j =
|
|
5689
|
-
_.$_$.k =
|
|
5690
|
-
_.$_$.l =
|
|
5691
|
-
_.$_$.m =
|
|
5692
|
-
_.$_$.n =
|
|
5693
|
-
_.$_$.o =
|
|
5694
|
-
_.$_$.p =
|
|
5695
|
-
_.$_$.q =
|
|
5814
|
+
_.$_$.b = NonCancellable_getInstance;
|
|
5815
|
+
_.$_$.c = await_0;
|
|
5816
|
+
_.$_$.d = coroutineScope;
|
|
5817
|
+
_.$_$.e = delay;
|
|
5818
|
+
_.$_$.f = withContext;
|
|
5819
|
+
_.$_$.g = withTimeoutOrNull;
|
|
5820
|
+
_.$_$.h = withTimeout;
|
|
5821
|
+
_.$_$.i = SelectImplementation;
|
|
5822
|
+
_.$_$.j = Semaphore;
|
|
5823
|
+
_.$_$.k = CancellableContinuationImpl;
|
|
5824
|
+
_.$_$.l = CoroutineScope_0;
|
|
5825
|
+
_.$_$.m = CoroutineScope;
|
|
5826
|
+
_.$_$.n = SupervisorJob;
|
|
5827
|
+
_.$_$.o = TimeoutCancellationException;
|
|
5828
|
+
_.$_$.p = async;
|
|
5829
|
+
_.$_$.q = ensureActive;
|
|
5830
|
+
_.$_$.r = get_isActive_0;
|
|
5831
|
+
_.$_$.s = get_isActive;
|
|
5832
|
+
_.$_$.t = launch;
|
|
5696
5833
|
//endregion
|
|
5697
5834
|
return _;
|
|
5698
5835
|
}));
|