@solibo/home-api 1.16.17 → 1.16.18
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/Kotlin-DateTime-library-kotlinx-datetime.mjs +964 -960
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -1
- package/MultiplatformSettings-multiplatform-settings-no-arg.mjs.map +1 -1
- package/MultiplatformSettings-multiplatform-settings.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +3712 -3533
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -1
- package/kotlinx-atomicfu.mjs +13 -13
- package/kotlinx-atomicfu.mjs.map +1 -1
- package/kotlinx-browser.mjs.map +1 -1
- package/kotlinx-coroutines-core.mjs +2054 -2054
- package/kotlinx-coroutines-core.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.mjs +57 -57
- package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-core.mjs +519 -519
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2285 -2286
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1713 -1711
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/ktor-ktor-client-auth.mjs.map +1 -1
- package/ktor-ktor-client-content-negotiation.mjs +452 -292
- package/ktor-ktor-client-content-negotiation.mjs.map +1 -1
- package/ktor-ktor-client-core.mjs +3486 -3378
- package/ktor-ktor-client-core.mjs.map +1 -1
- package/ktor-ktor-client-encoding.mjs.map +1 -1
- package/ktor-ktor-client-logging.mjs.map +1 -1
- package/ktor-ktor-client-websockets.mjs.map +1 -1
- package/ktor-ktor-events.mjs +7 -7
- package/ktor-ktor-events.mjs.map +1 -1
- package/ktor-ktor-http-cio.mjs +581 -581
- package/ktor-ktor-http-cio.mjs.map +1 -1
- package/ktor-ktor-http.mjs +1231 -1174
- package/ktor-ktor-http.mjs.map +1 -1
- package/ktor-ktor-io.mjs +1172 -1223
- package/ktor-ktor-io.mjs.map +1 -1
- package/ktor-ktor-openapi-schema.mjs +84 -0
- package/ktor-ktor-openapi-schema.mjs.map +1 -0
- package/ktor-ktor-serialization-kotlinx-json.mjs +9 -9
- package/ktor-ktor-serialization-kotlinx-json.mjs.map +1 -1
- package/ktor-ktor-serialization-kotlinx.mjs +216 -226
- package/ktor-ktor-serialization-kotlinx.mjs.map +1 -1
- package/ktor-ktor-serialization.mjs +111 -116
- package/ktor-ktor-serialization.mjs.map +1 -1
- package/ktor-ktor-sse.mjs.map +1 -1
- package/ktor-ktor-utils.mjs +1037 -983
- package/ktor-ktor-utils.mjs.map +1 -1
- package/ktor-ktor-websocket-serialization.mjs.map +1 -1
- package/ktor-ktor-websockets.mjs +925 -911
- package/ktor-ktor-websockets.mjs.map +1 -1
- package/package.json +1 -1
- package/solibo-sdk-sdk-home-api.d.mts +46 -46
- package/solibo-sdk-sdk-home-api.mjs +98430 -97370
- package/solibo-sdk-sdk-home-api.mjs.map +1 -1
package/ktor-ktor-io.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
Companion_instancejy2056q2ma5w as Companion_instance,
|
|
3
|
+
Unit_instance3kz1zqli6gr1r as Unit_instance,
|
|
4
|
+
_Result___init__impl__xyqfz832zdzqrocazzs as _Result___init__impl__xyqfz8,
|
|
5
5
|
protoOf180f3jzyo7rfj as protoOf,
|
|
6
6
|
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
7
7
|
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
@@ -24,36 +24,36 @@ import {
|
|
|
24
24
|
add2suhfggl4zvkk as add,
|
|
25
25
|
intercepted2ogpsikxxj4u0 as intercepted,
|
|
26
26
|
noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
|
|
27
|
-
|
|
27
|
+
returnIfSuspended39bw7wdvakhp8 as returnIfSuspended,
|
|
28
28
|
get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED,
|
|
29
29
|
initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine,
|
|
30
|
-
CancellationException_init_$Create$
|
|
30
|
+
CancellationException_init_$Create$6nn2czcftw2s as CancellationException_init_$Create$,
|
|
31
31
|
CancellationException3b36o9qz53rgr as CancellationException,
|
|
32
32
|
convertToInty04h231mmjoh as convertToInt,
|
|
33
33
|
toString1pkumu07cwy4m as toString_1,
|
|
34
|
-
IllegalStateException_init_$Create$
|
|
34
|
+
IllegalStateException_init_$Create$38ax6c90susjc as IllegalStateException_init_$Create$,
|
|
35
35
|
IllegalStateExceptionkoljg5n0nrlr as IllegalStateException,
|
|
36
|
-
IllegalStateException_init_$Init$
|
|
36
|
+
IllegalStateException_init_$Init$3qej4dbq7zzt3 as IllegalStateException_init_$Init$,
|
|
37
37
|
captureStack1fzi4aczwc4hg as captureStack,
|
|
38
38
|
replace3le3ie7l9k8aq as replace,
|
|
39
39
|
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
40
40
|
get_ONEazvfdh9ju3d4 as get_ONE,
|
|
41
|
-
IllegalArgumentException_init_$Create$
|
|
41
|
+
IllegalArgumentException_init_$Create$1gox8sdqs91jy as IllegalArgumentException_init_$Create$,
|
|
42
42
|
subtract2orl8z9upxd9l as subtract,
|
|
43
43
|
constructCallableReference23y65rf941mch as constructCallableReference,
|
|
44
|
-
|
|
44
|
+
EmptyCoroutineContext_instance3dshdbvg42f79 as EmptyCoroutineContext_instance,
|
|
45
45
|
Continuation1aa2oekvx7jm7 as Continuation,
|
|
46
46
|
KFunctionImpl1wt0sp8rkf847 as KFunctionImpl,
|
|
47
47
|
initMetadataForFunctionReferencen3g5fpj34t8u as initMetadataForFunctionReference,
|
|
48
48
|
initMetadataForLambda3af3he42mmnh as initMetadataForLambda,
|
|
49
49
|
Enum3alwj03lh1n41 as Enum,
|
|
50
|
-
ArrayList_init_$Create$
|
|
50
|
+
ArrayList_init_$Create$2xrifdqz5xirg as ArrayList_init_$Create$,
|
|
51
51
|
listOf1jh22dvmctj1r as listOf,
|
|
52
|
-
StringBuilder_init_$Create$
|
|
52
|
+
StringBuilder_init_$Create$yggnhbmai7wr as StringBuilder_init_$Create$,
|
|
53
53
|
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
54
54
|
encodeToByteArray1onwao0uakjfh as encodeToByteArray,
|
|
55
55
|
AutoCloseable1l5p57f9lp7kv as AutoCloseable,
|
|
56
|
-
|
|
56
|
+
_Char___init__impl__6a9atxrzocepzq3zgi as _Char___init__impl__6a9atx,
|
|
57
57
|
replaceqbix900hl8kl as replace_0,
|
|
58
58
|
getStringHashCode26igk1bx568vk as getStringHashCode,
|
|
59
59
|
charSequenceSubSequence1iwpdba8s3jc7 as charSequenceSubSequence,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
decodeToString1x4faah2liw2p as decodeToString,
|
|
64
64
|
setOf45ia9pnfhe90 as setOf,
|
|
65
65
|
charSequenceGet1vxk1y5n17t1z as charSequenceGet,
|
|
66
|
-
|
|
66
|
+
Char__toInt_impl_vasixd28v1p2u6jau5g as Char__toInt_impl_vasixd,
|
|
67
67
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
68
68
|
import {
|
|
69
69
|
DisposableHandle1uzxt8frdchxn as DisposableHandle,
|
|
@@ -75,23 +75,23 @@ import {
|
|
|
75
75
|
get_job2zvlvce9o9a29 as get_job,
|
|
76
76
|
Job13y4jkazwjho0 as Job,
|
|
77
77
|
cancel1xim2hrvjmwpn as cancel,
|
|
78
|
-
|
|
78
|
+
Dispatchers_getInstance128lm494a5r5s as Dispatchers_getInstance,
|
|
79
79
|
} from './kotlinx-coroutines-core.mjs';
|
|
80
80
|
import {
|
|
81
81
|
Buffergs925ekssbch as Buffer,
|
|
82
|
-
IOException_init_$Create$
|
|
82
|
+
IOException_init_$Create$1kq3iqv4goy5s as IOException_init_$Create$,
|
|
83
83
|
indexOf29nspdgx2e3ap as indexOf,
|
|
84
|
-
EOFException_init_$Create$
|
|
84
|
+
EOFException_init_$Create$1dnh68zpaekzl as EOFException_init_$Create$,
|
|
85
85
|
readString3v6duspiz33tv as readString,
|
|
86
86
|
readByteString2hnsbql6t4ads as readByteString,
|
|
87
87
|
readStringo8i62qxt5m4m as readString_0,
|
|
88
88
|
readString2nvggcfaijfhd as readString_1,
|
|
89
89
|
IOException1wyutdmfe71nu as IOException,
|
|
90
|
-
IOException_init_$Init$
|
|
91
|
-
IOException_init_$Create$
|
|
90
|
+
IOException_init_$Init$dftcwzvixao1 as IOException_init_$Init$,
|
|
91
|
+
IOException_init_$Create$gel36gqrokz0 as IOException_init_$Create$_0,
|
|
92
92
|
readByteArray1fhzfwi2j014k as readByteArray,
|
|
93
93
|
writeString33ca4btrgctw7 as writeString,
|
|
94
|
-
IOException_init_$Init$
|
|
94
|
+
IOException_init_$Init$25x2y9dednbo9 as IOException_init_$Init$_0,
|
|
95
95
|
readByteArray1ri21h2rciakw as readByteArray_0,
|
|
96
96
|
} from './kotlinx-io-kotlinx-io-core.mjs';
|
|
97
97
|
import { atomic$ref$130aurmcwdfdf1 as atomic$ref$1 } from './kotlinx-atomicfu.mjs';
|
|
@@ -103,10 +103,10 @@ initMetadataForCompanion(Companion);
|
|
|
103
103
|
initMetadataForObject(Empty, 'Empty');
|
|
104
104
|
initMetadataForClass(Closed, 'Closed');
|
|
105
105
|
function resume() {
|
|
106
|
-
return this.
|
|
106
|
+
return this.get_continuation_7yron4_k$().resumeWith_rk9gbt_k$(Companion_getInstance().RESUME_1);
|
|
107
107
|
}
|
|
108
108
|
function resume_0(throwable) {
|
|
109
|
-
var tmp = this.
|
|
109
|
+
var tmp = this.get_continuation_7yron4_k$();
|
|
110
110
|
var tmp_0;
|
|
111
111
|
if (throwable == null) {
|
|
112
112
|
tmp_0 = null;
|
|
@@ -117,7 +117,7 @@ function resume_0(throwable) {
|
|
|
117
117
|
tmp_0 = new Result(tmp$ret$0);
|
|
118
118
|
}
|
|
119
119
|
var tmp1_elvis_lhs = tmp_0;
|
|
120
|
-
return tmp.
|
|
120
|
+
return tmp.resumeWith_rk9gbt_k$(tmp1_elvis_lhs == null ? Companion_getInstance().RESUME_1 : tmp1_elvis_lhs.value_1);
|
|
121
121
|
}
|
|
122
122
|
initMetadataForInterface(Task, 'Task');
|
|
123
123
|
initMetadataForClass(Read, 'Read', VOID, VOID, [Task]);
|
|
@@ -128,7 +128,7 @@ initMetadataForCoroutine($flushCOROUTINE$, CoroutineImpl);
|
|
|
128
128
|
initMetadataForCoroutine($flushAndCloseCOROUTINE$, CoroutineImpl);
|
|
129
129
|
function awaitContent$default(min, $completion, $super) {
|
|
130
130
|
min = min === VOID ? 1 : min;
|
|
131
|
-
return $super === VOID ? this.
|
|
131
|
+
return $super === VOID ? this.awaitContent_q7m0p7_k$(min, $completion) : $super.awaitContent_q7m0p7_k$.call(this, min, $completion);
|
|
132
132
|
}
|
|
133
133
|
initMetadataForInterface(ByteReadChannel_1, 'ByteReadChannel', VOID, VOID, VOID, [1]);
|
|
134
134
|
function get_autoFlush() {
|
|
@@ -145,7 +145,6 @@ initMetadataForClass(ByteReadChannel$Companion$Empty$1, VOID, VOID, VOID, [ByteR
|
|
|
145
145
|
initMetadataForCompanion(Companion_0);
|
|
146
146
|
initMetadataForCoroutine($readBufferCOROUTINE$, CoroutineImpl);
|
|
147
147
|
initMetadataForCoroutine($readAvailableCOROUTINE$, CoroutineImpl);
|
|
148
|
-
initMetadataForCoroutine($readRemainingCOROUTINE$, CoroutineImpl);
|
|
149
148
|
initMetadataForCoroutine($toByteArrayCOROUTINE$, CoroutineImpl);
|
|
150
149
|
initMetadataForCoroutine($copyToCOROUTINE$, CoroutineImpl);
|
|
151
150
|
initMetadataForCoroutine($discardCOROUTINE$, CoroutineImpl);
|
|
@@ -176,7 +175,7 @@ initMetadataForClass(SourceByteReadChannel, 'SourceByteReadChannel', VOID, VOID,
|
|
|
176
175
|
initMetadataForClass(MalformedInputException, 'MalformedInputException', VOID, IOException);
|
|
177
176
|
initMetadataForClass(TooLongLineException, 'TooLongLineException', VOID, MalformedInputException);
|
|
178
177
|
function close() {
|
|
179
|
-
this.
|
|
178
|
+
this.dispose_3nnxhr_k$();
|
|
180
179
|
}
|
|
181
180
|
initMetadataForInterface(ObjectPool, 'ObjectPool', VOID, VOID, [AutoCloseable]);
|
|
182
181
|
initMetadataForClass(DefaultPool, 'DefaultPool', VOID, VOID, [ObjectPool]);
|
|
@@ -195,10 +194,10 @@ initMetadataForClass(TextDecoderFallback, 'TextDecoderFallback');
|
|
|
195
194
|
//endregion
|
|
196
195
|
function Companion() {
|
|
197
196
|
Companion_instance_0 = this;
|
|
198
|
-
this.
|
|
197
|
+
this.CLOSED_1 = new Closed(null);
|
|
199
198
|
var tmp = this;
|
|
200
199
|
// Inline function 'kotlin.Companion.success' call
|
|
201
|
-
tmp.
|
|
200
|
+
tmp.RESUME_1 = _Result___init__impl__xyqfz8(Unit_instance);
|
|
202
201
|
}
|
|
203
202
|
var Companion_instance_0;
|
|
204
203
|
function Companion_getInstance() {
|
|
@@ -226,109 +225,118 @@ function Empty_getInstance() {
|
|
|
226
225
|
return Empty_instance;
|
|
227
226
|
}
|
|
228
227
|
function Closed(cause) {
|
|
229
|
-
this.
|
|
228
|
+
this.cause_1 = cause;
|
|
230
229
|
}
|
|
231
230
|
protoOf(Closed).toString = function () {
|
|
232
|
-
return 'Closed(cause=' + toString(this.
|
|
231
|
+
return 'Closed(cause=' + toString(this.cause_1) + ')';
|
|
233
232
|
};
|
|
234
233
|
protoOf(Closed).hashCode = function () {
|
|
235
|
-
return this.
|
|
234
|
+
return this.cause_1 == null ? 0 : hashCode(this.cause_1);
|
|
236
235
|
};
|
|
237
236
|
protoOf(Closed).equals = function (other) {
|
|
238
237
|
if (this === other)
|
|
239
238
|
return true;
|
|
240
239
|
if (!(other instanceof Closed))
|
|
241
240
|
return false;
|
|
242
|
-
if (!equals(this.
|
|
241
|
+
if (!equals(this.cause_1, other.cause_1))
|
|
243
242
|
return false;
|
|
244
243
|
return true;
|
|
245
244
|
};
|
|
246
245
|
function Task() {
|
|
247
246
|
}
|
|
248
247
|
function Read(continuation) {
|
|
249
|
-
this.
|
|
250
|
-
this.
|
|
248
|
+
this.continuation_1 = continuation;
|
|
249
|
+
this.created_1 = null;
|
|
251
250
|
if (get_DEVELOPMENT_MODE()) {
|
|
252
251
|
var tmp = this;
|
|
253
252
|
// Inline function 'kotlin.also' call
|
|
254
|
-
var this_0 = newThrowable('ReadTask 0x' + toString_0(hashCode(this.
|
|
253
|
+
var this_0 = newThrowable('ReadTask 0x' + toString_0(hashCode(this.continuation_1), 16));
|
|
255
254
|
stackTraceToString(this_0);
|
|
256
|
-
tmp.
|
|
255
|
+
tmp.created_1 = this_0;
|
|
257
256
|
}
|
|
258
257
|
}
|
|
259
|
-
protoOf(Read).
|
|
260
|
-
return this.
|
|
258
|
+
protoOf(Read).get_continuation_7yron4_k$ = function () {
|
|
259
|
+
return this.continuation_1;
|
|
261
260
|
};
|
|
262
|
-
protoOf(Read).
|
|
263
|
-
return this.
|
|
261
|
+
protoOf(Read).get_created_i9xfr3_k$ = function () {
|
|
262
|
+
return this.created_1;
|
|
264
263
|
};
|
|
265
|
-
protoOf(Read).
|
|
264
|
+
protoOf(Read).taskName_6sat74_k$ = function () {
|
|
266
265
|
return 'read';
|
|
267
266
|
};
|
|
268
267
|
function Write(continuation) {
|
|
269
|
-
this.
|
|
270
|
-
this.
|
|
268
|
+
this.continuation_1 = continuation;
|
|
269
|
+
this.created_1 = null;
|
|
271
270
|
if (get_DEVELOPMENT_MODE()) {
|
|
272
271
|
var tmp = this;
|
|
273
272
|
// Inline function 'kotlin.also' call
|
|
274
|
-
var this_0 = newThrowable('WriteTask 0x' + toString_0(hashCode(this.
|
|
273
|
+
var this_0 = newThrowable('WriteTask 0x' + toString_0(hashCode(this.continuation_1), 16));
|
|
275
274
|
stackTraceToString(this_0);
|
|
276
|
-
tmp.
|
|
275
|
+
tmp.created_1 = this_0;
|
|
277
276
|
}
|
|
278
277
|
}
|
|
279
|
-
protoOf(Write).
|
|
280
|
-
return this.
|
|
278
|
+
protoOf(Write).get_continuation_7yron4_k$ = function () {
|
|
279
|
+
return this.continuation_1;
|
|
281
280
|
};
|
|
282
|
-
protoOf(Write).
|
|
283
|
-
return this.
|
|
281
|
+
protoOf(Write).get_created_i9xfr3_k$ = function () {
|
|
282
|
+
return this.created_1;
|
|
284
283
|
};
|
|
285
|
-
protoOf(Write).
|
|
284
|
+
protoOf(Write).taskName_6sat74_k$ = function () {
|
|
286
285
|
return 'write';
|
|
287
286
|
};
|
|
287
|
+
function rethrowCloseCauseIfNeeded($this) {
|
|
288
|
+
var tmp0_safe_receiver = $this.get_closedCause_o1qcj8_k$();
|
|
289
|
+
if (tmp0_safe_receiver == null)
|
|
290
|
+
null;
|
|
291
|
+
else {
|
|
292
|
+
// Inline function 'kotlin.let' call
|
|
293
|
+
throw tmp0_safe_receiver;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
288
296
|
function moveFlushToReadBuffer($this) {
|
|
289
297
|
// Inline function 'io.ktor.utils.io.locks.synchronized' call
|
|
290
|
-
$this.
|
|
291
|
-
$this.
|
|
292
|
-
$this.
|
|
298
|
+
$this.flushBufferMutex_1;
|
|
299
|
+
$this.flushBuffer_1.transferTo_lu4ka2_k$($this._readBuffer_1);
|
|
300
|
+
$this.flushBufferSize_1 = 0;
|
|
293
301
|
// Inline function 'io.ktor.utils.io.ByteChannel.resumeSlot' call
|
|
294
|
-
var current = $this.
|
|
302
|
+
var current = $this.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
295
303
|
var tmp;
|
|
296
304
|
if (current instanceof Write) {
|
|
297
|
-
tmp = $this.
|
|
305
|
+
tmp = $this.suspensionSlot_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
298
306
|
} else {
|
|
299
307
|
tmp = false;
|
|
300
308
|
}
|
|
301
309
|
if (tmp) {
|
|
302
|
-
current.
|
|
310
|
+
current.resume_2o15jx_k$();
|
|
303
311
|
}
|
|
304
312
|
}
|
|
305
313
|
function closeSlot($this, cause) {
|
|
306
|
-
var closeContinuation = !(cause == null) ? new Closed(cause) : Companion_getInstance().
|
|
307
|
-
var continuation = $this.
|
|
314
|
+
var closeContinuation = !(cause == null) ? new Closed(cause) : Companion_getInstance().CLOSED_1;
|
|
315
|
+
var continuation = $this.suspensionSlot_1.atomicfu$getAndSet(closeContinuation);
|
|
308
316
|
if (isInterface(continuation, Task)) {
|
|
309
|
-
continuation.
|
|
317
|
+
continuation.resume_xzb95z_k$(cause);
|
|
310
318
|
}
|
|
311
|
-
var tmp0_safe_receiver = $this.
|
|
319
|
+
var tmp0_safe_receiver = $this.closeHandler_1.atomicfu$getAndSet(null);
|
|
312
320
|
if (tmp0_safe_receiver == null)
|
|
313
321
|
null;
|
|
314
322
|
else
|
|
315
323
|
tmp0_safe_receiver(cause);
|
|
316
324
|
}
|
|
317
325
|
function sam$kotlinx_coroutines_DisposableHandle$0(function_0) {
|
|
318
|
-
this.
|
|
326
|
+
this.function_1 = function_0;
|
|
319
327
|
}
|
|
320
|
-
protoOf(sam$kotlinx_coroutines_DisposableHandle$0).
|
|
321
|
-
return this.
|
|
328
|
+
protoOf(sam$kotlinx_coroutines_DisposableHandle$0).dispose_3nnxhr_k$ = function () {
|
|
329
|
+
return this.function_1();
|
|
322
330
|
};
|
|
323
|
-
protoOf(sam$kotlinx_coroutines_DisposableHandle$0).
|
|
324
|
-
return this.
|
|
331
|
+
protoOf(sam$kotlinx_coroutines_DisposableHandle$0).getFunctionDelegate_jtodtf_k$ = function () {
|
|
332
|
+
return this.function_1;
|
|
325
333
|
};
|
|
326
334
|
protoOf(sam$kotlinx_coroutines_DisposableHandle$0).equals = function (other) {
|
|
327
335
|
var tmp;
|
|
328
336
|
if (!(other == null) ? isInterface(other, DisposableHandle) : false) {
|
|
329
337
|
var tmp_0;
|
|
330
338
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
331
|
-
tmp_0 = equals(this.
|
|
339
|
+
tmp_0 = equals(this.getFunctionDelegate_jtodtf_k$(), other.getFunctionDelegate_jtodtf_k$());
|
|
332
340
|
} else {
|
|
333
341
|
tmp_0 = false;
|
|
334
342
|
}
|
|
@@ -339,7 +347,7 @@ protoOf(sam$kotlinx_coroutines_DisposableHandle$0).equals = function (other) {
|
|
|
339
347
|
return tmp;
|
|
340
348
|
};
|
|
341
349
|
protoOf(sam$kotlinx_coroutines_DisposableHandle$0).hashCode = function () {
|
|
342
|
-
return hashCode(this.
|
|
350
|
+
return hashCode(this.getFunctionDelegate_jtodtf_k$());
|
|
343
351
|
};
|
|
344
352
|
function ByteChannel$invokeOnClose$lambda() {
|
|
345
353
|
return Unit_instance;
|
|
@@ -349,56 +357,56 @@ function ByteChannel$invokeOnClose$lambda_0() {
|
|
|
349
357
|
}
|
|
350
358
|
function ByteChannel$invokeOnClose$lambda_1(this$0, $handler) {
|
|
351
359
|
return function () {
|
|
352
|
-
this$0.
|
|
360
|
+
this$0.closeHandler_1.atomicfu$compareAndSet($handler, null);
|
|
353
361
|
return Unit_instance;
|
|
354
362
|
};
|
|
355
363
|
}
|
|
356
364
|
function $awaitContentCOROUTINE$(_this__u8e3s4, min, resultContinuation) {
|
|
357
365
|
CoroutineImpl.call(this, resultContinuation);
|
|
358
|
-
this.
|
|
359
|
-
this.
|
|
366
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
367
|
+
this.min_1 = min;
|
|
360
368
|
}
|
|
361
|
-
protoOf($awaitContentCOROUTINE$).
|
|
362
|
-
var suspendResult = this.
|
|
369
|
+
protoOf($awaitContentCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
370
|
+
var suspendResult = this.result_1;
|
|
363
371
|
$sm: do
|
|
364
372
|
try {
|
|
365
|
-
var tmp = this.
|
|
373
|
+
var tmp = this.state_1;
|
|
366
374
|
switch (tmp) {
|
|
367
375
|
case 0:
|
|
368
|
-
this.
|
|
369
|
-
|
|
370
|
-
if (this.
|
|
376
|
+
this.exceptionState_1 = 4;
|
|
377
|
+
rethrowCloseCauseIfNeeded(this._this__u8e3s4__1);
|
|
378
|
+
if (this._this__u8e3s4__1._readBuffer_1.get_size_woubt6_k$() >= fromInt(this.min_1))
|
|
371
379
|
return true;
|
|
372
|
-
this.
|
|
373
|
-
this.
|
|
380
|
+
this.this0__1 = this._this__u8e3s4__1;
|
|
381
|
+
this.state_1 = 1;
|
|
374
382
|
continue $sm;
|
|
375
383
|
case 1:
|
|
376
|
-
if (!(add(numberToLong(this.
|
|
377
|
-
this.
|
|
384
|
+
if (!(add(numberToLong(this._this__u8e3s4__1.flushBufferSize_1), this._this__u8e3s4__1._readBuffer_1.get_size_woubt6_k$()) < fromInt(this.min_1) && this._this__u8e3s4__1._closedCause_1.kotlinx$atomicfu$value == null)) {
|
|
385
|
+
this.state_1 = 3;
|
|
378
386
|
continue $sm;
|
|
379
387
|
}
|
|
380
388
|
|
|
381
|
-
this.
|
|
389
|
+
this.state_1 = 2;
|
|
382
390
|
var cancellable = new CancellableContinuationImpl(intercepted(this), 1);
|
|
383
|
-
cancellable.
|
|
384
|
-
var tmp0 = this.
|
|
391
|
+
cancellable.initCancellability_shqc60_k$();
|
|
392
|
+
var tmp0 = this.this0__1;
|
|
385
393
|
var tmp2 = new Read(cancellable);
|
|
386
394
|
l$ret$1: do {
|
|
387
|
-
var previous = tmp0.
|
|
395
|
+
var previous = tmp0.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
388
396
|
if (!(previous instanceof Closed)) {
|
|
389
|
-
if (!tmp0.
|
|
390
|
-
tmp2.
|
|
397
|
+
if (!tmp0.suspensionSlot_1.atomicfu$compareAndSet(previous, tmp2)) {
|
|
398
|
+
tmp2.resume_2o15jx_k$();
|
|
391
399
|
break l$ret$1;
|
|
392
400
|
}
|
|
393
401
|
}
|
|
394
402
|
if (previous instanceof Read) {
|
|
395
|
-
previous.
|
|
403
|
+
previous.resume_xzb95z_k$(new ConcurrentIOException(tmp2.taskName_6sat74_k$(), previous.get_created_i9xfr3_k$()));
|
|
396
404
|
} else {
|
|
397
405
|
if (isInterface(previous, Task)) {
|
|
398
|
-
previous.
|
|
406
|
+
previous.resume_2o15jx_k$();
|
|
399
407
|
} else {
|
|
400
408
|
if (previous instanceof Closed) {
|
|
401
|
-
tmp2.
|
|
409
|
+
tmp2.resume_xzb95z_k$(previous.cause_1);
|
|
402
410
|
break l$ret$1;
|
|
403
411
|
} else {
|
|
404
412
|
if (!equals(previous, Empty_instance)) {
|
|
@@ -407,95 +415,96 @@ protoOf($awaitContentCOROUTINE$).s8 = function () {
|
|
|
407
415
|
}
|
|
408
416
|
}
|
|
409
417
|
}
|
|
410
|
-
if (!(add(numberToLong(this.
|
|
411
|
-
var current = tmp0.
|
|
418
|
+
if (!(add(numberToLong(this._this__u8e3s4__1.flushBufferSize_1), this._this__u8e3s4__1._readBuffer_1.get_size_woubt6_k$()) < fromInt(this.min_1) && this._this__u8e3s4__1._closedCause_1.kotlinx$atomicfu$value == null)) {
|
|
419
|
+
var current = tmp0.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
412
420
|
var tmp_0;
|
|
413
421
|
if (current instanceof Read) {
|
|
414
|
-
tmp_0 = tmp0.
|
|
422
|
+
tmp_0 = tmp0.suspensionSlot_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
415
423
|
} else {
|
|
416
424
|
tmp_0 = false;
|
|
417
425
|
}
|
|
418
426
|
if (tmp_0) {
|
|
419
|
-
current.
|
|
427
|
+
current.resume_2o15jx_k$();
|
|
420
428
|
}
|
|
421
429
|
}
|
|
422
430
|
}
|
|
423
431
|
while (false);
|
|
424
|
-
suspendResult = returnIfSuspended(cancellable.
|
|
432
|
+
suspendResult = returnIfSuspended(cancellable.getResult_fck196_k$(), this);
|
|
425
433
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
426
434
|
return suspendResult;
|
|
427
435
|
}
|
|
428
436
|
|
|
429
437
|
continue $sm;
|
|
430
438
|
case 2:
|
|
431
|
-
this.
|
|
439
|
+
this.state_1 = 1;
|
|
432
440
|
continue $sm;
|
|
433
441
|
case 3:
|
|
434
|
-
|
|
435
|
-
|
|
442
|
+
rethrowCloseCauseIfNeeded(this._this__u8e3s4__1);
|
|
443
|
+
if (this._this__u8e3s4__1._readBuffer_1.get_size_woubt6_k$() < 1048576n) {
|
|
444
|
+
moveFlushToReadBuffer(this._this__u8e3s4__1);
|
|
436
445
|
}
|
|
437
446
|
|
|
438
|
-
return this.
|
|
447
|
+
return this._this__u8e3s4__1._readBuffer_1.get_size_woubt6_k$() >= fromInt(this.min_1);
|
|
439
448
|
case 4:
|
|
440
|
-
throw this.
|
|
449
|
+
throw this.exception_1;
|
|
441
450
|
}
|
|
442
451
|
} catch ($p) {
|
|
443
452
|
var e = $p;
|
|
444
|
-
if (this.
|
|
453
|
+
if (this.exceptionState_1 === 4) {
|
|
445
454
|
throw e;
|
|
446
455
|
} else {
|
|
447
|
-
this.
|
|
448
|
-
this.
|
|
456
|
+
this.state_1 = this.exceptionState_1;
|
|
457
|
+
this.exception_1 = e;
|
|
449
458
|
}
|
|
450
459
|
}
|
|
451
460
|
while (true);
|
|
452
461
|
};
|
|
453
462
|
function $flushCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
454
463
|
CoroutineImpl.call(this, resultContinuation);
|
|
455
|
-
this.
|
|
464
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
456
465
|
}
|
|
457
|
-
protoOf($flushCOROUTINE$).
|
|
458
|
-
var suspendResult = this.
|
|
466
|
+
protoOf($flushCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
467
|
+
var suspendResult = this.result_1;
|
|
459
468
|
$sm: do
|
|
460
469
|
try {
|
|
461
|
-
var tmp = this.
|
|
470
|
+
var tmp = this.state_1;
|
|
462
471
|
switch (tmp) {
|
|
463
472
|
case 0:
|
|
464
|
-
this.
|
|
465
|
-
|
|
466
|
-
this.
|
|
467
|
-
if (this.
|
|
473
|
+
this.exceptionState_1 = 4;
|
|
474
|
+
rethrowCloseCauseIfNeeded(this._this__u8e3s4__1);
|
|
475
|
+
this._this__u8e3s4__1.flushWriteBuffer_z39w8l_k$();
|
|
476
|
+
if (this._this__u8e3s4__1.get_hasFreeSpace_krtyyf_k$())
|
|
468
477
|
return Unit_instance;
|
|
469
|
-
this.
|
|
470
|
-
this.
|
|
478
|
+
this.this0__1 = this._this__u8e3s4__1;
|
|
479
|
+
this.state_1 = 1;
|
|
471
480
|
continue $sm;
|
|
472
481
|
case 1:
|
|
473
|
-
if (!(!this.
|
|
474
|
-
this.
|
|
482
|
+
if (!(!this._this__u8e3s4__1.get_hasFreeSpace_krtyyf_k$() && this._this__u8e3s4__1._closedCause_1.kotlinx$atomicfu$value == null)) {
|
|
483
|
+
this.state_1 = 3;
|
|
475
484
|
continue $sm;
|
|
476
485
|
}
|
|
477
486
|
|
|
478
|
-
this.
|
|
487
|
+
this.state_1 = 2;
|
|
479
488
|
var cancellable = new CancellableContinuationImpl(intercepted(this), 1);
|
|
480
|
-
cancellable.
|
|
481
|
-
var tmp0 = this.
|
|
489
|
+
cancellable.initCancellability_shqc60_k$();
|
|
490
|
+
var tmp0 = this.this0__1;
|
|
482
491
|
var tmp2 = new Write(cancellable);
|
|
483
492
|
l$ret$1: do {
|
|
484
|
-
var previous = tmp0.
|
|
493
|
+
var previous = tmp0.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
485
494
|
if (!(previous instanceof Closed)) {
|
|
486
|
-
if (!tmp0.
|
|
487
|
-
tmp2.
|
|
495
|
+
if (!tmp0.suspensionSlot_1.atomicfu$compareAndSet(previous, tmp2)) {
|
|
496
|
+
tmp2.resume_2o15jx_k$();
|
|
488
497
|
break l$ret$1;
|
|
489
498
|
}
|
|
490
499
|
}
|
|
491
500
|
if (previous instanceof Write) {
|
|
492
|
-
previous.
|
|
501
|
+
previous.resume_xzb95z_k$(new ConcurrentIOException(tmp2.taskName_6sat74_k$(), previous.get_created_i9xfr3_k$()));
|
|
493
502
|
} else {
|
|
494
503
|
if (isInterface(previous, Task)) {
|
|
495
|
-
previous.
|
|
504
|
+
previous.resume_2o15jx_k$();
|
|
496
505
|
} else {
|
|
497
506
|
if (previous instanceof Closed) {
|
|
498
|
-
tmp2.
|
|
507
|
+
tmp2.resume_xzb95z_k$(previous.cause_1);
|
|
499
508
|
break l$ret$1;
|
|
500
509
|
} else {
|
|
501
510
|
if (!equals(previous, Empty_instance)) {
|
|
@@ -504,62 +513,62 @@ protoOf($flushCOROUTINE$).s8 = function () {
|
|
|
504
513
|
}
|
|
505
514
|
}
|
|
506
515
|
}
|
|
507
|
-
if (!(!this.
|
|
508
|
-
var current = tmp0.
|
|
516
|
+
if (!(!this._this__u8e3s4__1.get_hasFreeSpace_krtyyf_k$() && this._this__u8e3s4__1._closedCause_1.kotlinx$atomicfu$value == null)) {
|
|
517
|
+
var current = tmp0.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
509
518
|
var tmp_0;
|
|
510
519
|
if (current instanceof Write) {
|
|
511
|
-
tmp_0 = tmp0.
|
|
520
|
+
tmp_0 = tmp0.suspensionSlot_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
512
521
|
} else {
|
|
513
522
|
tmp_0 = false;
|
|
514
523
|
}
|
|
515
524
|
if (tmp_0) {
|
|
516
|
-
current.
|
|
525
|
+
current.resume_2o15jx_k$();
|
|
517
526
|
}
|
|
518
527
|
}
|
|
519
528
|
}
|
|
520
529
|
while (false);
|
|
521
|
-
suspendResult = returnIfSuspended(cancellable.
|
|
530
|
+
suspendResult = returnIfSuspended(cancellable.getResult_fck196_k$(), this);
|
|
522
531
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
523
532
|
return suspendResult;
|
|
524
533
|
}
|
|
525
534
|
|
|
526
535
|
continue $sm;
|
|
527
536
|
case 2:
|
|
528
|
-
this.
|
|
537
|
+
this.state_1 = 1;
|
|
529
538
|
continue $sm;
|
|
530
539
|
case 3:
|
|
531
540
|
return Unit_instance;
|
|
532
541
|
case 4:
|
|
533
|
-
throw this.
|
|
542
|
+
throw this.exception_1;
|
|
534
543
|
}
|
|
535
544
|
} catch ($p) {
|
|
536
545
|
var e = $p;
|
|
537
|
-
if (this.
|
|
546
|
+
if (this.exceptionState_1 === 4) {
|
|
538
547
|
throw e;
|
|
539
548
|
} else {
|
|
540
|
-
this.
|
|
541
|
-
this.
|
|
549
|
+
this.state_1 = this.exceptionState_1;
|
|
550
|
+
this.exception_1 = e;
|
|
542
551
|
}
|
|
543
552
|
}
|
|
544
553
|
while (true);
|
|
545
554
|
};
|
|
546
555
|
function $flushAndCloseCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
547
556
|
CoroutineImpl.call(this, resultContinuation);
|
|
548
|
-
this.
|
|
557
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
549
558
|
}
|
|
550
|
-
protoOf($flushAndCloseCOROUTINE$).
|
|
551
|
-
var suspendResult = this.
|
|
559
|
+
protoOf($flushAndCloseCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
560
|
+
var suspendResult = this.result_1;
|
|
552
561
|
$sm: do
|
|
553
562
|
try {
|
|
554
|
-
var tmp = this.
|
|
563
|
+
var tmp = this.state_1;
|
|
555
564
|
switch (tmp) {
|
|
556
565
|
case 0:
|
|
557
|
-
this.
|
|
558
|
-
var this_0 = this.
|
|
559
|
-
this.
|
|
560
|
-
this.
|
|
561
|
-
this.
|
|
562
|
-
suspendResult = this_0.
|
|
566
|
+
this.exceptionState_1 = 4;
|
|
567
|
+
var this_0 = this._this__u8e3s4__1;
|
|
568
|
+
this.exceptionState_1 = 2;
|
|
569
|
+
this.tmp01__1 = Companion_instance;
|
|
570
|
+
this.state_1 = 1;
|
|
571
|
+
suspendResult = this_0.flush_4wsz1p_k$(this);
|
|
563
572
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
564
573
|
return suspendResult;
|
|
565
574
|
}
|
|
@@ -567,64 +576,64 @@ protoOf($flushAndCloseCOROUTINE$).s8 = function () {
|
|
|
567
576
|
continue $sm;
|
|
568
577
|
case 1:
|
|
569
578
|
var tmp_0 = this;
|
|
570
|
-
this.
|
|
571
|
-
tmp_0.
|
|
572
|
-
this.
|
|
573
|
-
this.
|
|
579
|
+
this.tmp01__1;
|
|
580
|
+
tmp_0.TRY_RESULT0__1 = _Result___init__impl__xyqfz8(Unit_instance);
|
|
581
|
+
this.exceptionState_1 = 4;
|
|
582
|
+
this.state_1 = 3;
|
|
574
583
|
continue $sm;
|
|
575
584
|
case 2:
|
|
576
|
-
this.
|
|
577
|
-
var tmp_1 = this.
|
|
585
|
+
this.exceptionState_1 = 4;
|
|
586
|
+
var tmp_1 = this.exception_1;
|
|
578
587
|
if (tmp_1 instanceof Error) {
|
|
579
|
-
var e = this.
|
|
588
|
+
var e = this.exception_1;
|
|
580
589
|
var tmp_2 = this;
|
|
581
|
-
tmp_2.
|
|
582
|
-
this.
|
|
590
|
+
tmp_2.TRY_RESULT0__1 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
591
|
+
this.state_1 = 3;
|
|
583
592
|
continue $sm;
|
|
584
593
|
} else {
|
|
585
|
-
throw this.
|
|
594
|
+
throw this.exception_1;
|
|
586
595
|
}
|
|
587
596
|
|
|
588
597
|
case 3:
|
|
589
|
-
this.
|
|
590
|
-
if (!this.
|
|
598
|
+
this.exceptionState_1 = 4;
|
|
599
|
+
if (!this._this__u8e3s4__1._closedCause_1.atomicfu$compareAndSet(null, get_CLOSED()))
|
|
591
600
|
return Unit_instance;
|
|
592
|
-
closeSlot(this.
|
|
601
|
+
closeSlot(this._this__u8e3s4__1, null);
|
|
593
602
|
return Unit_instance;
|
|
594
603
|
case 4:
|
|
595
|
-
throw this.
|
|
604
|
+
throw this.exception_1;
|
|
596
605
|
}
|
|
597
606
|
} catch ($p) {
|
|
598
607
|
var e_0 = $p;
|
|
599
|
-
if (this.
|
|
608
|
+
if (this.exceptionState_1 === 4) {
|
|
600
609
|
throw e_0;
|
|
601
610
|
} else {
|
|
602
|
-
this.
|
|
603
|
-
this.
|
|
611
|
+
this.state_1 = this.exceptionState_1;
|
|
612
|
+
this.exception_1 = e_0;
|
|
604
613
|
}
|
|
605
614
|
}
|
|
606
615
|
while (true);
|
|
607
616
|
};
|
|
608
617
|
function ByteChannel(autoFlush) {
|
|
609
618
|
autoFlush = autoFlush === VOID ? false : autoFlush;
|
|
610
|
-
this.
|
|
611
|
-
this.
|
|
612
|
-
this.
|
|
613
|
-
this.
|
|
614
|
-
this.
|
|
615
|
-
this.
|
|
616
|
-
this.
|
|
617
|
-
this.
|
|
618
|
-
this.
|
|
619
|
-
}
|
|
620
|
-
protoOf(ByteChannel).
|
|
621
|
-
return this.
|
|
622
|
-
};
|
|
623
|
-
protoOf(ByteChannel).
|
|
624
|
-
return this.
|
|
625
|
-
};
|
|
626
|
-
protoOf(ByteChannel).
|
|
627
|
-
var tmp0_safe_receiver = this.
|
|
619
|
+
this.autoFlush_1 = autoFlush;
|
|
620
|
+
this.flushBuffer_1 = new Buffer();
|
|
621
|
+
this.flushBufferSize_1 = 0;
|
|
622
|
+
this.flushBufferMutex_1 = new Object();
|
|
623
|
+
this.suspensionSlot_1 = atomic$ref$1(Empty_instance);
|
|
624
|
+
this._readBuffer_1 = new Buffer();
|
|
625
|
+
this._writeBuffer_1 = new Buffer();
|
|
626
|
+
this._closedCause_1 = atomic$ref$1(null);
|
|
627
|
+
this.closeHandler_1 = atomic$ref$1(null);
|
|
628
|
+
}
|
|
629
|
+
protoOf(ByteChannel).get_autoFlush_zfdl3o_k$ = function () {
|
|
630
|
+
return this.autoFlush_1;
|
|
631
|
+
};
|
|
632
|
+
protoOf(ByteChannel).get_hasFreeSpace_krtyyf_k$ = function () {
|
|
633
|
+
return this.flushBufferSize_1 < 1048576;
|
|
634
|
+
};
|
|
635
|
+
protoOf(ByteChannel).get_readBuffer_yjmj9b_k$ = function () {
|
|
636
|
+
var tmp0_safe_receiver = this._closedCause_1.kotlinx$atomicfu$value;
|
|
628
637
|
if (tmp0_safe_receiver == null)
|
|
629
638
|
null;
|
|
630
639
|
else {
|
|
@@ -636,7 +645,7 @@ protoOf(ByteChannel).a1h = function () {
|
|
|
636
645
|
tmp = null;
|
|
637
646
|
} else {
|
|
638
647
|
if (isInterface(tmp0_subject, CopyableThrowable)) {
|
|
639
|
-
tmp = access$_get_origin__hdh1qz(tmp0_safe_receiver).
|
|
648
|
+
tmp = access$_get_origin__hdh1qz(tmp0_safe_receiver).createCopy_mmw9ld_k$();
|
|
640
649
|
} else {
|
|
641
650
|
if (tmp0_subject instanceof CancellationException) {
|
|
642
651
|
tmp = CancellationException_init_$Create$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
|
|
@@ -655,14 +664,14 @@ protoOf(ByteChannel).a1h = function () {
|
|
|
655
664
|
throw tmp0_safe_receiver_0;
|
|
656
665
|
}
|
|
657
666
|
}
|
|
658
|
-
if (this.
|
|
667
|
+
if (this._readBuffer_1.exhausted_p1jt55_k$()) {
|
|
659
668
|
moveFlushToReadBuffer(this);
|
|
660
669
|
}
|
|
661
|
-
return this.
|
|
670
|
+
return this._readBuffer_1;
|
|
662
671
|
};
|
|
663
|
-
protoOf(ByteChannel).
|
|
664
|
-
if (this.
|
|
665
|
-
var tmp0_safe_receiver = this.
|
|
672
|
+
protoOf(ByteChannel).get_writeBuffer_t7kuc6_k$ = function () {
|
|
673
|
+
if (this.get_isClosedForWrite_seyg5n_k$()) {
|
|
674
|
+
var tmp0_safe_receiver = this._closedCause_1.kotlinx$atomicfu$value;
|
|
666
675
|
var tmp;
|
|
667
676
|
if (tmp0_safe_receiver == null) {
|
|
668
677
|
tmp = null;
|
|
@@ -675,7 +684,7 @@ protoOf(ByteChannel).b1h = function () {
|
|
|
675
684
|
tmp_0 = null;
|
|
676
685
|
} else {
|
|
677
686
|
if (isInterface(tmp0_subject, CopyableThrowable)) {
|
|
678
|
-
tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).
|
|
687
|
+
tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).createCopy_mmw9ld_k$();
|
|
679
688
|
} else {
|
|
680
689
|
if (tmp0_subject instanceof CancellationException) {
|
|
681
690
|
tmp_0 = CancellationException_init_$Create$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
|
|
@@ -698,10 +707,10 @@ protoOf(ByteChannel).b1h = function () {
|
|
|
698
707
|
if (tmp == null)
|
|
699
708
|
throw new ClosedWriteChannelException();
|
|
700
709
|
}
|
|
701
|
-
return this.
|
|
710
|
+
return this._writeBuffer_1;
|
|
702
711
|
};
|
|
703
|
-
protoOf(ByteChannel).
|
|
704
|
-
var tmp0_safe_receiver = this.
|
|
712
|
+
protoOf(ByteChannel).get_closedCause_o1qcj8_k$ = function () {
|
|
713
|
+
var tmp0_safe_receiver = this._closedCause_1.kotlinx$atomicfu$value;
|
|
705
714
|
var tmp;
|
|
706
715
|
if (tmp0_safe_receiver == null) {
|
|
707
716
|
tmp = null;
|
|
@@ -713,7 +722,7 @@ protoOf(ByteChannel).d1h = function () {
|
|
|
713
722
|
tmp_0 = null;
|
|
714
723
|
} else {
|
|
715
724
|
if (isInterface(tmp0_subject, CopyableThrowable)) {
|
|
716
|
-
tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).
|
|
725
|
+
tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).createCopy_mmw9ld_k$();
|
|
717
726
|
} else {
|
|
718
727
|
if (tmp0_subject instanceof CancellationException) {
|
|
719
728
|
tmp_0 = CancellationException_init_$Create$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
|
|
@@ -727,61 +736,61 @@ protoOf(ByteChannel).d1h = function () {
|
|
|
727
736
|
}
|
|
728
737
|
return tmp;
|
|
729
738
|
};
|
|
730
|
-
protoOf(ByteChannel).
|
|
731
|
-
return !(this.
|
|
739
|
+
protoOf(ByteChannel).get_isClosedForWrite_seyg5n_k$ = function () {
|
|
740
|
+
return !(this._closedCause_1.kotlinx$atomicfu$value == null);
|
|
732
741
|
};
|
|
733
|
-
protoOf(ByteChannel).
|
|
734
|
-
return !(this.
|
|
742
|
+
protoOf(ByteChannel).get_isClosedForRead_ajcc1s_k$ = function () {
|
|
743
|
+
return !(this.get_closedCause_o1qcj8_k$() == null) || (this.get_isClosedForWrite_seyg5n_k$() && this.flushBufferSize_1 === 0 && this._readBuffer_1.exhausted_p1jt55_k$());
|
|
735
744
|
};
|
|
736
|
-
protoOf(ByteChannel).
|
|
745
|
+
protoOf(ByteChannel).awaitContent_q7m0p7_k$ = function (min, $completion) {
|
|
737
746
|
var tmp = new $awaitContentCOROUTINE$(this, min, $completion);
|
|
738
|
-
tmp.
|
|
739
|
-
tmp.
|
|
740
|
-
return tmp.
|
|
747
|
+
tmp.result_1 = Unit_instance;
|
|
748
|
+
tmp.exception_1 = null;
|
|
749
|
+
return tmp.doResume_5yljmg_k$();
|
|
741
750
|
};
|
|
742
|
-
protoOf(ByteChannel).
|
|
751
|
+
protoOf(ByteChannel).flush_4wsz1p_k$ = function ($completion) {
|
|
743
752
|
var tmp = new $flushCOROUTINE$(this, $completion);
|
|
744
|
-
tmp.
|
|
745
|
-
tmp.
|
|
746
|
-
return tmp.
|
|
753
|
+
tmp.result_1 = Unit_instance;
|
|
754
|
+
tmp.exception_1 = null;
|
|
755
|
+
return tmp.doResume_5yljmg_k$();
|
|
747
756
|
};
|
|
748
|
-
protoOf(ByteChannel).
|
|
749
|
-
if (this.
|
|
757
|
+
protoOf(ByteChannel).flushWriteBuffer_z39w8l_k$ = function () {
|
|
758
|
+
if (this._writeBuffer_1.exhausted_p1jt55_k$())
|
|
750
759
|
return Unit_instance;
|
|
751
760
|
// Inline function 'io.ktor.utils.io.locks.synchronized' call
|
|
752
|
-
this.
|
|
753
|
-
var count = convertToInt(this.
|
|
754
|
-
this.
|
|
755
|
-
this.
|
|
761
|
+
this.flushBufferMutex_1;
|
|
762
|
+
var count = convertToInt(this._writeBuffer_1.get_size_woubt6_k$());
|
|
763
|
+
this.flushBuffer_1.transferFrom_v29myr_k$(this._writeBuffer_1);
|
|
764
|
+
this.flushBufferSize_1 = this.flushBufferSize_1 + count | 0;
|
|
756
765
|
// Inline function 'io.ktor.utils.io.ByteChannel.resumeSlot' call
|
|
757
|
-
var current = this.
|
|
766
|
+
var current = this.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
758
767
|
var tmp;
|
|
759
768
|
if (current instanceof Read) {
|
|
760
|
-
tmp = this.
|
|
769
|
+
tmp = this.suspensionSlot_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
761
770
|
} else {
|
|
762
771
|
tmp = false;
|
|
763
772
|
}
|
|
764
773
|
if (tmp) {
|
|
765
|
-
current.
|
|
774
|
+
current.resume_2o15jx_k$();
|
|
766
775
|
}
|
|
767
776
|
};
|
|
768
|
-
protoOf(ByteChannel).
|
|
769
|
-
this.
|
|
770
|
-
if (!this.
|
|
777
|
+
protoOf(ByteChannel).close_yn9xrc_k$ = function () {
|
|
778
|
+
this.flushWriteBuffer_z39w8l_k$();
|
|
779
|
+
if (!this._closedCause_1.atomicfu$compareAndSet(null, get_CLOSED()))
|
|
771
780
|
return Unit_instance;
|
|
772
781
|
closeSlot(this, null);
|
|
773
782
|
};
|
|
774
|
-
protoOf(ByteChannel).
|
|
783
|
+
protoOf(ByteChannel).flushAndClose_3zd2q_k$ = function ($completion) {
|
|
775
784
|
var tmp = new $flushAndCloseCOROUTINE$(this, $completion);
|
|
776
|
-
tmp.
|
|
777
|
-
tmp.
|
|
778
|
-
return tmp.
|
|
785
|
+
tmp.result_1 = Unit_instance;
|
|
786
|
+
tmp.exception_1 = null;
|
|
787
|
+
return tmp.doResume_5yljmg_k$();
|
|
779
788
|
};
|
|
780
|
-
protoOf(ByteChannel).
|
|
781
|
-
if (!(this.
|
|
789
|
+
protoOf(ByteChannel).cancel_9i2dv0_k$ = function (cause) {
|
|
790
|
+
if (!(this._closedCause_1.kotlinx$atomicfu$value == null))
|
|
782
791
|
return Unit_instance;
|
|
783
792
|
var closedToken = new CloseToken(cause);
|
|
784
|
-
this.
|
|
793
|
+
this._closedCause_1.atomicfu$compareAndSet(null, closedToken);
|
|
785
794
|
// Inline function 'io.ktor.utils.io.Companion.wrapCause' call
|
|
786
795
|
var tmp0_subject = access$_get_origin__hdh1qz(closedToken);
|
|
787
796
|
var tmp;
|
|
@@ -789,7 +798,7 @@ protoOf(ByteChannel).i1h = function (cause) {
|
|
|
789
798
|
tmp = null;
|
|
790
799
|
} else {
|
|
791
800
|
if (isInterface(tmp0_subject, CopyableThrowable)) {
|
|
792
|
-
tmp = access$_get_origin__hdh1qz(closedToken).
|
|
801
|
+
tmp = access$_get_origin__hdh1qz(closedToken).createCopy_mmw9ld_k$();
|
|
793
802
|
} else {
|
|
794
803
|
if (tmp0_subject instanceof CancellationException) {
|
|
795
804
|
tmp = CancellationException_init_$Create$(access$_get_origin__hdh1qz(closedToken).message, access$_get_origin__hdh1qz(closedToken));
|
|
@@ -802,8 +811,8 @@ protoOf(ByteChannel).i1h = function (cause) {
|
|
|
802
811
|
var wrappedCause = tmp;
|
|
803
812
|
closeSlot(this, wrappedCause);
|
|
804
813
|
};
|
|
805
|
-
protoOf(ByteChannel).
|
|
806
|
-
var existingCause = this.
|
|
814
|
+
protoOf(ByteChannel).invokeOnClose_agzauw_k$ = function (handler) {
|
|
815
|
+
var existingCause = this._closedCause_1.kotlinx$atomicfu$value;
|
|
807
816
|
if (!(existingCause == null)) {
|
|
808
817
|
// Inline function 'io.ktor.utils.io.Companion.wrapCause' call
|
|
809
818
|
var tmp0_subject = access$_get_origin__hdh1qz(existingCause);
|
|
@@ -812,7 +821,7 @@ protoOf(ByteChannel).j1h = function (handler) {
|
|
|
812
821
|
tmp = null;
|
|
813
822
|
} else {
|
|
814
823
|
if (isInterface(tmp0_subject, CopyableThrowable)) {
|
|
815
|
-
tmp = access$_get_origin__hdh1qz(existingCause).
|
|
824
|
+
tmp = access$_get_origin__hdh1qz(existingCause).createCopy_mmw9ld_k$();
|
|
816
825
|
} else {
|
|
817
826
|
if (tmp0_subject instanceof CancellationException) {
|
|
818
827
|
tmp = CancellationException_init_$Create$(access$_get_origin__hdh1qz(existingCause).message, access$_get_origin__hdh1qz(existingCause));
|
|
@@ -826,13 +835,13 @@ protoOf(ByteChannel).j1h = function (handler) {
|
|
|
826
835
|
var tmp_0 = ByteChannel$invokeOnClose$lambda;
|
|
827
836
|
return new sam$kotlinx_coroutines_DisposableHandle$0(tmp_0);
|
|
828
837
|
}
|
|
829
|
-
if (!this.
|
|
838
|
+
if (!this.closeHandler_1.atomicfu$compareAndSet(null, handler)) {
|
|
830
839
|
// Inline function 'kotlin.error' call
|
|
831
840
|
var message = 'Only one invokeOnClose handler is supported per channel';
|
|
832
841
|
throw IllegalStateException_init_$Create$(toString_1(message));
|
|
833
842
|
}
|
|
834
|
-
var cause = this.
|
|
835
|
-
if (!(cause == null) && this.
|
|
843
|
+
var cause = this._closedCause_1.kotlinx$atomicfu$value;
|
|
844
|
+
if (!(cause == null) && this.closeHandler_1.atomicfu$compareAndSet(handler, null)) {
|
|
836
845
|
// Inline function 'io.ktor.utils.io.Companion.wrapCause' call
|
|
837
846
|
var tmp0_subject_0 = access$_get_origin__hdh1qz(cause);
|
|
838
847
|
var tmp_1;
|
|
@@ -840,7 +849,7 @@ protoOf(ByteChannel).j1h = function (handler) {
|
|
|
840
849
|
tmp_1 = null;
|
|
841
850
|
} else {
|
|
842
851
|
if (isInterface(tmp0_subject_0, CopyableThrowable)) {
|
|
843
|
-
tmp_1 = access$_get_origin__hdh1qz(cause).
|
|
852
|
+
tmp_1 = access$_get_origin__hdh1qz(cause).createCopy_mmw9ld_k$();
|
|
844
853
|
} else {
|
|
845
854
|
if (tmp0_subject_0 instanceof CancellationException) {
|
|
846
855
|
tmp_1 = CancellationException_init_$Create$(access$_get_origin__hdh1qz(cause).message, access$_get_origin__hdh1qz(cause));
|
|
@@ -870,7 +879,7 @@ function ByteReadChannel(content, offset, length) {
|
|
|
870
879
|
length = length === VOID ? content.length : length;
|
|
871
880
|
// Inline function 'kotlin.also' call
|
|
872
881
|
var this_0 = new Buffer();
|
|
873
|
-
this_0.
|
|
882
|
+
this_0.write_ti570x_k$(content, offset, offset + length | 0);
|
|
874
883
|
var source = this_0;
|
|
875
884
|
return ByteReadChannel_0(source);
|
|
876
885
|
}
|
|
@@ -878,18 +887,18 @@ function ByteReadChannel_0(source) {
|
|
|
878
887
|
return new SourceByteReadChannel(source);
|
|
879
888
|
}
|
|
880
889
|
function buildPartialMatchTable($this) {
|
|
881
|
-
var table = new Int32Array($this.
|
|
890
|
+
var table = new Int32Array($this.matchString_1.get_size_woubt6_k$());
|
|
882
891
|
var j = 0;
|
|
883
892
|
var inductionVariable = 1;
|
|
884
|
-
var last = $this.
|
|
893
|
+
var last = $this.matchString_1.get_size_woubt6_k$();
|
|
885
894
|
if (inductionVariable < last)
|
|
886
895
|
do {
|
|
887
896
|
var i = inductionVariable;
|
|
888
897
|
inductionVariable = inductionVariable + 1 | 0;
|
|
889
|
-
while (j > 0 && !($this.
|
|
898
|
+
while (j > 0 && !($this.matchString_1.get_c1px32_k$(i) === $this.matchString_1.get_c1px32_k$(j))) {
|
|
890
899
|
j = table[j - 1 | 0];
|
|
891
900
|
}
|
|
892
|
-
if ($this.
|
|
901
|
+
if ($this.matchString_1.get_c1px32_k$(i) === $this.matchString_1.get_c1px32_k$(j)) {
|
|
893
902
|
j = j + 1 | 0;
|
|
894
903
|
}
|
|
895
904
|
table[i] = j;
|
|
@@ -899,19 +908,19 @@ function buildPartialMatchTable($this) {
|
|
|
899
908
|
}
|
|
900
909
|
function advanceToNextPotentialMatch($this, $completion) {
|
|
901
910
|
var tmp = new $advanceToNextPotentialMatchCOROUTINE$($this, $completion);
|
|
902
|
-
tmp.
|
|
903
|
-
tmp.
|
|
904
|
-
return tmp.
|
|
911
|
+
tmp.result_1 = Unit_instance;
|
|
912
|
+
tmp.exception_1 = null;
|
|
913
|
+
return tmp.doResume_5yljmg_k$();
|
|
905
914
|
}
|
|
906
915
|
function checkFullMatch($this, $completion) {
|
|
907
916
|
var tmp = new $checkFullMatchCOROUTINE$($this, $completion);
|
|
908
|
-
tmp.
|
|
909
|
-
tmp.
|
|
910
|
-
return tmp.
|
|
917
|
+
tmp.result_1 = Unit_instance;
|
|
918
|
+
tmp.exception_1 = null;
|
|
919
|
+
return tmp.doResume_5yljmg_k$();
|
|
911
920
|
}
|
|
912
921
|
function checkBounds($this, extra) {
|
|
913
|
-
if (add($this.
|
|
914
|
-
throw IOException_init_$Create$('Limit of ' + $this.
|
|
922
|
+
if (add($this.bytesRead_1, extra) > $this.limit_1) {
|
|
923
|
+
throw IOException_init_$Create$('Limit of ' + $this.limit_1.toString() + ' bytes exceeded ' + ('while searching for "' + toSingleLineString($this, $this.matchString_1) + '"'));
|
|
915
924
|
}
|
|
916
925
|
}
|
|
917
926
|
function toSingleLineString($this, $receiver) {
|
|
@@ -919,28 +928,28 @@ function toSingleLineString($this, $receiver) {
|
|
|
919
928
|
}
|
|
920
929
|
function $findNextCOROUTINE$(_this__u8e3s4, ignoreMissing, resultContinuation) {
|
|
921
930
|
CoroutineImpl.call(this, resultContinuation);
|
|
922
|
-
this.
|
|
923
|
-
this.
|
|
931
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
932
|
+
this.ignoreMissing_1 = ignoreMissing;
|
|
924
933
|
}
|
|
925
|
-
protoOf($findNextCOROUTINE$).
|
|
926
|
-
var suspendResult = this.
|
|
934
|
+
protoOf($findNextCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
935
|
+
var suspendResult = this.result_1;
|
|
927
936
|
$sm: do
|
|
928
937
|
try {
|
|
929
|
-
var tmp = this.
|
|
938
|
+
var tmp = this.state_1;
|
|
930
939
|
switch (tmp) {
|
|
931
940
|
case 0:
|
|
932
|
-
this.
|
|
933
|
-
this.
|
|
934
|
-
this.
|
|
941
|
+
this.exceptionState_1 = 9;
|
|
942
|
+
this._this__u8e3s4__1.bytesRead_1 = 0n;
|
|
943
|
+
this.state_1 = 1;
|
|
935
944
|
continue $sm;
|
|
936
945
|
case 1:
|
|
937
|
-
if (!this.
|
|
938
|
-
this.
|
|
939
|
-
this.
|
|
946
|
+
if (!this._this__u8e3s4__1.input_1.exhausted_p1jt55_k$()) {
|
|
947
|
+
this.WHEN_RESULT0__1 = true;
|
|
948
|
+
this.state_1 = 3;
|
|
940
949
|
continue $sm;
|
|
941
950
|
} else {
|
|
942
|
-
this.
|
|
943
|
-
suspendResult = this.
|
|
951
|
+
this.state_1 = 2;
|
|
952
|
+
suspendResult = this._this__u8e3s4__1.channel_1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
944
953
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
945
954
|
return suspendResult;
|
|
946
955
|
}
|
|
@@ -948,25 +957,25 @@ protoOf($findNextCOROUTINE$).s8 = function () {
|
|
|
948
957
|
}
|
|
949
958
|
|
|
950
959
|
case 2:
|
|
951
|
-
this.
|
|
952
|
-
this.
|
|
960
|
+
this.WHEN_RESULT0__1 = suspendResult;
|
|
961
|
+
this.state_1 = 3;
|
|
953
962
|
continue $sm;
|
|
954
963
|
case 3:
|
|
955
|
-
if (!this.
|
|
956
|
-
this.
|
|
964
|
+
if (!this.WHEN_RESULT0__1) {
|
|
965
|
+
this.state_1 = 7;
|
|
957
966
|
continue $sm;
|
|
958
967
|
}
|
|
959
968
|
|
|
960
|
-
this.
|
|
961
|
-
suspendResult = advanceToNextPotentialMatch(this.
|
|
969
|
+
this.state_1 = 4;
|
|
970
|
+
suspendResult = advanceToNextPotentialMatch(this._this__u8e3s4__1, this);
|
|
962
971
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
963
972
|
return suspendResult;
|
|
964
973
|
}
|
|
965
974
|
|
|
966
975
|
continue $sm;
|
|
967
976
|
case 4:
|
|
968
|
-
this.
|
|
969
|
-
suspendResult = checkFullMatch(this.
|
|
977
|
+
this.state_1 = 5;
|
|
978
|
+
suspendResult = checkFullMatch(this._this__u8e3s4__1, this);
|
|
970
979
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
971
980
|
return suspendResult;
|
|
972
981
|
}
|
|
@@ -974,66 +983,66 @@ protoOf($findNextCOROUTINE$).s8 = function () {
|
|
|
974
983
|
continue $sm;
|
|
975
984
|
case 5:
|
|
976
985
|
if (suspendResult) {
|
|
977
|
-
return this.
|
|
986
|
+
return this._this__u8e3s4__1.bytesRead_1;
|
|
978
987
|
} else {
|
|
979
|
-
this.
|
|
988
|
+
this.state_1 = 6;
|
|
980
989
|
continue $sm;
|
|
981
990
|
}
|
|
982
991
|
|
|
983
992
|
case 6:
|
|
984
|
-
this.
|
|
993
|
+
this.state_1 = 1;
|
|
985
994
|
continue $sm;
|
|
986
995
|
case 7:
|
|
987
|
-
if (!this.
|
|
988
|
-
throw IOException_init_$Create$('Expected "' + toSingleLineString(this.
|
|
996
|
+
if (!this.ignoreMissing_1) {
|
|
997
|
+
throw IOException_init_$Create$('Expected "' + toSingleLineString(this._this__u8e3s4__1, this._this__u8e3s4__1.matchString_1) + '" but encountered end of input');
|
|
989
998
|
}
|
|
990
999
|
|
|
991
|
-
this.
|
|
992
|
-
this.
|
|
993
|
-
suspendResult = this.
|
|
1000
|
+
this._this__u8e3s4__1.bytesRead_1 = add(this._this__u8e3s4__1.bytesRead_1, this._this__u8e3s4__1.partialMatchBuffer_1.transferTo_lu4ka2_k$(this._this__u8e3s4__1.writeChannel_1.get_writeBuffer_t7kuc6_k$()));
|
|
1001
|
+
this.state_1 = 8;
|
|
1002
|
+
suspendResult = this._this__u8e3s4__1.writeChannel_1.flush_4wsz1p_k$(this);
|
|
994
1003
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
995
1004
|
return suspendResult;
|
|
996
1005
|
}
|
|
997
1006
|
|
|
998
1007
|
continue $sm;
|
|
999
1008
|
case 8:
|
|
1000
|
-
return this.
|
|
1009
|
+
return this._this__u8e3s4__1.bytesRead_1;
|
|
1001
1010
|
case 9:
|
|
1002
|
-
throw this.
|
|
1011
|
+
throw this.exception_1;
|
|
1003
1012
|
}
|
|
1004
1013
|
} catch ($p) {
|
|
1005
1014
|
var e = $p;
|
|
1006
|
-
if (this.
|
|
1015
|
+
if (this.exceptionState_1 === 9) {
|
|
1007
1016
|
throw e;
|
|
1008
1017
|
} else {
|
|
1009
|
-
this.
|
|
1010
|
-
this.
|
|
1018
|
+
this.state_1 = this.exceptionState_1;
|
|
1019
|
+
this.exception_1 = e;
|
|
1011
1020
|
}
|
|
1012
1021
|
}
|
|
1013
1022
|
while (true);
|
|
1014
1023
|
};
|
|
1015
1024
|
function $advanceToNextPotentialMatchCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
1016
1025
|
CoroutineImpl.call(this, resultContinuation);
|
|
1017
|
-
this.
|
|
1026
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1018
1027
|
}
|
|
1019
|
-
protoOf($advanceToNextPotentialMatchCOROUTINE$).
|
|
1020
|
-
var suspendResult = this.
|
|
1028
|
+
protoOf($advanceToNextPotentialMatchCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
1029
|
+
var suspendResult = this.result_1;
|
|
1021
1030
|
$sm: do
|
|
1022
1031
|
try {
|
|
1023
|
-
var tmp = this.
|
|
1032
|
+
var tmp = this.state_1;
|
|
1024
1033
|
switch (tmp) {
|
|
1025
1034
|
case 0:
|
|
1026
|
-
this.
|
|
1027
|
-
this.
|
|
1035
|
+
this.exceptionState_1 = 8;
|
|
1036
|
+
this.state_1 = 1;
|
|
1028
1037
|
continue $sm;
|
|
1029
1038
|
case 1:
|
|
1030
|
-
if (!this.
|
|
1031
|
-
this.
|
|
1032
|
-
this.
|
|
1039
|
+
if (!this._this__u8e3s4__1.input_1.exhausted_p1jt55_k$()) {
|
|
1040
|
+
this.WHEN_RESULT0__1 = true;
|
|
1041
|
+
this.state_1 = 3;
|
|
1033
1042
|
continue $sm;
|
|
1034
1043
|
} else {
|
|
1035
|
-
this.
|
|
1036
|
-
suspendResult = this.
|
|
1044
|
+
this.state_1 = 2;
|
|
1045
|
+
suspendResult = this._this__u8e3s4__1.channel_1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
1037
1046
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1038
1047
|
return suspendResult;
|
|
1039
1048
|
}
|
|
@@ -1041,34 +1050,34 @@ protoOf($advanceToNextPotentialMatchCOROUTINE$).s8 = function () {
|
|
|
1041
1050
|
}
|
|
1042
1051
|
|
|
1043
1052
|
case 2:
|
|
1044
|
-
this.
|
|
1045
|
-
this.
|
|
1053
|
+
this.WHEN_RESULT0__1 = suspendResult;
|
|
1054
|
+
this.state_1 = 3;
|
|
1046
1055
|
continue $sm;
|
|
1047
1056
|
case 3:
|
|
1048
|
-
if (!this.
|
|
1049
|
-
this.
|
|
1057
|
+
if (!this.WHEN_RESULT0__1) {
|
|
1058
|
+
this.state_1 = 7;
|
|
1050
1059
|
continue $sm;
|
|
1051
1060
|
}
|
|
1052
1061
|
|
|
1053
|
-
var nextMatch = indexOf(this.
|
|
1062
|
+
var nextMatch = indexOf(this._this__u8e3s4__1.input_1, this._this__u8e3s4__1.matchString_1.get_c1px32_k$(0));
|
|
1054
1063
|
if (nextMatch === -1n) {
|
|
1055
|
-
var tmp_0 = this.
|
|
1056
|
-
checkBounds(this.
|
|
1057
|
-
this.
|
|
1058
|
-
this.
|
|
1059
|
-
suspendResult = flushIfNeeded(this.
|
|
1064
|
+
var tmp_0 = this._this__u8e3s4__1.input_1;
|
|
1065
|
+
checkBounds(this._this__u8e3s4__1, (tmp_0 instanceof Buffer ? tmp_0 : THROW_CCE()).get_size_woubt6_k$());
|
|
1066
|
+
this._this__u8e3s4__1.bytesRead_1 = add(this._this__u8e3s4__1.bytesRead_1, this._this__u8e3s4__1.input_1.transferTo_lu4ka2_k$(this._this__u8e3s4__1.writeChannel_1.get_writeBuffer_t7kuc6_k$()));
|
|
1067
|
+
this.state_1 = 5;
|
|
1068
|
+
suspendResult = flushIfNeeded(this._this__u8e3s4__1.writeChannel_1, this);
|
|
1060
1069
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1061
1070
|
return suspendResult;
|
|
1062
1071
|
}
|
|
1063
1072
|
continue $sm;
|
|
1064
1073
|
} else {
|
|
1065
|
-
checkBounds(this.
|
|
1066
|
-
var tmp_1 = this.
|
|
1067
|
-
var tmp_2 = this.
|
|
1068
|
-
var tmp_3 = this.
|
|
1069
|
-
tmp_1.
|
|
1070
|
-
this.
|
|
1071
|
-
suspendResult = flushIfNeeded(this.
|
|
1074
|
+
checkBounds(this._this__u8e3s4__1, nextMatch);
|
|
1075
|
+
var tmp_1 = this._this__u8e3s4__1;
|
|
1076
|
+
var tmp_2 = this._this__u8e3s4__1.bytesRead_1;
|
|
1077
|
+
var tmp_3 = this._this__u8e3s4__1.writeChannel_1.get_writeBuffer_t7kuc6_k$();
|
|
1078
|
+
tmp_1.bytesRead_1 = add(tmp_2, this._this__u8e3s4__1.input_1.readAtMostTo_4oop6l_k$(tmp_3 instanceof Buffer ? tmp_3 : THROW_CCE(), nextMatch));
|
|
1079
|
+
this.state_1 = 4;
|
|
1080
|
+
suspendResult = flushIfNeeded(this._this__u8e3s4__1.writeChannel_1, this);
|
|
1072
1081
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1073
1082
|
return suspendResult;
|
|
1074
1083
|
}
|
|
@@ -1078,49 +1087,49 @@ protoOf($advanceToNextPotentialMatchCOROUTINE$).s8 = function () {
|
|
|
1078
1087
|
case 4:
|
|
1079
1088
|
return Unit_instance;
|
|
1080
1089
|
case 5:
|
|
1081
|
-
this.
|
|
1090
|
+
this.state_1 = 6;
|
|
1082
1091
|
continue $sm;
|
|
1083
1092
|
case 6:
|
|
1084
|
-
this.
|
|
1093
|
+
this.state_1 = 1;
|
|
1085
1094
|
continue $sm;
|
|
1086
1095
|
case 7:
|
|
1087
1096
|
return Unit_instance;
|
|
1088
1097
|
case 8:
|
|
1089
|
-
throw this.
|
|
1098
|
+
throw this.exception_1;
|
|
1090
1099
|
}
|
|
1091
1100
|
} catch ($p) {
|
|
1092
1101
|
var e = $p;
|
|
1093
|
-
if (this.
|
|
1102
|
+
if (this.exceptionState_1 === 8) {
|
|
1094
1103
|
throw e;
|
|
1095
1104
|
} else {
|
|
1096
|
-
this.
|
|
1097
|
-
this.
|
|
1105
|
+
this.state_1 = this.exceptionState_1;
|
|
1106
|
+
this.exception_1 = e;
|
|
1098
1107
|
}
|
|
1099
1108
|
}
|
|
1100
1109
|
while (true);
|
|
1101
1110
|
};
|
|
1102
1111
|
function $checkFullMatchCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
1103
1112
|
CoroutineImpl.call(this, resultContinuation);
|
|
1104
|
-
this.
|
|
1113
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1105
1114
|
}
|
|
1106
|
-
protoOf($checkFullMatchCOROUTINE$).
|
|
1107
|
-
var suspendResult = this.
|
|
1115
|
+
protoOf($checkFullMatchCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
1116
|
+
var suspendResult = this.result_1;
|
|
1108
1117
|
$sm: do
|
|
1109
1118
|
try {
|
|
1110
|
-
var tmp = this.
|
|
1119
|
+
var tmp = this.state_1;
|
|
1111
1120
|
switch (tmp) {
|
|
1112
1121
|
case 0:
|
|
1113
|
-
this.
|
|
1114
|
-
this.
|
|
1122
|
+
this.exceptionState_1 = 8;
|
|
1123
|
+
this.state_1 = 1;
|
|
1115
1124
|
continue $sm;
|
|
1116
1125
|
case 1:
|
|
1117
|
-
if (!this.
|
|
1118
|
-
this.
|
|
1119
|
-
this.
|
|
1126
|
+
if (!this._this__u8e3s4__1.input_1.exhausted_p1jt55_k$()) {
|
|
1127
|
+
this.WHEN_RESULT1__1 = true;
|
|
1128
|
+
this.state_1 = 3;
|
|
1120
1129
|
continue $sm;
|
|
1121
1130
|
} else {
|
|
1122
|
-
this.
|
|
1123
|
-
suspendResult = this.
|
|
1131
|
+
this.state_1 = 2;
|
|
1132
|
+
suspendResult = this._this__u8e3s4__1.channel_1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
1124
1133
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1125
1134
|
return suspendResult;
|
|
1126
1135
|
}
|
|
@@ -1128,139 +1137,139 @@ protoOf($checkFullMatchCOROUTINE$).s8 = function () {
|
|
|
1128
1137
|
}
|
|
1129
1138
|
|
|
1130
1139
|
case 2:
|
|
1131
|
-
this.
|
|
1132
|
-
this.
|
|
1140
|
+
this.WHEN_RESULT1__1 = suspendResult;
|
|
1141
|
+
this.state_1 = 3;
|
|
1133
1142
|
continue $sm;
|
|
1134
1143
|
case 3:
|
|
1135
|
-
if (!this.
|
|
1136
|
-
this.
|
|
1144
|
+
if (!this.WHEN_RESULT1__1) {
|
|
1145
|
+
this.state_1 = 7;
|
|
1137
1146
|
continue $sm;
|
|
1138
1147
|
}
|
|
1139
1148
|
|
|
1140
|
-
this.
|
|
1141
|
-
if (this.
|
|
1142
|
-
var oldMatchIndex = this.
|
|
1143
|
-
while (this.
|
|
1144
|
-
this.
|
|
1149
|
+
this.byte0__1 = this._this__u8e3s4__1.input_1.readByte_ectjk2_k$();
|
|
1150
|
+
if (this._this__u8e3s4__1.matchIndex_1 > 0 && !(this.byte0__1 === this._this__u8e3s4__1.matchString_1.get_c1px32_k$(this._this__u8e3s4__1.matchIndex_1))) {
|
|
1151
|
+
var oldMatchIndex = this._this__u8e3s4__1.matchIndex_1;
|
|
1152
|
+
while (this._this__u8e3s4__1.matchIndex_1 > 0 && !(this.byte0__1 === this._this__u8e3s4__1.matchString_1.get_c1px32_k$(this._this__u8e3s4__1.matchIndex_1))) {
|
|
1153
|
+
this._this__u8e3s4__1.matchIndex_1 = this._this__u8e3s4__1.partialMatchTable_1[this._this__u8e3s4__1.matchIndex_1 - 1 | 0];
|
|
1145
1154
|
}
|
|
1146
|
-
var retained = fromInt(oldMatchIndex - this.
|
|
1147
|
-
checkBounds(this.
|
|
1148
|
-
var tmp_0 = this.
|
|
1149
|
-
var tmp_1 = this.
|
|
1150
|
-
var tmp_2 = this.
|
|
1151
|
-
tmp_0.
|
|
1152
|
-
if (this.
|
|
1153
|
-
this.
|
|
1154
|
-
suspendResult = writeByte(this.
|
|
1155
|
+
var retained = fromInt(oldMatchIndex - this._this__u8e3s4__1.matchIndex_1 | 0);
|
|
1156
|
+
checkBounds(this._this__u8e3s4__1, retained);
|
|
1157
|
+
var tmp_0 = this._this__u8e3s4__1;
|
|
1158
|
+
var tmp_1 = this._this__u8e3s4__1.bytesRead_1;
|
|
1159
|
+
var tmp_2 = this._this__u8e3s4__1.writeChannel_1.get_writeBuffer_t7kuc6_k$();
|
|
1160
|
+
tmp_0.bytesRead_1 = add(tmp_1, this._this__u8e3s4__1.partialMatchBuffer_1.readAtMostTo_4oop6l_k$(tmp_2 instanceof Buffer ? tmp_2 : THROW_CCE(), retained));
|
|
1161
|
+
if (this._this__u8e3s4__1.matchIndex_1 === 0 && !(this.byte0__1 === this._this__u8e3s4__1.matchString_1.get_c1px32_k$(this._this__u8e3s4__1.matchIndex_1))) {
|
|
1162
|
+
this.state_1 = 6;
|
|
1163
|
+
suspendResult = writeByte(this._this__u8e3s4__1.writeChannel_1, this.byte0__1, this);
|
|
1155
1164
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1156
1165
|
return suspendResult;
|
|
1157
1166
|
}
|
|
1158
1167
|
continue $sm;
|
|
1159
1168
|
} else {
|
|
1160
|
-
this.
|
|
1169
|
+
this.state_1 = 4;
|
|
1161
1170
|
continue $sm;
|
|
1162
1171
|
}
|
|
1163
1172
|
} else {
|
|
1164
|
-
this.
|
|
1173
|
+
this.state_1 = 5;
|
|
1165
1174
|
continue $sm;
|
|
1166
1175
|
}
|
|
1167
1176
|
|
|
1168
1177
|
case 4:
|
|
1169
|
-
this.
|
|
1178
|
+
this.state_1 = 5;
|
|
1170
1179
|
continue $sm;
|
|
1171
1180
|
case 5:
|
|
1172
|
-
this.
|
|
1173
|
-
if (this.
|
|
1181
|
+
this._this__u8e3s4__1.matchIndex_1 = this._this__u8e3s4__1.matchIndex_1 + 1 | 0;
|
|
1182
|
+
if (this._this__u8e3s4__1.matchIndex_1 === this._this__u8e3s4__1.matchString_1.get_size_woubt6_k$()) {
|
|
1174
1183
|
return true;
|
|
1175
1184
|
}
|
|
1176
1185
|
|
|
1177
|
-
this.
|
|
1178
|
-
this.
|
|
1186
|
+
this._this__u8e3s4__1.partialMatchBuffer_1.writeByte_9ih3z3_k$(this.byte0__1);
|
|
1187
|
+
this.state_1 = 1;
|
|
1179
1188
|
continue $sm;
|
|
1180
1189
|
case 6:
|
|
1181
|
-
var _unary__edvuaz = this.
|
|
1182
|
-
this.
|
|
1190
|
+
var _unary__edvuaz = this._this__u8e3s4__1.bytesRead_1;
|
|
1191
|
+
this._this__u8e3s4__1.bytesRead_1 = add(_unary__edvuaz, get_ONE());
|
|
1183
1192
|
return false;
|
|
1184
1193
|
case 7:
|
|
1185
1194
|
return false;
|
|
1186
1195
|
case 8:
|
|
1187
|
-
throw this.
|
|
1196
|
+
throw this.exception_1;
|
|
1188
1197
|
}
|
|
1189
1198
|
} catch ($p) {
|
|
1190
1199
|
var e = $p;
|
|
1191
|
-
if (this.
|
|
1200
|
+
if (this.exceptionState_1 === 8) {
|
|
1192
1201
|
throw e;
|
|
1193
1202
|
} else {
|
|
1194
|
-
this.
|
|
1195
|
-
this.
|
|
1203
|
+
this.state_1 = this.exceptionState_1;
|
|
1204
|
+
this.exception_1 = e;
|
|
1196
1205
|
}
|
|
1197
1206
|
}
|
|
1198
1207
|
while (true);
|
|
1199
1208
|
};
|
|
1200
1209
|
function ByteChannelScanner(channel, matchString, writeChannel, limit) {
|
|
1201
1210
|
limit = limit === VOID ? 9223372036854775807n : limit;
|
|
1202
|
-
this.
|
|
1203
|
-
this.
|
|
1204
|
-
this.
|
|
1205
|
-
this.
|
|
1211
|
+
this.channel_1 = channel;
|
|
1212
|
+
this.matchString_1 = matchString;
|
|
1213
|
+
this.writeChannel_1 = writeChannel;
|
|
1214
|
+
this.limit_1 = limit;
|
|
1206
1215
|
// Inline function 'kotlin.require' call
|
|
1207
|
-
if (!(this.
|
|
1216
|
+
if (!(this.matchString_1.get_size_woubt6_k$() > 0)) {
|
|
1208
1217
|
var message = 'Empty match string not permitted for scanning';
|
|
1209
1218
|
throw IllegalArgumentException_init_$Create$(toString_1(message));
|
|
1210
1219
|
}
|
|
1211
|
-
this.
|
|
1212
|
-
this.
|
|
1213
|
-
this.
|
|
1214
|
-
this.
|
|
1215
|
-
this.
|
|
1220
|
+
this.input_1 = this.channel_1.get_readBuffer_yjmj9b_k$();
|
|
1221
|
+
this.partialMatchTable_1 = buildPartialMatchTable(this);
|
|
1222
|
+
this.partialMatchBuffer_1 = new Buffer();
|
|
1223
|
+
this.bytesRead_1 = 0n;
|
|
1224
|
+
this.matchIndex_1 = 0;
|
|
1216
1225
|
}
|
|
1217
|
-
protoOf(ByteChannelScanner).
|
|
1226
|
+
protoOf(ByteChannelScanner).findNext_k7w4m8_k$ = function (ignoreMissing, $completion) {
|
|
1218
1227
|
var tmp = new $findNextCOROUTINE$(this, ignoreMissing, $completion);
|
|
1219
|
-
tmp.
|
|
1220
|
-
tmp.
|
|
1221
|
-
return tmp.
|
|
1228
|
+
tmp.result_1 = Unit_instance;
|
|
1229
|
+
tmp.exception_1 = null;
|
|
1230
|
+
return tmp.doResume_5yljmg_k$();
|
|
1222
1231
|
};
|
|
1223
1232
|
function attachWriterJob(_this__u8e3s4, writerJob) {
|
|
1224
|
-
var tmp = writerJob.
|
|
1233
|
+
var tmp = writerJob.channel_1;
|
|
1225
1234
|
var tmp0_safe_receiver = tmp instanceof ByteChannel ? tmp : null;
|
|
1226
1235
|
if (tmp0_safe_receiver == null)
|
|
1227
1236
|
null;
|
|
1228
1237
|
else {
|
|
1229
|
-
tmp0_safe_receiver.
|
|
1238
|
+
tmp0_safe_receiver.invokeOnClose_agzauw_k$(attachWriterJob$lambda(_this__u8e3s4));
|
|
1230
1239
|
}
|
|
1231
1240
|
}
|
|
1232
1241
|
function attachWriterJob$lambda($this_attachWriterJob) {
|
|
1233
1242
|
return function (cause) {
|
|
1234
1243
|
var tmp;
|
|
1235
1244
|
if (!(cause == null)) {
|
|
1236
|
-
$this_attachWriterJob.
|
|
1245
|
+
$this_attachWriterJob.cancel_9i2dv0_k$(cause);
|
|
1237
1246
|
tmp = Unit_instance;
|
|
1238
1247
|
}
|
|
1239
1248
|
return Unit_instance;
|
|
1240
1249
|
};
|
|
1241
1250
|
}
|
|
1242
1251
|
function ByteReadChannel$Companion$Empty$1() {
|
|
1243
|
-
this.
|
|
1244
|
-
this.
|
|
1252
|
+
this.closedCause_1 = null;
|
|
1253
|
+
this.readBuffer_1 = new Buffer();
|
|
1245
1254
|
}
|
|
1246
|
-
protoOf(ByteReadChannel$Companion$Empty$1).
|
|
1247
|
-
return this.
|
|
1255
|
+
protoOf(ByteReadChannel$Companion$Empty$1).get_closedCause_o1qcj8_k$ = function () {
|
|
1256
|
+
return this.closedCause_1;
|
|
1248
1257
|
};
|
|
1249
|
-
protoOf(ByteReadChannel$Companion$Empty$1).
|
|
1258
|
+
protoOf(ByteReadChannel$Companion$Empty$1).get_isClosedForRead_ajcc1s_k$ = function () {
|
|
1250
1259
|
return true;
|
|
1251
1260
|
};
|
|
1252
|
-
protoOf(ByteReadChannel$Companion$Empty$1).
|
|
1253
|
-
return this.
|
|
1261
|
+
protoOf(ByteReadChannel$Companion$Empty$1).get_readBuffer_yjmj9b_k$ = function () {
|
|
1262
|
+
return this.readBuffer_1;
|
|
1254
1263
|
};
|
|
1255
|
-
protoOf(ByteReadChannel$Companion$Empty$1).
|
|
1264
|
+
protoOf(ByteReadChannel$Companion$Empty$1).awaitContent_q7m0p7_k$ = function (min, $completion) {
|
|
1256
1265
|
return false;
|
|
1257
1266
|
};
|
|
1258
|
-
protoOf(ByteReadChannel$Companion$Empty$1).
|
|
1267
|
+
protoOf(ByteReadChannel$Companion$Empty$1).cancel_9i2dv0_k$ = function (cause) {
|
|
1259
1268
|
};
|
|
1260
1269
|
function Companion_0() {
|
|
1261
1270
|
Companion_instance_1 = this;
|
|
1262
1271
|
var tmp = this;
|
|
1263
|
-
tmp.
|
|
1272
|
+
tmp.Empty_1 = new ByteReadChannel$Companion$Empty$1();
|
|
1264
1273
|
}
|
|
1265
1274
|
var Companion_instance_1;
|
|
1266
1275
|
function Companion_getInstance_0() {
|
|
@@ -1271,42 +1280,36 @@ function Companion_getInstance_0() {
|
|
|
1271
1280
|
function ByteReadChannel_1() {
|
|
1272
1281
|
}
|
|
1273
1282
|
function cancel_0(_this__u8e3s4) {
|
|
1274
|
-
_this__u8e3s4.
|
|
1283
|
+
_this__u8e3s4.cancel_9i2dv0_k$(IOException_init_$Create$('Channel was cancelled'));
|
|
1275
1284
|
}
|
|
1276
1285
|
function readBuffer(_this__u8e3s4, $completion) {
|
|
1277
1286
|
var tmp = new $readBufferCOROUTINE$(_this__u8e3s4, $completion);
|
|
1278
|
-
tmp.
|
|
1279
|
-
tmp.
|
|
1280
|
-
return tmp.
|
|
1287
|
+
tmp.result_1 = Unit_instance;
|
|
1288
|
+
tmp.exception_1 = null;
|
|
1289
|
+
return tmp.doResume_5yljmg_k$();
|
|
1281
1290
|
}
|
|
1282
1291
|
function readAvailable(_this__u8e3s4, buffer, offset, length, $completion) {
|
|
1283
1292
|
offset = offset === VOID ? 0 : offset;
|
|
1284
1293
|
length = length === VOID ? buffer.length - offset | 0 : length;
|
|
1285
1294
|
var tmp = new $readAvailableCOROUTINE$(_this__u8e3s4, buffer, offset, length, $completion);
|
|
1286
|
-
tmp.
|
|
1287
|
-
tmp.
|
|
1288
|
-
return tmp.
|
|
1289
|
-
}
|
|
1290
|
-
function readRemaining(_this__u8e3s4, $completion) {
|
|
1291
|
-
var tmp = new $readRemainingCOROUTINE$(_this__u8e3s4, $completion);
|
|
1292
|
-
tmp.m8_1 = Unit_instance;
|
|
1293
|
-
tmp.n8_1 = null;
|
|
1294
|
-
return tmp.s8();
|
|
1295
|
+
tmp.result_1 = Unit_instance;
|
|
1296
|
+
tmp.exception_1 = null;
|
|
1297
|
+
return tmp.doResume_5yljmg_k$();
|
|
1295
1298
|
}
|
|
1296
1299
|
function toByteArray(_this__u8e3s4, $completion) {
|
|
1297
1300
|
var tmp = new $toByteArrayCOROUTINE$(_this__u8e3s4, $completion);
|
|
1298
|
-
tmp.
|
|
1299
|
-
tmp.
|
|
1300
|
-
return tmp.
|
|
1301
|
+
tmp.result_1 = Unit_instance;
|
|
1302
|
+
tmp.exception_1 = null;
|
|
1303
|
+
return tmp.doResume_5yljmg_k$();
|
|
1301
1304
|
}
|
|
1302
1305
|
function copyTo(_this__u8e3s4, channel, limit, $completion) {
|
|
1303
1306
|
var tmp = new $copyToCOROUTINE$(_this__u8e3s4, channel, limit, $completion);
|
|
1304
|
-
tmp.
|
|
1305
|
-
tmp.
|
|
1306
|
-
return tmp.
|
|
1307
|
+
tmp.result_1 = Unit_instance;
|
|
1308
|
+
tmp.exception_1 = null;
|
|
1309
|
+
return tmp.doResume_5yljmg_k$();
|
|
1307
1310
|
}
|
|
1308
|
-
function
|
|
1309
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
1311
|
+
function rethrowCloseCauseIfNeeded_0(_this__u8e3s4) {
|
|
1312
|
+
var tmp0_safe_receiver = _this__u8e3s4.get_closedCause_o1qcj8_k$();
|
|
1310
1313
|
if (tmp0_safe_receiver == null)
|
|
1311
1314
|
null;
|
|
1312
1315
|
else {
|
|
@@ -1317,32 +1320,32 @@ function rethrowCloseCauseIfNeeded(_this__u8e3s4) {
|
|
|
1317
1320
|
function discard(_this__u8e3s4, max, $completion) {
|
|
1318
1321
|
max = max === VOID ? 9223372036854775807n : max;
|
|
1319
1322
|
var tmp = new $discardCOROUTINE$(_this__u8e3s4, max, $completion);
|
|
1320
|
-
tmp.
|
|
1321
|
-
tmp.
|
|
1322
|
-
return tmp.
|
|
1323
|
+
tmp.result_1 = Unit_instance;
|
|
1324
|
+
tmp.exception_1 = null;
|
|
1325
|
+
return tmp.doResume_5yljmg_k$();
|
|
1323
1326
|
}
|
|
1324
1327
|
function copyTo_0(_this__u8e3s4, channel, $completion) {
|
|
1325
1328
|
var tmp = new $copyToCOROUTINE$_0(_this__u8e3s4, channel, $completion);
|
|
1326
|
-
tmp.
|
|
1327
|
-
tmp.
|
|
1328
|
-
return tmp.
|
|
1329
|
+
tmp.result_1 = Unit_instance;
|
|
1330
|
+
tmp.exception_1 = null;
|
|
1331
|
+
return tmp.doResume_5yljmg_k$();
|
|
1329
1332
|
}
|
|
1330
1333
|
function skipIfFound(_this__u8e3s4, byteString, $completion) {
|
|
1331
1334
|
var tmp = new $skipIfFoundCOROUTINE$(_this__u8e3s4, byteString, $completion);
|
|
1332
|
-
tmp.
|
|
1333
|
-
tmp.
|
|
1334
|
-
return tmp.
|
|
1335
|
+
tmp.result_1 = Unit_instance;
|
|
1336
|
+
tmp.exception_1 = null;
|
|
1337
|
+
return tmp.doResume_5yljmg_k$();
|
|
1335
1338
|
}
|
|
1336
1339
|
function readPacket(_this__u8e3s4, packet, $completion) {
|
|
1337
1340
|
var tmp = new $readPacketCOROUTINE$(_this__u8e3s4, packet, $completion);
|
|
1338
|
-
tmp.
|
|
1339
|
-
tmp.
|
|
1340
|
-
return tmp.
|
|
1341
|
+
tmp.result_1 = Unit_instance;
|
|
1342
|
+
tmp.exception_1 = null;
|
|
1343
|
+
return tmp.doResume_5yljmg_k$();
|
|
1341
1344
|
}
|
|
1342
1345
|
function readUntil(_this__u8e3s4, matchString, writeChannel, limit, ignoreMissing, $completion) {
|
|
1343
1346
|
limit = limit === VOID ? 9223372036854775807n : limit;
|
|
1344
1347
|
ignoreMissing = ignoreMissing === VOID ? false : ignoreMissing;
|
|
1345
|
-
return (new ByteChannelScanner(_this__u8e3s4, matchString, writeChannel, limit)).
|
|
1348
|
+
return (new ByteChannelScanner(_this__u8e3s4, matchString, writeChannel, limit)).findNext_k7w4m8_k$(ignoreMissing, $completion);
|
|
1346
1349
|
}
|
|
1347
1350
|
function readLineStrictTo(_this__u8e3s4, out, limit, lineEnding, $completion) {
|
|
1348
1351
|
limit = limit === VOID ? 9223372036854775807n : limit;
|
|
@@ -1354,29 +1357,20 @@ function readLineStrictTo(_this__u8e3s4, out, limit, lineEnding, $completion) {
|
|
|
1354
1357
|
}
|
|
1355
1358
|
return internalReadLineTo(_this__u8e3s4, out, limit, lineEnding.equals(LineEnding_Lenient_getInstance()), true, $completion);
|
|
1356
1359
|
}
|
|
1357
|
-
function rethrowCloseCauseIfNeeded_0(_this__u8e3s4) {
|
|
1358
|
-
var tmp0_safe_receiver = _this__u8e3s4.d1h();
|
|
1359
|
-
if (tmp0_safe_receiver == null)
|
|
1360
|
-
null;
|
|
1361
|
-
else {
|
|
1362
|
-
// Inline function 'kotlin.let' call
|
|
1363
|
-
throw tmp0_safe_receiver;
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
1360
|
function get_availableForRead(_this__u8e3s4) {
|
|
1367
|
-
return convertToInt(_this__u8e3s4.
|
|
1361
|
+
return convertToInt(_this__u8e3s4.get_readBuffer_yjmj9b_k$().get_buffer_bmaafd_k$().get_size_woubt6_k$());
|
|
1368
1362
|
}
|
|
1369
1363
|
function peek(_this__u8e3s4, count, $completion) {
|
|
1370
1364
|
var tmp = new $peekCOROUTINE$(_this__u8e3s4, count, $completion);
|
|
1371
|
-
tmp.
|
|
1372
|
-
tmp.
|
|
1373
|
-
return tmp.
|
|
1365
|
+
tmp.result_1 = Unit_instance;
|
|
1366
|
+
tmp.exception_1 = null;
|
|
1367
|
+
return tmp.doResume_5yljmg_k$();
|
|
1374
1368
|
}
|
|
1375
1369
|
function internalReadLineTo(_this__u8e3s4, out, limit, lenientLineEnding, throwOnIncompleteLine, $completion) {
|
|
1376
1370
|
var tmp = new $internalReadLineToCOROUTINE$(_this__u8e3s4, out, limit, lenientLineEnding, throwOnIncompleteLine, $completion);
|
|
1377
|
-
tmp.
|
|
1378
|
-
tmp.
|
|
1379
|
-
return tmp.
|
|
1371
|
+
tmp.result_1 = Unit_instance;
|
|
1372
|
+
tmp.exception_1 = null;
|
|
1373
|
+
return tmp.doResume_5yljmg_k$();
|
|
1380
1374
|
}
|
|
1381
1375
|
function throwEndOfStreamException(consumed) {
|
|
1382
1376
|
throw EOFException_init_$Create$('Unexpected end of stream after reading ' + consumed.toString() + ' bytes');
|
|
@@ -1385,7 +1379,7 @@ function throwTooLongLineException(limit) {
|
|
|
1385
1379
|
throw new TooLongLineException('Line exceeds limit of ' + limit.toString() + ' bytes');
|
|
1386
1380
|
}
|
|
1387
1381
|
function rethrowCloseCauseIfNeeded_1(_this__u8e3s4) {
|
|
1388
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
1382
|
+
var tmp0_safe_receiver = _this__u8e3s4.get_closedCause_o1qcj8_k$();
|
|
1389
1383
|
if (tmp0_safe_receiver == null)
|
|
1390
1384
|
null;
|
|
1391
1385
|
else {
|
|
@@ -1398,14 +1392,14 @@ function internalReadLineTo$bufferBytes(outBuffer, readBuffer, consumed, count)
|
|
|
1398
1392
|
if (outBuffer._v == null) {
|
|
1399
1393
|
outBuffer._v = new Buffer();
|
|
1400
1394
|
}
|
|
1401
|
-
outBuffer._v.
|
|
1395
|
+
outBuffer._v.write_9ocf0z_k$(readBuffer, count);
|
|
1402
1396
|
consumed._v = add(consumed._v, count);
|
|
1403
1397
|
}
|
|
1404
1398
|
}
|
|
1405
1399
|
function internalReadLineTo$appendOrBuffer(outBuffer, $out, readBuffer, consumed, count) {
|
|
1406
1400
|
if (outBuffer._v == null) {
|
|
1407
1401
|
if (count > 0n) {
|
|
1408
|
-
$out.
|
|
1402
|
+
$out.append_jgojdo_k$(readString(readBuffer, count));
|
|
1409
1403
|
consumed._v = add(consumed._v, count);
|
|
1410
1404
|
}
|
|
1411
1405
|
} else {
|
|
@@ -1433,178 +1427,131 @@ function internalReadLineTo$scanForSoleCr(_this__u8e3s4, $lenientLineEnding, lfI
|
|
|
1433
1427
|
}
|
|
1434
1428
|
function internalReadLineTo$discardCrlfOrCr(_this__u8e3s4, $this_internalReadLineTo, $lenientLineEnding, $completion) {
|
|
1435
1429
|
var tmp = new $internalReadLineTo$discardCrlfOrCrCOROUTINE$(_this__u8e3s4, $this_internalReadLineTo, $lenientLineEnding, $completion);
|
|
1436
|
-
tmp.
|
|
1437
|
-
tmp.
|
|
1438
|
-
return tmp.
|
|
1430
|
+
tmp.result_1 = Unit_instance;
|
|
1431
|
+
tmp.exception_1 = null;
|
|
1432
|
+
return tmp.doResume_5yljmg_k$();
|
|
1439
1433
|
}
|
|
1440
1434
|
function $readBufferCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
1441
1435
|
CoroutineImpl.call(this, resultContinuation);
|
|
1442
|
-
this.
|
|
1436
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1443
1437
|
}
|
|
1444
|
-
protoOf($readBufferCOROUTINE$).
|
|
1445
|
-
var suspendResult = this.
|
|
1438
|
+
protoOf($readBufferCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
1439
|
+
var suspendResult = this.result_1;
|
|
1446
1440
|
$sm: do
|
|
1447
1441
|
try {
|
|
1448
|
-
var tmp = this.
|
|
1442
|
+
var tmp = this.state_1;
|
|
1449
1443
|
switch (tmp) {
|
|
1450
1444
|
case 0:
|
|
1451
|
-
this.
|
|
1452
|
-
this.
|
|
1453
|
-
this.
|
|
1445
|
+
this.exceptionState_1 = 5;
|
|
1446
|
+
this.result0__1 = new Buffer();
|
|
1447
|
+
this.state_1 = 1;
|
|
1454
1448
|
continue $sm;
|
|
1455
1449
|
case 1:
|
|
1456
|
-
if (!!this.
|
|
1457
|
-
this.
|
|
1450
|
+
if (!!this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$()) {
|
|
1451
|
+
this.state_1 = 4;
|
|
1458
1452
|
continue $sm;
|
|
1459
1453
|
}
|
|
1460
1454
|
|
|
1461
|
-
this.
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1455
|
+
if (this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().exhausted_p1jt55_k$()) {
|
|
1456
|
+
this.state_1 = 2;
|
|
1457
|
+
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
1458
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1459
|
+
return suspendResult;
|
|
1460
|
+
}
|
|
1461
|
+
continue $sm;
|
|
1462
|
+
} else {
|
|
1463
|
+
this.state_1 = 3;
|
|
1464
|
+
continue $sm;
|
|
1466
1465
|
}
|
|
1467
1466
|
|
|
1468
|
-
continue $sm;
|
|
1469
1467
|
case 2:
|
|
1470
|
-
this.
|
|
1468
|
+
this.state_1 = 3;
|
|
1471
1469
|
continue $sm;
|
|
1472
1470
|
case 3:
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
else {
|
|
1477
|
-
throw tmp0_safe_receiver;
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
return this.o1j_1;
|
|
1471
|
+
this.result0__1.transferFrom_v29myr_k$(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$());
|
|
1472
|
+
this.state_1 = 1;
|
|
1473
|
+
continue $sm;
|
|
1481
1474
|
case 4:
|
|
1482
|
-
|
|
1475
|
+
rethrowCloseCauseIfNeeded_0(this._this__u8e3s4__1);
|
|
1476
|
+
return this.result0__1;
|
|
1477
|
+
case 5:
|
|
1478
|
+
throw this.exception_1;
|
|
1483
1479
|
}
|
|
1484
1480
|
} catch ($p) {
|
|
1485
1481
|
var e = $p;
|
|
1486
|
-
if (this.
|
|
1482
|
+
if (this.exceptionState_1 === 5) {
|
|
1487
1483
|
throw e;
|
|
1488
1484
|
} else {
|
|
1489
|
-
this.
|
|
1490
|
-
this.
|
|
1485
|
+
this.state_1 = this.exceptionState_1;
|
|
1486
|
+
this.exception_1 = e;
|
|
1491
1487
|
}
|
|
1492
1488
|
}
|
|
1493
1489
|
while (true);
|
|
1494
1490
|
};
|
|
1495
1491
|
function $readAvailableCOROUTINE$(_this__u8e3s4, buffer, offset, length, resultContinuation) {
|
|
1496
1492
|
CoroutineImpl.call(this, resultContinuation);
|
|
1497
|
-
this.
|
|
1498
|
-
this.
|
|
1499
|
-
this.
|
|
1500
|
-
this.
|
|
1493
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1494
|
+
this.buffer_1 = buffer;
|
|
1495
|
+
this.offset_1 = offset;
|
|
1496
|
+
this.length_1 = length;
|
|
1501
1497
|
}
|
|
1502
|
-
protoOf($readAvailableCOROUTINE$).
|
|
1503
|
-
var suspendResult = this.
|
|
1498
|
+
protoOf($readAvailableCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
1499
|
+
var suspendResult = this.result_1;
|
|
1504
1500
|
$sm: do
|
|
1505
1501
|
try {
|
|
1506
|
-
var tmp = this.
|
|
1502
|
+
var tmp = this.state_1;
|
|
1507
1503
|
switch (tmp) {
|
|
1508
1504
|
case 0:
|
|
1509
|
-
this.
|
|
1510
|
-
if (this.
|
|
1505
|
+
this.exceptionState_1 = 3;
|
|
1506
|
+
if (this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$())
|
|
1511
1507
|
return -1;
|
|
1512
|
-
if (this.
|
|
1513
|
-
this.
|
|
1514
|
-
suspendResult = this.
|
|
1508
|
+
if (this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().exhausted_p1jt55_k$()) {
|
|
1509
|
+
this.state_1 = 1;
|
|
1510
|
+
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
1515
1511
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1516
1512
|
return suspendResult;
|
|
1517
1513
|
}
|
|
1518
1514
|
continue $sm;
|
|
1519
1515
|
} else {
|
|
1520
|
-
this.
|
|
1516
|
+
this.state_1 = 2;
|
|
1521
1517
|
continue $sm;
|
|
1522
1518
|
}
|
|
1523
1519
|
|
|
1524
1520
|
case 1:
|
|
1525
|
-
this.
|
|
1521
|
+
this.state_1 = 2;
|
|
1526
1522
|
continue $sm;
|
|
1527
1523
|
case 2:
|
|
1528
|
-
if (this.
|
|
1524
|
+
if (this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$())
|
|
1529
1525
|
return -1;
|
|
1530
|
-
return readAvailable_0(this.
|
|
1526
|
+
return readAvailable_0(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$(), this.buffer_1, this.offset_1, this.length_1);
|
|
1531
1527
|
case 3:
|
|
1532
|
-
throw this.
|
|
1528
|
+
throw this.exception_1;
|
|
1533
1529
|
}
|
|
1534
1530
|
} catch ($p) {
|
|
1535
1531
|
var e = $p;
|
|
1536
|
-
if (this.
|
|
1532
|
+
if (this.exceptionState_1 === 3) {
|
|
1537
1533
|
throw e;
|
|
1538
1534
|
} else {
|
|
1539
|
-
this.
|
|
1540
|
-
this.
|
|
1541
|
-
}
|
|
1542
|
-
}
|
|
1543
|
-
while (true);
|
|
1544
|
-
};
|
|
1545
|
-
function $readRemainingCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
1546
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
1547
|
-
this.j1k_1 = _this__u8e3s4;
|
|
1548
|
-
}
|
|
1549
|
-
protoOf($readRemainingCOROUTINE$).s8 = function () {
|
|
1550
|
-
var suspendResult = this.m8_1;
|
|
1551
|
-
$sm: do
|
|
1552
|
-
try {
|
|
1553
|
-
var tmp = this.k8_1;
|
|
1554
|
-
switch (tmp) {
|
|
1555
|
-
case 0:
|
|
1556
|
-
this.l8_1 = 4;
|
|
1557
|
-
this.k1k_1 = BytePacketBuilder();
|
|
1558
|
-
this.k8_1 = 1;
|
|
1559
|
-
continue $sm;
|
|
1560
|
-
case 1:
|
|
1561
|
-
if (!!this.j1k_1.e1h()) {
|
|
1562
|
-
this.k8_1 = 3;
|
|
1563
|
-
continue $sm;
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
this.k1k_1.pq(this.j1k_1.a1h());
|
|
1567
|
-
this.k8_1 = 2;
|
|
1568
|
-
suspendResult = this.j1k_1.g1h(VOID, this);
|
|
1569
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1570
|
-
return suspendResult;
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
continue $sm;
|
|
1574
|
-
case 2:
|
|
1575
|
-
this.k8_1 = 1;
|
|
1576
|
-
continue $sm;
|
|
1577
|
-
case 3:
|
|
1578
|
-
rethrowCloseCauseIfNeeded(this.j1k_1);
|
|
1579
|
-
return this.k1k_1.wo();
|
|
1580
|
-
case 4:
|
|
1581
|
-
throw this.n8_1;
|
|
1582
|
-
}
|
|
1583
|
-
} catch ($p) {
|
|
1584
|
-
var e = $p;
|
|
1585
|
-
if (this.l8_1 === 4) {
|
|
1586
|
-
throw e;
|
|
1587
|
-
} else {
|
|
1588
|
-
this.k8_1 = this.l8_1;
|
|
1589
|
-
this.n8_1 = e;
|
|
1535
|
+
this.state_1 = this.exceptionState_1;
|
|
1536
|
+
this.exception_1 = e;
|
|
1590
1537
|
}
|
|
1591
1538
|
}
|
|
1592
1539
|
while (true);
|
|
1593
1540
|
};
|
|
1594
1541
|
function $toByteArrayCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
1595
1542
|
CoroutineImpl.call(this, resultContinuation);
|
|
1596
|
-
this.
|
|
1543
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1597
1544
|
}
|
|
1598
|
-
protoOf($toByteArrayCOROUTINE$).
|
|
1599
|
-
var suspendResult = this.
|
|
1545
|
+
protoOf($toByteArrayCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
1546
|
+
var suspendResult = this.result_1;
|
|
1600
1547
|
$sm: do
|
|
1601
1548
|
try {
|
|
1602
|
-
var tmp = this.
|
|
1549
|
+
var tmp = this.state_1;
|
|
1603
1550
|
switch (tmp) {
|
|
1604
1551
|
case 0:
|
|
1605
|
-
this.
|
|
1606
|
-
this.
|
|
1607
|
-
suspendResult = readBuffer(this.
|
|
1552
|
+
this.exceptionState_1 = 2;
|
|
1553
|
+
this.state_1 = 1;
|
|
1554
|
+
suspendResult = readBuffer(this._this__u8e3s4__1, this);
|
|
1608
1555
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1609
1556
|
return suspendResult;
|
|
1610
1557
|
}
|
|
@@ -1614,306 +1561,306 @@ protoOf($toByteArrayCOROUTINE$).s8 = function () {
|
|
|
1614
1561
|
var ARGUMENT = suspendResult;
|
|
1615
1562
|
return readBytes(ARGUMENT);
|
|
1616
1563
|
case 2:
|
|
1617
|
-
throw this.
|
|
1564
|
+
throw this.exception_1;
|
|
1618
1565
|
}
|
|
1619
1566
|
} catch ($p) {
|
|
1620
1567
|
var e = $p;
|
|
1621
|
-
if (this.
|
|
1568
|
+
if (this.exceptionState_1 === 2) {
|
|
1622
1569
|
throw e;
|
|
1623
1570
|
} else {
|
|
1624
|
-
this.
|
|
1625
|
-
this.
|
|
1571
|
+
this.state_1 = this.exceptionState_1;
|
|
1572
|
+
this.exception_1 = e;
|
|
1626
1573
|
}
|
|
1627
1574
|
}
|
|
1628
1575
|
while (true);
|
|
1629
1576
|
};
|
|
1630
1577
|
function $copyToCOROUTINE$(_this__u8e3s4, channel, limit, resultContinuation) {
|
|
1631
1578
|
CoroutineImpl.call(this, resultContinuation);
|
|
1632
|
-
this.
|
|
1633
|
-
this.
|
|
1634
|
-
this.
|
|
1579
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1580
|
+
this.channel_1 = channel;
|
|
1581
|
+
this.limit_1 = limit;
|
|
1635
1582
|
}
|
|
1636
|
-
protoOf($copyToCOROUTINE$).
|
|
1637
|
-
var suspendResult = this.
|
|
1583
|
+
protoOf($copyToCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
1584
|
+
var suspendResult = this.result_1;
|
|
1638
1585
|
$sm: do
|
|
1639
1586
|
try {
|
|
1640
|
-
var tmp = this.
|
|
1587
|
+
var tmp = this.state_1;
|
|
1641
1588
|
switch (tmp) {
|
|
1642
1589
|
case 0:
|
|
1643
|
-
this.
|
|
1644
|
-
this.
|
|
1645
|
-
this.
|
|
1590
|
+
this.exceptionState_1 = 12;
|
|
1591
|
+
this.remaining0__1 = this.limit_1;
|
|
1592
|
+
this.state_1 = 1;
|
|
1646
1593
|
continue $sm;
|
|
1647
1594
|
case 1:
|
|
1648
|
-
this.
|
|
1649
|
-
this.
|
|
1650
|
-
this.
|
|
1595
|
+
this.exceptionState_1 = 8;
|
|
1596
|
+
this.exceptionState_1 = 7;
|
|
1597
|
+
this.state_1 = 2;
|
|
1651
1598
|
continue $sm;
|
|
1652
1599
|
case 2:
|
|
1653
|
-
if (!(!this.
|
|
1654
|
-
this.
|
|
1600
|
+
if (!(!this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$() && this.remaining0__1 > 0n)) {
|
|
1601
|
+
this.state_1 = 6;
|
|
1655
1602
|
continue $sm;
|
|
1656
1603
|
}
|
|
1657
1604
|
|
|
1658
|
-
if (this.
|
|
1659
|
-
this.
|
|
1660
|
-
suspendResult = this.
|
|
1605
|
+
if (this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().exhausted_p1jt55_k$()) {
|
|
1606
|
+
this.state_1 = 3;
|
|
1607
|
+
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
1661
1608
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1662
1609
|
return suspendResult;
|
|
1663
1610
|
}
|
|
1664
1611
|
continue $sm;
|
|
1665
1612
|
} else {
|
|
1666
|
-
this.
|
|
1613
|
+
this.state_1 = 4;
|
|
1667
1614
|
continue $sm;
|
|
1668
1615
|
}
|
|
1669
1616
|
|
|
1670
1617
|
case 3:
|
|
1671
|
-
this.
|
|
1618
|
+
this.state_1 = 4;
|
|
1672
1619
|
continue $sm;
|
|
1673
1620
|
case 4:
|
|
1674
|
-
var tmp0 = this.
|
|
1675
|
-
var b = get_remaining(this.
|
|
1621
|
+
var tmp0 = this.remaining0__1;
|
|
1622
|
+
var b = get_remaining(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$());
|
|
1676
1623
|
var count = tmp0 <= b ? tmp0 : b;
|
|
1677
|
-
this.
|
|
1678
|
-
this.
|
|
1679
|
-
this.
|
|
1680
|
-
suspendResult = this.
|
|
1624
|
+
this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().readTo_3vtbf7_k$(this.channel_1.get_writeBuffer_t7kuc6_k$(), count);
|
|
1625
|
+
this.remaining0__1 = subtract(this.remaining0__1, count);
|
|
1626
|
+
this.state_1 = 5;
|
|
1627
|
+
suspendResult = this.channel_1.flush_4wsz1p_k$(this);
|
|
1681
1628
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1682
1629
|
return suspendResult;
|
|
1683
1630
|
}
|
|
1684
1631
|
|
|
1685
1632
|
continue $sm;
|
|
1686
1633
|
case 5:
|
|
1687
|
-
this.
|
|
1634
|
+
this.state_1 = 2;
|
|
1688
1635
|
continue $sm;
|
|
1689
1636
|
case 6:
|
|
1690
|
-
this.
|
|
1691
|
-
this.
|
|
1637
|
+
this.exceptionState_1 = 12;
|
|
1638
|
+
this.state_1 = 10;
|
|
1692
1639
|
continue $sm;
|
|
1693
1640
|
case 7:
|
|
1694
|
-
this.
|
|
1695
|
-
var tmp_0 = this.
|
|
1641
|
+
this.exceptionState_1 = 8;
|
|
1642
|
+
var tmp_0 = this.exception_1;
|
|
1696
1643
|
if (tmp_0 instanceof Error) {
|
|
1697
|
-
var cause = this.
|
|
1698
|
-
this.
|
|
1699
|
-
close_0(this.
|
|
1644
|
+
var cause = this.exception_1;
|
|
1645
|
+
this._this__u8e3s4__1.cancel_9i2dv0_k$(cause);
|
|
1646
|
+
close_0(this.channel_1, cause);
|
|
1700
1647
|
throw cause;
|
|
1701
1648
|
} else {
|
|
1702
|
-
throw this.
|
|
1649
|
+
throw this.exception_1;
|
|
1703
1650
|
}
|
|
1704
1651
|
|
|
1705
1652
|
case 8:
|
|
1706
|
-
this.
|
|
1707
|
-
this.
|
|
1708
|
-
this.
|
|
1709
|
-
suspendResult = this.
|
|
1653
|
+
this.exceptionState_1 = 12;
|
|
1654
|
+
this.t1__1 = this.exception_1;
|
|
1655
|
+
this.state_1 = 9;
|
|
1656
|
+
suspendResult = this.channel_1.flush_4wsz1p_k$(this);
|
|
1710
1657
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1711
1658
|
return suspendResult;
|
|
1712
1659
|
}
|
|
1713
1660
|
|
|
1714
1661
|
continue $sm;
|
|
1715
1662
|
case 9:
|
|
1716
|
-
throw this.
|
|
1663
|
+
throw this.t1__1;
|
|
1717
1664
|
case 10:
|
|
1718
|
-
this.
|
|
1719
|
-
this.
|
|
1720
|
-
suspendResult = this.
|
|
1665
|
+
this.exceptionState_1 = 12;
|
|
1666
|
+
this.state_1 = 11;
|
|
1667
|
+
suspendResult = this.channel_1.flush_4wsz1p_k$(this);
|
|
1721
1668
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1722
1669
|
return suspendResult;
|
|
1723
1670
|
}
|
|
1724
1671
|
|
|
1725
1672
|
continue $sm;
|
|
1726
1673
|
case 11:
|
|
1727
|
-
return subtract(this.
|
|
1674
|
+
return subtract(this.limit_1, this.remaining0__1);
|
|
1728
1675
|
case 12:
|
|
1729
|
-
throw this.
|
|
1676
|
+
throw this.exception_1;
|
|
1730
1677
|
}
|
|
1731
1678
|
} catch ($p) {
|
|
1732
1679
|
var e = $p;
|
|
1733
|
-
if (this.
|
|
1680
|
+
if (this.exceptionState_1 === 12) {
|
|
1734
1681
|
throw e;
|
|
1735
1682
|
} else {
|
|
1736
|
-
this.
|
|
1737
|
-
this.
|
|
1683
|
+
this.state_1 = this.exceptionState_1;
|
|
1684
|
+
this.exception_1 = e;
|
|
1738
1685
|
}
|
|
1739
1686
|
}
|
|
1740
1687
|
while (true);
|
|
1741
1688
|
};
|
|
1742
1689
|
function $discardCOROUTINE$(_this__u8e3s4, max, resultContinuation) {
|
|
1743
1690
|
CoroutineImpl.call(this, resultContinuation);
|
|
1744
|
-
this.
|
|
1745
|
-
this.
|
|
1691
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1692
|
+
this.max_1 = max;
|
|
1746
1693
|
}
|
|
1747
|
-
protoOf($discardCOROUTINE$).
|
|
1748
|
-
var suspendResult = this.
|
|
1694
|
+
protoOf($discardCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
1695
|
+
var suspendResult = this.result_1;
|
|
1749
1696
|
$sm: do
|
|
1750
1697
|
try {
|
|
1751
|
-
var tmp = this.
|
|
1698
|
+
var tmp = this.state_1;
|
|
1752
1699
|
switch (tmp) {
|
|
1753
1700
|
case 0:
|
|
1754
|
-
this.
|
|
1755
|
-
this.
|
|
1756
|
-
this.
|
|
1701
|
+
this.exceptionState_1 = 5;
|
|
1702
|
+
this.remaining0__1 = this.max_1;
|
|
1703
|
+
this.state_1 = 1;
|
|
1757
1704
|
continue $sm;
|
|
1758
1705
|
case 1:
|
|
1759
|
-
if (!(this.
|
|
1760
|
-
this.
|
|
1706
|
+
if (!(this.remaining0__1 > 0n && !this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$())) {
|
|
1707
|
+
this.state_1 = 4;
|
|
1761
1708
|
continue $sm;
|
|
1762
1709
|
}
|
|
1763
1710
|
|
|
1764
|
-
if (get_availableForRead(this.
|
|
1765
|
-
this.
|
|
1766
|
-
suspendResult = this.
|
|
1711
|
+
if (get_availableForRead(this._this__u8e3s4__1) === 0) {
|
|
1712
|
+
this.state_1 = 2;
|
|
1713
|
+
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
1767
1714
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1768
1715
|
return suspendResult;
|
|
1769
1716
|
}
|
|
1770
1717
|
continue $sm;
|
|
1771
1718
|
} else {
|
|
1772
|
-
this.
|
|
1719
|
+
this.state_1 = 3;
|
|
1773
1720
|
continue $sm;
|
|
1774
1721
|
}
|
|
1775
1722
|
|
|
1776
1723
|
case 2:
|
|
1777
|
-
this.
|
|
1724
|
+
this.state_1 = 3;
|
|
1778
1725
|
continue $sm;
|
|
1779
1726
|
case 3:
|
|
1780
|
-
var tmp0 = this.
|
|
1781
|
-
var b = get_remaining(this.
|
|
1727
|
+
var tmp0 = this.remaining0__1;
|
|
1728
|
+
var b = get_remaining(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$());
|
|
1782
1729
|
var count = tmp0 <= b ? tmp0 : b;
|
|
1783
|
-
discard_0(this.
|
|
1784
|
-
this.
|
|
1785
|
-
this.
|
|
1730
|
+
discard_0(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$(), count);
|
|
1731
|
+
this.remaining0__1 = subtract(this.remaining0__1, count);
|
|
1732
|
+
this.state_1 = 1;
|
|
1786
1733
|
continue $sm;
|
|
1787
1734
|
case 4:
|
|
1788
|
-
return subtract(this.
|
|
1735
|
+
return subtract(this.max_1, this.remaining0__1);
|
|
1789
1736
|
case 5:
|
|
1790
|
-
throw this.
|
|
1737
|
+
throw this.exception_1;
|
|
1791
1738
|
}
|
|
1792
1739
|
} catch ($p) {
|
|
1793
1740
|
var e = $p;
|
|
1794
|
-
if (this.
|
|
1741
|
+
if (this.exceptionState_1 === 5) {
|
|
1795
1742
|
throw e;
|
|
1796
1743
|
} else {
|
|
1797
|
-
this.
|
|
1798
|
-
this.
|
|
1744
|
+
this.state_1 = this.exceptionState_1;
|
|
1745
|
+
this.exception_1 = e;
|
|
1799
1746
|
}
|
|
1800
1747
|
}
|
|
1801
1748
|
while (true);
|
|
1802
1749
|
};
|
|
1803
1750
|
function $copyToCOROUTINE$_0(_this__u8e3s4, channel, resultContinuation) {
|
|
1804
1751
|
CoroutineImpl.call(this, resultContinuation);
|
|
1805
|
-
this.
|
|
1806
|
-
this.
|
|
1752
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1753
|
+
this.channel_1 = channel;
|
|
1807
1754
|
}
|
|
1808
|
-
protoOf($copyToCOROUTINE$_0).
|
|
1809
|
-
var suspendResult = this.
|
|
1755
|
+
protoOf($copyToCOROUTINE$_0).doResume_5yljmg_k$ = function () {
|
|
1756
|
+
var suspendResult = this.result_1;
|
|
1810
1757
|
$sm: do
|
|
1811
1758
|
try {
|
|
1812
|
-
var tmp = this.
|
|
1759
|
+
var tmp = this.state_1;
|
|
1813
1760
|
switch (tmp) {
|
|
1814
1761
|
case 0:
|
|
1815
|
-
this.
|
|
1816
|
-
this.
|
|
1817
|
-
this.
|
|
1762
|
+
this.exceptionState_1 = 11;
|
|
1763
|
+
this.result0__1 = 0n;
|
|
1764
|
+
this.state_1 = 1;
|
|
1818
1765
|
continue $sm;
|
|
1819
1766
|
case 1:
|
|
1820
|
-
this.
|
|
1821
|
-
this.
|
|
1822
|
-
this.
|
|
1767
|
+
this.exceptionState_1 = 7;
|
|
1768
|
+
this.exceptionState_1 = 6;
|
|
1769
|
+
this.state_1 = 2;
|
|
1823
1770
|
continue $sm;
|
|
1824
1771
|
case 2:
|
|
1825
|
-
if (!!this.
|
|
1826
|
-
this.
|
|
1772
|
+
if (!!this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$()) {
|
|
1773
|
+
this.state_1 = 5;
|
|
1827
1774
|
continue $sm;
|
|
1828
1775
|
}
|
|
1829
1776
|
|
|
1830
|
-
this.
|
|
1831
|
-
this.
|
|
1832
|
-
suspendResult = this.
|
|
1777
|
+
this.result0__1 = add(this.result0__1, this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().transferTo_lu4ka2_k$(this.channel_1.get_writeBuffer_t7kuc6_k$()));
|
|
1778
|
+
this.state_1 = 3;
|
|
1779
|
+
suspendResult = this.channel_1.flush_4wsz1p_k$(this);
|
|
1833
1780
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1834
1781
|
return suspendResult;
|
|
1835
1782
|
}
|
|
1836
1783
|
|
|
1837
1784
|
continue $sm;
|
|
1838
1785
|
case 3:
|
|
1839
|
-
this.
|
|
1840
|
-
suspendResult = this.
|
|
1786
|
+
this.state_1 = 4;
|
|
1787
|
+
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
1841
1788
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1842
1789
|
return suspendResult;
|
|
1843
1790
|
}
|
|
1844
1791
|
|
|
1845
1792
|
continue $sm;
|
|
1846
1793
|
case 4:
|
|
1847
|
-
this.
|
|
1794
|
+
this.state_1 = 2;
|
|
1848
1795
|
continue $sm;
|
|
1849
1796
|
case 5:
|
|
1850
|
-
this.
|
|
1851
|
-
this.
|
|
1797
|
+
this.exceptionState_1 = 11;
|
|
1798
|
+
this.state_1 = 9;
|
|
1852
1799
|
continue $sm;
|
|
1853
1800
|
case 6:
|
|
1854
|
-
this.
|
|
1855
|
-
var tmp_0 = this.
|
|
1801
|
+
this.exceptionState_1 = 7;
|
|
1802
|
+
var tmp_0 = this.exception_1;
|
|
1856
1803
|
if (tmp_0 instanceof Error) {
|
|
1857
|
-
var cause = this.
|
|
1858
|
-
this.
|
|
1859
|
-
close_0(this.
|
|
1804
|
+
var cause = this.exception_1;
|
|
1805
|
+
this._this__u8e3s4__1.cancel_9i2dv0_k$(cause);
|
|
1806
|
+
close_0(this.channel_1, cause);
|
|
1860
1807
|
throw cause;
|
|
1861
1808
|
} else {
|
|
1862
|
-
throw this.
|
|
1809
|
+
throw this.exception_1;
|
|
1863
1810
|
}
|
|
1864
1811
|
|
|
1865
1812
|
case 7:
|
|
1866
|
-
this.
|
|
1867
|
-
this.
|
|
1868
|
-
this.
|
|
1869
|
-
suspendResult = this.
|
|
1813
|
+
this.exceptionState_1 = 11;
|
|
1814
|
+
this.t1__1 = this.exception_1;
|
|
1815
|
+
this.state_1 = 8;
|
|
1816
|
+
suspendResult = this.channel_1.flush_4wsz1p_k$(this);
|
|
1870
1817
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1871
1818
|
return suspendResult;
|
|
1872
1819
|
}
|
|
1873
1820
|
|
|
1874
1821
|
continue $sm;
|
|
1875
1822
|
case 8:
|
|
1876
|
-
throw this.
|
|
1823
|
+
throw this.t1__1;
|
|
1877
1824
|
case 9:
|
|
1878
|
-
this.
|
|
1879
|
-
this.
|
|
1880
|
-
suspendResult = this.
|
|
1825
|
+
this.exceptionState_1 = 11;
|
|
1826
|
+
this.state_1 = 10;
|
|
1827
|
+
suspendResult = this.channel_1.flush_4wsz1p_k$(this);
|
|
1881
1828
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1882
1829
|
return suspendResult;
|
|
1883
1830
|
}
|
|
1884
1831
|
|
|
1885
1832
|
continue $sm;
|
|
1886
1833
|
case 10:
|
|
1887
|
-
return this.
|
|
1834
|
+
return this.result0__1;
|
|
1888
1835
|
case 11:
|
|
1889
|
-
throw this.
|
|
1836
|
+
throw this.exception_1;
|
|
1890
1837
|
}
|
|
1891
1838
|
} catch ($p) {
|
|
1892
1839
|
var e = $p;
|
|
1893
|
-
if (this.
|
|
1840
|
+
if (this.exceptionState_1 === 11) {
|
|
1894
1841
|
throw e;
|
|
1895
1842
|
} else {
|
|
1896
|
-
this.
|
|
1897
|
-
this.
|
|
1843
|
+
this.state_1 = this.exceptionState_1;
|
|
1844
|
+
this.exception_1 = e;
|
|
1898
1845
|
}
|
|
1899
1846
|
}
|
|
1900
1847
|
while (true);
|
|
1901
1848
|
};
|
|
1902
1849
|
function $skipIfFoundCOROUTINE$(_this__u8e3s4, byteString, resultContinuation) {
|
|
1903
1850
|
CoroutineImpl.call(this, resultContinuation);
|
|
1904
|
-
this.
|
|
1905
|
-
this.
|
|
1851
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1852
|
+
this.byteString_1 = byteString;
|
|
1906
1853
|
}
|
|
1907
|
-
protoOf($skipIfFoundCOROUTINE$).
|
|
1908
|
-
var suspendResult = this.
|
|
1854
|
+
protoOf($skipIfFoundCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
1855
|
+
var suspendResult = this.result_1;
|
|
1909
1856
|
$sm: do
|
|
1910
1857
|
try {
|
|
1911
|
-
var tmp = this.
|
|
1858
|
+
var tmp = this.state_1;
|
|
1912
1859
|
switch (tmp) {
|
|
1913
1860
|
case 0:
|
|
1914
|
-
this.
|
|
1915
|
-
this.
|
|
1916
|
-
suspendResult = peek(this.
|
|
1861
|
+
this.exceptionState_1 = 4;
|
|
1862
|
+
this.state_1 = 1;
|
|
1863
|
+
suspendResult = peek(this._this__u8e3s4__1, this.byteString_1.get_size_woubt6_k$(), this);
|
|
1917
1864
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1918
1865
|
return suspendResult;
|
|
1919
1866
|
}
|
|
@@ -1921,15 +1868,15 @@ protoOf($skipIfFoundCOROUTINE$).s8 = function () {
|
|
|
1921
1868
|
continue $sm;
|
|
1922
1869
|
case 1:
|
|
1923
1870
|
var ARGUMENT = suspendResult;
|
|
1924
|
-
if (equals(ARGUMENT, this.
|
|
1925
|
-
this.
|
|
1926
|
-
suspendResult = discard(this.
|
|
1871
|
+
if (equals(ARGUMENT, this.byteString_1)) {
|
|
1872
|
+
this.state_1 = 3;
|
|
1873
|
+
suspendResult = discard(this._this__u8e3s4__1, fromInt(this.byteString_1.get_size_woubt6_k$()), this);
|
|
1927
1874
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1928
1875
|
return suspendResult;
|
|
1929
1876
|
}
|
|
1930
1877
|
continue $sm;
|
|
1931
1878
|
} else {
|
|
1932
|
-
this.
|
|
1879
|
+
this.state_1 = 2;
|
|
1933
1880
|
continue $sm;
|
|
1934
1881
|
}
|
|
1935
1882
|
|
|
@@ -1938,111 +1885,111 @@ protoOf($skipIfFoundCOROUTINE$).s8 = function () {
|
|
|
1938
1885
|
case 3:
|
|
1939
1886
|
return true;
|
|
1940
1887
|
case 4:
|
|
1941
|
-
throw this.
|
|
1888
|
+
throw this.exception_1;
|
|
1942
1889
|
}
|
|
1943
1890
|
} catch ($p) {
|
|
1944
1891
|
var e = $p;
|
|
1945
|
-
if (this.
|
|
1892
|
+
if (this.exceptionState_1 === 4) {
|
|
1946
1893
|
throw e;
|
|
1947
1894
|
} else {
|
|
1948
|
-
this.
|
|
1949
|
-
this.
|
|
1895
|
+
this.state_1 = this.exceptionState_1;
|
|
1896
|
+
this.exception_1 = e;
|
|
1950
1897
|
}
|
|
1951
1898
|
}
|
|
1952
1899
|
while (true);
|
|
1953
1900
|
};
|
|
1954
1901
|
function $readPacketCOROUTINE$(_this__u8e3s4, packet, resultContinuation) {
|
|
1955
1902
|
CoroutineImpl.call(this, resultContinuation);
|
|
1956
|
-
this.
|
|
1957
|
-
this.
|
|
1903
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1904
|
+
this.packet_1 = packet;
|
|
1958
1905
|
}
|
|
1959
|
-
protoOf($readPacketCOROUTINE$).
|
|
1960
|
-
var suspendResult = this.
|
|
1906
|
+
protoOf($readPacketCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
1907
|
+
var suspendResult = this.result_1;
|
|
1961
1908
|
$sm: do
|
|
1962
1909
|
try {
|
|
1963
|
-
var tmp = this.
|
|
1910
|
+
var tmp = this.state_1;
|
|
1964
1911
|
switch (tmp) {
|
|
1965
1912
|
case 0:
|
|
1966
|
-
this.
|
|
1967
|
-
this.
|
|
1968
|
-
this.
|
|
1913
|
+
this.exceptionState_1 = 6;
|
|
1914
|
+
this.result0__1 = new Buffer();
|
|
1915
|
+
this.state_1 = 1;
|
|
1969
1916
|
continue $sm;
|
|
1970
1917
|
case 1:
|
|
1971
|
-
if (!(this.
|
|
1972
|
-
this.
|
|
1918
|
+
if (!(this.result0__1.get_size_woubt6_k$() < fromInt(this.packet_1))) {
|
|
1919
|
+
this.state_1 = 5;
|
|
1973
1920
|
continue $sm;
|
|
1974
1921
|
}
|
|
1975
1922
|
|
|
1976
|
-
if (this.
|
|
1977
|
-
this.
|
|
1978
|
-
suspendResult = this.
|
|
1923
|
+
if (this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().exhausted_p1jt55_k$()) {
|
|
1924
|
+
this.state_1 = 2;
|
|
1925
|
+
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
1979
1926
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1980
1927
|
return suspendResult;
|
|
1981
1928
|
}
|
|
1982
1929
|
continue $sm;
|
|
1983
1930
|
} else {
|
|
1984
|
-
this.
|
|
1931
|
+
this.state_1 = 3;
|
|
1985
1932
|
continue $sm;
|
|
1986
1933
|
}
|
|
1987
1934
|
|
|
1988
1935
|
case 2:
|
|
1989
|
-
this.
|
|
1936
|
+
this.state_1 = 3;
|
|
1990
1937
|
continue $sm;
|
|
1991
1938
|
case 3:
|
|
1992
|
-
if (this.
|
|
1993
|
-
this.
|
|
1939
|
+
if (this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$()) {
|
|
1940
|
+
this.state_1 = 5;
|
|
1994
1941
|
continue $sm;
|
|
1995
1942
|
} else {
|
|
1996
|
-
this.
|
|
1943
|
+
this.state_1 = 4;
|
|
1997
1944
|
continue $sm;
|
|
1998
1945
|
}
|
|
1999
1946
|
|
|
2000
1947
|
case 4:
|
|
2001
|
-
if (get_remaining(this.
|
|
2002
|
-
this.
|
|
1948
|
+
if (get_remaining(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$()) > subtract(numberToLong(this.packet_1), this.result0__1.get_size_woubt6_k$())) {
|
|
1949
|
+
this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().readTo_3vtbf7_k$(this.result0__1, subtract(numberToLong(this.packet_1), this.result0__1.get_size_woubt6_k$()));
|
|
2003
1950
|
} else {
|
|
2004
|
-
this.
|
|
1951
|
+
this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().transferTo_lu4ka2_k$(this.result0__1);
|
|
2005
1952
|
}
|
|
2006
1953
|
|
|
2007
|
-
this.
|
|
1954
|
+
this.state_1 = 1;
|
|
2008
1955
|
continue $sm;
|
|
2009
1956
|
case 5:
|
|
2010
|
-
if (this.
|
|
2011
|
-
throw EOFException_init_$Create$('Not enough data available, required ' + this.
|
|
1957
|
+
if (this.result0__1.get_size_woubt6_k$() < fromInt(this.packet_1)) {
|
|
1958
|
+
throw EOFException_init_$Create$('Not enough data available, required ' + this.packet_1 + ' bytes but only ' + this.result0__1.get_size_woubt6_k$().toString() + ' available');
|
|
2012
1959
|
}
|
|
2013
1960
|
|
|
2014
|
-
return this.
|
|
1961
|
+
return this.result0__1;
|
|
2015
1962
|
case 6:
|
|
2016
|
-
throw this.
|
|
1963
|
+
throw this.exception_1;
|
|
2017
1964
|
}
|
|
2018
1965
|
} catch ($p) {
|
|
2019
1966
|
var e = $p;
|
|
2020
|
-
if (this.
|
|
1967
|
+
if (this.exceptionState_1 === 6) {
|
|
2021
1968
|
throw e;
|
|
2022
1969
|
} else {
|
|
2023
|
-
this.
|
|
2024
|
-
this.
|
|
1970
|
+
this.state_1 = this.exceptionState_1;
|
|
1971
|
+
this.exception_1 = e;
|
|
2025
1972
|
}
|
|
2026
1973
|
}
|
|
2027
1974
|
while (true);
|
|
2028
1975
|
};
|
|
2029
1976
|
function $peekCOROUTINE$(_this__u8e3s4, count, resultContinuation) {
|
|
2030
1977
|
CoroutineImpl.call(this, resultContinuation);
|
|
2031
|
-
this.
|
|
2032
|
-
this.
|
|
1978
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1979
|
+
this.count_1 = count;
|
|
2033
1980
|
}
|
|
2034
|
-
protoOf($peekCOROUTINE$).
|
|
2035
|
-
var suspendResult = this.
|
|
1981
|
+
protoOf($peekCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
1982
|
+
var suspendResult = this.result_1;
|
|
2036
1983
|
$sm: do
|
|
2037
1984
|
try {
|
|
2038
|
-
var tmp = this.
|
|
1985
|
+
var tmp = this.state_1;
|
|
2039
1986
|
switch (tmp) {
|
|
2040
1987
|
case 0:
|
|
2041
|
-
this.
|
|
2042
|
-
if (this.
|
|
1988
|
+
this.exceptionState_1 = 3;
|
|
1989
|
+
if (this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$())
|
|
2043
1990
|
return null;
|
|
2044
|
-
this.
|
|
2045
|
-
suspendResult = this.
|
|
1991
|
+
this.state_1 = 1;
|
|
1992
|
+
suspendResult = this._this__u8e3s4__1.awaitContent_q7m0p7_k$(this.count_1, this);
|
|
2046
1993
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2047
1994
|
return suspendResult;
|
|
2048
1995
|
}
|
|
@@ -2052,348 +1999,348 @@ protoOf($peekCOROUTINE$).s8 = function () {
|
|
|
2052
1999
|
if (!suspendResult) {
|
|
2053
2000
|
return null;
|
|
2054
2001
|
} else {
|
|
2055
|
-
this.
|
|
2002
|
+
this.state_1 = 2;
|
|
2056
2003
|
continue $sm;
|
|
2057
2004
|
}
|
|
2058
2005
|
|
|
2059
2006
|
case 2:
|
|
2060
|
-
return readByteString(this.
|
|
2007
|
+
return readByteString(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().peek_21nx7_k$(), this.count_1);
|
|
2061
2008
|
case 3:
|
|
2062
|
-
throw this.
|
|
2009
|
+
throw this.exception_1;
|
|
2063
2010
|
}
|
|
2064
2011
|
} catch ($p) {
|
|
2065
2012
|
var e = $p;
|
|
2066
|
-
if (this.
|
|
2013
|
+
if (this.exceptionState_1 === 3) {
|
|
2067
2014
|
throw e;
|
|
2068
2015
|
} else {
|
|
2069
|
-
this.
|
|
2070
|
-
this.
|
|
2016
|
+
this.state_1 = this.exceptionState_1;
|
|
2017
|
+
this.exception_1 = e;
|
|
2071
2018
|
}
|
|
2072
2019
|
}
|
|
2073
2020
|
while (true);
|
|
2074
2021
|
};
|
|
2075
2022
|
function $internalReadLineToCOROUTINE$(_this__u8e3s4, out, limit, lenientLineEnding, throwOnIncompleteLine, resultContinuation) {
|
|
2076
2023
|
CoroutineImpl.call(this, resultContinuation);
|
|
2077
|
-
this.
|
|
2078
|
-
this.
|
|
2079
|
-
this.
|
|
2080
|
-
this.
|
|
2081
|
-
this.
|
|
2082
|
-
}
|
|
2083
|
-
protoOf($internalReadLineToCOROUTINE$).
|
|
2084
|
-
var suspendResult = this.
|
|
2024
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
2025
|
+
this.out_1 = out;
|
|
2026
|
+
this.limit_1 = limit;
|
|
2027
|
+
this.lenientLineEnding_1 = lenientLineEnding;
|
|
2028
|
+
this.throwOnIncompleteLine_1 = throwOnIncompleteLine;
|
|
2029
|
+
}
|
|
2030
|
+
protoOf($internalReadLineToCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
2031
|
+
var suspendResult = this.result_1;
|
|
2085
2032
|
$sm: do
|
|
2086
2033
|
try {
|
|
2087
|
-
var tmp = this.
|
|
2034
|
+
var tmp = this.state_1;
|
|
2088
2035
|
switch (tmp) {
|
|
2089
2036
|
case 0:
|
|
2090
|
-
this.
|
|
2091
|
-
this.
|
|
2092
|
-
if (this.
|
|
2093
|
-
this.
|
|
2094
|
-
suspendResult = this.
|
|
2037
|
+
this.exceptionState_1 = 27;
|
|
2038
|
+
this.readBuffer4__1 = this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$();
|
|
2039
|
+
if (this.readBuffer4__1.exhausted_p1jt55_k$()) {
|
|
2040
|
+
this.state_1 = 1;
|
|
2041
|
+
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
2095
2042
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2096
2043
|
return suspendResult;
|
|
2097
2044
|
}
|
|
2098
2045
|
continue $sm;
|
|
2099
2046
|
} else {
|
|
2100
|
-
this.
|
|
2047
|
+
this.state_1 = 2;
|
|
2101
2048
|
continue $sm;
|
|
2102
2049
|
}
|
|
2103
2050
|
|
|
2104
2051
|
case 1:
|
|
2105
|
-
this.
|
|
2052
|
+
this.state_1 = 2;
|
|
2106
2053
|
continue $sm;
|
|
2107
2054
|
case 2:
|
|
2108
|
-
if (this.
|
|
2055
|
+
if (this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$())
|
|
2109
2056
|
return -1n;
|
|
2110
|
-
this.
|
|
2111
|
-
this.
|
|
2112
|
-
this.
|
|
2057
|
+
this.consumed3__1 = {_v: 0n};
|
|
2058
|
+
this.outBuffer0__1 = {_v: null};
|
|
2059
|
+
this.state_1 = 3;
|
|
2113
2060
|
continue $sm;
|
|
2114
2061
|
case 3:
|
|
2115
|
-
this.
|
|
2062
|
+
this.state_1 = 4;
|
|
2116
2063
|
continue $sm;
|
|
2117
2064
|
case 4:
|
|
2118
|
-
this.
|
|
2119
|
-
this.
|
|
2065
|
+
this.exceptionState_1 = 24;
|
|
2066
|
+
this.state_1 = 5;
|
|
2120
2067
|
continue $sm;
|
|
2121
2068
|
case 5:
|
|
2122
|
-
if (!(this.
|
|
2123
|
-
this.
|
|
2069
|
+
if (!(this.consumed3__1._v < this.limit_1 && !this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$())) {
|
|
2070
|
+
this.state_1 = 15;
|
|
2124
2071
|
continue $sm;
|
|
2125
2072
|
}
|
|
2126
2073
|
|
|
2127
|
-
this.
|
|
2128
|
-
this.
|
|
2129
|
-
var crIndex = internalReadLineTo$scanForSoleCr(this.
|
|
2074
|
+
this.limitLeft7__1 = subtract(this.limit_1, this.consumed3__1._v);
|
|
2075
|
+
this.lfIndex8__1 = indexOf(this.readBuffer4__1, 10, VOID, this.limitLeft7__1);
|
|
2076
|
+
var crIndex = internalReadLineTo$scanForSoleCr(this.readBuffer4__1, this.lenientLineEnding_1, this.lfIndex8__1, this.limitLeft7__1);
|
|
2130
2077
|
if (crIndex >= 0n) {
|
|
2131
|
-
internalReadLineTo$appendOrBuffer(this.
|
|
2132
|
-
discard_0(this.
|
|
2133
|
-
this.
|
|
2134
|
-
this.
|
|
2135
|
-
this.
|
|
2078
|
+
internalReadLineTo$appendOrBuffer(this.outBuffer0__1, this.out_1, this.readBuffer4__1, this.consumed3__1, crIndex);
|
|
2079
|
+
discard_0(this.readBuffer4__1, 1n);
|
|
2080
|
+
this.tmp$ret$02__1 = this.consumed3__1._v;
|
|
2081
|
+
this.exceptionState_1 = 27;
|
|
2082
|
+
this.state_1 = 25;
|
|
2136
2083
|
continue $sm;
|
|
2137
2084
|
} else {
|
|
2138
|
-
this.
|
|
2085
|
+
this.state_1 = 6;
|
|
2139
2086
|
continue $sm;
|
|
2140
2087
|
}
|
|
2141
2088
|
|
|
2142
2089
|
case 6:
|
|
2143
|
-
if (this.
|
|
2144
|
-
discard_0(this.
|
|
2145
|
-
this.
|
|
2146
|
-
this.
|
|
2147
|
-
this.
|
|
2090
|
+
if (this.lfIndex8__1 === 0n) {
|
|
2091
|
+
discard_0(this.readBuffer4__1, 1n);
|
|
2092
|
+
this.tmp$ret$02__1 = this.consumed3__1._v;
|
|
2093
|
+
this.exceptionState_1 = 27;
|
|
2094
|
+
this.state_1 = 25;
|
|
2148
2095
|
continue $sm;
|
|
2149
2096
|
} else {
|
|
2150
|
-
this.
|
|
2097
|
+
this.state_1 = 7;
|
|
2151
2098
|
continue $sm;
|
|
2152
2099
|
}
|
|
2153
2100
|
|
|
2154
2101
|
case 7:
|
|
2155
|
-
if (this.
|
|
2102
|
+
if (this.lfIndex8__1 > 0n) {
|
|
2156
2103
|
var tmp_0;
|
|
2157
|
-
var tmp_1 = this.
|
|
2158
|
-
var this_0 = this.
|
|
2159
|
-
if (tmp_1.
|
|
2104
|
+
var tmp_1 = this.readBuffer4__1.get_buffer_bmaafd_k$();
|
|
2105
|
+
var this_0 = this.lfIndex8__1;
|
|
2106
|
+
if (tmp_1.get_f9lzxq_k$(subtract(this_0, fromInt(1))) === 13) {
|
|
2160
2107
|
tmp_0 = 1n;
|
|
2161
2108
|
} else {
|
|
2162
2109
|
tmp_0 = 0n;
|
|
2163
2110
|
}
|
|
2164
2111
|
var isCrlf = tmp_0;
|
|
2165
|
-
internalReadLineTo$appendOrBuffer(this.
|
|
2166
|
-
discard_0(this.
|
|
2167
|
-
this.
|
|
2168
|
-
this.
|
|
2169
|
-
this.
|
|
2112
|
+
internalReadLineTo$appendOrBuffer(this.outBuffer0__1, this.out_1, this.readBuffer4__1, this.consumed3__1, subtract(this.lfIndex8__1, isCrlf));
|
|
2113
|
+
discard_0(this.readBuffer4__1, add(numberToLong(1), isCrlf));
|
|
2114
|
+
this.tmp$ret$02__1 = this.consumed3__1._v;
|
|
2115
|
+
this.exceptionState_1 = 27;
|
|
2116
|
+
this.state_1 = 25;
|
|
2170
2117
|
continue $sm;
|
|
2171
2118
|
} else {
|
|
2172
|
-
this.
|
|
2119
|
+
this.state_1 = 8;
|
|
2173
2120
|
continue $sm;
|
|
2174
2121
|
}
|
|
2175
2122
|
|
|
2176
2123
|
case 8:
|
|
2177
|
-
var tmp0 = this.
|
|
2178
|
-
var b = get_remaining(this.
|
|
2124
|
+
var tmp0 = this.limitLeft7__1;
|
|
2125
|
+
var b = get_remaining(this.readBuffer4__1);
|
|
2179
2126
|
var count = tmp0 <= b ? tmp0 : b;
|
|
2180
|
-
var tmp_2 = this.
|
|
2181
|
-
if (tmp_2.
|
|
2182
|
-
internalReadLineTo$appendOrBuffer(this.
|
|
2183
|
-
this.
|
|
2184
|
-
suspendResult = internalReadLineTo$discardCrlfOrCr(this.
|
|
2127
|
+
var tmp_2 = this.readBuffer4__1.get_buffer_bmaafd_k$();
|
|
2128
|
+
if (tmp_2.get_f9lzxq_k$(subtract(count, fromInt(1))) === 13) {
|
|
2129
|
+
internalReadLineTo$appendOrBuffer(this.outBuffer0__1, this.out_1, this.readBuffer4__1, this.consumed3__1, subtract(count, fromInt(1)));
|
|
2130
|
+
this.state_1 = 9;
|
|
2131
|
+
suspendResult = internalReadLineTo$discardCrlfOrCr(this.readBuffer4__1, this._this__u8e3s4__1, this.lenientLineEnding_1, this);
|
|
2185
2132
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2186
2133
|
return suspendResult;
|
|
2187
2134
|
}
|
|
2188
2135
|
continue $sm;
|
|
2189
2136
|
} else {
|
|
2190
|
-
internalReadLineTo$bufferBytes(this.
|
|
2191
|
-
this.
|
|
2137
|
+
internalReadLineTo$bufferBytes(this.outBuffer0__1, this.readBuffer4__1, this.consumed3__1, count);
|
|
2138
|
+
this.state_1 = 11;
|
|
2192
2139
|
continue $sm;
|
|
2193
2140
|
}
|
|
2194
2141
|
|
|
2195
2142
|
case 9:
|
|
2196
2143
|
if (suspendResult) {
|
|
2197
|
-
this.
|
|
2198
|
-
this.
|
|
2199
|
-
this.
|
|
2144
|
+
this.tmp$ret$02__1 = this.consumed3__1._v;
|
|
2145
|
+
this.exceptionState_1 = 27;
|
|
2146
|
+
this.state_1 = 25;
|
|
2200
2147
|
continue $sm;
|
|
2201
2148
|
} else {
|
|
2202
|
-
internalReadLineTo$bufferBytes(this.
|
|
2203
|
-
this.
|
|
2149
|
+
internalReadLineTo$bufferBytes(this.outBuffer0__1, this.readBuffer4__1, this.consumed3__1, 1n);
|
|
2150
|
+
this.state_1 = 10;
|
|
2204
2151
|
continue $sm;
|
|
2205
2152
|
}
|
|
2206
2153
|
|
|
2207
2154
|
case 10:
|
|
2208
|
-
this.
|
|
2155
|
+
this.state_1 = 11;
|
|
2209
2156
|
continue $sm;
|
|
2210
2157
|
case 11:
|
|
2211
|
-
if (this.
|
|
2212
|
-
this.
|
|
2213
|
-
suspendResult = this.
|
|
2158
|
+
if (this.consumed3__1._v < this.limit_1 && get_remaining(this.readBuffer4__1) === 0n) {
|
|
2159
|
+
this.state_1 = 12;
|
|
2160
|
+
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
2214
2161
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2215
2162
|
return suspendResult;
|
|
2216
2163
|
}
|
|
2217
2164
|
continue $sm;
|
|
2218
2165
|
} else {
|
|
2219
|
-
this.
|
|
2220
|
-
this.
|
|
2166
|
+
this.WHEN_RESULT6__1 = false;
|
|
2167
|
+
this.state_1 = 13;
|
|
2221
2168
|
continue $sm;
|
|
2222
2169
|
}
|
|
2223
2170
|
|
|
2224
2171
|
case 12:
|
|
2225
|
-
this.
|
|
2226
|
-
this.
|
|
2172
|
+
this.WHEN_RESULT6__1 = !suspendResult;
|
|
2173
|
+
this.state_1 = 13;
|
|
2227
2174
|
continue $sm;
|
|
2228
2175
|
case 13:
|
|
2229
|
-
if (this.
|
|
2230
|
-
this.
|
|
2176
|
+
if (this.WHEN_RESULT6__1) {
|
|
2177
|
+
this.state_1 = 15;
|
|
2231
2178
|
continue $sm;
|
|
2232
2179
|
} else {
|
|
2233
|
-
this.
|
|
2180
|
+
this.state_1 = 14;
|
|
2234
2181
|
continue $sm;
|
|
2235
2182
|
}
|
|
2236
2183
|
|
|
2237
2184
|
case 14:
|
|
2238
|
-
this.
|
|
2185
|
+
this.state_1 = 5;
|
|
2239
2186
|
continue $sm;
|
|
2240
2187
|
case 15:
|
|
2241
|
-
if (this.
|
|
2242
|
-
this.
|
|
2243
|
-
this.
|
|
2244
|
-
this.
|
|
2188
|
+
if (this.consumed3__1._v === 0n && this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$()) {
|
|
2189
|
+
this.tmp$ret$02__1 = -1n;
|
|
2190
|
+
this.exceptionState_1 = 27;
|
|
2191
|
+
this.state_1 = 25;
|
|
2245
2192
|
continue $sm;
|
|
2246
2193
|
} else {
|
|
2247
|
-
this.
|
|
2194
|
+
this.state_1 = 16;
|
|
2248
2195
|
continue $sm;
|
|
2249
2196
|
}
|
|
2250
2197
|
|
|
2251
2198
|
case 16:
|
|
2252
|
-
if (!(this.
|
|
2253
|
-
var message = 'Consumed bytes exceed the limit: ' + this.
|
|
2199
|
+
if (!(this.consumed3__1._v <= this.limit_1)) {
|
|
2200
|
+
var message = 'Consumed bytes exceed the limit: ' + this.consumed3__1._v.toString() + ' > ' + this.limit_1.toString() + ". It's an implementation bug, please report it.";
|
|
2254
2201
|
throw IllegalStateException_init_$Create$(toString_1(message));
|
|
2255
2202
|
}
|
|
2256
2203
|
|
|
2257
|
-
if (this.
|
|
2258
|
-
if (this.
|
|
2204
|
+
if (this.consumed3__1._v === this.limit_1) {
|
|
2205
|
+
if (this.limit_1 === 9223372036854775807n)
|
|
2259
2206
|
throw new TooLongLineException('Max line length exceeded');
|
|
2260
|
-
if (get_remaining(this.
|
|
2261
|
-
this.
|
|
2262
|
-
suspendResult = this.
|
|
2207
|
+
if (get_remaining(this.readBuffer4__1) === 0n) {
|
|
2208
|
+
this.state_1 = 18;
|
|
2209
|
+
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
2263
2210
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2264
2211
|
return suspendResult;
|
|
2265
2212
|
}
|
|
2266
2213
|
continue $sm;
|
|
2267
2214
|
} else {
|
|
2268
|
-
this.
|
|
2269
|
-
this.
|
|
2215
|
+
this.WHEN_RESULT5__1 = false;
|
|
2216
|
+
this.state_1 = 19;
|
|
2270
2217
|
continue $sm;
|
|
2271
2218
|
}
|
|
2272
2219
|
} else {
|
|
2273
|
-
this.
|
|
2220
|
+
this.state_1 = 17;
|
|
2274
2221
|
continue $sm;
|
|
2275
2222
|
}
|
|
2276
2223
|
|
|
2277
2224
|
case 17:
|
|
2278
|
-
if (this.
|
|
2279
|
-
throwEndOfStreamException(this.
|
|
2225
|
+
if (this.throwOnIncompleteLine_1) {
|
|
2226
|
+
throwEndOfStreamException(this.consumed3__1._v);
|
|
2280
2227
|
}
|
|
2281
2228
|
|
|
2282
|
-
this.
|
|
2283
|
-
this.
|
|
2284
|
-
this.
|
|
2229
|
+
this.tmp$ret$02__1 = this.consumed3__1._v;
|
|
2230
|
+
this.exceptionState_1 = 27;
|
|
2231
|
+
this.state_1 = 25;
|
|
2285
2232
|
var tmp_3 = this;
|
|
2286
2233
|
continue $sm;
|
|
2287
2234
|
case 18:
|
|
2288
|
-
this.
|
|
2289
|
-
this.
|
|
2235
|
+
this.WHEN_RESULT5__1 = !suspendResult;
|
|
2236
|
+
this.state_1 = 19;
|
|
2290
2237
|
continue $sm;
|
|
2291
2238
|
case 19:
|
|
2292
|
-
if (this.
|
|
2293
|
-
throwEndOfStreamException(this.
|
|
2239
|
+
if (this.WHEN_RESULT5__1) {
|
|
2240
|
+
throwEndOfStreamException(this.consumed3__1._v);
|
|
2294
2241
|
} else {
|
|
2295
|
-
this.
|
|
2242
|
+
this.state_1 = 20;
|
|
2296
2243
|
continue $sm;
|
|
2297
2244
|
}
|
|
2298
2245
|
|
|
2299
2246
|
break;
|
|
2300
2247
|
case 20:
|
|
2301
|
-
var tmp0_subject = this.
|
|
2248
|
+
var tmp0_subject = this.readBuffer4__1.get_buffer_bmaafd_k$().get_f9lzxq_k$(0n);
|
|
2302
2249
|
if (tmp0_subject === 10) {
|
|
2303
|
-
discard_0(this.
|
|
2304
|
-
this.
|
|
2305
|
-
this.
|
|
2306
|
-
this.
|
|
2250
|
+
discard_0(this.readBuffer4__1, 1n);
|
|
2251
|
+
this.tmp$ret$02__1 = this.consumed3__1._v;
|
|
2252
|
+
this.exceptionState_1 = 27;
|
|
2253
|
+
this.state_1 = 25;
|
|
2307
2254
|
continue $sm;
|
|
2308
2255
|
} else {
|
|
2309
2256
|
if (tmp0_subject === 13) {
|
|
2310
|
-
this.
|
|
2311
|
-
suspendResult = internalReadLineTo$discardCrlfOrCr(this.
|
|
2257
|
+
this.state_1 = 21;
|
|
2258
|
+
suspendResult = internalReadLineTo$discardCrlfOrCr(this.readBuffer4__1, this._this__u8e3s4__1, this.lenientLineEnding_1, this);
|
|
2312
2259
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2313
2260
|
return suspendResult;
|
|
2314
2261
|
}
|
|
2315
2262
|
continue $sm;
|
|
2316
2263
|
} else {
|
|
2317
|
-
this.
|
|
2264
|
+
this.state_1 = 23;
|
|
2318
2265
|
continue $sm;
|
|
2319
2266
|
}
|
|
2320
2267
|
}
|
|
2321
2268
|
|
|
2322
2269
|
case 21:
|
|
2323
2270
|
if (suspendResult) {
|
|
2324
|
-
this.
|
|
2325
|
-
this.
|
|
2326
|
-
this.
|
|
2271
|
+
this.tmp$ret$02__1 = this.consumed3__1._v;
|
|
2272
|
+
this.exceptionState_1 = 27;
|
|
2273
|
+
this.state_1 = 25;
|
|
2327
2274
|
continue $sm;
|
|
2328
2275
|
} else {
|
|
2329
|
-
this.
|
|
2276
|
+
this.state_1 = 22;
|
|
2330
2277
|
continue $sm;
|
|
2331
2278
|
}
|
|
2332
2279
|
|
|
2333
2280
|
case 22:
|
|
2334
|
-
this.
|
|
2281
|
+
this.state_1 = 23;
|
|
2335
2282
|
continue $sm;
|
|
2336
2283
|
case 23:
|
|
2337
|
-
throwTooLongLineException(this.
|
|
2284
|
+
throwTooLongLineException(this.limit_1);
|
|
2338
2285
|
break;
|
|
2339
2286
|
case 24:
|
|
2340
|
-
this.
|
|
2341
|
-
var t = this.
|
|
2342
|
-
if (!(this.
|
|
2343
|
-
this.
|
|
2287
|
+
this.exceptionState_1 = 27;
|
|
2288
|
+
var t = this.exception_1;
|
|
2289
|
+
if (!(this.outBuffer0__1._v == null)) {
|
|
2290
|
+
this.out_1.append_jgojdo_k$(readString_0(this.outBuffer0__1._v));
|
|
2344
2291
|
}
|
|
2345
2292
|
|
|
2346
2293
|
throw t;
|
|
2347
2294
|
case 25:
|
|
2348
|
-
var tmp_4 = this.
|
|
2349
|
-
this.
|
|
2350
|
-
if (!(this.
|
|
2351
|
-
this.
|
|
2295
|
+
var tmp_4 = this.tmp$ret$02__1;
|
|
2296
|
+
this.exceptionState_1 = 27;
|
|
2297
|
+
if (!(this.outBuffer0__1._v == null)) {
|
|
2298
|
+
this.out_1.append_jgojdo_k$(readString_0(this.outBuffer0__1._v));
|
|
2352
2299
|
}
|
|
2353
2300
|
|
|
2354
2301
|
return tmp_4;
|
|
2355
2302
|
case 26:
|
|
2356
|
-
this.
|
|
2357
|
-
if (!(this.
|
|
2358
|
-
this.
|
|
2303
|
+
this.exceptionState_1 = 27;
|
|
2304
|
+
if (!(this.outBuffer0__1._v == null)) {
|
|
2305
|
+
this.out_1.append_jgojdo_k$(readString_0(this.outBuffer0__1._v));
|
|
2359
2306
|
}
|
|
2360
2307
|
|
|
2361
2308
|
return Unit_instance;
|
|
2362
2309
|
case 27:
|
|
2363
|
-
throw this.
|
|
2310
|
+
throw this.exception_1;
|
|
2364
2311
|
}
|
|
2365
2312
|
} catch ($p) {
|
|
2366
2313
|
var e = $p;
|
|
2367
|
-
if (this.
|
|
2314
|
+
if (this.exceptionState_1 === 27) {
|
|
2368
2315
|
throw e;
|
|
2369
2316
|
} else {
|
|
2370
|
-
this.
|
|
2371
|
-
this.
|
|
2317
|
+
this.state_1 = this.exceptionState_1;
|
|
2318
|
+
this.exception_1 = e;
|
|
2372
2319
|
}
|
|
2373
2320
|
}
|
|
2374
2321
|
while (true);
|
|
2375
2322
|
};
|
|
2376
2323
|
function $internalReadLineTo$discardCrlfOrCrCOROUTINE$(_this__u8e3s4, $this_internalReadLineTo, $lenientLineEnding, resultContinuation) {
|
|
2377
2324
|
CoroutineImpl.call(this, resultContinuation);
|
|
2378
|
-
this.
|
|
2379
|
-
this
|
|
2380
|
-
this
|
|
2325
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
2326
|
+
this.$this_internalReadLineTo_1 = $this_internalReadLineTo;
|
|
2327
|
+
this.$lenientLineEnding_1 = $lenientLineEnding;
|
|
2381
2328
|
}
|
|
2382
|
-
protoOf($internalReadLineTo$discardCrlfOrCrCOROUTINE$).
|
|
2383
|
-
var suspendResult = this.
|
|
2329
|
+
protoOf($internalReadLineTo$discardCrlfOrCrCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
2330
|
+
var suspendResult = this.result_1;
|
|
2384
2331
|
$sm: do
|
|
2385
2332
|
try {
|
|
2386
|
-
var tmp = this.
|
|
2333
|
+
var tmp = this.state_1;
|
|
2387
2334
|
switch (tmp) {
|
|
2388
2335
|
case 0:
|
|
2389
|
-
this.
|
|
2390
|
-
if (get_remaining(this.
|
|
2391
|
-
this.
|
|
2392
|
-
this.
|
|
2336
|
+
this.exceptionState_1 = 5;
|
|
2337
|
+
if (get_remaining(this._this__u8e3s4__1) >= 2n) {
|
|
2338
|
+
this.WHEN_RESULT1__1 = true;
|
|
2339
|
+
this.state_1 = 2;
|
|
2393
2340
|
continue $sm;
|
|
2394
2341
|
} else {
|
|
2395
|
-
this.
|
|
2396
|
-
suspendResult = this.
|
|
2342
|
+
this.state_1 = 1;
|
|
2343
|
+
suspendResult = this.$this_internalReadLineTo_1.awaitContent_q7m0p7_k$(2, this);
|
|
2397
2344
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2398
2345
|
return suspendResult;
|
|
2399
2346
|
}
|
|
@@ -2401,46 +2348,46 @@ protoOf($internalReadLineTo$discardCrlfOrCrCOROUTINE$).s8 = function () {
|
|
|
2401
2348
|
}
|
|
2402
2349
|
|
|
2403
2350
|
case 1:
|
|
2404
|
-
this.
|
|
2405
|
-
this.
|
|
2351
|
+
this.WHEN_RESULT1__1 = suspendResult;
|
|
2352
|
+
this.state_1 = 2;
|
|
2406
2353
|
continue $sm;
|
|
2407
2354
|
case 2:
|
|
2408
|
-
if (this.
|
|
2409
|
-
this.
|
|
2410
|
-
this.
|
|
2355
|
+
if (this.WHEN_RESULT1__1) {
|
|
2356
|
+
this.WHEN_RESULT0__1 = this._this__u8e3s4__1.get_buffer_bmaafd_k$().get_f9lzxq_k$(1n) === 10;
|
|
2357
|
+
this.state_1 = 3;
|
|
2411
2358
|
continue $sm;
|
|
2412
2359
|
} else {
|
|
2413
|
-
this.
|
|
2414
|
-
this.
|
|
2360
|
+
this.WHEN_RESULT0__1 = false;
|
|
2361
|
+
this.state_1 = 3;
|
|
2415
2362
|
continue $sm;
|
|
2416
2363
|
}
|
|
2417
2364
|
|
|
2418
2365
|
case 3:
|
|
2419
|
-
if (this.
|
|
2420
|
-
discard_0(this.
|
|
2366
|
+
if (this.WHEN_RESULT0__1) {
|
|
2367
|
+
discard_0(this._this__u8e3s4__1, 2n);
|
|
2421
2368
|
return true;
|
|
2422
2369
|
} else {
|
|
2423
|
-
this.
|
|
2370
|
+
this.state_1 = 4;
|
|
2424
2371
|
continue $sm;
|
|
2425
2372
|
}
|
|
2426
2373
|
|
|
2427
2374
|
case 4:
|
|
2428
|
-
if (this
|
|
2429
|
-
discard_0(this.
|
|
2375
|
+
if (this.$lenientLineEnding_1) {
|
|
2376
|
+
discard_0(this._this__u8e3s4__1, 1n);
|
|
2430
2377
|
return true;
|
|
2431
2378
|
}
|
|
2432
2379
|
|
|
2433
2380
|
return false;
|
|
2434
2381
|
case 5:
|
|
2435
|
-
throw this.
|
|
2382
|
+
throw this.exception_1;
|
|
2436
2383
|
}
|
|
2437
2384
|
} catch ($p) {
|
|
2438
2385
|
var e = $p;
|
|
2439
|
-
if (this.
|
|
2386
|
+
if (this.exceptionState_1 === 5) {
|
|
2440
2387
|
throw e;
|
|
2441
2388
|
} else {
|
|
2442
|
-
this.
|
|
2443
|
-
this.
|
|
2389
|
+
this.state_1 = this.exceptionState_1;
|
|
2390
|
+
this.exception_1 = e;
|
|
2444
2391
|
}
|
|
2445
2392
|
}
|
|
2446
2393
|
while (true);
|
|
@@ -2449,50 +2396,50 @@ function ByteWriteChannel() {
|
|
|
2449
2396
|
}
|
|
2450
2397
|
function flushIfNeeded(_this__u8e3s4, $completion) {
|
|
2451
2398
|
var tmp = new $flushIfNeededCOROUTINE$(_this__u8e3s4, $completion);
|
|
2452
|
-
tmp.
|
|
2453
|
-
tmp.
|
|
2454
|
-
return tmp.
|
|
2399
|
+
tmp.result_1 = Unit_instance;
|
|
2400
|
+
tmp.exception_1 = null;
|
|
2401
|
+
return tmp.doResume_5yljmg_k$();
|
|
2455
2402
|
}
|
|
2456
2403
|
function $flushIfNeededCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
2457
2404
|
CoroutineImpl.call(this, resultContinuation);
|
|
2458
|
-
this.
|
|
2405
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
2459
2406
|
}
|
|
2460
|
-
protoOf($flushIfNeededCOROUTINE$).
|
|
2461
|
-
var suspendResult = this.
|
|
2407
|
+
protoOf($flushIfNeededCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
2408
|
+
var suspendResult = this.result_1;
|
|
2462
2409
|
$sm: do
|
|
2463
2410
|
try {
|
|
2464
|
-
var tmp = this.
|
|
2411
|
+
var tmp = this.state_1;
|
|
2465
2412
|
switch (tmp) {
|
|
2466
2413
|
case 0:
|
|
2467
|
-
this.
|
|
2468
|
-
rethrowCloseCauseIfNeeded_1(this.
|
|
2469
|
-
if (this.
|
|
2470
|
-
this.
|
|
2471
|
-
suspendResult = this.
|
|
2414
|
+
this.exceptionState_1 = 3;
|
|
2415
|
+
rethrowCloseCauseIfNeeded_1(this._this__u8e3s4__1);
|
|
2416
|
+
if (this._this__u8e3s4__1.get_autoFlush_zfdl3o_k$() || get_size(this._this__u8e3s4__1.get_writeBuffer_t7kuc6_k$()) >= 1048576) {
|
|
2417
|
+
this.state_1 = 1;
|
|
2418
|
+
suspendResult = this._this__u8e3s4__1.flush_4wsz1p_k$(this);
|
|
2472
2419
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2473
2420
|
return suspendResult;
|
|
2474
2421
|
}
|
|
2475
2422
|
continue $sm;
|
|
2476
2423
|
} else {
|
|
2477
|
-
this.
|
|
2424
|
+
this.state_1 = 2;
|
|
2478
2425
|
continue $sm;
|
|
2479
2426
|
}
|
|
2480
2427
|
|
|
2481
2428
|
case 1:
|
|
2482
|
-
this.
|
|
2429
|
+
this.state_1 = 2;
|
|
2483
2430
|
continue $sm;
|
|
2484
2431
|
case 2:
|
|
2485
2432
|
return Unit_instance;
|
|
2486
2433
|
case 3:
|
|
2487
|
-
throw this.
|
|
2434
|
+
throw this.exception_1;
|
|
2488
2435
|
}
|
|
2489
2436
|
} catch ($p) {
|
|
2490
2437
|
var e = $p;
|
|
2491
|
-
if (this.
|
|
2438
|
+
if (this.exceptionState_1 === 3) {
|
|
2492
2439
|
throw e;
|
|
2493
2440
|
} else {
|
|
2494
|
-
this.
|
|
2495
|
-
this.
|
|
2441
|
+
this.state_1 = this.exceptionState_1;
|
|
2442
|
+
this.exception_1 = e;
|
|
2496
2443
|
}
|
|
2497
2444
|
}
|
|
2498
2445
|
while (true);
|
|
@@ -2500,8 +2447,8 @@ protoOf($flushIfNeededCOROUTINE$).s8 = function () {
|
|
|
2500
2447
|
function ByteWriteChannel$flushAndClose$ref(p0) {
|
|
2501
2448
|
var i = new ByteWriteChannel$flushAndClose$ref_0(p0);
|
|
2502
2449
|
return constructCallableReference(function ($completion) {
|
|
2503
|
-
return i.
|
|
2504
|
-
}, 0, 1,
|
|
2450
|
+
return i.invoke_h7udsx_k$($completion);
|
|
2451
|
+
}, 0, 1, 7, 'flushAndClose', [p0]);
|
|
2505
2452
|
}
|
|
2506
2453
|
function get_NO_CALLBACK() {
|
|
2507
2454
|
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
@@ -2511,46 +2458,46 @@ var NO_CALLBACK;
|
|
|
2511
2458
|
function writeFully(_this__u8e3s4, value, startIndex, endIndex, $completion) {
|
|
2512
2459
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
2513
2460
|
endIndex = endIndex === VOID ? value.length : endIndex;
|
|
2514
|
-
_this__u8e3s4.
|
|
2461
|
+
_this__u8e3s4.get_writeBuffer_t7kuc6_k$().write_ti570x_k$(value, startIndex, endIndex);
|
|
2515
2462
|
return flushIfNeeded(_this__u8e3s4, $completion);
|
|
2516
2463
|
}
|
|
2517
2464
|
function WriterJob(channel, job) {
|
|
2518
|
-
this.
|
|
2519
|
-
this.
|
|
2465
|
+
this.channel_1 = channel;
|
|
2466
|
+
this.job_1 = job;
|
|
2520
2467
|
}
|
|
2521
|
-
protoOf(WriterJob).
|
|
2522
|
-
return this.
|
|
2468
|
+
protoOf(WriterJob).get_job_18j2r0_k$ = function () {
|
|
2469
|
+
return this.job_1;
|
|
2523
2470
|
};
|
|
2524
2471
|
function writer(_this__u8e3s4, coroutineContext, autoFlush, block) {
|
|
2525
2472
|
coroutineContext = coroutineContext === VOID ? EmptyCoroutineContext_instance : coroutineContext;
|
|
2526
2473
|
autoFlush = autoFlush === VOID ? false : autoFlush;
|
|
2527
2474
|
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
2528
|
-
return writer_0(_this__u8e3s4, coroutineContext, new ByteChannel(), block);
|
|
2475
|
+
return writer_0(_this__u8e3s4, coroutineContext, new ByteChannel(autoFlush), block);
|
|
2529
2476
|
}
|
|
2530
2477
|
function WriterScope(channel, coroutineContext) {
|
|
2531
|
-
this.
|
|
2532
|
-
this.
|
|
2478
|
+
this.channel_1 = channel;
|
|
2479
|
+
this.coroutineContext_1 = coroutineContext;
|
|
2533
2480
|
}
|
|
2534
|
-
protoOf(WriterScope).
|
|
2535
|
-
return this.
|
|
2481
|
+
protoOf(WriterScope).get_coroutineContext_115oqo_k$ = function () {
|
|
2482
|
+
return this.coroutineContext_1;
|
|
2536
2483
|
};
|
|
2537
2484
|
function invokeOnCompletion(_this__u8e3s4, block) {
|
|
2538
2485
|
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
2539
|
-
return _this__u8e3s4.
|
|
2486
|
+
return _this__u8e3s4.get_job_18j2r0_k$().invokeOnCompletion_n6cffu_k$(block);
|
|
2540
2487
|
}
|
|
2541
2488
|
function close_0(_this__u8e3s4, cause) {
|
|
2542
2489
|
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
2543
2490
|
if (cause == null) {
|
|
2544
2491
|
fireAndForget(ByteWriteChannel$flushAndClose$ref(_this__u8e3s4));
|
|
2545
2492
|
} else {
|
|
2546
|
-
_this__u8e3s4.
|
|
2493
|
+
_this__u8e3s4.cancel_9i2dv0_k$(cause);
|
|
2547
2494
|
}
|
|
2548
2495
|
}
|
|
2549
2496
|
function writePacket(_this__u8e3s4, source, $completion) {
|
|
2550
2497
|
var tmp = new $writePacketCOROUTINE$(_this__u8e3s4, source, $completion);
|
|
2551
|
-
tmp.
|
|
2552
|
-
tmp.
|
|
2553
|
-
return tmp.
|
|
2498
|
+
tmp.result_1 = Unit_instance;
|
|
2499
|
+
tmp.exception_1 = null;
|
|
2500
|
+
return tmp.doResume_5yljmg_k$();
|
|
2554
2501
|
}
|
|
2555
2502
|
function fireAndForget(_this__u8e3s4) {
|
|
2556
2503
|
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
@@ -2561,112 +2508,112 @@ function writer_0(_this__u8e3s4, coroutineContext, channel, block) {
|
|
|
2561
2508
|
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
2562
2509
|
// Inline function 'kotlin.apply' call
|
|
2563
2510
|
var this_0 = launch(_this__u8e3s4, coroutineContext, VOID, writer$slambda_0(block, channel, null));
|
|
2564
|
-
this_0.
|
|
2511
|
+
this_0.invokeOnCompletion_n6cffu_k$(writer$lambda(channel));
|
|
2565
2512
|
var job = this_0;
|
|
2566
2513
|
return new WriterJob(channel, job);
|
|
2567
2514
|
}
|
|
2568
2515
|
function writeByte(_this__u8e3s4, value, $completion) {
|
|
2569
|
-
_this__u8e3s4.
|
|
2516
|
+
_this__u8e3s4.get_writeBuffer_t7kuc6_k$().writeByte_9ih3z3_k$(value);
|
|
2570
2517
|
return flushIfNeeded(_this__u8e3s4, $completion);
|
|
2571
2518
|
}
|
|
2572
2519
|
function NO_CALLBACK$1() {
|
|
2573
|
-
this.
|
|
2520
|
+
this.context_1 = EmptyCoroutineContext_instance;
|
|
2574
2521
|
}
|
|
2575
|
-
protoOf(NO_CALLBACK$1).
|
|
2576
|
-
return this.
|
|
2522
|
+
protoOf(NO_CALLBACK$1).get_context_h02k06_k$ = function () {
|
|
2523
|
+
return this.context_1;
|
|
2577
2524
|
};
|
|
2578
|
-
protoOf(NO_CALLBACK$1).
|
|
2525
|
+
protoOf(NO_CALLBACK$1).resumeWith_ol1nfv_k$ = function (result) {
|
|
2579
2526
|
return Unit_instance;
|
|
2580
2527
|
};
|
|
2581
|
-
protoOf(NO_CALLBACK$1).
|
|
2582
|
-
return this.
|
|
2528
|
+
protoOf(NO_CALLBACK$1).resumeWith_rk9gbt_k$ = function (result) {
|
|
2529
|
+
return this.resumeWith_ol1nfv_k$(result);
|
|
2583
2530
|
};
|
|
2584
2531
|
function ByteWriteChannel$flushAndClose$ref_0(p0) {
|
|
2585
|
-
KFunctionImpl.call(this, 1, 1,
|
|
2586
|
-
this.
|
|
2532
|
+
KFunctionImpl.call(this, 1, 1, 7);
|
|
2533
|
+
this.f$0__1 = p0;
|
|
2587
2534
|
}
|
|
2588
|
-
protoOf(ByteWriteChannel$flushAndClose$ref_0).
|
|
2589
|
-
return this.
|
|
2535
|
+
protoOf(ByteWriteChannel$flushAndClose$ref_0).invoke_h7udsx_k$ = function ($completion) {
|
|
2536
|
+
return this.f$0__1.flushAndClose_3zd2q_k$($completion);
|
|
2590
2537
|
};
|
|
2591
|
-
protoOf(ByteWriteChannel$flushAndClose$ref_0).
|
|
2592
|
-
return this.
|
|
2538
|
+
protoOf(ByteWriteChannel$flushAndClose$ref_0).invoke_ib42db_k$ = function ($completion) {
|
|
2539
|
+
return this.invoke_h7udsx_k$($completion);
|
|
2593
2540
|
};
|
|
2594
2541
|
function writer$slambda($block, $channel, resultContinuation) {
|
|
2595
|
-
this
|
|
2596
|
-
this
|
|
2542
|
+
this.$block_1 = $block;
|
|
2543
|
+
this.$channel_1 = $channel;
|
|
2597
2544
|
CoroutineImpl.call(this, resultContinuation);
|
|
2598
2545
|
}
|
|
2599
|
-
protoOf(writer$slambda).
|
|
2600
|
-
var tmp = this.
|
|
2601
|
-
tmp.
|
|
2602
|
-
tmp.
|
|
2603
|
-
return tmp.
|
|
2546
|
+
protoOf(writer$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
|
|
2547
|
+
var tmp = this.create_rcuf4x_k$($this$launch, $completion);
|
|
2548
|
+
tmp.result_1 = Unit_instance;
|
|
2549
|
+
tmp.exception_1 = null;
|
|
2550
|
+
return tmp.doResume_5yljmg_k$();
|
|
2604
2551
|
};
|
|
2605
|
-
protoOf(writer$slambda).
|
|
2606
|
-
return this.
|
|
2552
|
+
protoOf(writer$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
|
|
2553
|
+
return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
2607
2554
|
};
|
|
2608
|
-
protoOf(writer$slambda).
|
|
2609
|
-
var suspendResult = this.
|
|
2555
|
+
protoOf(writer$slambda).doResume_5yljmg_k$ = function () {
|
|
2556
|
+
var suspendResult = this.result_1;
|
|
2610
2557
|
$sm: do
|
|
2611
2558
|
try {
|
|
2612
|
-
var tmp = this.
|
|
2559
|
+
var tmp = this.state_1;
|
|
2613
2560
|
switch (tmp) {
|
|
2614
2561
|
case 0:
|
|
2615
|
-
this.
|
|
2616
|
-
this.
|
|
2617
|
-
this.
|
|
2562
|
+
this.exceptionState_1 = 14;
|
|
2563
|
+
this.nested2__1 = Job(get_job(this.$this$launch_1.get_coroutineContext_115oqo_k$()));
|
|
2564
|
+
this.state_1 = 1;
|
|
2618
2565
|
continue $sm;
|
|
2619
2566
|
case 1:
|
|
2620
|
-
this.
|
|
2621
|
-
this.
|
|
2622
|
-
this.
|
|
2623
|
-
suspendResult = this
|
|
2567
|
+
this.exceptionState_1 = 4;
|
|
2568
|
+
this.exceptionState_1 = 3;
|
|
2569
|
+
this.state_1 = 2;
|
|
2570
|
+
suspendResult = this.$block_1(new WriterScope(this.$channel_1, this.$this$launch_1.get_coroutineContext_115oqo_k$().plus_s13ygv_k$(this.nested2__1)), this);
|
|
2624
2571
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2625
2572
|
return suspendResult;
|
|
2626
2573
|
}
|
|
2627
2574
|
|
|
2628
2575
|
continue $sm;
|
|
2629
2576
|
case 2:
|
|
2630
|
-
this.
|
|
2577
|
+
this.nested2__1.complete_9ww6vb_k$();
|
|
2631
2578
|
var tmp_0;
|
|
2632
|
-
if (get_job(this.
|
|
2633
|
-
this.
|
|
2579
|
+
if (get_job(this.$this$launch_1.get_coroutineContext_115oqo_k$()).get_isCancelled_trk8pu_k$()) {
|
|
2580
|
+
this.$channel_1.cancel_9i2dv0_k$(get_job(this.$this$launch_1.get_coroutineContext_115oqo_k$()).getCancellationException_8i1q6u_k$());
|
|
2634
2581
|
tmp_0 = Unit_instance;
|
|
2635
2582
|
}
|
|
2636
2583
|
|
|
2637
|
-
this.
|
|
2638
|
-
this.
|
|
2584
|
+
this.exceptionState_1 = 14;
|
|
2585
|
+
this.state_1 = 9;
|
|
2639
2586
|
continue $sm;
|
|
2640
2587
|
case 3:
|
|
2641
|
-
this.
|
|
2642
|
-
var tmp_1 = this.
|
|
2588
|
+
this.exceptionState_1 = 4;
|
|
2589
|
+
var tmp_1 = this.exception_1;
|
|
2643
2590
|
if (tmp_1 instanceof Error) {
|
|
2644
|
-
var cause = this.
|
|
2645
|
-
cancel(this.
|
|
2646
|
-
this.
|
|
2647
|
-
this.
|
|
2648
|
-
this.
|
|
2591
|
+
var cause = this.exception_1;
|
|
2592
|
+
cancel(this.nested2__1, 'Exception thrown while writing to channel', cause);
|
|
2593
|
+
this.$channel_1.cancel_9i2dv0_k$(cause);
|
|
2594
|
+
this.exceptionState_1 = 14;
|
|
2595
|
+
this.state_1 = 9;
|
|
2649
2596
|
continue $sm;
|
|
2650
2597
|
} else {
|
|
2651
|
-
throw this.
|
|
2598
|
+
throw this.exception_1;
|
|
2652
2599
|
}
|
|
2653
2600
|
|
|
2654
2601
|
case 4:
|
|
2655
|
-
this.
|
|
2656
|
-
this.
|
|
2657
|
-
this.
|
|
2658
|
-
suspendResult = this.
|
|
2602
|
+
this.exceptionState_1 = 14;
|
|
2603
|
+
this.t3__1 = this.exception_1;
|
|
2604
|
+
this.state_1 = 5;
|
|
2605
|
+
suspendResult = this.nested2__1.join_o20dar_k$(this);
|
|
2659
2606
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2660
2607
|
return suspendResult;
|
|
2661
2608
|
}
|
|
2662
2609
|
|
|
2663
2610
|
continue $sm;
|
|
2664
2611
|
case 5:
|
|
2665
|
-
this
|
|
2666
|
-
this.
|
|
2667
|
-
this.
|
|
2668
|
-
this.
|
|
2669
|
-
suspendResult = this.
|
|
2612
|
+
this.$this$launch_1;
|
|
2613
|
+
this.exceptionState_1 = 7;
|
|
2614
|
+
this.tmp05__1 = Companion_instance;
|
|
2615
|
+
this.state_1 = 6;
|
|
2616
|
+
suspendResult = this.$channel_1.flushAndClose_3zd2q_k$(this);
|
|
2670
2617
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2671
2618
|
return suspendResult;
|
|
2672
2619
|
}
|
|
@@ -2674,42 +2621,42 @@ protoOf(writer$slambda).s8 = function () {
|
|
|
2674
2621
|
continue $sm;
|
|
2675
2622
|
case 6:
|
|
2676
2623
|
var tmp_2 = this;
|
|
2677
|
-
this.
|
|
2678
|
-
tmp_2.
|
|
2679
|
-
this.
|
|
2680
|
-
this.
|
|
2624
|
+
this.tmp05__1;
|
|
2625
|
+
tmp_2.TRY_RESULT4__1 = _Result___init__impl__xyqfz8(Unit_instance);
|
|
2626
|
+
this.exceptionState_1 = 14;
|
|
2627
|
+
this.state_1 = 8;
|
|
2681
2628
|
continue $sm;
|
|
2682
2629
|
case 7:
|
|
2683
|
-
this.
|
|
2684
|
-
var tmp_3 = this.
|
|
2630
|
+
this.exceptionState_1 = 14;
|
|
2631
|
+
var tmp_3 = this.exception_1;
|
|
2685
2632
|
if (tmp_3 instanceof Error) {
|
|
2686
|
-
var e = this.
|
|
2633
|
+
var e = this.exception_1;
|
|
2687
2634
|
var tmp_4 = this;
|
|
2688
|
-
tmp_4.
|
|
2689
|
-
this.
|
|
2635
|
+
tmp_4.TRY_RESULT4__1 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
2636
|
+
this.state_1 = 8;
|
|
2690
2637
|
continue $sm;
|
|
2691
2638
|
} else {
|
|
2692
|
-
throw this.
|
|
2639
|
+
throw this.exception_1;
|
|
2693
2640
|
}
|
|
2694
2641
|
|
|
2695
2642
|
case 8:
|
|
2696
|
-
this.
|
|
2697
|
-
throw this.
|
|
2643
|
+
this.exceptionState_1 = 14;
|
|
2644
|
+
throw this.t3__1;
|
|
2698
2645
|
case 9:
|
|
2699
|
-
this.
|
|
2700
|
-
this.
|
|
2701
|
-
suspendResult = this.
|
|
2646
|
+
this.exceptionState_1 = 14;
|
|
2647
|
+
this.state_1 = 10;
|
|
2648
|
+
suspendResult = this.nested2__1.join_o20dar_k$(this);
|
|
2702
2649
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2703
2650
|
return suspendResult;
|
|
2704
2651
|
}
|
|
2705
2652
|
|
|
2706
2653
|
continue $sm;
|
|
2707
2654
|
case 10:
|
|
2708
|
-
this
|
|
2709
|
-
this.
|
|
2710
|
-
this.
|
|
2711
|
-
this.
|
|
2712
|
-
suspendResult = this.
|
|
2655
|
+
this.$this$launch_1;
|
|
2656
|
+
this.exceptionState_1 = 12;
|
|
2657
|
+
this.tmp01__1 = Companion_instance;
|
|
2658
|
+
this.state_1 = 11;
|
|
2659
|
+
suspendResult = this.$channel_1.flushAndClose_3zd2q_k$(this);
|
|
2713
2660
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2714
2661
|
return suspendResult;
|
|
2715
2662
|
}
|
|
@@ -2717,57 +2664,57 @@ protoOf(writer$slambda).s8 = function () {
|
|
|
2717
2664
|
continue $sm;
|
|
2718
2665
|
case 11:
|
|
2719
2666
|
var tmp_5 = this;
|
|
2720
|
-
this.
|
|
2721
|
-
tmp_5.
|
|
2722
|
-
this.
|
|
2723
|
-
this.
|
|
2667
|
+
this.tmp01__1;
|
|
2668
|
+
tmp_5.TRY_RESULT0__1 = _Result___init__impl__xyqfz8(Unit_instance);
|
|
2669
|
+
this.exceptionState_1 = 14;
|
|
2670
|
+
this.state_1 = 13;
|
|
2724
2671
|
continue $sm;
|
|
2725
2672
|
case 12:
|
|
2726
|
-
this.
|
|
2727
|
-
var tmp_6 = this.
|
|
2673
|
+
this.exceptionState_1 = 14;
|
|
2674
|
+
var tmp_6 = this.exception_1;
|
|
2728
2675
|
if (tmp_6 instanceof Error) {
|
|
2729
|
-
var e_0 = this.
|
|
2676
|
+
var e_0 = this.exception_1;
|
|
2730
2677
|
var tmp_7 = this;
|
|
2731
|
-
tmp_7.
|
|
2732
|
-
this.
|
|
2678
|
+
tmp_7.TRY_RESULT0__1 = _Result___init__impl__xyqfz8(createFailure(e_0));
|
|
2679
|
+
this.state_1 = 13;
|
|
2733
2680
|
continue $sm;
|
|
2734
2681
|
} else {
|
|
2735
|
-
throw this.
|
|
2682
|
+
throw this.exception_1;
|
|
2736
2683
|
}
|
|
2737
2684
|
|
|
2738
2685
|
case 13:
|
|
2739
|
-
this.
|
|
2686
|
+
this.exceptionState_1 = 14;
|
|
2740
2687
|
return Unit_instance;
|
|
2741
2688
|
case 14:
|
|
2742
|
-
throw this.
|
|
2689
|
+
throw this.exception_1;
|
|
2743
2690
|
}
|
|
2744
2691
|
} catch ($p) {
|
|
2745
2692
|
var e_1 = $p;
|
|
2746
|
-
if (this.
|
|
2693
|
+
if (this.exceptionState_1 === 14) {
|
|
2747
2694
|
throw e_1;
|
|
2748
2695
|
} else {
|
|
2749
|
-
this.
|
|
2750
|
-
this.
|
|
2696
|
+
this.state_1 = this.exceptionState_1;
|
|
2697
|
+
this.exception_1 = e_1;
|
|
2751
2698
|
}
|
|
2752
2699
|
}
|
|
2753
2700
|
while (true);
|
|
2754
2701
|
};
|
|
2755
|
-
protoOf(writer$slambda).
|
|
2756
|
-
var i = new writer$slambda(this
|
|
2757
|
-
i
|
|
2702
|
+
protoOf(writer$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
|
|
2703
|
+
var i = new writer$slambda(this.$block_1, this.$channel_1, completion);
|
|
2704
|
+
i.$this$launch_1 = $this$launch;
|
|
2758
2705
|
return i;
|
|
2759
2706
|
};
|
|
2760
2707
|
function writer$slambda_0($block, $channel, resultContinuation) {
|
|
2761
2708
|
var i = new writer$slambda($block, $channel, resultContinuation);
|
|
2762
2709
|
return constructCallableReference(function ($this$launch, $completion) {
|
|
2763
|
-
return i.
|
|
2710
|
+
return i.invoke_d9fzmj_k$($this$launch, $completion);
|
|
2764
2711
|
}, 1);
|
|
2765
2712
|
}
|
|
2766
2713
|
function writer$lambda($channel) {
|
|
2767
2714
|
return function (it) {
|
|
2768
2715
|
var tmp;
|
|
2769
|
-
if (!(it == null) && !$channel.
|
|
2770
|
-
$channel.
|
|
2716
|
+
if (!(it == null) && !$channel.get_isClosedForWrite_seyg5n_k$()) {
|
|
2717
|
+
$channel.cancel_9i2dv0_k$(it);
|
|
2771
2718
|
tmp = Unit_instance;
|
|
2772
2719
|
}
|
|
2773
2720
|
return Unit_instance;
|
|
@@ -2775,48 +2722,48 @@ function writer$lambda($channel) {
|
|
|
2775
2722
|
}
|
|
2776
2723
|
function $writePacketCOROUTINE$(_this__u8e3s4, source, resultContinuation) {
|
|
2777
2724
|
CoroutineImpl.call(this, resultContinuation);
|
|
2778
|
-
this.
|
|
2779
|
-
this.
|
|
2725
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
2726
|
+
this.source_1 = source;
|
|
2780
2727
|
}
|
|
2781
|
-
protoOf($writePacketCOROUTINE$).
|
|
2782
|
-
var suspendResult = this.
|
|
2728
|
+
protoOf($writePacketCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
2729
|
+
var suspendResult = this.result_1;
|
|
2783
2730
|
$sm: do
|
|
2784
2731
|
try {
|
|
2785
|
-
var tmp = this.
|
|
2732
|
+
var tmp = this.state_1;
|
|
2786
2733
|
switch (tmp) {
|
|
2787
2734
|
case 0:
|
|
2788
|
-
this.
|
|
2789
|
-
this.
|
|
2735
|
+
this.exceptionState_1 = 4;
|
|
2736
|
+
this.state_1 = 1;
|
|
2790
2737
|
continue $sm;
|
|
2791
2738
|
case 1:
|
|
2792
|
-
if (!!this.
|
|
2793
|
-
this.
|
|
2739
|
+
if (!!this.source_1.exhausted_p1jt55_k$()) {
|
|
2740
|
+
this.state_1 = 3;
|
|
2794
2741
|
continue $sm;
|
|
2795
2742
|
}
|
|
2796
2743
|
|
|
2797
|
-
this.
|
|
2798
|
-
this.
|
|
2799
|
-
suspendResult = flushIfNeeded(this.
|
|
2744
|
+
this._this__u8e3s4__1.get_writeBuffer_t7kuc6_k$().write_9ocf0z_k$(this.source_1, get_remaining(this.source_1));
|
|
2745
|
+
this.state_1 = 2;
|
|
2746
|
+
suspendResult = flushIfNeeded(this._this__u8e3s4__1, this);
|
|
2800
2747
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2801
2748
|
return suspendResult;
|
|
2802
2749
|
}
|
|
2803
2750
|
|
|
2804
2751
|
continue $sm;
|
|
2805
2752
|
case 2:
|
|
2806
|
-
this.
|
|
2753
|
+
this.state_1 = 1;
|
|
2807
2754
|
continue $sm;
|
|
2808
2755
|
case 3:
|
|
2809
2756
|
return Unit_instance;
|
|
2810
2757
|
case 4:
|
|
2811
|
-
throw this.
|
|
2758
|
+
throw this.exception_1;
|
|
2812
2759
|
}
|
|
2813
2760
|
} catch ($p) {
|
|
2814
2761
|
var e = $p;
|
|
2815
|
-
if (this.
|
|
2762
|
+
if (this.exceptionState_1 === 4) {
|
|
2816
2763
|
throw e;
|
|
2817
2764
|
} else {
|
|
2818
|
-
this.
|
|
2819
|
-
this.
|
|
2765
|
+
this.state_1 = this.exceptionState_1;
|
|
2766
|
+
this.exception_1 = e;
|
|
2820
2767
|
}
|
|
2821
2768
|
}
|
|
2822
2769
|
while (true);
|
|
@@ -2840,10 +2787,10 @@ function Companion_getInstance_1() {
|
|
|
2840
2787
|
return Companion_instance_2;
|
|
2841
2788
|
}
|
|
2842
2789
|
function access$_get_origin__hdh1qz($this) {
|
|
2843
|
-
return $this.
|
|
2790
|
+
return $this.origin_1;
|
|
2844
2791
|
}
|
|
2845
2792
|
function CloseToken(origin) {
|
|
2846
|
-
this.
|
|
2793
|
+
this.origin_1 = origin;
|
|
2847
2794
|
}
|
|
2848
2795
|
var properties_initialized_CloseToken_kt_lgg8zn;
|
|
2849
2796
|
function _init_properties_CloseToken_kt__9ucr41() {
|
|
@@ -2854,32 +2801,32 @@ function _init_properties_CloseToken_kt__9ucr41() {
|
|
|
2854
2801
|
}
|
|
2855
2802
|
function transferFromDelegate($this) {
|
|
2856
2803
|
updateConsumed($this);
|
|
2857
|
-
var appended = $this.
|
|
2858
|
-
$this.
|
|
2804
|
+
var appended = $this.buffer_1.transferFrom_v29myr_k$($this.delegate_1.get_readBuffer_yjmj9b_k$());
|
|
2805
|
+
$this.initial_1 = add($this.initial_1, appended);
|
|
2859
2806
|
}
|
|
2860
2807
|
function updateConsumed($this) {
|
|
2861
|
-
$this.
|
|
2862
|
-
$this.
|
|
2808
|
+
$this.consumed_1 = add($this.consumed_1, subtract($this.initial_1, $this.buffer_1.get_size_woubt6_k$()));
|
|
2809
|
+
$this.initial_1 = $this.buffer_1.get_size_woubt6_k$();
|
|
2863
2810
|
}
|
|
2864
2811
|
function $awaitContentCOROUTINE$_0(_this__u8e3s4, min, resultContinuation) {
|
|
2865
2812
|
CoroutineImpl.call(this, resultContinuation);
|
|
2866
|
-
this.
|
|
2867
|
-
this.
|
|
2813
|
+
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
2814
|
+
this.min_1 = min;
|
|
2868
2815
|
}
|
|
2869
|
-
protoOf($awaitContentCOROUTINE$_0).
|
|
2870
|
-
var suspendResult = this.
|
|
2816
|
+
protoOf($awaitContentCOROUTINE$_0).doResume_5yljmg_k$ = function () {
|
|
2817
|
+
var suspendResult = this.result_1;
|
|
2871
2818
|
$sm: do
|
|
2872
2819
|
try {
|
|
2873
|
-
var tmp = this.
|
|
2820
|
+
var tmp = this.state_1;
|
|
2874
2821
|
switch (tmp) {
|
|
2875
2822
|
case 0:
|
|
2876
|
-
this.
|
|
2877
|
-
if (this.
|
|
2823
|
+
this.exceptionState_1 = 3;
|
|
2824
|
+
if (this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().get_size_woubt6_k$() >= fromInt(this.min_1)) {
|
|
2878
2825
|
return true;
|
|
2879
2826
|
}
|
|
2880
2827
|
|
|
2881
|
-
this.
|
|
2882
|
-
suspendResult = this.
|
|
2828
|
+
this.state_1 = 1;
|
|
2829
|
+
suspendResult = this._this__u8e3s4__1.delegate_1.awaitContent_q7m0p7_k$(this.min_1, this);
|
|
2883
2830
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2884
2831
|
return suspendResult;
|
|
2885
2832
|
}
|
|
@@ -2887,58 +2834,58 @@ protoOf($awaitContentCOROUTINE$_0).s8 = function () {
|
|
|
2887
2834
|
continue $sm;
|
|
2888
2835
|
case 1:
|
|
2889
2836
|
if (suspendResult) {
|
|
2890
|
-
transferFromDelegate(this.
|
|
2837
|
+
transferFromDelegate(this._this__u8e3s4__1);
|
|
2891
2838
|
return true;
|
|
2892
2839
|
} else {
|
|
2893
|
-
this.
|
|
2840
|
+
this.state_1 = 2;
|
|
2894
2841
|
continue $sm;
|
|
2895
2842
|
}
|
|
2896
2843
|
|
|
2897
2844
|
case 2:
|
|
2898
2845
|
return false;
|
|
2899
2846
|
case 3:
|
|
2900
|
-
throw this.
|
|
2847
|
+
throw this.exception_1;
|
|
2901
2848
|
}
|
|
2902
2849
|
} catch ($p) {
|
|
2903
2850
|
var e = $p;
|
|
2904
|
-
if (this.
|
|
2851
|
+
if (this.exceptionState_1 === 3) {
|
|
2905
2852
|
throw e;
|
|
2906
2853
|
} else {
|
|
2907
|
-
this.
|
|
2908
|
-
this.
|
|
2854
|
+
this.state_1 = this.exceptionState_1;
|
|
2855
|
+
this.exception_1 = e;
|
|
2909
2856
|
}
|
|
2910
2857
|
}
|
|
2911
2858
|
while (true);
|
|
2912
2859
|
};
|
|
2913
2860
|
function CountedByteReadChannel(delegate) {
|
|
2914
|
-
this.
|
|
2915
|
-
this.
|
|
2916
|
-
this.
|
|
2917
|
-
this.
|
|
2861
|
+
this.delegate_1 = delegate;
|
|
2862
|
+
this.buffer_1 = new Buffer();
|
|
2863
|
+
this.initial_1 = 0n;
|
|
2864
|
+
this.consumed_1 = 0n;
|
|
2918
2865
|
}
|
|
2919
|
-
protoOf(CountedByteReadChannel).
|
|
2866
|
+
protoOf(CountedByteReadChannel).get_totalBytesRead_dai8jq_k$ = function () {
|
|
2920
2867
|
updateConsumed(this);
|
|
2921
|
-
return this.
|
|
2868
|
+
return this.consumed_1;
|
|
2922
2869
|
};
|
|
2923
|
-
protoOf(CountedByteReadChannel).
|
|
2924
|
-
return this.
|
|
2870
|
+
protoOf(CountedByteReadChannel).get_closedCause_o1qcj8_k$ = function () {
|
|
2871
|
+
return this.delegate_1.get_closedCause_o1qcj8_k$();
|
|
2925
2872
|
};
|
|
2926
|
-
protoOf(CountedByteReadChannel).
|
|
2927
|
-
return this.
|
|
2873
|
+
protoOf(CountedByteReadChannel).get_isClosedForRead_ajcc1s_k$ = function () {
|
|
2874
|
+
return this.buffer_1.exhausted_p1jt55_k$() && this.delegate_1.get_isClosedForRead_ajcc1s_k$();
|
|
2928
2875
|
};
|
|
2929
|
-
protoOf(CountedByteReadChannel).
|
|
2876
|
+
protoOf(CountedByteReadChannel).get_readBuffer_yjmj9b_k$ = function () {
|
|
2930
2877
|
transferFromDelegate(this);
|
|
2931
|
-
return this.
|
|
2878
|
+
return this.buffer_1;
|
|
2932
2879
|
};
|
|
2933
|
-
protoOf(CountedByteReadChannel).
|
|
2880
|
+
protoOf(CountedByteReadChannel).awaitContent_q7m0p7_k$ = function (min, $completion) {
|
|
2934
2881
|
var tmp = new $awaitContentCOROUTINE$_0(this, min, $completion);
|
|
2935
|
-
tmp.
|
|
2936
|
-
tmp.
|
|
2937
|
-
return tmp.
|
|
2882
|
+
tmp.result_1 = Unit_instance;
|
|
2883
|
+
tmp.exception_1 = null;
|
|
2884
|
+
return tmp.doResume_5yljmg_k$();
|
|
2938
2885
|
};
|
|
2939
|
-
protoOf(CountedByteReadChannel).
|
|
2940
|
-
this.
|
|
2941
|
-
this.
|
|
2886
|
+
protoOf(CountedByteReadChannel).cancel_9i2dv0_k$ = function (cause) {
|
|
2887
|
+
this.delegate_1.cancel_9i2dv0_k$(cause);
|
|
2888
|
+
this.buffer_1.close_yn9xrc_k$();
|
|
2942
2889
|
};
|
|
2943
2890
|
function counted(_this__u8e3s4) {
|
|
2944
2891
|
return new CountedByteReadChannel(_this__u8e3s4);
|
|
@@ -2961,25 +2908,25 @@ function ClosedWriteChannelException(cause) {
|
|
|
2961
2908
|
ClosedByteChannelException.call(this, cause);
|
|
2962
2909
|
captureStack(this, ClosedWriteChannelException);
|
|
2963
2910
|
}
|
|
2964
|
-
var
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
function LineEnding_initEntries() {
|
|
2968
|
-
if (LineEnding_entriesInitialized)
|
|
2911
|
+
var static_init_called;
|
|
2912
|
+
function static_init() {
|
|
2913
|
+
if (static_init_called)
|
|
2969
2914
|
return Unit_instance;
|
|
2970
|
-
|
|
2915
|
+
static_init_called = true;
|
|
2971
2916
|
LineEnding_Default_instance = new LineEnding('Default', 0);
|
|
2972
2917
|
LineEnding_Lenient_instance = new LineEnding('Lenient', 1);
|
|
2973
2918
|
}
|
|
2919
|
+
var LineEnding_Default_instance;
|
|
2920
|
+
var LineEnding_Lenient_instance;
|
|
2974
2921
|
function LineEnding(name, ordinal) {
|
|
2975
2922
|
Enum.call(this, name, ordinal);
|
|
2976
2923
|
}
|
|
2977
2924
|
function LineEnding_Default_getInstance() {
|
|
2978
|
-
|
|
2925
|
+
static_init();
|
|
2979
2926
|
return LineEnding_Default_instance;
|
|
2980
2927
|
}
|
|
2981
2928
|
function LineEnding_Lenient_getInstance() {
|
|
2982
|
-
|
|
2929
|
+
static_init();
|
|
2983
2930
|
return LineEnding_Lenient_instance;
|
|
2984
2931
|
}
|
|
2985
2932
|
function _LineEndingMode___init__impl__jo5bul(mode) {
|
|
@@ -2996,23 +2943,23 @@ function LineEndingMode__plus_impl_ttpz2j($this, other) {
|
|
|
2996
2943
|
}
|
|
2997
2944
|
function LineEndingMode__toString_impl_j4h76r($this) {
|
|
2998
2945
|
var tmp;
|
|
2999
|
-
if ($this
|
|
2946
|
+
if (equals(new LineEndingMode($this), new LineEndingMode(Companion_getInstance_2().CR_1))) {
|
|
3000
2947
|
tmp = 'CR';
|
|
3001
|
-
} else if ($this
|
|
2948
|
+
} else if (equals(new LineEndingMode($this), new LineEndingMode(Companion_getInstance_2().LF_1))) {
|
|
3002
2949
|
tmp = 'LF';
|
|
3003
|
-
} else if ($this
|
|
2950
|
+
} else if (equals(new LineEndingMode($this), new LineEndingMode(Companion_getInstance_2().CRLF_1))) {
|
|
3004
2951
|
tmp = 'CRLF';
|
|
3005
2952
|
} else {
|
|
3006
2953
|
// Inline function 'kotlin.collections.filter' call
|
|
3007
|
-
var tmp0 = Companion_getInstance_2().
|
|
2954
|
+
var tmp0 = Companion_getInstance_2().values_1;
|
|
3008
2955
|
// Inline function 'kotlin.collections.filterTo' call
|
|
3009
2956
|
var destination = ArrayList_init_$Create$();
|
|
3010
|
-
var _iterator__ex2g4s = tmp0.
|
|
3011
|
-
while (_iterator__ex2g4s.
|
|
3012
|
-
var element = _iterator__ex2g4s.
|
|
3013
|
-
var it = element.
|
|
2957
|
+
var _iterator__ex2g4s = tmp0.iterator_jk1svi_k$();
|
|
2958
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
2959
|
+
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
2960
|
+
var it = element.mode_1;
|
|
3014
2961
|
if (LineEndingMode__contains_impl_q5pr68($this, it)) {
|
|
3015
|
-
destination.
|
|
2962
|
+
destination.add_utx5q5_k$(element);
|
|
3016
2963
|
}
|
|
3017
2964
|
}
|
|
3018
2965
|
tmp = toString_1(destination);
|
|
@@ -3021,11 +2968,11 @@ function LineEndingMode__toString_impl_j4h76r($this) {
|
|
|
3021
2968
|
}
|
|
3022
2969
|
function Companion_2() {
|
|
3023
2970
|
Companion_instance_3 = this;
|
|
3024
|
-
this.
|
|
3025
|
-
this.
|
|
3026
|
-
this.
|
|
3027
|
-
this.
|
|
3028
|
-
this.
|
|
2971
|
+
this.CR_1 = _LineEndingMode___init__impl__jo5bul(1);
|
|
2972
|
+
this.LF_1 = _LineEndingMode___init__impl__jo5bul(2);
|
|
2973
|
+
this.CRLF_1 = _LineEndingMode___init__impl__jo5bul(4);
|
|
2974
|
+
this.Any_1 = _LineEndingMode___init__impl__jo5bul(7);
|
|
2975
|
+
this.values_1 = listOf([new LineEndingMode(this.CR_1), new LineEndingMode(this.LF_1), new LineEndingMode(this.CRLF_1)]);
|
|
3029
2976
|
}
|
|
3030
2977
|
var Companion_instance_3;
|
|
3031
2978
|
function Companion_getInstance_2() {
|
|
@@ -3039,29 +2986,29 @@ function LineEndingMode__hashCode_impl_2mopm4($this) {
|
|
|
3039
2986
|
function LineEndingMode__equals_impl_qyr4nk($this, other) {
|
|
3040
2987
|
if (!(other instanceof LineEndingMode))
|
|
3041
2988
|
return false;
|
|
3042
|
-
if (!($this === other.
|
|
2989
|
+
if (!($this === other.mode_1))
|
|
3043
2990
|
return false;
|
|
3044
2991
|
return true;
|
|
3045
2992
|
}
|
|
3046
2993
|
function LineEndingMode(mode) {
|
|
3047
2994
|
Companion_getInstance_2();
|
|
3048
|
-
this.
|
|
2995
|
+
this.mode_1 = mode;
|
|
3049
2996
|
}
|
|
3050
2997
|
protoOf(LineEndingMode).toString = function () {
|
|
3051
|
-
return LineEndingMode__toString_impl_j4h76r(this.
|
|
2998
|
+
return LineEndingMode__toString_impl_j4h76r(this.mode_1);
|
|
3052
2999
|
};
|
|
3053
3000
|
protoOf(LineEndingMode).hashCode = function () {
|
|
3054
|
-
return LineEndingMode__hashCode_impl_2mopm4(this.
|
|
3001
|
+
return LineEndingMode__hashCode_impl_2mopm4(this.mode_1);
|
|
3055
3002
|
};
|
|
3056
3003
|
protoOf(LineEndingMode).equals = function (other) {
|
|
3057
|
-
return LineEndingMode__equals_impl_qyr4nk(this.
|
|
3004
|
+
return LineEndingMode__equals_impl_qyr4nk(this.mode_1, other);
|
|
3058
3005
|
};
|
|
3059
3006
|
function SourceByteReadChannel(source) {
|
|
3060
|
-
this.
|
|
3061
|
-
this.
|
|
3007
|
+
this.source_1 = source;
|
|
3008
|
+
this.closed_1 = null;
|
|
3062
3009
|
}
|
|
3063
|
-
protoOf(SourceByteReadChannel).
|
|
3064
|
-
var tmp0_safe_receiver = this.
|
|
3010
|
+
protoOf(SourceByteReadChannel).get_closedCause_o1qcj8_k$ = function () {
|
|
3011
|
+
var tmp0_safe_receiver = this.closed_1;
|
|
3065
3012
|
var tmp;
|
|
3066
3013
|
if (tmp0_safe_receiver == null) {
|
|
3067
3014
|
tmp = null;
|
|
@@ -3073,7 +3020,7 @@ protoOf(SourceByteReadChannel).d1h = function () {
|
|
|
3073
3020
|
tmp_0 = null;
|
|
3074
3021
|
} else {
|
|
3075
3022
|
if (isInterface(tmp0_subject, CopyableThrowable)) {
|
|
3076
|
-
tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).
|
|
3023
|
+
tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).createCopy_mmw9ld_k$();
|
|
3077
3024
|
} else {
|
|
3078
3025
|
if (tmp0_subject instanceof CancellationException) {
|
|
3079
3026
|
tmp_0 = CancellationException_init_$Create$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
|
|
@@ -3087,42 +3034,42 @@ protoOf(SourceByteReadChannel).d1h = function () {
|
|
|
3087
3034
|
}
|
|
3088
3035
|
return tmp;
|
|
3089
3036
|
};
|
|
3090
|
-
protoOf(SourceByteReadChannel).
|
|
3091
|
-
return this.
|
|
3037
|
+
protoOf(SourceByteReadChannel).get_isClosedForRead_ajcc1s_k$ = function () {
|
|
3038
|
+
return this.source_1.exhausted_p1jt55_k$();
|
|
3092
3039
|
};
|
|
3093
|
-
protoOf(SourceByteReadChannel).
|
|
3094
|
-
var tmp0_safe_receiver = this.
|
|
3040
|
+
protoOf(SourceByteReadChannel).get_readBuffer_yjmj9b_k$ = function () {
|
|
3041
|
+
var tmp0_safe_receiver = this.get_closedCause_o1qcj8_k$();
|
|
3095
3042
|
if (tmp0_safe_receiver == null)
|
|
3096
3043
|
null;
|
|
3097
3044
|
else {
|
|
3098
3045
|
// Inline function 'kotlin.let' call
|
|
3099
3046
|
throw tmp0_safe_receiver;
|
|
3100
3047
|
}
|
|
3101
|
-
return this.
|
|
3048
|
+
return this.source_1.get_buffer_bmaafd_k$();
|
|
3102
3049
|
};
|
|
3103
|
-
protoOf(SourceByteReadChannel).
|
|
3104
|
-
var tmp0_safe_receiver = this.
|
|
3050
|
+
protoOf(SourceByteReadChannel).awaitContent_q7m0p7_k$ = function (min, $completion) {
|
|
3051
|
+
var tmp0_safe_receiver = this.get_closedCause_o1qcj8_k$();
|
|
3105
3052
|
if (tmp0_safe_receiver == null)
|
|
3106
3053
|
null;
|
|
3107
3054
|
else {
|
|
3108
3055
|
// Inline function 'kotlin.let' call
|
|
3109
3056
|
throw tmp0_safe_receiver;
|
|
3110
3057
|
}
|
|
3111
|
-
return this.
|
|
3058
|
+
return this.source_1.request_hj5jqj_k$(fromInt(min));
|
|
3112
3059
|
};
|
|
3113
|
-
protoOf(SourceByteReadChannel).
|
|
3114
|
-
if (!(this.
|
|
3060
|
+
protoOf(SourceByteReadChannel).cancel_9i2dv0_k$ = function (cause) {
|
|
3061
|
+
if (!(this.closed_1 == null))
|
|
3115
3062
|
return Unit_instance;
|
|
3116
|
-
this.
|
|
3063
|
+
this.source_1.close_yn9xrc_k$();
|
|
3117
3064
|
var tmp = this;
|
|
3118
3065
|
var tmp1_elvis_lhs = cause == null ? null : cause.message;
|
|
3119
|
-
tmp.
|
|
3066
|
+
tmp.closed_1 = new CloseToken(IOException_init_$Create$_0(tmp1_elvis_lhs == null ? 'Channel was cancelled' : tmp1_elvis_lhs, cause));
|
|
3120
3067
|
};
|
|
3121
3068
|
function decode(_this__u8e3s4, input, max) {
|
|
3122
3069
|
max = max === VOID ? 2147483647 : max;
|
|
3123
3070
|
var tmp0 = fromInt(max);
|
|
3124
3071
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
3125
|
-
var b = input.
|
|
3072
|
+
var b = input.get_buffer_bmaafd_k$().get_size_woubt6_k$();
|
|
3126
3073
|
var tmp$ret$0 = tmp0 <= b ? tmp0 : b;
|
|
3127
3074
|
// Inline function 'kotlin.text.buildString' call
|
|
3128
3075
|
var capacity = convertToInt(tmp$ret$0);
|
|
@@ -3159,44 +3106,44 @@ function encodeToImpl(_this__u8e3s4, destination, input, fromIndex, toIndex) {
|
|
|
3159
3106
|
}
|
|
3160
3107
|
}
|
|
3161
3108
|
function canRead(_this__u8e3s4) {
|
|
3162
|
-
return !_this__u8e3s4.
|
|
3109
|
+
return !_this__u8e3s4.exhausted_p1jt55_k$();
|
|
3163
3110
|
}
|
|
3164
3111
|
function readBytes(_this__u8e3s4, count) {
|
|
3165
|
-
count = count === VOID ? convertToInt(_this__u8e3s4.
|
|
3112
|
+
count = count === VOID ? convertToInt(_this__u8e3s4.get_size_woubt6_k$()) : count;
|
|
3166
3113
|
return readByteArray(_this__u8e3s4, count);
|
|
3167
3114
|
}
|
|
3168
3115
|
function writeFully_0(_this__u8e3s4, buffer, offset, length) {
|
|
3169
3116
|
offset = offset === VOID ? 0 : offset;
|
|
3170
3117
|
length = length === VOID ? buffer.length - offset | 0 : length;
|
|
3171
|
-
_this__u8e3s4.
|
|
3118
|
+
_this__u8e3s4.write_ti570x_k$(buffer, offset, offset + length | 0);
|
|
3172
3119
|
}
|
|
3173
3120
|
function BytePacketBuilder() {
|
|
3174
3121
|
return new Buffer();
|
|
3175
3122
|
}
|
|
3176
3123
|
function build(_this__u8e3s4) {
|
|
3177
|
-
return _this__u8e3s4.
|
|
3124
|
+
return _this__u8e3s4.get_buffer_bmaafd_k$();
|
|
3178
3125
|
}
|
|
3179
3126
|
function get_size(_this__u8e3s4) {
|
|
3180
|
-
return convertToInt(_this__u8e3s4.
|
|
3127
|
+
return convertToInt(_this__u8e3s4.get_buffer_bmaafd_k$().get_size_woubt6_k$());
|
|
3181
3128
|
}
|
|
3182
3129
|
var ByteReadPacketEmpty;
|
|
3183
3130
|
function get_remaining(_this__u8e3s4) {
|
|
3184
3131
|
_init_properties_ByteReadPacket_kt__28475y();
|
|
3185
|
-
return _this__u8e3s4.
|
|
3132
|
+
return _this__u8e3s4.get_buffer_bmaafd_k$().get_size_woubt6_k$();
|
|
3186
3133
|
}
|
|
3187
3134
|
function takeWhile(_this__u8e3s4, block) {
|
|
3188
3135
|
_init_properties_ByteReadPacket_kt__28475y();
|
|
3189
|
-
while (!_this__u8e3s4.
|
|
3136
|
+
while (!_this__u8e3s4.exhausted_p1jt55_k$() && block(_this__u8e3s4.get_buffer_bmaafd_k$())) {
|
|
3190
3137
|
}
|
|
3191
3138
|
}
|
|
3192
3139
|
function discard_0(_this__u8e3s4, count) {
|
|
3193
3140
|
count = count === VOID ? 9223372036854775807n : count;
|
|
3194
3141
|
_init_properties_ByteReadPacket_kt__28475y();
|
|
3195
|
-
_this__u8e3s4.
|
|
3142
|
+
_this__u8e3s4.request_hj5jqj_k$(count);
|
|
3196
3143
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
3197
3144
|
var b = get_remaining(_this__u8e3s4);
|
|
3198
3145
|
var countToDiscard = count <= b ? count : b;
|
|
3199
|
-
_this__u8e3s4.
|
|
3146
|
+
_this__u8e3s4.get_buffer_bmaafd_k$().skip_csbv9x_k$(countToDiscard);
|
|
3200
3147
|
return countToDiscard;
|
|
3201
3148
|
}
|
|
3202
3149
|
var properties_initialized_ByteReadPacket_kt_hw4st4;
|
|
@@ -3209,23 +3156,23 @@ function _init_properties_ByteReadPacket_kt__28475y() {
|
|
|
3209
3156
|
function readAvailable_0(_this__u8e3s4, buffer, offset, length) {
|
|
3210
3157
|
offset = offset === VOID ? 0 : offset;
|
|
3211
3158
|
length = length === VOID ? buffer.length - offset | 0 : length;
|
|
3212
|
-
var result = _this__u8e3s4.
|
|
3159
|
+
var result = _this__u8e3s4.readAtMostTo_kub29z_k$(buffer, offset, offset + length | 0);
|
|
3213
3160
|
return result === -1 ? 0 : result;
|
|
3214
3161
|
}
|
|
3215
3162
|
function toByteArray_0(_this__u8e3s4, charset) {
|
|
3216
|
-
charset = charset === VOID ? Charsets_getInstance().
|
|
3217
|
-
if (charset.equals(Charsets_getInstance().
|
|
3163
|
+
charset = charset === VOID ? Charsets_getInstance().UTF_8__1 : charset;
|
|
3164
|
+
if (charset.equals(Charsets_getInstance().UTF_8__1))
|
|
3218
3165
|
return encodeToByteArray(_this__u8e3s4);
|
|
3219
|
-
return encodeToByteArray_0(charset.
|
|
3166
|
+
return encodeToByteArray_0(charset.newEncoder_gqwcdg_k$(), _this__u8e3s4, 0, _this__u8e3s4.length);
|
|
3220
3167
|
}
|
|
3221
3168
|
function writeText(_this__u8e3s4, text, fromIndex, toIndex, charset) {
|
|
3222
3169
|
fromIndex = fromIndex === VOID ? 0 : fromIndex;
|
|
3223
3170
|
toIndex = toIndex === VOID ? charSequenceLength(text) : toIndex;
|
|
3224
|
-
charset = charset === VOID ? Charsets_getInstance().
|
|
3225
|
-
if (charset === Charsets_getInstance().
|
|
3171
|
+
charset = charset === VOID ? Charsets_getInstance().UTF_8__1 : charset;
|
|
3172
|
+
if (charset === Charsets_getInstance().UTF_8__1) {
|
|
3226
3173
|
return writeString(_this__u8e3s4, toString_1(text), fromIndex, toIndex);
|
|
3227
3174
|
}
|
|
3228
|
-
encodeToImpl(charset.
|
|
3175
|
+
encodeToImpl(charset.newEncoder_gqwcdg_k$(), _this__u8e3s4, text, fromIndex, toIndex);
|
|
3229
3176
|
}
|
|
3230
3177
|
function get_ByteArrayPool() {
|
|
3231
3178
|
_init_properties_ByteArrayPool_kt__kfi3uj();
|
|
@@ -3235,7 +3182,7 @@ var ByteArrayPool;
|
|
|
3235
3182
|
function ByteArrayPool$1() {
|
|
3236
3183
|
DefaultPool.call(this, 128);
|
|
3237
3184
|
}
|
|
3238
|
-
protoOf(ByteArrayPool$1).
|
|
3185
|
+
protoOf(ByteArrayPool$1).produceInstance_xswihh_k$ = function () {
|
|
3239
3186
|
return new Int8Array(4096);
|
|
3240
3187
|
};
|
|
3241
3188
|
var properties_initialized_ByteArrayPool_kt_td6pfh;
|
|
@@ -3249,21 +3196,21 @@ function ObjectPool() {
|
|
|
3249
3196
|
}
|
|
3250
3197
|
function NoPoolImpl() {
|
|
3251
3198
|
}
|
|
3252
|
-
protoOf(NoPoolImpl).
|
|
3199
|
+
protoOf(NoPoolImpl).recycle_d2xv5h_k$ = function (instance) {
|
|
3253
3200
|
return Unit_instance;
|
|
3254
3201
|
};
|
|
3255
|
-
protoOf(NoPoolImpl).
|
|
3202
|
+
protoOf(NoPoolImpl).dispose_3nnxhr_k$ = function () {
|
|
3256
3203
|
return Unit_instance;
|
|
3257
3204
|
};
|
|
3258
3205
|
function Companion_3() {
|
|
3259
3206
|
}
|
|
3260
|
-
protoOf(Companion_3).
|
|
3207
|
+
protoOf(Companion_3).forName_etcah2_k$ = function (name) {
|
|
3261
3208
|
switch (name) {
|
|
3262
3209
|
case 'UTF-8':
|
|
3263
3210
|
case 'utf-8':
|
|
3264
3211
|
case 'UTF8':
|
|
3265
3212
|
case 'utf8':
|
|
3266
|
-
return Charsets_getInstance().
|
|
3213
|
+
return Charsets_getInstance().UTF_8__1;
|
|
3267
3214
|
}
|
|
3268
3215
|
var tmp;
|
|
3269
3216
|
var tmp_0;
|
|
@@ -3294,7 +3241,7 @@ protoOf(Companion_3).z1r = function (name) {
|
|
|
3294
3241
|
tmp = name === 'latin1' || name === 'Latin1';
|
|
3295
3242
|
}
|
|
3296
3243
|
if (tmp) {
|
|
3297
|
-
return Charsets_getInstance().
|
|
3244
|
+
return Charsets_getInstance().ISO_8859_1__1;
|
|
3298
3245
|
}
|
|
3299
3246
|
throw IllegalArgumentException_init_$Create$('Charset ' + name + ' is not supported');
|
|
3300
3247
|
};
|
|
@@ -3303,7 +3250,7 @@ function Companion_getInstance_3() {
|
|
|
3303
3250
|
return Companion_instance_4;
|
|
3304
3251
|
}
|
|
3305
3252
|
function Charset(_name) {
|
|
3306
|
-
this.
|
|
3253
|
+
this._name_1 = _name;
|
|
3307
3254
|
}
|
|
3308
3255
|
protoOf(Charset).equals = function (other) {
|
|
3309
3256
|
if (this === other)
|
|
@@ -3312,18 +3259,18 @@ protoOf(Charset).equals = function (other) {
|
|
|
3312
3259
|
return false;
|
|
3313
3260
|
if (!(other instanceof Charset))
|
|
3314
3261
|
THROW_CCE();
|
|
3315
|
-
return this.
|
|
3262
|
+
return this._name_1 === other._name_1;
|
|
3316
3263
|
};
|
|
3317
3264
|
protoOf(Charset).hashCode = function () {
|
|
3318
|
-
return getStringHashCode(this.
|
|
3265
|
+
return getStringHashCode(this._name_1);
|
|
3319
3266
|
};
|
|
3320
3267
|
protoOf(Charset).toString = function () {
|
|
3321
|
-
return this.
|
|
3268
|
+
return this._name_1;
|
|
3322
3269
|
};
|
|
3323
3270
|
function Charsets() {
|
|
3324
3271
|
Charsets_instance = this;
|
|
3325
|
-
this.
|
|
3326
|
-
this.
|
|
3272
|
+
this.UTF_8__1 = new CharsetImpl('UTF-8');
|
|
3273
|
+
this.ISO_8859_1__1 = new CharsetImpl('ISO-8859-1');
|
|
3327
3274
|
}
|
|
3328
3275
|
var Charsets_instance;
|
|
3329
3276
|
function Charsets_getInstance() {
|
|
@@ -3332,24 +3279,25 @@ function Charsets_getInstance() {
|
|
|
3332
3279
|
return Charsets_instance;
|
|
3333
3280
|
}
|
|
3334
3281
|
function CharsetDecoder(_charset) {
|
|
3335
|
-
this.
|
|
3282
|
+
this._charset_1 = _charset;
|
|
3336
3283
|
}
|
|
3337
3284
|
function MalformedInputException(message) {
|
|
3338
3285
|
IOException_init_$Init$_0(message, this);
|
|
3339
3286
|
captureStack(this, MalformedInputException);
|
|
3340
3287
|
}
|
|
3341
3288
|
function get_name(_this__u8e3s4) {
|
|
3342
|
-
return _this__u8e3s4.
|
|
3289
|
+
return _this__u8e3s4._name_1;
|
|
3343
3290
|
}
|
|
3344
3291
|
function forName(_this__u8e3s4, name) {
|
|
3345
|
-
return Companion_instance_4.
|
|
3292
|
+
return Companion_instance_4.forName_etcah2_k$(name);
|
|
3346
3293
|
}
|
|
3347
3294
|
function CharsetEncoder(_charset) {
|
|
3348
|
-
this.
|
|
3295
|
+
this._charset_1 = _charset;
|
|
3349
3296
|
}
|
|
3350
3297
|
function decode_0(_this__u8e3s4, input, dst, max) {
|
|
3351
3298
|
var decoder = Decoder(get_name(get_charset(_this__u8e3s4)), true);
|
|
3352
|
-
|
|
3299
|
+
input.request_hj5jqj_k$(fromInt(max));
|
|
3300
|
+
var tmp0 = input.get_buffer_bmaafd_k$().get_size_woubt6_k$();
|
|
3353
3301
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
3354
3302
|
var b = fromInt(max);
|
|
3355
3303
|
var count = tmp0 <= b ? tmp0 : b;
|
|
@@ -3359,7 +3307,7 @@ function decode_0(_this__u8e3s4, input, dst, max) {
|
|
|
3359
3307
|
// Inline function 'org.khronos.webgl.toInt8Array' call
|
|
3360
3308
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
3361
3309
|
// Inline function 'kotlin.js.asDynamic' call
|
|
3362
|
-
tmp = decoder.
|
|
3310
|
+
tmp = decoder.decode_hpap4q_k$(array);
|
|
3363
3311
|
} catch ($p) {
|
|
3364
3312
|
var tmp_0;
|
|
3365
3313
|
if ($p instanceof Error) {
|
|
@@ -3371,7 +3319,7 @@ function decode_0(_this__u8e3s4, input, dst, max) {
|
|
|
3371
3319
|
}
|
|
3372
3320
|
}
|
|
3373
3321
|
var result = tmp;
|
|
3374
|
-
dst.
|
|
3322
|
+
dst.append_jgojdo_k$(result);
|
|
3375
3323
|
return result.length;
|
|
3376
3324
|
}
|
|
3377
3325
|
function encodeImpl(_this__u8e3s4, input, fromIndex, toIndex, dst) {
|
|
@@ -3381,11 +3329,11 @@ function encodeImpl(_this__u8e3s4, input, fromIndex, toIndex, dst) {
|
|
|
3381
3329
|
var message = 'Failed requirement.';
|
|
3382
3330
|
throw IllegalArgumentException_init_$Create$(toString_1(message));
|
|
3383
3331
|
}
|
|
3384
|
-
if (get_charset_0(_this__u8e3s4).equals(Charsets_getInstance().
|
|
3332
|
+
if (get_charset_0(_this__u8e3s4).equals(Charsets_getInstance().ISO_8859_1__1)) {
|
|
3385
3333
|
return encodeISO88591(input, fromIndex, toIndex, dst);
|
|
3386
3334
|
}
|
|
3387
3335
|
// Inline function 'kotlin.require' call
|
|
3388
|
-
if (!(get_charset_0(_this__u8e3s4) === Charsets_getInstance().
|
|
3336
|
+
if (!(get_charset_0(_this__u8e3s4) === Charsets_getInstance().UTF_8__1)) {
|
|
3389
3337
|
var message_0 = 'Only UTF-8 encoding is supported in JS';
|
|
3390
3338
|
throw IllegalArgumentException_init_$Create$(toString_1(message_0));
|
|
3391
3339
|
}
|
|
@@ -3395,7 +3343,7 @@ function encodeImpl(_this__u8e3s4, input, fromIndex, toIndex, dst) {
|
|
|
3395
3343
|
var result = encoder.encode(tmp$ret$5);
|
|
3396
3344
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
3397
3345
|
// Inline function 'kotlin.js.asDynamic' call
|
|
3398
|
-
dst.
|
|
3346
|
+
dst.write$default_fa5nq1_k$(result);
|
|
3399
3347
|
return result.length;
|
|
3400
3348
|
}
|
|
3401
3349
|
function encodeToByteArray_0(_this__u8e3s4, input, fromIndex, toIndex) {
|
|
@@ -3406,17 +3354,17 @@ function encodeToByteArray_0(_this__u8e3s4, input, fromIndex, toIndex) {
|
|
|
3406
3354
|
function CharsetImpl(name) {
|
|
3407
3355
|
Charset.call(this, name);
|
|
3408
3356
|
}
|
|
3409
|
-
protoOf(CharsetImpl).
|
|
3357
|
+
protoOf(CharsetImpl).newEncoder_gqwcdg_k$ = function () {
|
|
3410
3358
|
return new CharsetEncoderImpl(this);
|
|
3411
3359
|
};
|
|
3412
|
-
protoOf(CharsetImpl).
|
|
3360
|
+
protoOf(CharsetImpl).newDecoder_zcettw_k$ = function () {
|
|
3413
3361
|
return new CharsetDecoderImpl(this);
|
|
3414
3362
|
};
|
|
3415
3363
|
function get_charset(_this__u8e3s4) {
|
|
3416
|
-
return _this__u8e3s4.
|
|
3364
|
+
return _this__u8e3s4._charset_1;
|
|
3417
3365
|
}
|
|
3418
3366
|
function get_charset_0(_this__u8e3s4) {
|
|
3419
|
-
return _this__u8e3s4.
|
|
3367
|
+
return _this__u8e3s4._charset_1;
|
|
3420
3368
|
}
|
|
3421
3369
|
function encodeToByteArrayImpl(_this__u8e3s4, input, fromIndex, toIndex) {
|
|
3422
3370
|
fromIndex = fromIndex === VOID ? 0 : fromIndex;
|
|
@@ -3435,39 +3383,39 @@ function encodeToByteArrayImpl(_this__u8e3s4, input, fromIndex, toIndex) {
|
|
|
3435
3383
|
}
|
|
3436
3384
|
function CharsetEncoderImpl(charset) {
|
|
3437
3385
|
CharsetEncoder.call(this, charset);
|
|
3438
|
-
this.
|
|
3386
|
+
this.charset_1 = charset;
|
|
3439
3387
|
}
|
|
3440
3388
|
protoOf(CharsetEncoderImpl).toString = function () {
|
|
3441
|
-
return 'CharsetEncoderImpl(charset=' + this.
|
|
3389
|
+
return 'CharsetEncoderImpl(charset=' + this.charset_1.toString() + ')';
|
|
3442
3390
|
};
|
|
3443
3391
|
protoOf(CharsetEncoderImpl).hashCode = function () {
|
|
3444
|
-
return this.
|
|
3392
|
+
return this.charset_1.hashCode();
|
|
3445
3393
|
};
|
|
3446
3394
|
protoOf(CharsetEncoderImpl).equals = function (other) {
|
|
3447
3395
|
if (this === other)
|
|
3448
3396
|
return true;
|
|
3449
3397
|
if (!(other instanceof CharsetEncoderImpl))
|
|
3450
3398
|
return false;
|
|
3451
|
-
if (!this.
|
|
3399
|
+
if (!this.charset_1.equals(other.charset_1))
|
|
3452
3400
|
return false;
|
|
3453
3401
|
return true;
|
|
3454
3402
|
};
|
|
3455
3403
|
function CharsetDecoderImpl(charset) {
|
|
3456
3404
|
CharsetDecoder.call(this, charset);
|
|
3457
|
-
this.
|
|
3405
|
+
this.charset_1 = charset;
|
|
3458
3406
|
}
|
|
3459
3407
|
protoOf(CharsetDecoderImpl).toString = function () {
|
|
3460
|
-
return 'CharsetDecoderImpl(charset=' + this.
|
|
3408
|
+
return 'CharsetDecoderImpl(charset=' + this.charset_1.toString() + ')';
|
|
3461
3409
|
};
|
|
3462
3410
|
protoOf(CharsetDecoderImpl).hashCode = function () {
|
|
3463
|
-
return this.
|
|
3411
|
+
return this.charset_1.hashCode();
|
|
3464
3412
|
};
|
|
3465
3413
|
protoOf(CharsetDecoderImpl).equals = function (other) {
|
|
3466
3414
|
if (this === other)
|
|
3467
3415
|
return true;
|
|
3468
3416
|
if (!(other instanceof CharsetDecoderImpl))
|
|
3469
3417
|
return false;
|
|
3470
|
-
if (!this.
|
|
3418
|
+
if (!this.charset_1.equals(other.charset_1))
|
|
3471
3419
|
return false;
|
|
3472
3420
|
return true;
|
|
3473
3421
|
};
|
|
@@ -3501,10 +3449,10 @@ function textDecoderOptions(fatal) {
|
|
|
3501
3449
|
return this_0;
|
|
3502
3450
|
}
|
|
3503
3451
|
function toKtor$1($this_toKtor) {
|
|
3504
|
-
this
|
|
3452
|
+
this.$this_toKtor_1 = $this_toKtor;
|
|
3505
3453
|
}
|
|
3506
|
-
protoOf(toKtor$1).
|
|
3507
|
-
return this.
|
|
3454
|
+
protoOf(toKtor$1).decode_hpap4q_k$ = function (buffer) {
|
|
3455
|
+
return this.$this_toKtor_1.decode(buffer);
|
|
3508
3456
|
};
|
|
3509
3457
|
function get_ENCODING_ALIASES() {
|
|
3510
3458
|
_init_properties_TextDecoderFallback_js_kt__an7r6m();
|
|
@@ -3517,18 +3465,18 @@ function get_REPLACEMENT() {
|
|
|
3517
3465
|
}
|
|
3518
3466
|
var REPLACEMENT;
|
|
3519
3467
|
function TextDecoderFallback(encoding, fatal) {
|
|
3520
|
-
this.
|
|
3468
|
+
this.fatal_1 = fatal;
|
|
3521
3469
|
// Inline function 'kotlin.text.trim' call
|
|
3522
3470
|
// Inline function 'kotlin.text.lowercase' call
|
|
3523
3471
|
// Inline function 'kotlin.js.asDynamic' call
|
|
3524
3472
|
var requestedEncoding = toString_1(trim(isCharSequence(encoding) ? encoding : THROW_CCE())).toLowerCase();
|
|
3525
3473
|
// Inline function 'kotlin.check' call
|
|
3526
|
-
if (!get_ENCODING_ALIASES().
|
|
3474
|
+
if (!get_ENCODING_ALIASES().contains_aljjnj_k$(requestedEncoding)) {
|
|
3527
3475
|
var message = encoding + ' is not supported.';
|
|
3528
3476
|
throw IllegalStateException_init_$Create$(toString_1(message));
|
|
3529
3477
|
}
|
|
3530
3478
|
}
|
|
3531
|
-
protoOf(TextDecoderFallback).
|
|
3479
|
+
protoOf(TextDecoderFallback).decode_hpap4q_k$ = function (buffer) {
|
|
3532
3480
|
// Inline function 'io.ktor.utils.io.core.buildPacket' call
|
|
3533
3481
|
var builder = new Buffer();
|
|
3534
3482
|
var bytes = buffer instanceof Int8Array ? buffer : THROW_CCE();
|
|
@@ -3544,7 +3492,7 @@ protoOf(TextDecoderFallback).d1s = function (buffer) {
|
|
|
3544
3492
|
var point = toCodePoint(byte);
|
|
3545
3493
|
if (point < 0) {
|
|
3546
3494
|
// Inline function 'kotlin.check' call
|
|
3547
|
-
if (!!this.
|
|
3495
|
+
if (!!this.fatal_1) {
|
|
3548
3496
|
var message = 'Invalid character: ' + point;
|
|
3549
3497
|
throw IllegalStateException_init_$Create$(toString_1(message));
|
|
3550
3498
|
}
|
|
@@ -3552,9 +3500,9 @@ protoOf(TextDecoderFallback).d1s = function (buffer) {
|
|
|
3552
3500
|
continue $l$loop;
|
|
3553
3501
|
}
|
|
3554
3502
|
if (point > 255) {
|
|
3555
|
-
builder.
|
|
3503
|
+
builder.writeByte_9ih3z3_k$(toByte(point >> 8));
|
|
3556
3504
|
}
|
|
3557
|
-
builder.
|
|
3505
|
+
builder.writeByte_9ih3z3_k$(toByte(point & 255));
|
|
3558
3506
|
}
|
|
3559
3507
|
while (inductionVariable < last);
|
|
3560
3508
|
return decodeToString(readByteArray_0(builder));
|
|
@@ -3581,24 +3529,25 @@ function _init_properties_TextDecoderFallback_js_kt__an7r6m() {
|
|
|
3581
3529
|
}
|
|
3582
3530
|
}
|
|
3583
3531
|
function readText_0(_this__u8e3s4, charset, max) {
|
|
3584
|
-
charset = charset === VOID ? Charsets_getInstance().
|
|
3532
|
+
charset = charset === VOID ? Charsets_getInstance().UTF_8__1 : charset;
|
|
3585
3533
|
max = max === VOID ? 2147483647 : max;
|
|
3586
|
-
if (charset.equals(Charsets_getInstance().
|
|
3534
|
+
if (charset.equals(Charsets_getInstance().UTF_8__1)) {
|
|
3587
3535
|
if (max === 2147483647)
|
|
3588
3536
|
return readString_1(_this__u8e3s4);
|
|
3589
|
-
|
|
3537
|
+
_this__u8e3s4.request_hj5jqj_k$(fromInt(max));
|
|
3538
|
+
var tmp0 = _this__u8e3s4.get_buffer_bmaafd_k$().get_size_woubt6_k$();
|
|
3590
3539
|
// Inline function 'kotlin.math.min' call
|
|
3591
3540
|
var b = fromInt(max);
|
|
3592
3541
|
var count = tmp0 <= b ? tmp0 : b;
|
|
3593
3542
|
return readString(_this__u8e3s4, count);
|
|
3594
3543
|
}
|
|
3595
|
-
return decode(charset.
|
|
3544
|
+
return decode(charset.newDecoder_zcettw_k$(), _this__u8e3s4, max);
|
|
3596
3545
|
}
|
|
3597
3546
|
function get_DEVELOPMENT_MODE() {
|
|
3598
3547
|
return false;
|
|
3599
3548
|
}
|
|
3600
3549
|
function ioDispatcher() {
|
|
3601
|
-
return Dispatchers_getInstance().
|
|
3550
|
+
return Dispatchers_getInstance().Default_1;
|
|
3602
3551
|
}
|
|
3603
3552
|
function encodeISO88591(input, fromIndex, toIndex, dst) {
|
|
3604
3553
|
if (fromIndex >= toIndex)
|
|
@@ -3614,7 +3563,7 @@ function encodeISO88591(input, fromIndex, toIndex, dst) {
|
|
|
3614
3563
|
if (character > 255) {
|
|
3615
3564
|
failedToMapError(character);
|
|
3616
3565
|
}
|
|
3617
|
-
dst.
|
|
3566
|
+
dst.writeByte_9ih3z3_k$(toByte(character));
|
|
3618
3567
|
}
|
|
3619
3568
|
while (inductionVariable < toIndex);
|
|
3620
3569
|
return toIndex - fromIndex | 0;
|
|
@@ -3636,66 +3585,66 @@ function _init_properties_Win1252Table_kt__tl0v64() {
|
|
|
3636
3585
|
}
|
|
3637
3586
|
}
|
|
3638
3587
|
function DefaultPool(capacity) {
|
|
3639
|
-
this.
|
|
3588
|
+
this.capacity_1 = capacity;
|
|
3640
3589
|
var tmp = this;
|
|
3641
3590
|
// Inline function 'kotlin.arrayOfNulls' call
|
|
3642
|
-
var size = this.
|
|
3643
|
-
tmp.
|
|
3644
|
-
this.
|
|
3591
|
+
var size = this.capacity_1;
|
|
3592
|
+
tmp.instances_1 = Array(size);
|
|
3593
|
+
this.size_1 = 0;
|
|
3645
3594
|
}
|
|
3646
|
-
protoOf(DefaultPool).
|
|
3595
|
+
protoOf(DefaultPool).disposeInstance_6ek0a2_k$ = function (instance) {
|
|
3647
3596
|
};
|
|
3648
|
-
protoOf(DefaultPool).
|
|
3597
|
+
protoOf(DefaultPool).clearInstance_nfz4jw_k$ = function (instance) {
|
|
3649
3598
|
return instance;
|
|
3650
3599
|
};
|
|
3651
|
-
protoOf(DefaultPool).
|
|
3600
|
+
protoOf(DefaultPool).validateInstance_6mwbhp_k$ = function (instance) {
|
|
3652
3601
|
};
|
|
3653
|
-
protoOf(DefaultPool).
|
|
3654
|
-
if (this.
|
|
3655
|
-
return this.
|
|
3656
|
-
this.
|
|
3657
|
-
var idx = this.
|
|
3658
|
-
var tmp = this.
|
|
3602
|
+
protoOf(DefaultPool).borrow_mvkpor_k$ = function () {
|
|
3603
|
+
if (this.size_1 === 0)
|
|
3604
|
+
return this.produceInstance_xswihh_k$();
|
|
3605
|
+
this.size_1 = this.size_1 - 1 | 0;
|
|
3606
|
+
var idx = this.size_1;
|
|
3607
|
+
var tmp = this.instances_1[idx];
|
|
3659
3608
|
var instance = !(tmp == null) ? tmp : THROW_CCE();
|
|
3660
|
-
this.
|
|
3661
|
-
return this.
|
|
3609
|
+
this.instances_1[idx] = null;
|
|
3610
|
+
return this.clearInstance_nfz4jw_k$(instance);
|
|
3662
3611
|
};
|
|
3663
|
-
protoOf(DefaultPool).
|
|
3664
|
-
this.
|
|
3665
|
-
if (this.
|
|
3666
|
-
this.
|
|
3612
|
+
protoOf(DefaultPool).recycle_d2xv5h_k$ = function (instance) {
|
|
3613
|
+
this.validateInstance_6mwbhp_k$(instance);
|
|
3614
|
+
if (this.size_1 === this.capacity_1) {
|
|
3615
|
+
this.disposeInstance_6ek0a2_k$(instance);
|
|
3667
3616
|
} else {
|
|
3668
|
-
var _unary__edvuaz = this.
|
|
3669
|
-
this.
|
|
3670
|
-
this.
|
|
3617
|
+
var _unary__edvuaz = this.size_1;
|
|
3618
|
+
this.size_1 = _unary__edvuaz + 1 | 0;
|
|
3619
|
+
this.instances_1[_unary__edvuaz] = instance;
|
|
3671
3620
|
}
|
|
3672
3621
|
};
|
|
3673
|
-
protoOf(DefaultPool).
|
|
3622
|
+
protoOf(DefaultPool).dispose_3nnxhr_k$ = function () {
|
|
3674
3623
|
var inductionVariable = 0;
|
|
3675
|
-
var last = this.
|
|
3624
|
+
var last = this.size_1;
|
|
3676
3625
|
if (inductionVariable < last)
|
|
3677
3626
|
do {
|
|
3678
3627
|
var i = inductionVariable;
|
|
3679
3628
|
inductionVariable = inductionVariable + 1 | 0;
|
|
3680
|
-
var tmp = this.
|
|
3629
|
+
var tmp = this.instances_1[i];
|
|
3681
3630
|
var instance = !(tmp == null) ? tmp : THROW_CCE();
|
|
3682
|
-
this.
|
|
3683
|
-
this.
|
|
3631
|
+
this.instances_1[i] = null;
|
|
3632
|
+
this.disposeInstance_6ek0a2_k$(instance);
|
|
3684
3633
|
}
|
|
3685
3634
|
while (inductionVariable < last);
|
|
3686
|
-
this.
|
|
3635
|
+
this.size_1 = 0;
|
|
3687
3636
|
};
|
|
3688
3637
|
//region block: post-declaration
|
|
3689
|
-
protoOf(Read).
|
|
3690
|
-
protoOf(Read).
|
|
3691
|
-
protoOf(Write).
|
|
3692
|
-
protoOf(Write).
|
|
3693
|
-
protoOf(ByteChannel).
|
|
3694
|
-
protoOf(ByteReadChannel$Companion$Empty$1).
|
|
3695
|
-
protoOf(CountedByteReadChannel).
|
|
3696
|
-
protoOf(SourceByteReadChannel).
|
|
3697
|
-
protoOf(DefaultPool).
|
|
3698
|
-
protoOf(NoPoolImpl).
|
|
3638
|
+
protoOf(Read).resume_2o15jx_k$ = resume;
|
|
3639
|
+
protoOf(Read).resume_xzb95z_k$ = resume_0;
|
|
3640
|
+
protoOf(Write).resume_2o15jx_k$ = resume;
|
|
3641
|
+
protoOf(Write).resume_xzb95z_k$ = resume_0;
|
|
3642
|
+
protoOf(ByteChannel).awaitContent$default_rxihsg_k$ = awaitContent$default;
|
|
3643
|
+
protoOf(ByteReadChannel$Companion$Empty$1).awaitContent$default_rxihsg_k$ = awaitContent$default;
|
|
3644
|
+
protoOf(CountedByteReadChannel).awaitContent$default_rxihsg_k$ = awaitContent$default;
|
|
3645
|
+
protoOf(SourceByteReadChannel).awaitContent$default_rxihsg_k$ = awaitContent$default;
|
|
3646
|
+
protoOf(DefaultPool).close_yn9xrc_k$ = close;
|
|
3647
|
+
protoOf(NoPoolImpl).close_yn9xrc_k$ = close;
|
|
3699
3648
|
//endregion
|
|
3700
3649
|
//region block: init
|
|
3701
3650
|
Empty_instance = new Empty();
|
|
@@ -3704,21 +3653,21 @@ Companion_instance_4 = new Companion_3();
|
|
|
3704
3653
|
//endregion
|
|
3705
3654
|
//region block: exports
|
|
3706
3655
|
export {
|
|
3707
|
-
LineEndingMode__plus_impl_ttpz2j as
|
|
3708
|
-
Charsets_getInstance as
|
|
3709
|
-
Companion_getInstance_0 as
|
|
3710
|
-
Companion_getInstance_2 as
|
|
3711
|
-
copyTo as
|
|
3712
|
-
copyTo_0 as
|
|
3713
|
-
readAvailable as
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
readUntil as
|
|
3718
|
-
skipIfFound as
|
|
3719
|
-
toByteArray as
|
|
3720
|
-
writeFully as
|
|
3721
|
-
writePacket as
|
|
3656
|
+
LineEndingMode__plus_impl_ttpz2j as LineEndingMode__plus_impl_ttpz2j3huakwvr4g74l,
|
|
3657
|
+
Charsets_getInstance as Charsets_getInstancezrqwjk0yrlyw,
|
|
3658
|
+
Companion_getInstance_0 as Companion_getInstance1wcuorfuztxv3,
|
|
3659
|
+
Companion_getInstance_2 as Companion_getInstance325d2evlpmaqk,
|
|
3660
|
+
copyTo as copyTo2t9ovypu2ttur,
|
|
3661
|
+
copyTo_0 as copyToi5ntzjcye2q9,
|
|
3662
|
+
readAvailable as readAvailable3nvldm7ch5xu5,
|
|
3663
|
+
readBuffer as readBuffery45c0omfxhxc,
|
|
3664
|
+
readLineStrictTo as readLineStrictTo1b1nwo5trwh7s,
|
|
3665
|
+
readPacket as readPacket290wjvm56mmfy,
|
|
3666
|
+
readUntil as readUntil2ls7o0c1kzd4x,
|
|
3667
|
+
skipIfFound as skipIfFoundarb6fjv6fvg7,
|
|
3668
|
+
toByteArray as toByteArraylei52b7x53md,
|
|
3669
|
+
writeFully as writeFully3k1eaua3t4bqd,
|
|
3670
|
+
writePacket as writePacket12ojj8o5tswuc,
|
|
3722
3671
|
MalformedInputException as MalformedInputExceptionbvc6h5ij0ias,
|
|
3723
3672
|
decode as decode1t43jmuxrxpmo,
|
|
3724
3673
|
encode as encode35e4rpnc94tb5,
|
|
@@ -3751,7 +3700,7 @@ export {
|
|
|
3751
3700
|
invokeOnCompletion as invokeOnCompletion1ziuxzoag0iwj,
|
|
3752
3701
|
ioDispatcher as ioDispatcher3b9pa3x0duop,
|
|
3753
3702
|
readText as readText3frapgncbqrcg,
|
|
3754
|
-
|
|
3703
|
+
rethrowCloseCauseIfNeeded_0 as rethrowCloseCauseIfNeeded3ixo8wl4o3bz4,
|
|
3755
3704
|
writer as writer1eia5its2a1fh,
|
|
3756
3705
|
};
|
|
3757
3706
|
//endregion
|