@glandais/vcyclist-engine 5.1.1 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,23 +36,23 @@
36
36
  var emptyList = kotlin_kotlin.$_$.g3;
37
37
  var initMetadataForCoroutine = kotlin_kotlin.$_$.w6;
38
38
  var EmptyCoroutineContext_getInstance = kotlin_kotlin.$_$.y;
39
+ var Key_instance = kotlin_kotlin.$_$.x;
40
+ var equals = kotlin_kotlin.$_$.n6;
39
41
  var createCoroutineUnintercepted = kotlin_kotlin.$_$.p4;
42
+ var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.c2;
40
43
  var initMetadataForInterface = kotlin_kotlin.$_$.y6;
41
44
  var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.l2;
42
45
  var isInterface = kotlin_kotlin.$_$.c7;
43
46
  var THROW_CCE = kotlin_kotlin.$_$.ca;
44
- var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.c2;
45
47
  var toString_0 = kotlin_kotlin.$_$.va;
46
48
  var initMetadataForObject = kotlin_kotlin.$_$.a7;
47
49
  var hashCode = kotlin_kotlin.$_$.t6;
48
- var equals = kotlin_kotlin.$_$.n6;
49
- var CancellationException_init_$Create$ = kotlin_kotlin.$_$.r1;
50
+ var createFailure = kotlin_kotlin.$_$.ka;
50
51
  var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.b;
52
+ var CancellationException_init_$Create$ = kotlin_kotlin.$_$.r1;
51
53
  var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.i;
52
54
  var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.l;
53
- var createFailure = kotlin_kotlin.$_$.ka;
54
55
  var AbstractCoroutineContextKey = kotlin_kotlin.$_$.t4;
55
- var Key_instance = kotlin_kotlin.$_$.x;
56
56
  var AbstractCoroutineContextElement = kotlin_kotlin.$_$.s4;
57
57
  var get = kotlin_kotlin.$_$.u4;
58
58
  var minusKey = kotlin_kotlin.$_$.v4;
@@ -127,6 +127,8 @@
127
127
  initMetadataForCoroutine($awaitCOROUTINE$, CoroutineImpl);
128
128
  initMetadataForClass(DeferredCoroutine, 'DeferredCoroutine', VOID, AbstractCoroutine, [Element], [0]);
129
129
  initMetadataForClass(LazyDeferredCoroutine, 'LazyDeferredCoroutine', VOID, DeferredCoroutine, VOID, [0]);
130
+ initMetadataForClass(ScopeCoroutine, 'ScopeCoroutine', VOID, AbstractCoroutine, VOID, [0]);
131
+ initMetadataForClass(DispatchedCoroutine, 'DispatchedCoroutine', VOID, ScopeCoroutine, VOID, [0]);
130
132
  initMetadataForInterface(CancellableContinuation, 'CancellableContinuation', VOID, VOID, [Continuation]);
131
133
  initMetadataForClass(DisposeOnCancel, 'DisposeOnCancel', VOID, VOID, [CancelHandler]);
132
134
  initMetadataForInterface(Runnable, 'Runnable');
@@ -159,13 +161,14 @@
159
161
  initMetadataForClass(Empty, 'Empty', VOID, VOID, [Incomplete]);
160
162
  initMetadataForClass(LockFreeLinkedListHead, 'LockFreeLinkedListHead', LockFreeLinkedListHead, LockFreeLinkedListNode);
161
163
  initMetadataForClass(NodeList, 'NodeList', NodeList, LockFreeLinkedListHead, [Incomplete]);
164
+ initMetadataForClass(IncompleteStateBox, 'IncompleteStateBox');
162
165
  initMetadataForClass(InactiveNodeList, 'InactiveNodeList', VOID, VOID, [Incomplete]);
163
166
  initMetadataForClass(InvokeOnCompletion, 'InvokeOnCompletion', VOID, JobNode);
164
167
  initMetadataForClass(InvokeOnCancelling, 'InvokeOnCancelling', VOID, JobNode);
165
168
  initMetadataForClass(ChildHandleNode, 'ChildHandleNode', VOID, JobNode);
166
169
  initMetadataForClass(ResumeAwaitOnCompletion, 'ResumeAwaitOnCompletion', VOID, JobNode);
167
- initMetadataForClass(IncompleteStateBox, 'IncompleteStateBox');
168
170
  initMetadataForClass(MainCoroutineDispatcher, 'MainCoroutineDispatcher', VOID, CoroutineDispatcher);
171
+ initMetadataForObject(NonCancellable, 'NonCancellable', VOID, AbstractCoroutineContextElement, [Element], [0]);
169
172
  initMetadataForClass(TimeoutCancellationException, 'TimeoutCancellationException', VOID, CancellationException);
170
173
  initMetadataForObject(Unconfined, 'Unconfined', VOID, CoroutineDispatcher);
171
174
  initMetadataForObject(Key_2, 'Key');
@@ -174,7 +177,6 @@
174
177
  initMetadataForObject(ExceptionSuccessfullyProcessed, 'ExceptionSuccessfullyProcessed', VOID, Exception);
175
178
  initMetadataForClass(DispatchedContinuation, 'DispatchedContinuation', VOID, DispatchedTask, [Continuation]);
176
179
  initMetadataForClass(DispatchException, 'DispatchException', VOID, Exception);
177
- initMetadataForClass(ScopeCoroutine, 'ScopeCoroutine', VOID, AbstractCoroutine, VOID, [0]);
178
180
  initMetadataForClass(Symbol, 'Symbol');
179
181
  initMetadataForInterface(SelectInstance, 'SelectInstance');
180
182
  initMetadataForClass(CancellableContinuationWithOwner, 'CancellableContinuationWithOwner', VOID, VOID, [CancellableContinuation, Waiter]);
@@ -187,6 +189,7 @@
187
189
  initMetadataForClass(MessageQueue, 'MessageQueue', VOID, VOID, [MutableIterable, Collection, KtList]);
188
190
  initMetadataForClass(ScheduledMessageQueue, 'ScheduledMessageQueue', VOID, MessageQueue);
189
191
  initMetadataForClass(WindowMessageQueue, 'WindowMessageQueue', VOID, MessageQueue);
192
+ initMetadataForClass(UndispatchedCoroutine, 'UndispatchedCoroutine', VOID, ScopeCoroutine, VOID, [0]);
190
193
  initMetadataForObject(Dispatchers, 'Dispatchers');
191
194
  initMetadataForClass(JsMainDispatcher, 'JsMainDispatcher', VOID, MainCoroutineDispatcher);
192
195
  initMetadataForClass(JobCancellationException, 'JobCancellationException', VOID, CancellationException);
@@ -427,6 +430,30 @@
427
430
  coroutine.start_50fwcj_k$(start, coroutine, block);
428
431
  return coroutine;
429
432
  }
433
+ function withContext(context, block, $completion) {
434
+ var tmp$ret$0;
435
+ $l$block_0: {
436
+ var oldContext = $completion.get_context_h02k06_k$();
437
+ var newContext = newCoroutineContext_0(oldContext, context);
438
+ ensureActive(newContext);
439
+ if (newContext === oldContext) {
440
+ var coroutine = new ScopeCoroutine(newContext, $completion);
441
+ tmp$ret$0 = startUndispatchedOrReturn(coroutine, coroutine, block);
442
+ break $l$block_0;
443
+ }
444
+ if (equals(newContext.get_y2st91_k$(Key_instance), oldContext.get_y2st91_k$(Key_instance))) {
445
+ var coroutine_0 = new UndispatchedCoroutine(newContext, $completion);
446
+ // Inline function 'kotlinx.coroutines.withCoroutineContext' call
447
+ coroutine_0.context_1;
448
+ tmp$ret$0 = startUndispatchedOrReturn(coroutine_0, coroutine_0, block);
449
+ break $l$block_0;
450
+ }
451
+ var coroutine_1 = new DispatchedCoroutine(newContext, $completion);
452
+ startCoroutineCancellable(block, coroutine_1, coroutine_1);
453
+ tmp$ret$0 = coroutine_1.getResult_fck196_k$();
454
+ }
455
+ return tmp$ret$0;
456
+ }
430
457
  function $awaitCOROUTINE$(_this__u8e3s4, resultContinuation) {
431
458
  CoroutineImpl.call(this, resultContinuation);
432
459
  this._this__u8e3s4__1 = _this__u8e3s4;
@@ -479,7 +506,65 @@
479
506
  this.continuation_1 = createCoroutineUnintercepted(block, this, this);
480
507
  }
481
508
  protoOf(LazyDeferredCoroutine).onStart_qsx7gt_k$ = function () {
482
- startCoroutineCancellable(this.continuation_1, this);
509
+ startCoroutineCancellable_0(this.continuation_1, this);
510
+ };
511
+ function trySuspend($this) {
512
+ // Inline function 'kotlinx.atomicfu.loop' call
513
+ var this_0 = $this._decision_1;
514
+ while (true) {
515
+ switch (this_0.kotlinx$atomicfu$value) {
516
+ case 0:
517
+ if ($this._decision_1.atomicfu$compareAndSet(0, 1))
518
+ return true;
519
+ break;
520
+ case 2:
521
+ return false;
522
+ default:
523
+ // Inline function 'kotlin.error' call
524
+
525
+ var message = 'Already suspended';
526
+ throw IllegalStateException_init_$Create$(toString(message));
527
+ }
528
+ }
529
+ }
530
+ function tryResume($this) {
531
+ // Inline function 'kotlinx.atomicfu.loop' call
532
+ var this_0 = $this._decision_1;
533
+ while (true) {
534
+ switch (this_0.kotlinx$atomicfu$value) {
535
+ case 0:
536
+ if ($this._decision_1.atomicfu$compareAndSet(0, 2))
537
+ return true;
538
+ break;
539
+ case 1:
540
+ return false;
541
+ default:
542
+ // Inline function 'kotlin.error' call
543
+
544
+ var message = 'Already resumed';
545
+ throw IllegalStateException_init_$Create$(toString(message));
546
+ }
547
+ }
548
+ }
549
+ function DispatchedCoroutine(context, uCont) {
550
+ ScopeCoroutine.call(this, context, uCont);
551
+ this._decision_1 = atomic$int$1(0);
552
+ }
553
+ protoOf(DispatchedCoroutine).afterCompletion_2p0irt_k$ = function (state) {
554
+ this.afterResume_ugh2hm_k$(state);
555
+ };
556
+ protoOf(DispatchedCoroutine).afterResume_ugh2hm_k$ = function (state) {
557
+ if (tryResume(this))
558
+ return Unit_instance;
559
+ resumeCancellableWithInternal(intercepted(this.uCont_1), recoverResult(state, this.uCont_1));
560
+ };
561
+ protoOf(DispatchedCoroutine).getResult_fck196_k$ = function () {
562
+ if (trySuspend(this))
563
+ return get_COROUTINE_SUSPENDED();
564
+ var state = unboxState(this.get_state_2t6sbp_k$());
565
+ if (state instanceof CompletedExceptionally)
566
+ throw state.cause_1;
567
+ return state;
483
568
  };
484
569
  function CancellableContinuation() {
485
570
  }
@@ -593,7 +678,7 @@
593
678
  }
594
679
  }
595
680
  }
596
- function trySuspend($this) {
681
+ function trySuspend_0($this) {
597
682
  // Inline function 'kotlinx.atomicfu.loop' call
598
683
  var this_0 = $this._decisionAndIndex_1;
599
684
  while (true) {
@@ -619,7 +704,7 @@
619
704
  }
620
705
  }
621
706
  }
622
- function tryResume($this) {
707
+ function tryResume_0($this) {
623
708
  // Inline function 'kotlinx.atomicfu.loop' call
624
709
  var this_0 = $this._decisionAndIndex_1;
625
710
  while (true) {
@@ -728,7 +813,7 @@
728
813
  throw IllegalStateException_init_$Create$(toString(message));
729
814
  }
730
815
  function dispatchResume($this, mode) {
731
- if (tryResume($this))
816
+ if (tryResume_0($this))
732
817
  return Unit_instance;
733
818
  dispatch($this, mode);
734
819
  }
@@ -975,7 +1060,7 @@
975
1060
  };
976
1061
  protoOf(CancellableContinuationImpl).getResult_fck196_k$ = function () {
977
1062
  var isReusable_0 = isReusable(this);
978
- if (trySuspend(this)) {
1063
+ if (trySuspend_0(this)) {
979
1064
  if (_get_parentHandle__f8dcex(this) == null) {
980
1065
  installParentHandle(this);
981
1066
  }
@@ -1304,13 +1389,18 @@
1304
1389
  protoOf(CompletableDeferredImpl).completeExceptionally_xyzekf_k$ = function (exception) {
1305
1390
  return this.makeCompleting_fohkwa_k$(new CompletedExceptionally(exception));
1306
1391
  };
1307
- function CancelledContinuation(continuation, cause, handled) {
1308
- CompletedExceptionally.call(this, cause == null ? CancellationException_init_$Create$('Continuation ' + toString(continuation) + ' was cancelled normally') : cause, handled);
1309
- this._resumed_1 = atomic$boolean$1(false);
1392
+ function recoverResult(state, uCont) {
1393
+ var tmp;
1394
+ if (state instanceof CompletedExceptionally) {
1395
+ // Inline function 'kotlin.Companion.failure' call
1396
+ var exception = recoverStackTrace(state.cause_1, uCont);
1397
+ tmp = _Result___init__impl__xyqfz8(createFailure(exception));
1398
+ } else {
1399
+ // Inline function 'kotlin.Companion.success' call
1400
+ tmp = _Result___init__impl__xyqfz8(state);
1401
+ }
1402
+ return tmp;
1310
1403
  }
1311
- protoOf(CancelledContinuation).makeResumed_vjvawn_k$ = function () {
1312
- return this._resumed_1.atomicfu$compareAndSet(false, true);
1313
- };
1314
1404
  function CompletedExceptionally(cause, handled) {
1315
1405
  handled = handled === VOID ? false : handled;
1316
1406
  this.cause_1 = cause;
@@ -1325,6 +1415,13 @@
1325
1415
  protoOf(CompletedExceptionally).toString = function () {
1326
1416
  return get_classSimpleName(this) + '[' + this.cause_1.toString() + ']';
1327
1417
  };
1418
+ function CancelledContinuation(continuation, cause, handled) {
1419
+ CompletedExceptionally.call(this, cause == null ? CancellationException_init_$Create$('Continuation ' + toString(continuation) + ' was cancelled normally') : cause, handled);
1420
+ this._resumed_1 = atomic$boolean$1(false);
1421
+ }
1422
+ protoOf(CancelledContinuation).makeResumed_vjvawn_k$ = function () {
1423
+ return this._resumed_1.atomicfu$compareAndSet(false, true);
1424
+ };
1328
1425
  function toState(_this__u8e3s4, caller) {
1329
1426
  // Inline function 'kotlin.getOrElse' call
1330
1427
  var exception = Result__exceptionOrNull_impl_p6xea9(_this__u8e3s4);
@@ -1347,18 +1444,6 @@
1347
1444
  }
1348
1445
  return tmp;
1349
1446
  }
1350
- function recoverResult(state, uCont) {
1351
- var tmp;
1352
- if (state instanceof CompletedExceptionally) {
1353
- // Inline function 'kotlin.Companion.failure' call
1354
- var exception = recoverStackTrace(state.cause_1, uCont);
1355
- tmp = _Result___init__impl__xyqfz8(createFailure(exception));
1356
- } else {
1357
- // Inline function 'kotlin.Companion.success' call
1358
- tmp = _Result___init__impl__xyqfz8(state);
1359
- }
1360
- return tmp;
1361
- }
1362
1447
  function CoroutineDispatcher$Key$_init_$lambda_akl8b5(it) {
1363
1448
  return it instanceof CoroutineDispatcher ? it : null;
1364
1449
  }
@@ -1468,7 +1553,7 @@
1468
1553
  var tmp;
1469
1554
  switch (this.ordinal_1) {
1470
1555
  case 0:
1471
- startCoroutineCancellable_0(block, receiver, completion);
1556
+ startCoroutineCancellable(block, receiver, completion);
1472
1557
  tmp = Unit_instance;
1473
1558
  break;
1474
1559
  case 2:
@@ -1608,6 +1693,14 @@
1608
1693
  }
1609
1694
  return tmp;
1610
1695
  }
1696
+ function ensureActive(_this__u8e3s4) {
1697
+ var tmp0_safe_receiver = _this__u8e3s4.get_y2st91_k$(Key_instance_2);
1698
+ if (tmp0_safe_receiver == null)
1699
+ null;
1700
+ else {
1701
+ ensureActive_0(tmp0_safe_receiver);
1702
+ }
1703
+ }
1611
1704
  function NonDisposableHandle() {
1612
1705
  }
1613
1706
  protoOf(NonDisposableHandle).dispose_3nnxhr_k$ = function () {
@@ -1628,6 +1721,10 @@
1628
1721
  function Key_getInstance_1() {
1629
1722
  return Key_instance_2;
1630
1723
  }
1724
+ function ensureActive_0(_this__u8e3s4) {
1725
+ if (!_this__u8e3s4.get_isActive_quafmh_k$())
1726
+ throw _this__u8e3s4.getCancellationException_8i1q6u_k$();
1727
+ }
1631
1728
  function ParentJob() {
1632
1729
  }
1633
1730
  function get_COMPLETING_ALREADY() {
@@ -1688,6 +1785,12 @@
1688
1785
  protoOf(JobNode).toString = function () {
1689
1786
  return get_classSimpleName(this) + '@' + get_hexAddress(this) + '[job@' + get_hexAddress(this.get_job_18j2r0_k$()) + ']';
1690
1787
  };
1788
+ function unboxState(_this__u8e3s4) {
1789
+ _init_properties_JobSupport_kt__68f172();
1790
+ var tmp0_safe_receiver = _this__u8e3s4 instanceof IncompleteStateBox ? _this__u8e3s4 : null;
1791
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.state_1;
1792
+ return tmp1_elvis_lhs == null ? _this__u8e3s4 : tmp1_elvis_lhs;
1793
+ }
1691
1794
  function _set_exceptionsHolder__tqm22h($this, value) {
1692
1795
  $this._exceptionsHolder_1.kotlinx$atomicfu$value = value;
1693
1796
  }
@@ -2927,6 +3030,9 @@
2927
3030
  protoOf(NodeList).toString = function () {
2928
3031
  return get_DEBUG() ? this.getString_gb1pt9_k$('Active') : protoOf(LockFreeLinkedListHead).toString.call(this);
2929
3032
  };
3033
+ function IncompleteStateBox(state) {
3034
+ this.state_1 = state;
3035
+ }
2930
3036
  function boxIncomplete(_this__u8e3s4) {
2931
3037
  _init_properties_JobSupport_kt__68f172();
2932
3038
  var tmp;
@@ -2984,12 +3090,6 @@
2984
3090
  protoOf(ChildHandleNode).childCancelled_hsnipy_k$ = function (cause) {
2985
3091
  return this.get_job_18j2r0_k$().childCancelled_hsnipy_k$(cause);
2986
3092
  };
2987
- function unboxState(_this__u8e3s4) {
2988
- _init_properties_JobSupport_kt__68f172();
2989
- var tmp0_safe_receiver = _this__u8e3s4 instanceof IncompleteStateBox ? _this__u8e3s4 : null;
2990
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.state_1;
2991
- return tmp1_elvis_lhs == null ? _this__u8e3s4 : tmp1_elvis_lhs;
2992
- }
2993
3093
  function ResumeAwaitOnCompletion(continuation) {
2994
3094
  JobNode.call(this);
2995
3095
  this.continuation_1 = continuation;
@@ -3016,9 +3116,6 @@
3016
3116
  tmp0_0.resumeWith_rk9gbt_k$(tmp$ret$4);
3017
3117
  }
3018
3118
  };
3019
- function IncompleteStateBox(state) {
3020
- this.state_1 = state;
3021
- }
3022
3119
  var properties_initialized_JobSupport_kt_5iq8a4;
3023
3120
  function _init_properties_JobSupport_kt__68f172() {
3024
3121
  if (!properties_initialized_JobSupport_kt_5iq8a4) {
@@ -3067,6 +3164,38 @@
3067
3164
  return 'Dispatchers.Main.immediate';
3068
3165
  return null;
3069
3166
  };
3167
+ function NonCancellable() {
3168
+ NonCancellable_instance = this;
3169
+ AbstractCoroutineContextElement.call(this, Key_instance_2);
3170
+ this.message_1 = "NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited";
3171
+ }
3172
+ protoOf(NonCancellable).get_isActive_quafmh_k$ = function () {
3173
+ return true;
3174
+ };
3175
+ protoOf(NonCancellable).start_1tchgi_k$ = function () {
3176
+ return false;
3177
+ };
3178
+ protoOf(NonCancellable).getCancellationException_8i1q6u_k$ = function () {
3179
+ throw IllegalStateException_init_$Create$('This job is always active');
3180
+ };
3181
+ protoOf(NonCancellable).invokeOnCompletion_n6cffu_k$ = function (handler) {
3182
+ return NonDisposableHandle_instance;
3183
+ };
3184
+ protoOf(NonCancellable).invokeOnCompletion_sct3wq_k$ = function (onCancelling, invokeImmediately, handler) {
3185
+ return NonDisposableHandle_instance;
3186
+ };
3187
+ protoOf(NonCancellable).attachChild_314ws0_k$ = function (child) {
3188
+ return NonDisposableHandle_instance;
3189
+ };
3190
+ protoOf(NonCancellable).toString = function () {
3191
+ return 'NonCancellable';
3192
+ };
3193
+ var NonCancellable_instance;
3194
+ function NonCancellable_getInstance() {
3195
+ if (NonCancellable_instance == null)
3196
+ new NonCancellable();
3197
+ return NonCancellable_instance;
3198
+ }
3070
3199
  function TimeoutCancellationException() {
3071
3200
  }
3072
3201
  function Unconfined() {
@@ -3329,6 +3458,81 @@
3329
3458
  return REUSABLE_CLAIMED;
3330
3459
  }
3331
3460
  var REUSABLE_CLAIMED;
3461
+ function resumeCancellableWithInternal(_this__u8e3s4, result) {
3462
+ _init_properties_DispatchedContinuation_kt__tnmqc0();
3463
+ var tmp;
3464
+ if (_this__u8e3s4 instanceof DispatchedContinuation) {
3465
+ // Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeCancellableWith' call
3466
+ var state = toState_0(result);
3467
+ if (safeIsDispatchNeeded(_this__u8e3s4.dispatcher_1, _this__u8e3s4.get_context_h02k06_k$())) {
3468
+ _this__u8e3s4._state_1 = state;
3469
+ _this__u8e3s4.resumeMode_1 = 1;
3470
+ safeDispatch(_this__u8e3s4.dispatcher_1, _this__u8e3s4.get_context_h02k06_k$(), _this__u8e3s4);
3471
+ } else {
3472
+ $l$block: {
3473
+ // Inline function 'kotlinx.coroutines.internal.executeUnconfined' call
3474
+ // Inline function 'kotlinx.coroutines.assert' call
3475
+ var eventLoop = ThreadLocalEventLoop_getInstance().get_eventLoop_wo5hfs_k$();
3476
+ if (false && eventLoop.get_isUnconfinedQueueEmpty_mi405s_k$()) {
3477
+ break $l$block;
3478
+ }
3479
+ var tmp_0;
3480
+ if (eventLoop.get_isUnconfinedLoopActive_g78ri6_k$()) {
3481
+ _this__u8e3s4._state_1 = state;
3482
+ _this__u8e3s4.resumeMode_1 = 1;
3483
+ eventLoop.dispatchUnconfined_o79kaq_k$(_this__u8e3s4);
3484
+ tmp_0 = true;
3485
+ } else {
3486
+ // Inline function 'kotlinx.coroutines.runUnconfinedEventLoop' call
3487
+ eventLoop.incrementUseCount_jadqvy_k$(true);
3488
+ try {
3489
+ var tmp$ret$5;
3490
+ $l$block_0: {
3491
+ // Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeCancelled' call
3492
+ var job = _this__u8e3s4.get_context_h02k06_k$().get_y2st91_k$(Key_instance_2);
3493
+ if (!(job == null) && !job.get_isActive_quafmh_k$()) {
3494
+ var cause = job.getCancellationException_8i1q6u_k$();
3495
+ _this__u8e3s4.cancelCompletedResult_pnx7en_k$(state, cause);
3496
+ // Inline function 'kotlin.coroutines.resumeWithException' call
3497
+ // Inline function 'kotlin.Companion.failure' call
3498
+ var tmp$ret$7 = _Result___init__impl__xyqfz8(createFailure(cause));
3499
+ _this__u8e3s4.resumeWith_rk9gbt_k$(tmp$ret$7);
3500
+ tmp$ret$5 = true;
3501
+ break $l$block_0;
3502
+ }
3503
+ tmp$ret$5 = false;
3504
+ }
3505
+ if (!tmp$ret$5) {
3506
+ // Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeUndispatchedWith' call
3507
+ _this__u8e3s4.continuation_1;
3508
+ // Inline function 'kotlinx.coroutines.withContinuationContext' call
3509
+ _this__u8e3s4.countOrElement_1;
3510
+ _this__u8e3s4.continuation_1.resumeWith_rk9gbt_k$(result);
3511
+ }
3512
+ $l$loop: while (eventLoop.processUnconfinedEvent_mypjl6_k$()) {
3513
+ }
3514
+ } catch ($p) {
3515
+ if ($p instanceof Error) {
3516
+ var e = $p;
3517
+ _this__u8e3s4.handleFatalException_fix1y3_k$(e);
3518
+ } else {
3519
+ throw $p;
3520
+ }
3521
+ }
3522
+ finally {
3523
+ eventLoop.decrementUseCount_x8i8ca_k$(true);
3524
+ }
3525
+ tmp_0 = false;
3526
+ }
3527
+ }
3528
+ }
3529
+ tmp = Unit_instance;
3530
+ } else {
3531
+ _this__u8e3s4.resumeWith_rk9gbt_k$(result);
3532
+ tmp = Unit_instance;
3533
+ }
3534
+ return tmp;
3535
+ }
3332
3536
  function _get_reusableCancellableContinuation__9qex09($this) {
3333
3537
  var tmp = $this._reusableCancellableContinuation_1.kotlinx$atomicfu$value;
3334
3538
  return tmp instanceof CancellableContinuationImpl ? tmp : null;
@@ -3516,81 +3720,6 @@
3516
3720
  }
3517
3721
  }
3518
3722
  }
3519
- function resumeCancellableWithInternal(_this__u8e3s4, result) {
3520
- _init_properties_DispatchedContinuation_kt__tnmqc0();
3521
- var tmp;
3522
- if (_this__u8e3s4 instanceof DispatchedContinuation) {
3523
- // Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeCancellableWith' call
3524
- var state = toState_0(result);
3525
- if (safeIsDispatchNeeded(_this__u8e3s4.dispatcher_1, _this__u8e3s4.get_context_h02k06_k$())) {
3526
- _this__u8e3s4._state_1 = state;
3527
- _this__u8e3s4.resumeMode_1 = 1;
3528
- safeDispatch(_this__u8e3s4.dispatcher_1, _this__u8e3s4.get_context_h02k06_k$(), _this__u8e3s4);
3529
- } else {
3530
- $l$block: {
3531
- // Inline function 'kotlinx.coroutines.internal.executeUnconfined' call
3532
- // Inline function 'kotlinx.coroutines.assert' call
3533
- var eventLoop = ThreadLocalEventLoop_getInstance().get_eventLoop_wo5hfs_k$();
3534
- if (false && eventLoop.get_isUnconfinedQueueEmpty_mi405s_k$()) {
3535
- break $l$block;
3536
- }
3537
- var tmp_0;
3538
- if (eventLoop.get_isUnconfinedLoopActive_g78ri6_k$()) {
3539
- _this__u8e3s4._state_1 = state;
3540
- _this__u8e3s4.resumeMode_1 = 1;
3541
- eventLoop.dispatchUnconfined_o79kaq_k$(_this__u8e3s4);
3542
- tmp_0 = true;
3543
- } else {
3544
- // Inline function 'kotlinx.coroutines.runUnconfinedEventLoop' call
3545
- eventLoop.incrementUseCount_jadqvy_k$(true);
3546
- try {
3547
- var tmp$ret$5;
3548
- $l$block_0: {
3549
- // Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeCancelled' call
3550
- var job = _this__u8e3s4.get_context_h02k06_k$().get_y2st91_k$(Key_instance_2);
3551
- if (!(job == null) && !job.get_isActive_quafmh_k$()) {
3552
- var cause = job.getCancellationException_8i1q6u_k$();
3553
- _this__u8e3s4.cancelCompletedResult_pnx7en_k$(state, cause);
3554
- // Inline function 'kotlin.coroutines.resumeWithException' call
3555
- // Inline function 'kotlin.Companion.failure' call
3556
- var tmp$ret$7 = _Result___init__impl__xyqfz8(createFailure(cause));
3557
- _this__u8e3s4.resumeWith_rk9gbt_k$(tmp$ret$7);
3558
- tmp$ret$5 = true;
3559
- break $l$block_0;
3560
- }
3561
- tmp$ret$5 = false;
3562
- }
3563
- if (!tmp$ret$5) {
3564
- // Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeUndispatchedWith' call
3565
- _this__u8e3s4.continuation_1;
3566
- // Inline function 'kotlinx.coroutines.withContinuationContext' call
3567
- _this__u8e3s4.countOrElement_1;
3568
- _this__u8e3s4.continuation_1.resumeWith_rk9gbt_k$(result);
3569
- }
3570
- $l$loop: while (eventLoop.processUnconfinedEvent_mypjl6_k$()) {
3571
- }
3572
- } catch ($p) {
3573
- if ($p instanceof Error) {
3574
- var e = $p;
3575
- _this__u8e3s4.handleFatalException_fix1y3_k$(e);
3576
- } else {
3577
- throw $p;
3578
- }
3579
- }
3580
- finally {
3581
- eventLoop.decrementUseCount_x8i8ca_k$(true);
3582
- }
3583
- tmp_0 = false;
3584
- }
3585
- }
3586
- }
3587
- tmp = Unit_instance;
3588
- } else {
3589
- _this__u8e3s4.resumeWith_rk9gbt_k$(result);
3590
- tmp = Unit_instance;
3591
- }
3592
- return tmp;
3593
- }
3594
3723
  var properties_initialized_DispatchedContinuation_kt_2siadq;
3595
3724
  function _init_properties_DispatchedContinuation_kt__tnmqc0() {
3596
3725
  if (!properties_initialized_DispatchedContinuation_kt_2siadq) {
@@ -3809,34 +3938,34 @@
3809
3938
  }
3810
3939
  return parsed;
3811
3940
  }
3812
- function startCoroutineCancellable(_this__u8e3s4, fatalCompletion) {
3941
+ function startCoroutineCancellable(_this__u8e3s4, receiver, completion) {
3813
3942
  // Inline function 'kotlinx.coroutines.intrinsics.runSafely' call
3814
3943
  try {
3815
- var tmp = intercepted(_this__u8e3s4);
3944
+ var tmp = intercepted(createCoroutineUnintercepted(_this__u8e3s4, receiver, completion));
3816
3945
  // Inline function 'kotlin.Companion.success' call
3817
3946
  var tmp$ret$2 = _Result___init__impl__xyqfz8(Unit_instance);
3818
3947
  resumeCancellableWithInternal(tmp, tmp$ret$2);
3819
3948
  } catch ($p) {
3820
3949
  if ($p instanceof Error) {
3821
3950
  var e = $p;
3822
- dispatcherFailure(fatalCompletion, e);
3951
+ dispatcherFailure(completion, e);
3823
3952
  } else {
3824
3953
  throw $p;
3825
3954
  }
3826
3955
  }
3827
3956
  return Unit_instance;
3828
3957
  }
3829
- function startCoroutineCancellable_0(_this__u8e3s4, receiver, completion) {
3958
+ function startCoroutineCancellable_0(_this__u8e3s4, fatalCompletion) {
3830
3959
  // Inline function 'kotlinx.coroutines.intrinsics.runSafely' call
3831
3960
  try {
3832
- var tmp = intercepted(createCoroutineUnintercepted(_this__u8e3s4, receiver, completion));
3961
+ var tmp = intercepted(_this__u8e3s4);
3833
3962
  // Inline function 'kotlin.Companion.success' call
3834
3963
  var tmp$ret$2 = _Result___init__impl__xyqfz8(Unit_instance);
3835
3964
  resumeCancellableWithInternal(tmp, tmp$ret$2);
3836
3965
  } catch ($p) {
3837
3966
  if ($p instanceof Error) {
3838
3967
  var e = $p;
3839
- dispatcherFailure(completion, e);
3968
+ dispatcherFailure(fatalCompletion, e);
3840
3969
  } else {
3841
3970
  throw $p;
3842
3971
  }
@@ -4693,6 +4822,15 @@
4693
4822
  var combined = _this__u8e3s4.get_coroutineContext_115oqo_k$().plus_s13ygv_k$(context);
4694
4823
  return !(combined === Dispatchers_getInstance().Default_1) && combined.get_y2st91_k$(Key_instance) == null ? combined.plus_s13ygv_k$(Dispatchers_getInstance().Default_1) : combined;
4695
4824
  }
4825
+ function newCoroutineContext_0(_this__u8e3s4, addedContext) {
4826
+ return _this__u8e3s4.plus_s13ygv_k$(addedContext);
4827
+ }
4828
+ function UndispatchedCoroutine(context, uCont) {
4829
+ ScopeCoroutine.call(this, context, uCont);
4830
+ }
4831
+ protoOf(UndispatchedCoroutine).afterResume_ugh2hm_k$ = function (state) {
4832
+ return this.uCont_1.resumeWith_rk9gbt_k$(recoverResult(state, this.uCont_1));
4833
+ };
4696
4834
  function toDebugString(_this__u8e3s4) {
4697
4835
  return toString(_this__u8e3s4);
4698
4836
  }
@@ -5126,15 +5264,17 @@
5126
5264
  //region block: exports
5127
5265
  _.$_$ = _.$_$ || {};
5128
5266
  _.$_$.a = GlobalScope_instance;
5129
- _.$_$.b = awaitAll;
5130
- _.$_$.c = await_0;
5131
- _.$_$.d = coroutineScope;
5132
- _.$_$.e = Mutex;
5133
- _.$_$.f = Semaphore;
5134
- _.$_$.g = CompletableDeferred;
5135
- _.$_$.h = CoroutineScope;
5136
- _.$_$.i = async;
5137
- _.$_$.j = promise;
5267
+ _.$_$.b = NonCancellable_getInstance;
5268
+ _.$_$.c = awaitAll;
5269
+ _.$_$.d = await_0;
5270
+ _.$_$.e = coroutineScope;
5271
+ _.$_$.f = withContext;
5272
+ _.$_$.g = Mutex;
5273
+ _.$_$.h = Semaphore;
5274
+ _.$_$.i = CompletableDeferred;
5275
+ _.$_$.j = CoroutineScope;
5276
+ _.$_$.k = async;
5277
+ _.$_$.l = promise;
5138
5278
  //endregion
5139
5279
  return _;
5140
5280
  }));