@solibo/solibo-sdk 1.5.18 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/KmLogging-logging.mjs +110 -110
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1545 -1545
- package/KotlinBigInteger-bignum.mjs +1198 -1198
- package/MultiplatformSettings-multiplatform-settings-test.mjs +19 -19
- package/MultiplatformSettings-multiplatform-settings.mjs +17 -17
- package/Stately-stately-concurrency.mjs +5 -5
- package/cryptography-kotlin-cryptography-bigint.mjs +33 -33
- package/cryptography-kotlin-cryptography-core.mjs +49 -49
- package/cryptography-kotlin-cryptography-provider-base.mjs +8 -8
- package/cryptography-kotlin-cryptography-provider-webcrypto.mjs +175 -175
- package/cryptography-kotlin-cryptography-random.mjs +26 -26
- package/cryptography-kotlin-cryptography-serialization-asn1-modules.mjs +204 -204
- package/cryptography-kotlin-cryptography-serialization-asn1.mjs +332 -332
- package/cryptography-kotlin-cryptography-serialization-pem.mjs +16 -16
- package/index.mjs +6 -0
- package/kotlin-kotlin-stdlib.mjs +2141 -2051
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlinx-atomicfu.mjs +13 -13
- package/kotlinx-coroutines-core.mjs +2488 -2461
- package/kotlinx-coroutines-core.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.mjs +32 -32
- package/kotlinx-io-kotlinx-io-core.mjs +451 -451
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1832 -1832
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1383 -1383
- package/ktor-ktor-client-auth.mjs +463 -463
- package/ktor-ktor-client-content-negotiation.mjs +184 -184
- package/ktor-ktor-client-core.mjs +4457 -4456
- package/ktor-ktor-client-core.mjs.map +1 -1
- package/ktor-ktor-client-encoding.mjs +785 -0
- package/ktor-ktor-client-encoding.mjs.map +1 -0
- package/ktor-ktor-client-logging.mjs +1080 -1080
- package/ktor-ktor-client-mock.mjs +79 -79
- package/ktor-ktor-events.mjs +6 -6
- package/ktor-ktor-http-cio.mjs +480 -480
- package/ktor-ktor-http.mjs +1296 -997
- package/ktor-ktor-http.mjs.map +1 -1
- package/ktor-ktor-io.mjs +1120 -1097
- package/ktor-ktor-io.mjs.map +1 -1
- package/ktor-ktor-serialization-kotlinx-json.mjs +7 -7
- package/ktor-ktor-serialization-kotlinx.mjs +228 -228
- package/ktor-ktor-serialization.mjs +105 -105
- package/ktor-ktor-utils.mjs +1152 -1041
- package/ktor-ktor-utils.mjs.map +1 -1
- package/ktor-ktor-websockets.mjs +741 -741
- package/package.json +1 -1
- package/solibo-sdk-sdk-home-api.mjs +77103 -73805
- package/solibo-sdk-sdk-home-api.mjs.map +1 -1
- package/solibo-sdk-sdk.d.mts +318 -3
- package/solibo-sdk-sdk.mjs +6928 -6854
- package/solibo-sdk-sdk.mjs.map +1 -1
|
@@ -47,10 +47,10 @@ function write$default(source, startIndex, endIndex, $super) {
|
|
|
47
47
|
endIndex = endIndex === VOID ? source.length : endIndex;
|
|
48
48
|
var tmp;
|
|
49
49
|
if ($super === VOID) {
|
|
50
|
-
this.
|
|
50
|
+
this.d2t(source, startIndex, endIndex);
|
|
51
51
|
tmp = Unit_instance;
|
|
52
52
|
} else {
|
|
53
|
-
tmp = $super.
|
|
53
|
+
tmp = $super.d2t.call(this, source, startIndex, endIndex);
|
|
54
54
|
}
|
|
55
55
|
return tmp;
|
|
56
56
|
}
|
|
@@ -102,20 +102,20 @@ function throwEof($this, byteCount) {
|
|
|
102
102
|
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + $this.g1().toString() + ', required: ' + byteCount.toString() + ')');
|
|
103
103
|
}
|
|
104
104
|
function Buffer() {
|
|
105
|
-
this.
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
105
|
+
this.q2r_1 = null;
|
|
106
|
+
this.r2r_1 = null;
|
|
107
|
+
this.s2r_1 = 0n;
|
|
108
108
|
}
|
|
109
109
|
protoOf(Buffer).g1 = function () {
|
|
110
|
-
return this.
|
|
110
|
+
return this.s2r_1;
|
|
111
111
|
};
|
|
112
|
-
protoOf(Buffer).
|
|
112
|
+
protoOf(Buffer).t2r = function () {
|
|
113
113
|
return this;
|
|
114
114
|
};
|
|
115
|
-
protoOf(Buffer).
|
|
115
|
+
protoOf(Buffer).u2r = function () {
|
|
116
116
|
return this.g1() === 0n;
|
|
117
117
|
};
|
|
118
|
-
protoOf(Buffer).
|
|
118
|
+
protoOf(Buffer).v2r = function (byteCount) {
|
|
119
119
|
// Inline function 'kotlin.require' call
|
|
120
120
|
if (!(byteCount >= 0n)) {
|
|
121
121
|
var message = 'byteCount: ' + byteCount.toString();
|
|
@@ -125,7 +125,7 @@ protoOf(Buffer).r2r = function (byteCount) {
|
|
|
125
125
|
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + this.g1().toString() + ', required: ' + byteCount.toString() + ')');
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
|
-
protoOf(Buffer).
|
|
128
|
+
protoOf(Buffer).w2r = function (byteCount) {
|
|
129
129
|
// Inline function 'kotlin.require' call
|
|
130
130
|
if (!(byteCount >= 0n)) {
|
|
131
131
|
var message = 'byteCount: ' + byteCount.toString() + ' < 0';
|
|
@@ -133,8 +133,8 @@ protoOf(Buffer).s2r = function (byteCount) {
|
|
|
133
133
|
}
|
|
134
134
|
return this.g1() >= byteCount;
|
|
135
135
|
};
|
|
136
|
-
protoOf(Buffer).
|
|
137
|
-
var tmp0_elvis_lhs = this.
|
|
136
|
+
protoOf(Buffer).x2r = function () {
|
|
137
|
+
var tmp0_elvis_lhs = this.q2r_1;
|
|
138
138
|
var tmp;
|
|
139
139
|
if (tmp0_elvis_lhs == null) {
|
|
140
140
|
throwEof(this, 1n);
|
|
@@ -144,18 +144,18 @@ protoOf(Buffer).t2r = function () {
|
|
|
144
144
|
var segment = tmp;
|
|
145
145
|
var segmentSize = segment.g1();
|
|
146
146
|
if (segmentSize === 0) {
|
|
147
|
-
this.
|
|
148
|
-
return this.
|
|
147
|
+
this.f2s();
|
|
148
|
+
return this.x2r();
|
|
149
149
|
}
|
|
150
|
-
var v = segment.
|
|
151
|
-
this.
|
|
150
|
+
var v = segment.g2s();
|
|
151
|
+
this.s2r_1 = subtract(this.s2r_1, 1n);
|
|
152
152
|
if (segmentSize === 1) {
|
|
153
|
-
this.
|
|
153
|
+
this.f2s();
|
|
154
154
|
}
|
|
155
155
|
return v;
|
|
156
156
|
};
|
|
157
|
-
protoOf(Buffer).
|
|
158
|
-
var tmp0_elvis_lhs = this.
|
|
157
|
+
protoOf(Buffer).h2s = function () {
|
|
158
|
+
var tmp0_elvis_lhs = this.q2r_1;
|
|
159
159
|
var tmp;
|
|
160
160
|
if (tmp0_elvis_lhs == null) {
|
|
161
161
|
throwEof(this, 2n);
|
|
@@ -165,121 +165,121 @@ protoOf(Buffer).d2s = function () {
|
|
|
165
165
|
var segment = tmp;
|
|
166
166
|
var segmentSize = segment.g1();
|
|
167
167
|
if (segmentSize < 2) {
|
|
168
|
-
this.
|
|
168
|
+
this.v2r(2n);
|
|
169
169
|
if (segmentSize === 0) {
|
|
170
|
-
this.
|
|
171
|
-
return this.
|
|
170
|
+
this.f2s();
|
|
171
|
+
return this.h2s();
|
|
172
172
|
}
|
|
173
173
|
// Inline function 'kotlinx.io.and' call
|
|
174
|
-
var tmp_0 = (this.
|
|
174
|
+
var tmp_0 = (this.x2r() & 255) << 8;
|
|
175
175
|
// Inline function 'kotlinx.io.and' call
|
|
176
|
-
var tmp$ret$1 = this.
|
|
176
|
+
var tmp$ret$1 = this.x2r() & 255;
|
|
177
177
|
return toShort(tmp_0 | tmp$ret$1);
|
|
178
178
|
}
|
|
179
|
-
var v = segment.
|
|
180
|
-
this.
|
|
179
|
+
var v = segment.i2s();
|
|
180
|
+
this.s2r_1 = subtract(this.s2r_1, 2n);
|
|
181
181
|
if (segmentSize === 2) {
|
|
182
|
-
this.
|
|
182
|
+
this.f2s();
|
|
183
183
|
}
|
|
184
184
|
return v;
|
|
185
185
|
};
|
|
186
|
-
protoOf(Buffer).
|
|
186
|
+
protoOf(Buffer).j2s = function () {
|
|
187
187
|
return Unit_instance;
|
|
188
188
|
};
|
|
189
|
-
protoOf(Buffer).
|
|
189
|
+
protoOf(Buffer).k2s = function (out, startIndex, endIndex) {
|
|
190
190
|
checkBounds(this.g1(), startIndex, endIndex);
|
|
191
191
|
if (startIndex === endIndex)
|
|
192
192
|
return Unit_instance;
|
|
193
193
|
var currentOffset = startIndex;
|
|
194
194
|
var remainingByteCount = subtract(endIndex, startIndex);
|
|
195
|
-
out.
|
|
196
|
-
var s = this.
|
|
197
|
-
while (currentOffset >= fromInt(ensureNotNull(s).
|
|
198
|
-
currentOffset = subtract(currentOffset, fromInt(s.
|
|
199
|
-
s = s.
|
|
195
|
+
out.s2r_1 = add(out.s2r_1, remainingByteCount);
|
|
196
|
+
var s = this.q2r_1;
|
|
197
|
+
while (currentOffset >= fromInt(ensureNotNull(s).a2s_1 - s.z2r_1 | 0)) {
|
|
198
|
+
currentOffset = subtract(currentOffset, fromInt(s.a2s_1 - s.z2r_1 | 0));
|
|
199
|
+
s = s.d2s_1;
|
|
200
200
|
}
|
|
201
201
|
while (remainingByteCount > 0n) {
|
|
202
|
-
var copy = ensureNotNull(s).
|
|
203
|
-
copy.
|
|
202
|
+
var copy = ensureNotNull(s).l2s();
|
|
203
|
+
copy.z2r_1 = copy.z2r_1 + convertToInt(currentOffset) | 0;
|
|
204
204
|
var tmp = copy;
|
|
205
|
-
var tmp0 = copy.
|
|
205
|
+
var tmp0 = copy.z2r_1 + convertToInt(remainingByteCount) | 0;
|
|
206
206
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
207
|
-
var b = copy.
|
|
208
|
-
tmp.
|
|
207
|
+
var b = copy.a2s_1;
|
|
208
|
+
tmp.a2s_1 = Math.min(tmp0, b);
|
|
209
209
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
210
|
-
if (out.
|
|
211
|
-
out.
|
|
212
|
-
out.
|
|
210
|
+
if (out.q2r_1 == null) {
|
|
211
|
+
out.q2r_1 = copy;
|
|
212
|
+
out.r2r_1 = copy;
|
|
213
213
|
} else if (false) {
|
|
214
|
-
out.
|
|
215
|
-
if (ensureNotNull(out.
|
|
216
|
-
out.
|
|
214
|
+
out.r2r_1 = ensureNotNull(out.r2r_1).m2s(copy).n2s();
|
|
215
|
+
if (ensureNotNull(out.r2r_1).e2s_1 == null) {
|
|
216
|
+
out.q2r_1 = out.r2r_1;
|
|
217
217
|
}
|
|
218
218
|
} else {
|
|
219
|
-
out.
|
|
219
|
+
out.r2r_1 = ensureNotNull(out.r2r_1).m2s(copy);
|
|
220
220
|
}
|
|
221
|
-
remainingByteCount = subtract(remainingByteCount, fromInt(copy.
|
|
221
|
+
remainingByteCount = subtract(remainingByteCount, fromInt(copy.a2s_1 - copy.z2r_1 | 0));
|
|
222
222
|
currentOffset = 0n;
|
|
223
|
-
s = s.
|
|
223
|
+
s = s.d2s_1;
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
|
-
protoOf(Buffer).
|
|
226
|
+
protoOf(Buffer).o2s = function () {
|
|
227
227
|
var result = this.g1();
|
|
228
228
|
if (result === 0n)
|
|
229
229
|
return 0n;
|
|
230
|
-
var tail = ensureNotNull(this.
|
|
231
|
-
if (tail.
|
|
232
|
-
result = subtract(result, fromInt(tail.
|
|
230
|
+
var tail = ensureNotNull(this.r2r_1);
|
|
231
|
+
if (tail.a2s_1 < 8192 && tail.c2s_1) {
|
|
232
|
+
result = subtract(result, fromInt(tail.a2s_1 - tail.z2r_1 | 0));
|
|
233
233
|
}
|
|
234
234
|
return result;
|
|
235
235
|
};
|
|
236
|
-
protoOf(Buffer).
|
|
236
|
+
protoOf(Buffer).p2s = function (position) {
|
|
237
237
|
if (position < 0n || position >= this.g1()) {
|
|
238
238
|
throw IndexOutOfBoundsException_init_$Create$('position (' + position.toString() + ') is not within the range [0..size(' + this.g1().toString() + '))');
|
|
239
239
|
}
|
|
240
240
|
if (position === 0n) {
|
|
241
|
-
return ensureNotNull(this.
|
|
241
|
+
return ensureNotNull(this.q2r_1).q2s(0);
|
|
242
242
|
}
|
|
243
243
|
$l$block_1: {
|
|
244
244
|
// Inline function 'kotlinx.io.seek' call
|
|
245
|
-
if (this.
|
|
246
|
-
return ensureNotNull(null).
|
|
245
|
+
if (this.q2r_1 == null) {
|
|
246
|
+
return ensureNotNull(null).q2s(convertToInt(subtract(position, -1n)));
|
|
247
247
|
}
|
|
248
248
|
if (subtract(this.g1(), position) < position) {
|
|
249
|
-
var s = this.
|
|
249
|
+
var s = this.r2r_1;
|
|
250
250
|
var offset = this.g1();
|
|
251
251
|
$l$loop: while (!(s == null) && offset > position) {
|
|
252
|
-
offset = subtract(offset, fromInt(s.
|
|
252
|
+
offset = subtract(offset, fromInt(s.a2s_1 - s.z2r_1 | 0));
|
|
253
253
|
if (offset <= position)
|
|
254
254
|
break $l$loop;
|
|
255
|
-
s = s.
|
|
255
|
+
s = s.e2s_1;
|
|
256
256
|
}
|
|
257
257
|
var tmp0 = s;
|
|
258
258
|
var offset_0 = offset;
|
|
259
|
-
return ensureNotNull(tmp0).
|
|
259
|
+
return ensureNotNull(tmp0).q2s(convertToInt(subtract(position, offset_0)));
|
|
260
260
|
} else {
|
|
261
|
-
var s_0 = this.
|
|
261
|
+
var s_0 = this.q2r_1;
|
|
262
262
|
var offset_1 = 0n;
|
|
263
263
|
$l$loop_0: while (!(s_0 == null)) {
|
|
264
264
|
var tmp0_0 = offset_1;
|
|
265
265
|
// Inline function 'kotlin.Long.plus' call
|
|
266
|
-
var other = s_0.
|
|
266
|
+
var other = s_0.a2s_1 - s_0.z2r_1 | 0;
|
|
267
267
|
var nextOffset = add(tmp0_0, fromInt(other));
|
|
268
268
|
if (nextOffset > position)
|
|
269
269
|
break $l$loop_0;
|
|
270
|
-
s_0 = s_0.
|
|
270
|
+
s_0 = s_0.d2s_1;
|
|
271
271
|
offset_1 = nextOffset;
|
|
272
272
|
}
|
|
273
273
|
var tmp0_1 = s_0;
|
|
274
274
|
var offset_2 = offset_1;
|
|
275
|
-
return ensureNotNull(tmp0_1).
|
|
275
|
+
return ensureNotNull(tmp0_1).q2s(convertToInt(subtract(position, offset_2)));
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
279
|
protoOf(Buffer).f3 = function () {
|
|
280
|
-
return this.
|
|
280
|
+
return this.r2s(this.g1());
|
|
281
281
|
};
|
|
282
|
-
protoOf(Buffer).
|
|
282
|
+
protoOf(Buffer).r2s = function (byteCount) {
|
|
283
283
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
284
284
|
// Inline function 'kotlin.require' call
|
|
285
285
|
if (!(byteCount >= 0n)) {
|
|
@@ -288,7 +288,7 @@ protoOf(Buffer).n2s = function (byteCount) {
|
|
|
288
288
|
}
|
|
289
289
|
var remainingByteCount = byteCount;
|
|
290
290
|
while (remainingByteCount > 0n) {
|
|
291
|
-
var tmp0_elvis_lhs = this.
|
|
291
|
+
var tmp0_elvis_lhs = this.q2r_1;
|
|
292
292
|
var tmp;
|
|
293
293
|
if (tmp0_elvis_lhs == null) {
|
|
294
294
|
throw EOFException_init_$Create$_0('Buffer exhausted before skipping ' + byteCount.toString() + ' bytes.');
|
|
@@ -298,24 +298,24 @@ protoOf(Buffer).n2s = function (byteCount) {
|
|
|
298
298
|
var head = tmp;
|
|
299
299
|
var tmp0 = remainingByteCount;
|
|
300
300
|
// Inline function 'kotlinx.io.minOf' call
|
|
301
|
-
var b = head.
|
|
301
|
+
var b = head.a2s_1 - head.z2r_1 | 0;
|
|
302
302
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
303
303
|
var b_0 = fromInt(b);
|
|
304
304
|
var tmp$ret$3 = tmp0 <= b_0 ? tmp0 : b_0;
|
|
305
305
|
var toSkip = convertToInt(tmp$ret$3);
|
|
306
|
-
this.
|
|
306
|
+
this.s2r_1 = subtract(this.s2r_1, fromInt(toSkip));
|
|
307
307
|
remainingByteCount = subtract(remainingByteCount, fromInt(toSkip));
|
|
308
|
-
head.
|
|
309
|
-
if (head.
|
|
310
|
-
this.
|
|
308
|
+
head.z2r_1 = head.z2r_1 + toSkip | 0;
|
|
309
|
+
if (head.z2r_1 === head.a2s_1) {
|
|
310
|
+
this.f2s();
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
};
|
|
314
|
-
protoOf(Buffer).
|
|
314
|
+
protoOf(Buffer).s2s = function (sink, startIndex, endIndex) {
|
|
315
315
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
316
316
|
var size = sink.length;
|
|
317
317
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
318
|
-
var tmp0_elvis_lhs = this.
|
|
318
|
+
var tmp0_elvis_lhs = this.q2r_1;
|
|
319
319
|
var tmp;
|
|
320
320
|
if (tmp0_elvis_lhs == null) {
|
|
321
321
|
return -1;
|
|
@@ -327,14 +327,14 @@ protoOf(Buffer).o2s = function (sink, startIndex, endIndex) {
|
|
|
327
327
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
328
328
|
var b = s.g1();
|
|
329
329
|
var toCopy = Math.min(tmp0, b);
|
|
330
|
-
s.
|
|
331
|
-
this.
|
|
330
|
+
s.t2s(sink, startIndex, startIndex + toCopy | 0);
|
|
331
|
+
this.s2r_1 = subtract(this.s2r_1, fromInt(toCopy));
|
|
332
332
|
if (isEmpty(s)) {
|
|
333
|
-
this.
|
|
333
|
+
this.f2s();
|
|
334
334
|
}
|
|
335
335
|
return toCopy;
|
|
336
336
|
};
|
|
337
|
-
protoOf(Buffer).
|
|
337
|
+
protoOf(Buffer).u2s = function (sink, byteCount) {
|
|
338
338
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
339
339
|
// Inline function 'kotlin.require' call
|
|
340
340
|
if (!(byteCount >= 0n)) {
|
|
@@ -344,10 +344,10 @@ protoOf(Buffer).q2s = function (sink, byteCount) {
|
|
|
344
344
|
if (this.g1() === 0n)
|
|
345
345
|
return -1n;
|
|
346
346
|
var bytesWritten = byteCount > this.g1() ? this.g1() : byteCount;
|
|
347
|
-
sink.
|
|
347
|
+
sink.v2s(this, bytesWritten);
|
|
348
348
|
return bytesWritten;
|
|
349
349
|
};
|
|
350
|
-
protoOf(Buffer).
|
|
350
|
+
protoOf(Buffer).w2s = function (sink, byteCount) {
|
|
351
351
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
352
352
|
// Inline function 'kotlin.require' call
|
|
353
353
|
if (!(byteCount >= 0n)) {
|
|
@@ -355,62 +355,62 @@ protoOf(Buffer).s2s = function (sink, byteCount) {
|
|
|
355
355
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
356
356
|
}
|
|
357
357
|
if (this.g1() < byteCount) {
|
|
358
|
-
sink.
|
|
358
|
+
sink.v2s(this, this.g1());
|
|
359
359
|
throw EOFException_init_$Create$_0('Buffer exhausted before writing ' + byteCount.toString() + ' bytes. Only ' + this.g1().toString() + ' bytes were written.');
|
|
360
360
|
}
|
|
361
|
-
sink.
|
|
361
|
+
sink.v2s(this, byteCount);
|
|
362
362
|
};
|
|
363
|
-
protoOf(Buffer).
|
|
363
|
+
protoOf(Buffer).x2s = function (sink) {
|
|
364
364
|
var byteCount = this.g1();
|
|
365
365
|
if (byteCount > 0n) {
|
|
366
|
-
sink.
|
|
366
|
+
sink.v2s(this, byteCount);
|
|
367
367
|
}
|
|
368
368
|
return byteCount;
|
|
369
369
|
};
|
|
370
|
-
protoOf(Buffer).
|
|
370
|
+
protoOf(Buffer).y2s = function () {
|
|
371
371
|
return buffered(new PeekSource(this));
|
|
372
372
|
};
|
|
373
|
-
protoOf(Buffer).
|
|
373
|
+
protoOf(Buffer).z2s = function (minimumCapacity) {
|
|
374
374
|
// Inline function 'kotlin.require' call
|
|
375
375
|
if (!(minimumCapacity >= 1 && minimumCapacity <= 8192)) {
|
|
376
376
|
var message = 'unexpected capacity (' + minimumCapacity + '), should be in range [1, 8192]';
|
|
377
377
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
378
378
|
}
|
|
379
|
-
if (this.
|
|
380
|
-
var result = SegmentPool_instance.
|
|
381
|
-
this.
|
|
382
|
-
this.
|
|
379
|
+
if (this.r2r_1 == null) {
|
|
380
|
+
var result = SegmentPool_instance.c2t();
|
|
381
|
+
this.q2r_1 = result;
|
|
382
|
+
this.r2r_1 = result;
|
|
383
383
|
return result;
|
|
384
384
|
}
|
|
385
|
-
var t = ensureNotNull(this.
|
|
386
|
-
if ((t.
|
|
387
|
-
var newTail = t.
|
|
388
|
-
this.
|
|
385
|
+
var t = ensureNotNull(this.r2r_1);
|
|
386
|
+
if ((t.a2s_1 + minimumCapacity | 0) > 8192 || !t.c2s_1) {
|
|
387
|
+
var newTail = t.m2s(SegmentPool_instance.c2t());
|
|
388
|
+
this.r2r_1 = newTail;
|
|
389
389
|
return newTail;
|
|
390
390
|
}
|
|
391
391
|
return t;
|
|
392
392
|
};
|
|
393
|
-
protoOf(Buffer).
|
|
393
|
+
protoOf(Buffer).d2t = function (source, startIndex, endIndex) {
|
|
394
394
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
395
395
|
var size = source.length;
|
|
396
396
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
397
397
|
var currentOffset = startIndex;
|
|
398
398
|
while (currentOffset < endIndex) {
|
|
399
|
-
var tail = this.
|
|
399
|
+
var tail = this.z2s(1);
|
|
400
400
|
var tmp0 = endIndex - currentOffset | 0;
|
|
401
401
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
402
|
-
var b = tail.
|
|
402
|
+
var b = tail.e2t();
|
|
403
403
|
var toCopy = Math.min(tmp0, b);
|
|
404
|
-
tail.
|
|
404
|
+
tail.f2t(source, currentOffset, currentOffset + toCopy | 0);
|
|
405
405
|
currentOffset = currentOffset + toCopy | 0;
|
|
406
406
|
}
|
|
407
407
|
var tmp = this;
|
|
408
|
-
var tmp0_0 = this.
|
|
408
|
+
var tmp0_0 = this.s2r_1;
|
|
409
409
|
// Inline function 'kotlin.Long.plus' call
|
|
410
410
|
var other = endIndex - startIndex | 0;
|
|
411
|
-
tmp.
|
|
411
|
+
tmp.s2r_1 = add(tmp0_0, fromInt(other));
|
|
412
412
|
};
|
|
413
|
-
protoOf(Buffer).
|
|
413
|
+
protoOf(Buffer).h2t = function (source, byteCount) {
|
|
414
414
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
415
415
|
// Inline function 'kotlin.require' call
|
|
416
416
|
if (!(byteCount >= 0n)) {
|
|
@@ -419,85 +419,85 @@ protoOf(Buffer).d2t = function (source, byteCount) {
|
|
|
419
419
|
}
|
|
420
420
|
var remainingByteCount = byteCount;
|
|
421
421
|
while (remainingByteCount > 0n) {
|
|
422
|
-
var read = source.
|
|
422
|
+
var read = source.u2s(this, remainingByteCount);
|
|
423
423
|
if (read === -1n) {
|
|
424
424
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + byteCount.toString() + ' bytes. ' + ('Only ' + subtract(byteCount, remainingByteCount).toString() + ' were read.'));
|
|
425
425
|
}
|
|
426
426
|
remainingByteCount = subtract(remainingByteCount, read);
|
|
427
427
|
}
|
|
428
428
|
};
|
|
429
|
-
protoOf(Buffer).
|
|
429
|
+
protoOf(Buffer).v2s = function (source, byteCount) {
|
|
430
430
|
// Inline function 'kotlin.require' call
|
|
431
431
|
if (!!(source === this)) {
|
|
432
432
|
var message = 'source == this';
|
|
433
433
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
434
434
|
}
|
|
435
|
-
checkOffsetAndCount(source.
|
|
435
|
+
checkOffsetAndCount(source.s2r_1, 0n, byteCount);
|
|
436
436
|
var remainingByteCount = byteCount;
|
|
437
437
|
while (remainingByteCount > 0n) {
|
|
438
|
-
if (remainingByteCount < fromInt(ensureNotNull(source.
|
|
439
|
-
var tail = this.
|
|
438
|
+
if (remainingByteCount < fromInt(ensureNotNull(source.q2r_1).g1())) {
|
|
439
|
+
var tail = this.r2r_1;
|
|
440
440
|
var tmp;
|
|
441
|
-
if (!(tail == null) && tail.
|
|
441
|
+
if (!(tail == null) && tail.c2s_1) {
|
|
442
442
|
var tmp0 = remainingByteCount;
|
|
443
443
|
// Inline function 'kotlin.Long.plus' call
|
|
444
|
-
var other = tail.
|
|
444
|
+
var other = tail.a2s_1;
|
|
445
445
|
var tmp0_0 = add(tmp0, fromInt(other));
|
|
446
446
|
// Inline function 'kotlin.Long.minus' call
|
|
447
|
-
var other_0 = tail.
|
|
447
|
+
var other_0 = tail.i2t() ? 0 : tail.z2r_1;
|
|
448
448
|
tmp = subtract(tmp0_0, fromInt(other_0)) <= 8192n;
|
|
449
449
|
} else {
|
|
450
450
|
tmp = false;
|
|
451
451
|
}
|
|
452
452
|
if (tmp) {
|
|
453
|
-
ensureNotNull(source.
|
|
454
|
-
source.
|
|
455
|
-
this.
|
|
453
|
+
ensureNotNull(source.q2r_1).k2t(tail, convertToInt(remainingByteCount));
|
|
454
|
+
source.s2r_1 = subtract(source.s2r_1, remainingByteCount);
|
|
455
|
+
this.s2r_1 = add(this.s2r_1, remainingByteCount);
|
|
456
456
|
return Unit_instance;
|
|
457
457
|
} else {
|
|
458
|
-
source.
|
|
458
|
+
source.q2r_1 = ensureNotNull(source.q2r_1).j2t(convertToInt(remainingByteCount));
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var segmentToMove = ensureNotNull(source.
|
|
461
|
+
var segmentToMove = ensureNotNull(source.q2r_1);
|
|
462
462
|
var movedByteCount = fromInt(segmentToMove.g1());
|
|
463
|
-
source.
|
|
464
|
-
if (source.
|
|
465
|
-
source.
|
|
463
|
+
source.q2r_1 = segmentToMove.l2t();
|
|
464
|
+
if (source.q2r_1 == null) {
|
|
465
|
+
source.r2r_1 = null;
|
|
466
466
|
}
|
|
467
467
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
468
|
-
if (this.
|
|
469
|
-
this.
|
|
470
|
-
this.
|
|
468
|
+
if (this.q2r_1 == null) {
|
|
469
|
+
this.q2r_1 = segmentToMove;
|
|
470
|
+
this.r2r_1 = segmentToMove;
|
|
471
471
|
} else if (true) {
|
|
472
|
-
this.
|
|
473
|
-
if (ensureNotNull(this.
|
|
474
|
-
this.
|
|
472
|
+
this.r2r_1 = ensureNotNull(this.r2r_1).m2s(segmentToMove).n2s();
|
|
473
|
+
if (ensureNotNull(this.r2r_1).e2s_1 == null) {
|
|
474
|
+
this.q2r_1 = this.r2r_1;
|
|
475
475
|
}
|
|
476
476
|
} else {
|
|
477
|
-
this.
|
|
477
|
+
this.r2r_1 = ensureNotNull(this.r2r_1).m2s(segmentToMove);
|
|
478
478
|
}
|
|
479
|
-
source.
|
|
480
|
-
this.
|
|
479
|
+
source.s2r_1 = subtract(source.s2r_1, movedByteCount);
|
|
480
|
+
this.s2r_1 = add(this.s2r_1, movedByteCount);
|
|
481
481
|
remainingByteCount = subtract(remainingByteCount, movedByteCount);
|
|
482
482
|
}
|
|
483
483
|
};
|
|
484
|
-
protoOf(Buffer).
|
|
484
|
+
protoOf(Buffer).m2t = function (source) {
|
|
485
485
|
var totalBytesRead = 0n;
|
|
486
486
|
$l$loop: while (true) {
|
|
487
|
-
var readCount = source.
|
|
487
|
+
var readCount = source.u2s(this, 8192n);
|
|
488
488
|
if (readCount === -1n)
|
|
489
489
|
break $l$loop;
|
|
490
490
|
totalBytesRead = add(totalBytesRead, readCount);
|
|
491
491
|
}
|
|
492
492
|
return totalBytesRead;
|
|
493
493
|
};
|
|
494
|
-
protoOf(Buffer).
|
|
495
|
-
this.
|
|
496
|
-
this.
|
|
494
|
+
protoOf(Buffer).n2t = function (byte) {
|
|
495
|
+
this.z2s(1).o2t(byte);
|
|
496
|
+
this.s2r_1 = add(this.s2r_1, 1n);
|
|
497
497
|
};
|
|
498
|
-
protoOf(Buffer).
|
|
499
|
-
this.
|
|
500
|
-
this.
|
|
498
|
+
protoOf(Buffer).p2t = function (short) {
|
|
499
|
+
this.z2s(2).q2t(short);
|
|
500
|
+
this.s2r_1 = add(this.s2r_1, 2n);
|
|
501
501
|
};
|
|
502
502
|
protoOf(Buffer).c5 = function () {
|
|
503
503
|
return Unit_instance;
|
|
@@ -515,7 +515,7 @@ protoOf(Buffer).toString = function () {
|
|
|
515
515
|
var builder = StringBuilder_init_$Create$(imul(len, 2) + (this.g1() > fromInt(maxPrintableBytes) ? 1 : 0) | 0);
|
|
516
516
|
var bytesWritten = 0;
|
|
517
517
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
518
|
-
var curr = this.
|
|
518
|
+
var curr = this.q2r_1;
|
|
519
519
|
while (!(curr == null)) {
|
|
520
520
|
var tmp0 = get_SegmentReadContextImpl();
|
|
521
521
|
var segment = curr;
|
|
@@ -523,7 +523,7 @@ protoOf(Buffer).toString = function () {
|
|
|
523
523
|
while (bytesWritten < len && idx < segment.g1()) {
|
|
524
524
|
var _unary__edvuaz = idx;
|
|
525
525
|
idx = _unary__edvuaz + 1 | 0;
|
|
526
|
-
var b_0 = tmp0.
|
|
526
|
+
var b_0 = tmp0.r2t(segment, _unary__edvuaz);
|
|
527
527
|
bytesWritten = bytesWritten + 1 | 0;
|
|
528
528
|
var tmp = get_HEX_DIGIT_CHARS();
|
|
529
529
|
// Inline function 'kotlinx.io.shr' call
|
|
@@ -534,36 +534,36 @@ protoOf(Buffer).toString = function () {
|
|
|
534
534
|
var tmp$ret$5 = b_0 & 15;
|
|
535
535
|
tmp_0.s(tmp_1[tmp$ret$5]);
|
|
536
536
|
}
|
|
537
|
-
curr = curr.
|
|
537
|
+
curr = curr.d2s_1;
|
|
538
538
|
}
|
|
539
539
|
if (this.g1() > fromInt(maxPrintableBytes)) {
|
|
540
540
|
builder.s(_Char___init__impl__6a9atx(8230));
|
|
541
541
|
}
|
|
542
542
|
return 'Buffer(size=' + this.g1().toString() + ' hex=' + builder.toString() + ')';
|
|
543
543
|
};
|
|
544
|
-
protoOf(Buffer).
|
|
545
|
-
var oldHead = ensureNotNull(this.
|
|
546
|
-
var nextHead = oldHead.
|
|
547
|
-
this.
|
|
544
|
+
protoOf(Buffer).f2s = function () {
|
|
545
|
+
var oldHead = ensureNotNull(this.q2r_1);
|
|
546
|
+
var nextHead = oldHead.d2s_1;
|
|
547
|
+
this.q2r_1 = nextHead;
|
|
548
548
|
if (nextHead == null) {
|
|
549
|
-
this.
|
|
549
|
+
this.r2r_1 = null;
|
|
550
550
|
} else {
|
|
551
|
-
nextHead.
|
|
551
|
+
nextHead.e2s_1 = null;
|
|
552
552
|
}
|
|
553
|
-
oldHead.
|
|
554
|
-
SegmentPool_instance.
|
|
553
|
+
oldHead.d2s_1 = null;
|
|
554
|
+
SegmentPool_instance.s2t(oldHead);
|
|
555
555
|
};
|
|
556
|
-
protoOf(Buffer).
|
|
557
|
-
var oldTail = ensureNotNull(this.
|
|
558
|
-
var newTail = oldTail.
|
|
559
|
-
this.
|
|
556
|
+
protoOf(Buffer).t2t = function () {
|
|
557
|
+
var oldTail = ensureNotNull(this.r2r_1);
|
|
558
|
+
var newTail = oldTail.e2s_1;
|
|
559
|
+
this.r2r_1 = newTail;
|
|
560
560
|
if (newTail == null) {
|
|
561
|
-
this.
|
|
561
|
+
this.q2r_1 = null;
|
|
562
562
|
} else {
|
|
563
|
-
newTail.
|
|
563
|
+
newTail.d2s_1 = null;
|
|
564
564
|
}
|
|
565
|
-
oldTail.
|
|
566
|
-
SegmentPool_instance.
|
|
565
|
+
oldTail.e2s_1 = null;
|
|
566
|
+
SegmentPool_instance.s2t(oldTail);
|
|
567
567
|
};
|
|
568
568
|
function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
569
569
|
startIndex = startIndex === VOID ? 0n : startIndex;
|
|
@@ -576,7 +576,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
576
576
|
return -1n;
|
|
577
577
|
$l$block_1: {
|
|
578
578
|
// Inline function 'kotlinx.io.seek' call
|
|
579
|
-
if (_this__u8e3s4.
|
|
579
|
+
if (_this__u8e3s4.q2r_1 == null) {
|
|
580
580
|
if (-1n === -1n) {
|
|
581
581
|
return -1n;
|
|
582
582
|
}
|
|
@@ -604,19 +604,19 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
604
604
|
// Inline function 'kotlin.Long.plus' call
|
|
605
605
|
var other = segment.g1();
|
|
606
606
|
offset = add(tmp0_0, fromInt(other));
|
|
607
|
-
segment = segment.
|
|
607
|
+
segment = segment.d2s_1;
|
|
608
608
|
}
|
|
609
609
|
while (!(segment == null) && offset < endOffset);
|
|
610
610
|
return -1n;
|
|
611
611
|
}
|
|
612
612
|
if (subtract(_this__u8e3s4.g1(), startIndex) < startIndex) {
|
|
613
|
-
var s = _this__u8e3s4.
|
|
613
|
+
var s = _this__u8e3s4.r2r_1;
|
|
614
614
|
var offset_0 = _this__u8e3s4.g1();
|
|
615
615
|
$l$loop: while (!(s == null) && offset_0 > startIndex) {
|
|
616
|
-
offset_0 = subtract(offset_0, fromInt(s.
|
|
616
|
+
offset_0 = subtract(offset_0, fromInt(s.a2s_1 - s.z2r_1 | 0));
|
|
617
617
|
if (offset_0 <= startIndex)
|
|
618
618
|
break $l$loop;
|
|
619
|
-
s = s.
|
|
619
|
+
s = s.e2s_1;
|
|
620
620
|
}
|
|
621
621
|
var tmp0_1 = s;
|
|
622
622
|
var o = offset_0;
|
|
@@ -647,21 +647,21 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
647
647
|
// Inline function 'kotlin.Long.plus' call
|
|
648
648
|
var other_0 = segment_0.g1();
|
|
649
649
|
offset_1 = add(tmp0_3, fromInt(other_0));
|
|
650
|
-
segment_0 = segment_0.
|
|
650
|
+
segment_0 = segment_0.d2s_1;
|
|
651
651
|
}
|
|
652
652
|
while (!(segment_0 == null) && offset_1 < endOffset);
|
|
653
653
|
return -1n;
|
|
654
654
|
} else {
|
|
655
|
-
var s_0 = _this__u8e3s4.
|
|
655
|
+
var s_0 = _this__u8e3s4.q2r_1;
|
|
656
656
|
var offset_2 = 0n;
|
|
657
657
|
$l$loop_0: while (!(s_0 == null)) {
|
|
658
658
|
var tmp0_4 = offset_2;
|
|
659
659
|
// Inline function 'kotlin.Long.plus' call
|
|
660
|
-
var other_1 = s_0.
|
|
660
|
+
var other_1 = s_0.a2s_1 - s_0.z2r_1 | 0;
|
|
661
661
|
var nextOffset = add(tmp0_4, fromInt(other_1));
|
|
662
662
|
if (nextOffset > startIndex)
|
|
663
663
|
break $l$loop_0;
|
|
664
|
-
s_0 = s_0.
|
|
664
|
+
s_0 = s_0.d2s_1;
|
|
665
665
|
offset_2 = nextOffset;
|
|
666
666
|
}
|
|
667
667
|
var tmp0_5 = s_0;
|
|
@@ -693,7 +693,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
693
693
|
// Inline function 'kotlin.Long.plus' call
|
|
694
694
|
var other_2 = segment_1.g1();
|
|
695
695
|
offset_3 = add(tmp0_7, fromInt(other_2));
|
|
696
|
-
segment_1 = segment_1.
|
|
696
|
+
segment_1 = segment_1.d2s_1;
|
|
697
697
|
}
|
|
698
698
|
while (!(segment_1 == null) && offset_3 < endOffset);
|
|
699
699
|
return -1n;
|
|
@@ -701,25 +701,25 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
703
|
function readByteString(_this__u8e3s4, byteCount) {
|
|
704
|
-
return UnsafeByteStringOperations_instance.
|
|
704
|
+
return UnsafeByteStringOperations_instance.p2r(readByteArray_0(_this__u8e3s4, byteCount));
|
|
705
705
|
}
|
|
706
706
|
function buffered(_this__u8e3s4) {
|
|
707
707
|
return new RealSource(_this__u8e3s4);
|
|
708
708
|
}
|
|
709
709
|
function PeekSource(upstream) {
|
|
710
|
-
this.
|
|
711
|
-
this.
|
|
712
|
-
this.
|
|
710
|
+
this.u2t_1 = upstream;
|
|
711
|
+
this.v2t_1 = this.u2t_1.t2r();
|
|
712
|
+
this.w2t_1 = this.v2t_1.q2r_1;
|
|
713
713
|
var tmp = this;
|
|
714
|
-
var tmp0_safe_receiver = this.
|
|
715
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
716
|
-
tmp.
|
|
717
|
-
this.
|
|
718
|
-
this.
|
|
714
|
+
var tmp0_safe_receiver = this.v2t_1.q2r_1;
|
|
715
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z2r_1;
|
|
716
|
+
tmp.x2t_1 = tmp1_elvis_lhs == null ? -1 : tmp1_elvis_lhs;
|
|
717
|
+
this.y2t_1 = false;
|
|
718
|
+
this.z2t_1 = 0n;
|
|
719
719
|
}
|
|
720
|
-
protoOf(PeekSource).
|
|
720
|
+
protoOf(PeekSource).u2s = function (sink, byteCount) {
|
|
721
721
|
// Inline function 'kotlin.check' call
|
|
722
|
-
if (!!this.
|
|
722
|
+
if (!!this.y2t_1) {
|
|
723
723
|
var message = 'Source is closed.';
|
|
724
724
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
725
725
|
}
|
|
@@ -730,43 +730,43 @@ protoOf(PeekSource).q2s = function (sink, byteCount) {
|
|
|
730
730
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
731
731
|
}
|
|
732
732
|
// Inline function 'kotlin.check' call
|
|
733
|
-
if (!(this.
|
|
733
|
+
if (!(this.w2t_1 == null || (this.w2t_1 === this.v2t_1.q2r_1 && this.x2t_1 === ensureNotNull(this.v2t_1.q2r_1).z2r_1))) {
|
|
734
734
|
var message_1 = 'Peek source is invalid because upstream source was used';
|
|
735
735
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
736
736
|
}
|
|
737
737
|
if (byteCount === 0n)
|
|
738
738
|
return 0n;
|
|
739
739
|
// Inline function 'kotlin.Long.plus' call
|
|
740
|
-
var this_0 = this.
|
|
740
|
+
var this_0 = this.z2t_1;
|
|
741
741
|
var tmp$ret$7 = add(this_0, fromInt(1));
|
|
742
|
-
if (!this.
|
|
742
|
+
if (!this.u2t_1.w2r(tmp$ret$7))
|
|
743
743
|
return -1n;
|
|
744
|
-
if (this.
|
|
745
|
-
this.
|
|
746
|
-
this.
|
|
744
|
+
if (this.w2t_1 == null && !(this.v2t_1.q2r_1 == null)) {
|
|
745
|
+
this.w2t_1 = this.v2t_1.q2r_1;
|
|
746
|
+
this.x2t_1 = ensureNotNull(this.v2t_1.q2r_1).z2r_1;
|
|
747
747
|
}
|
|
748
748
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
749
|
-
var b = subtract(this.
|
|
749
|
+
var b = subtract(this.v2t_1.g1(), this.z2t_1);
|
|
750
750
|
var toCopy = byteCount <= b ? byteCount : b;
|
|
751
|
-
this.
|
|
752
|
-
this.
|
|
751
|
+
this.v2t_1.k2s(sink, this.z2t_1, add(this.z2t_1, toCopy));
|
|
752
|
+
this.z2t_1 = add(this.z2t_1, toCopy);
|
|
753
753
|
return toCopy;
|
|
754
754
|
};
|
|
755
755
|
protoOf(PeekSource).c5 = function () {
|
|
756
|
-
this.
|
|
756
|
+
this.y2t_1 = true;
|
|
757
757
|
};
|
|
758
758
|
function RealSource(source) {
|
|
759
|
-
this.
|
|
760
|
-
this.
|
|
761
|
-
this.
|
|
759
|
+
this.a2u_1 = source;
|
|
760
|
+
this.b2u_1 = false;
|
|
761
|
+
this.c2u_1 = new Buffer();
|
|
762
762
|
}
|
|
763
|
-
protoOf(RealSource).
|
|
764
|
-
return this.
|
|
763
|
+
protoOf(RealSource).t2r = function () {
|
|
764
|
+
return this.c2u_1;
|
|
765
765
|
};
|
|
766
|
-
protoOf(RealSource).
|
|
766
|
+
protoOf(RealSource).u2s = function (sink, byteCount) {
|
|
767
767
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
768
768
|
// Inline function 'kotlin.check' call
|
|
769
|
-
if (!!this.
|
|
769
|
+
if (!!this.b2u_1) {
|
|
770
770
|
var message = 'Source is closed.';
|
|
771
771
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
772
772
|
}
|
|
@@ -775,33 +775,33 @@ protoOf(RealSource).q2s = function (sink, byteCount) {
|
|
|
775
775
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
776
776
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
777
777
|
}
|
|
778
|
-
if (this.
|
|
779
|
-
var read = this.
|
|
778
|
+
if (this.c2u_1.g1() === 0n) {
|
|
779
|
+
var read = this.a2u_1.u2s(this.c2u_1, 8192n);
|
|
780
780
|
if (read === -1n)
|
|
781
781
|
return -1n;
|
|
782
782
|
}
|
|
783
783
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
784
|
-
var b = this.
|
|
784
|
+
var b = this.c2u_1.g1();
|
|
785
785
|
var toRead = byteCount <= b ? byteCount : b;
|
|
786
|
-
return this.
|
|
786
|
+
return this.c2u_1.u2s(sink, toRead);
|
|
787
787
|
};
|
|
788
|
-
protoOf(RealSource).
|
|
788
|
+
protoOf(RealSource).u2r = function () {
|
|
789
789
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
790
790
|
// Inline function 'kotlin.check' call
|
|
791
|
-
if (!!this.
|
|
791
|
+
if (!!this.b2u_1) {
|
|
792
792
|
var message = 'Source is closed.';
|
|
793
793
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
794
794
|
}
|
|
795
|
-
return this.
|
|
795
|
+
return this.c2u_1.u2r() && this.a2u_1.u2s(this.c2u_1, 8192n) === -1n;
|
|
796
796
|
};
|
|
797
|
-
protoOf(RealSource).
|
|
798
|
-
if (!this.
|
|
797
|
+
protoOf(RealSource).v2r = function (byteCount) {
|
|
798
|
+
if (!this.w2r(byteCount))
|
|
799
799
|
throw EOFException_init_$Create$_0("Source doesn't contain required number of bytes (" + byteCount.toString() + ').');
|
|
800
800
|
};
|
|
801
|
-
protoOf(RealSource).
|
|
801
|
+
protoOf(RealSource).w2r = function (byteCount) {
|
|
802
802
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
803
803
|
// Inline function 'kotlin.check' call
|
|
804
|
-
if (!!this.
|
|
804
|
+
if (!!this.b2u_1) {
|
|
805
805
|
var message = 'Source is closed.';
|
|
806
806
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
807
807
|
}
|
|
@@ -810,91 +810,91 @@ protoOf(RealSource).s2r = function (byteCount) {
|
|
|
810
810
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
811
811
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
812
812
|
}
|
|
813
|
-
while (this.
|
|
814
|
-
if (this.
|
|
813
|
+
while (this.c2u_1.g1() < byteCount) {
|
|
814
|
+
if (this.a2u_1.u2s(this.c2u_1, 8192n) === -1n)
|
|
815
815
|
return false;
|
|
816
816
|
}
|
|
817
817
|
return true;
|
|
818
818
|
};
|
|
819
|
-
protoOf(RealSource).
|
|
820
|
-
this.
|
|
821
|
-
return this.
|
|
819
|
+
protoOf(RealSource).x2r = function () {
|
|
820
|
+
this.v2r(1n);
|
|
821
|
+
return this.c2u_1.x2r();
|
|
822
822
|
};
|
|
823
|
-
protoOf(RealSource).
|
|
823
|
+
protoOf(RealSource).s2s = function (sink, startIndex, endIndex) {
|
|
824
824
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
825
825
|
var size = sink.length;
|
|
826
826
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
827
|
-
if (this.
|
|
828
|
-
var read = this.
|
|
827
|
+
if (this.c2u_1.g1() === 0n) {
|
|
828
|
+
var read = this.a2u_1.u2s(this.c2u_1, 8192n);
|
|
829
829
|
if (read === -1n)
|
|
830
830
|
return -1;
|
|
831
831
|
}
|
|
832
832
|
var tmp0 = endIndex - startIndex | 0;
|
|
833
833
|
// Inline function 'kotlinx.io.minOf' call
|
|
834
|
-
var b = this.
|
|
834
|
+
var b = this.c2u_1.g1();
|
|
835
835
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
836
836
|
var a = fromInt(tmp0);
|
|
837
837
|
var tmp$ret$1 = a <= b ? a : b;
|
|
838
838
|
var toRead = convertToInt(tmp$ret$1);
|
|
839
|
-
return this.
|
|
839
|
+
return this.c2u_1.s2s(sink, startIndex, startIndex + toRead | 0);
|
|
840
840
|
};
|
|
841
|
-
protoOf(RealSource).
|
|
841
|
+
protoOf(RealSource).w2s = function (sink, byteCount) {
|
|
842
842
|
try {
|
|
843
|
-
this.
|
|
843
|
+
this.v2r(byteCount);
|
|
844
844
|
} catch ($p) {
|
|
845
845
|
if ($p instanceof EOFException) {
|
|
846
846
|
var e = $p;
|
|
847
|
-
sink.
|
|
847
|
+
sink.v2s(this.c2u_1, this.c2u_1.g1());
|
|
848
848
|
throw e;
|
|
849
849
|
} else {
|
|
850
850
|
throw $p;
|
|
851
851
|
}
|
|
852
852
|
}
|
|
853
|
-
this.
|
|
853
|
+
this.c2u_1.w2s(sink, byteCount);
|
|
854
854
|
};
|
|
855
|
-
protoOf(RealSource).
|
|
855
|
+
protoOf(RealSource).x2s = function (sink) {
|
|
856
856
|
var totalBytesWritten = 0n;
|
|
857
|
-
while (!(this.
|
|
858
|
-
var emitByteCount = this.
|
|
857
|
+
while (!(this.a2u_1.u2s(this.c2u_1, 8192n) === -1n)) {
|
|
858
|
+
var emitByteCount = this.c2u_1.o2s();
|
|
859
859
|
if (emitByteCount > 0n) {
|
|
860
860
|
totalBytesWritten = add(totalBytesWritten, emitByteCount);
|
|
861
|
-
sink.
|
|
861
|
+
sink.v2s(this.c2u_1, emitByteCount);
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
|
-
if (this.
|
|
865
|
-
totalBytesWritten = add(totalBytesWritten, this.
|
|
866
|
-
sink.
|
|
864
|
+
if (this.c2u_1.g1() > 0n) {
|
|
865
|
+
totalBytesWritten = add(totalBytesWritten, this.c2u_1.g1());
|
|
866
|
+
sink.v2s(this.c2u_1, this.c2u_1.g1());
|
|
867
867
|
}
|
|
868
868
|
return totalBytesWritten;
|
|
869
869
|
};
|
|
870
|
-
protoOf(RealSource).
|
|
871
|
-
this.
|
|
872
|
-
return this.
|
|
870
|
+
protoOf(RealSource).h2s = function () {
|
|
871
|
+
this.v2r(2n);
|
|
872
|
+
return this.c2u_1.h2s();
|
|
873
873
|
};
|
|
874
|
-
protoOf(RealSource).
|
|
874
|
+
protoOf(RealSource).y2s = function () {
|
|
875
875
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
876
876
|
// Inline function 'kotlin.check' call
|
|
877
|
-
if (!!this.
|
|
877
|
+
if (!!this.b2u_1) {
|
|
878
878
|
var message = 'Source is closed.';
|
|
879
879
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
880
880
|
}
|
|
881
881
|
return buffered(new PeekSource(this));
|
|
882
882
|
};
|
|
883
883
|
protoOf(RealSource).c5 = function () {
|
|
884
|
-
if (this.
|
|
884
|
+
if (this.b2u_1)
|
|
885
885
|
return Unit_instance;
|
|
886
|
-
this.
|
|
887
|
-
this.
|
|
888
|
-
this.
|
|
886
|
+
this.b2u_1 = true;
|
|
887
|
+
this.a2u_1.c5();
|
|
888
|
+
this.c2u_1.f3();
|
|
889
889
|
};
|
|
890
890
|
protoOf(RealSource).toString = function () {
|
|
891
|
-
return 'buffered(' + toString(this.
|
|
891
|
+
return 'buffered(' + toString(this.a2u_1) + ')';
|
|
892
892
|
};
|
|
893
893
|
function Segment_init_$Init$($this) {
|
|
894
894
|
Segment.call($this);
|
|
895
|
-
$this.
|
|
896
|
-
$this.
|
|
897
|
-
$this.
|
|
895
|
+
$this.y2r_1 = new Int8Array(8192);
|
|
896
|
+
$this.c2s_1 = true;
|
|
897
|
+
$this.b2s_1 = null;
|
|
898
898
|
return $this;
|
|
899
899
|
}
|
|
900
900
|
function Segment_init_$Create$() {
|
|
@@ -902,87 +902,87 @@ function Segment_init_$Create$() {
|
|
|
902
902
|
}
|
|
903
903
|
function Segment_init_$Init$_0(data, pos, limit, shareToken, owner, $this) {
|
|
904
904
|
Segment.call($this);
|
|
905
|
-
$this.
|
|
906
|
-
$this.
|
|
907
|
-
$this.
|
|
908
|
-
$this.
|
|
909
|
-
$this.
|
|
905
|
+
$this.y2r_1 = data;
|
|
906
|
+
$this.z2r_1 = pos;
|
|
907
|
+
$this.a2s_1 = limit;
|
|
908
|
+
$this.b2s_1 = shareToken;
|
|
909
|
+
$this.c2s_1 = owner;
|
|
910
910
|
return $this;
|
|
911
911
|
}
|
|
912
912
|
function Segment_init_$Create$_0(data, pos, limit, shareToken, owner) {
|
|
913
913
|
return Segment_init_$Init$_0(data, pos, limit, shareToken, owner, objectCreate(protoOf(Segment)));
|
|
914
914
|
}
|
|
915
915
|
function Companion() {
|
|
916
|
-
this.
|
|
917
|
-
this.
|
|
916
|
+
this.d2u_1 = 8192;
|
|
917
|
+
this.e2u_1 = 1024;
|
|
918
918
|
}
|
|
919
|
-
protoOf(Companion).
|
|
919
|
+
protoOf(Companion).f2u = function () {
|
|
920
920
|
return Segment_init_$Create$();
|
|
921
921
|
};
|
|
922
922
|
var Companion_instance;
|
|
923
923
|
function Companion_getInstance() {
|
|
924
924
|
return Companion_instance;
|
|
925
925
|
}
|
|
926
|
-
protoOf(Segment).
|
|
927
|
-
var tmp0_safe_receiver = this.
|
|
928
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
926
|
+
protoOf(Segment).i2t = function () {
|
|
927
|
+
var tmp0_safe_receiver = this.b2s_1;
|
|
928
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g2u();
|
|
929
929
|
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
|
|
930
930
|
};
|
|
931
|
-
protoOf(Segment).
|
|
932
|
-
var tmp0_elvis_lhs = this.
|
|
931
|
+
protoOf(Segment).l2s = function () {
|
|
932
|
+
var tmp0_elvis_lhs = this.b2s_1;
|
|
933
933
|
var tmp;
|
|
934
934
|
if (tmp0_elvis_lhs == null) {
|
|
935
935
|
// Inline function 'kotlin.also' call
|
|
936
|
-
var this_0 = SegmentPool_instance.
|
|
937
|
-
this.
|
|
936
|
+
var this_0 = SegmentPool_instance.h2u();
|
|
937
|
+
this.b2s_1 = this_0;
|
|
938
938
|
tmp = this_0;
|
|
939
939
|
} else {
|
|
940
940
|
tmp = tmp0_elvis_lhs;
|
|
941
941
|
}
|
|
942
942
|
var t = tmp;
|
|
943
|
-
var tmp_0 = this.
|
|
944
|
-
var tmp_1 = this.
|
|
943
|
+
var tmp_0 = this.z2r_1;
|
|
944
|
+
var tmp_1 = this.a2s_1;
|
|
945
945
|
// Inline function 'kotlin.also' call
|
|
946
|
-
t.
|
|
947
|
-
return Segment_init_$Create$_0(this.
|
|
946
|
+
t.i2u();
|
|
947
|
+
return Segment_init_$Create$_0(this.y2r_1, tmp_0, tmp_1, t, false);
|
|
948
948
|
};
|
|
949
|
-
protoOf(Segment).
|
|
950
|
-
var result = this.
|
|
951
|
-
if (!(this.
|
|
952
|
-
ensureNotNull(this.
|
|
949
|
+
protoOf(Segment).l2t = function () {
|
|
950
|
+
var result = this.d2s_1;
|
|
951
|
+
if (!(this.e2s_1 == null)) {
|
|
952
|
+
ensureNotNull(this.e2s_1).d2s_1 = this.d2s_1;
|
|
953
953
|
}
|
|
954
|
-
if (!(this.
|
|
955
|
-
ensureNotNull(this.
|
|
954
|
+
if (!(this.d2s_1 == null)) {
|
|
955
|
+
ensureNotNull(this.d2s_1).e2s_1 = this.e2s_1;
|
|
956
956
|
}
|
|
957
|
-
this.
|
|
958
|
-
this.
|
|
957
|
+
this.d2s_1 = null;
|
|
958
|
+
this.e2s_1 = null;
|
|
959
959
|
return result;
|
|
960
960
|
};
|
|
961
|
-
protoOf(Segment).
|
|
962
|
-
segment.
|
|
963
|
-
segment.
|
|
964
|
-
if (!(this.
|
|
965
|
-
ensureNotNull(this.
|
|
961
|
+
protoOf(Segment).m2s = function (segment) {
|
|
962
|
+
segment.e2s_1 = this;
|
|
963
|
+
segment.d2s_1 = this.d2s_1;
|
|
964
|
+
if (!(this.d2s_1 == null)) {
|
|
965
|
+
ensureNotNull(this.d2s_1).e2s_1 = segment;
|
|
966
966
|
}
|
|
967
|
-
this.
|
|
967
|
+
this.d2s_1 = segment;
|
|
968
968
|
return segment;
|
|
969
969
|
};
|
|
970
|
-
protoOf(Segment).
|
|
970
|
+
protoOf(Segment).j2t = function (byteCount) {
|
|
971
971
|
// Inline function 'kotlin.require' call
|
|
972
|
-
if (!(byteCount > 0 && byteCount <= (this.
|
|
972
|
+
if (!(byteCount > 0 && byteCount <= (this.a2s_1 - this.z2r_1 | 0))) {
|
|
973
973
|
var message = 'byteCount out of range';
|
|
974
974
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
975
975
|
}
|
|
976
976
|
var prefix;
|
|
977
977
|
if (byteCount >= 1024) {
|
|
978
|
-
prefix = this.
|
|
978
|
+
prefix = this.l2s();
|
|
979
979
|
} else {
|
|
980
|
-
prefix = SegmentPool_instance.
|
|
981
|
-
var tmp0 = this.
|
|
982
|
-
var tmp2 = prefix.
|
|
983
|
-
var tmp5 = this.
|
|
980
|
+
prefix = SegmentPool_instance.c2t();
|
|
981
|
+
var tmp0 = this.y2r_1;
|
|
982
|
+
var tmp2 = prefix.y2r_1;
|
|
983
|
+
var tmp5 = this.z2r_1;
|
|
984
984
|
// Inline function 'kotlin.collections.copyInto' call
|
|
985
|
-
var endIndex = this.
|
|
985
|
+
var endIndex = this.z2r_1 + byteCount | 0;
|
|
986
986
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
987
987
|
// Inline function 'kotlin.js.asDynamic' call
|
|
988
988
|
var tmp = tmp0;
|
|
@@ -990,62 +990,62 @@ protoOf(Segment).f2t = function (byteCount) {
|
|
|
990
990
|
// Inline function 'kotlin.js.asDynamic' call
|
|
991
991
|
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
992
992
|
}
|
|
993
|
-
prefix.
|
|
994
|
-
this.
|
|
995
|
-
if (!(this.
|
|
996
|
-
ensureNotNull(this.
|
|
993
|
+
prefix.a2s_1 = prefix.z2r_1 + byteCount | 0;
|
|
994
|
+
this.z2r_1 = this.z2r_1 + byteCount | 0;
|
|
995
|
+
if (!(this.e2s_1 == null)) {
|
|
996
|
+
ensureNotNull(this.e2s_1).m2s(prefix);
|
|
997
997
|
} else {
|
|
998
|
-
prefix.
|
|
999
|
-
this.
|
|
998
|
+
prefix.d2s_1 = this;
|
|
999
|
+
this.e2s_1 = prefix;
|
|
1000
1000
|
}
|
|
1001
1001
|
return prefix;
|
|
1002
1002
|
};
|
|
1003
|
-
protoOf(Segment).
|
|
1003
|
+
protoOf(Segment).n2s = function () {
|
|
1004
1004
|
// Inline function 'kotlin.check' call
|
|
1005
|
-
if (!!(this.
|
|
1005
|
+
if (!!(this.e2s_1 == null)) {
|
|
1006
1006
|
var message = 'cannot compact';
|
|
1007
1007
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1008
1008
|
}
|
|
1009
|
-
if (!ensureNotNull(this.
|
|
1009
|
+
if (!ensureNotNull(this.e2s_1).c2s_1)
|
|
1010
1010
|
return this;
|
|
1011
|
-
var byteCount = this.
|
|
1012
|
-
var availableByteCount = (8192 - ensureNotNull(this.
|
|
1011
|
+
var byteCount = this.a2s_1 - this.z2r_1 | 0;
|
|
1012
|
+
var availableByteCount = (8192 - ensureNotNull(this.e2s_1).a2s_1 | 0) + (ensureNotNull(this.e2s_1).i2t() ? 0 : ensureNotNull(this.e2s_1).z2r_1) | 0;
|
|
1013
1013
|
if (byteCount > availableByteCount)
|
|
1014
1014
|
return this;
|
|
1015
|
-
var predecessor = this.
|
|
1016
|
-
this.
|
|
1017
|
-
var successor = this.
|
|
1015
|
+
var predecessor = this.e2s_1;
|
|
1016
|
+
this.k2t(ensureNotNull(predecessor), byteCount);
|
|
1017
|
+
var successor = this.l2t();
|
|
1018
1018
|
// Inline function 'kotlin.check' call
|
|
1019
1019
|
if (!(successor == null)) {
|
|
1020
1020
|
throw IllegalStateException_init_$Create$('Check failed.');
|
|
1021
1021
|
}
|
|
1022
|
-
SegmentPool_instance.
|
|
1022
|
+
SegmentPool_instance.s2t(this);
|
|
1023
1023
|
return predecessor;
|
|
1024
1024
|
};
|
|
1025
|
-
protoOf(Segment).
|
|
1026
|
-
var _unary__edvuaz = this.
|
|
1027
|
-
this.
|
|
1028
|
-
this.
|
|
1025
|
+
protoOf(Segment).o2t = function (byte) {
|
|
1026
|
+
var _unary__edvuaz = this.a2s_1;
|
|
1027
|
+
this.a2s_1 = _unary__edvuaz + 1 | 0;
|
|
1028
|
+
this.y2r_1[_unary__edvuaz] = byte;
|
|
1029
1029
|
};
|
|
1030
|
-
protoOf(Segment).
|
|
1031
|
-
var data = this.
|
|
1032
|
-
var limit = this.
|
|
1030
|
+
protoOf(Segment).q2t = function (short) {
|
|
1031
|
+
var data = this.y2r_1;
|
|
1032
|
+
var limit = this.a2s_1;
|
|
1033
1033
|
var _unary__edvuaz = limit;
|
|
1034
1034
|
limit = _unary__edvuaz + 1 | 0;
|
|
1035
1035
|
data[_unary__edvuaz] = toByte((short >>> 8 | 0) & 255);
|
|
1036
1036
|
var _unary__edvuaz_0 = limit;
|
|
1037
1037
|
limit = _unary__edvuaz_0 + 1 | 0;
|
|
1038
1038
|
data[_unary__edvuaz_0] = toByte(short & 255);
|
|
1039
|
-
this.
|
|
1039
|
+
this.a2s_1 = limit;
|
|
1040
1040
|
};
|
|
1041
|
-
protoOf(Segment).
|
|
1042
|
-
var _unary__edvuaz = this.
|
|
1043
|
-
this.
|
|
1044
|
-
return this.
|
|
1041
|
+
protoOf(Segment).g2s = function () {
|
|
1042
|
+
var _unary__edvuaz = this.z2r_1;
|
|
1043
|
+
this.z2r_1 = _unary__edvuaz + 1 | 0;
|
|
1044
|
+
return this.y2r_1[_unary__edvuaz];
|
|
1045
1045
|
};
|
|
1046
|
-
protoOf(Segment).
|
|
1047
|
-
var data = this.
|
|
1048
|
-
var pos = this.
|
|
1046
|
+
protoOf(Segment).i2s = function () {
|
|
1047
|
+
var data = this.y2r_1;
|
|
1048
|
+
var pos = this.z2r_1;
|
|
1049
1049
|
var _unary__edvuaz = pos;
|
|
1050
1050
|
pos = _unary__edvuaz + 1 | 0;
|
|
1051
1051
|
// Inline function 'kotlinx.io.and' call
|
|
@@ -1055,118 +1055,118 @@ protoOf(Segment).e2s = function () {
|
|
|
1055
1055
|
// Inline function 'kotlinx.io.and' call
|
|
1056
1056
|
var tmp$ret$1 = data[_unary__edvuaz_0] & 255;
|
|
1057
1057
|
var s = toShort(tmp | tmp$ret$1);
|
|
1058
|
-
this.
|
|
1058
|
+
this.z2r_1 = pos;
|
|
1059
1059
|
return s;
|
|
1060
1060
|
};
|
|
1061
|
-
protoOf(Segment).
|
|
1061
|
+
protoOf(Segment).k2t = function (sink, byteCount) {
|
|
1062
1062
|
// Inline function 'kotlin.check' call
|
|
1063
|
-
if (!sink.
|
|
1063
|
+
if (!sink.c2s_1) {
|
|
1064
1064
|
var message = 'only owner can write';
|
|
1065
1065
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1066
1066
|
}
|
|
1067
|
-
if ((sink.
|
|
1068
|
-
if (sink.
|
|
1067
|
+
if ((sink.a2s_1 + byteCount | 0) > 8192) {
|
|
1068
|
+
if (sink.i2t())
|
|
1069
1069
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1070
|
-
if (((sink.
|
|
1070
|
+
if (((sink.a2s_1 + byteCount | 0) - sink.z2r_1 | 0) > 8192)
|
|
1071
1071
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1072
|
-
var tmp0 = sink.
|
|
1073
|
-
var tmp2 = sink.
|
|
1074
|
-
var tmp5 = sink.
|
|
1072
|
+
var tmp0 = sink.y2r_1;
|
|
1073
|
+
var tmp2 = sink.y2r_1;
|
|
1074
|
+
var tmp5 = sink.z2r_1;
|
|
1075
1075
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1076
|
-
var endIndex = sink.
|
|
1076
|
+
var endIndex = sink.a2s_1;
|
|
1077
1077
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1078
1078
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1079
1079
|
var tmp = tmp0;
|
|
1080
1080
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1081
1081
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1082
1082
|
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
1083
|
-
sink.
|
|
1084
|
-
sink.
|
|
1083
|
+
sink.a2s_1 = sink.a2s_1 - sink.z2r_1 | 0;
|
|
1084
|
+
sink.z2r_1 = 0;
|
|
1085
1085
|
}
|
|
1086
|
-
var tmp0_0 = this.
|
|
1087
|
-
var tmp2_0 = sink.
|
|
1088
|
-
var tmp4 = sink.
|
|
1089
|
-
var tmp6 = this.
|
|
1086
|
+
var tmp0_0 = this.y2r_1;
|
|
1087
|
+
var tmp2_0 = sink.y2r_1;
|
|
1088
|
+
var tmp4 = sink.a2s_1;
|
|
1089
|
+
var tmp6 = this.z2r_1;
|
|
1090
1090
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1091
|
-
var endIndex_0 = this.
|
|
1091
|
+
var endIndex_0 = this.z2r_1 + byteCount | 0;
|
|
1092
1092
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1093
1093
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1094
1094
|
var tmp_0 = tmp0_0;
|
|
1095
1095
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1096
1096
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1097
1097
|
arrayCopy(tmp_0, tmp2_0, tmp4, tmp6, endIndex_0);
|
|
1098
|
-
sink.
|
|
1099
|
-
this.
|
|
1098
|
+
sink.a2s_1 = sink.a2s_1 + byteCount | 0;
|
|
1099
|
+
this.z2r_1 = this.z2r_1 + byteCount | 0;
|
|
1100
1100
|
};
|
|
1101
|
-
protoOf(Segment).
|
|
1101
|
+
protoOf(Segment).t2s = function (dst, dstStartOffset, dstEndOffset) {
|
|
1102
1102
|
var len = dstEndOffset - dstStartOffset | 0;
|
|
1103
|
-
var tmp0 = this.
|
|
1104
|
-
var tmp6 = this.
|
|
1103
|
+
var tmp0 = this.y2r_1;
|
|
1104
|
+
var tmp6 = this.z2r_1;
|
|
1105
1105
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1106
|
-
var endIndex = this.
|
|
1106
|
+
var endIndex = this.z2r_1 + len | 0;
|
|
1107
1107
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1108
1108
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1109
1109
|
var tmp = tmp0;
|
|
1110
1110
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1111
1111
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1112
1112
|
arrayCopy(tmp, dst, dstStartOffset, tmp6, endIndex);
|
|
1113
|
-
this.
|
|
1113
|
+
this.z2r_1 = this.z2r_1 + len | 0;
|
|
1114
1114
|
};
|
|
1115
|
-
protoOf(Segment).
|
|
1116
|
-
var tmp2 = this.
|
|
1115
|
+
protoOf(Segment).f2t = function (src, srcStartOffset, srcEndOffset) {
|
|
1116
|
+
var tmp2 = this.y2r_1;
|
|
1117
1117
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1118
|
-
var destinationOffset = this.
|
|
1118
|
+
var destinationOffset = this.a2s_1;
|
|
1119
1119
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1120
1120
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1121
1121
|
var tmp = src;
|
|
1122
1122
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1123
1123
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1124
1124
|
arrayCopy(tmp, tmp2, destinationOffset, srcStartOffset, srcEndOffset);
|
|
1125
|
-
this.
|
|
1125
|
+
this.a2s_1 = this.a2s_1 + (srcEndOffset - srcStartOffset | 0) | 0;
|
|
1126
1126
|
};
|
|
1127
1127
|
protoOf(Segment).g1 = function () {
|
|
1128
|
-
return this.
|
|
1128
|
+
return this.a2s_1 - this.z2r_1 | 0;
|
|
1129
1129
|
};
|
|
1130
|
-
protoOf(Segment).
|
|
1131
|
-
return this.
|
|
1130
|
+
protoOf(Segment).e2t = function () {
|
|
1131
|
+
return this.y2r_1.length - this.a2s_1 | 0;
|
|
1132
1132
|
};
|
|
1133
|
-
protoOf(Segment).
|
|
1134
|
-
return this.
|
|
1133
|
+
protoOf(Segment).j2u = function (readOnly) {
|
|
1134
|
+
return this.y2r_1;
|
|
1135
1135
|
};
|
|
1136
|
-
protoOf(Segment).
|
|
1137
|
-
return this.
|
|
1136
|
+
protoOf(Segment).q2s = function (index) {
|
|
1137
|
+
return this.y2r_1[this.z2r_1 + index | 0];
|
|
1138
1138
|
};
|
|
1139
|
-
protoOf(Segment).
|
|
1140
|
-
this.
|
|
1139
|
+
protoOf(Segment).k2u = function (index, value) {
|
|
1140
|
+
this.y2r_1[this.a2s_1 + index | 0] = value;
|
|
1141
1141
|
};
|
|
1142
|
-
protoOf(Segment).
|
|
1143
|
-
var d = this.
|
|
1144
|
-
var l = this.
|
|
1142
|
+
protoOf(Segment).l2u = function (index, b0, b1) {
|
|
1143
|
+
var d = this.y2r_1;
|
|
1144
|
+
var l = this.a2s_1;
|
|
1145
1145
|
d[l + index | 0] = b0;
|
|
1146
1146
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1147
1147
|
};
|
|
1148
|
-
protoOf(Segment).
|
|
1149
|
-
var d = this.
|
|
1150
|
-
var l = this.
|
|
1148
|
+
protoOf(Segment).m2u = function (index, b0, b1, b2) {
|
|
1149
|
+
var d = this.y2r_1;
|
|
1150
|
+
var l = this.a2s_1;
|
|
1151
1151
|
d[l + index | 0] = b0;
|
|
1152
1152
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1153
1153
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1154
1154
|
};
|
|
1155
|
-
protoOf(Segment).
|
|
1156
|
-
var d = this.
|
|
1157
|
-
var l = this.
|
|
1155
|
+
protoOf(Segment).n2u = function (index, b0, b1, b2, b3) {
|
|
1156
|
+
var d = this.y2r_1;
|
|
1157
|
+
var l = this.a2s_1;
|
|
1158
1158
|
d[l + index | 0] = b0;
|
|
1159
1159
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1160
1160
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1161
1161
|
d[(l + index | 0) + 3 | 0] = b3;
|
|
1162
1162
|
};
|
|
1163
1163
|
function Segment() {
|
|
1164
|
-
this.
|
|
1165
|
-
this.
|
|
1166
|
-
this.
|
|
1167
|
-
this.
|
|
1168
|
-
this.
|
|
1169
|
-
this.
|
|
1164
|
+
this.z2r_1 = 0;
|
|
1165
|
+
this.a2s_1 = 0;
|
|
1166
|
+
this.b2s_1 = null;
|
|
1167
|
+
this.c2s_1 = false;
|
|
1168
|
+
this.d2s_1 = null;
|
|
1169
|
+
this.e2s_1 = null;
|
|
1170
1170
|
}
|
|
1171
1171
|
function isEmpty(_this__u8e3s4) {
|
|
1172
1172
|
return _this__u8e3s4.g1() === 0;
|
|
@@ -1177,10 +1177,10 @@ function AlwaysSharedCopyTracker() {
|
|
|
1177
1177
|
AlwaysSharedCopyTracker_instance = this;
|
|
1178
1178
|
SegmentCopyTracker.call(this);
|
|
1179
1179
|
}
|
|
1180
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1180
|
+
protoOf(AlwaysSharedCopyTracker).g2u = function () {
|
|
1181
1181
|
return true;
|
|
1182
1182
|
};
|
|
1183
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1183
|
+
protoOf(AlwaysSharedCopyTracker).i2u = function () {
|
|
1184
1184
|
return Unit_instance;
|
|
1185
1185
|
};
|
|
1186
1186
|
var AlwaysSharedCopyTracker_instance;
|
|
@@ -1200,8 +1200,8 @@ function indexOf_0(_this__u8e3s4, byte, startOffset, endOffset) {
|
|
|
1200
1200
|
var message_0 = '' + endOffset;
|
|
1201
1201
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1202
1202
|
}
|
|
1203
|
-
var p = _this__u8e3s4.
|
|
1204
|
-
var data = _this__u8e3s4.
|
|
1203
|
+
var p = _this__u8e3s4.z2r_1;
|
|
1204
|
+
var data = _this__u8e3s4.j2u(true);
|
|
1205
1205
|
var inductionVariable = startOffset;
|
|
1206
1206
|
if (inductionVariable < endOffset)
|
|
1207
1207
|
do {
|
|
@@ -1254,23 +1254,23 @@ function indexOf_1(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
1254
1254
|
// Inline function 'kotlin.Long.plus' call
|
|
1255
1255
|
var this_0 = offset;
|
|
1256
1256
|
var tmp$ret$2 = add(this_0, fromInt(1));
|
|
1257
|
-
tmp_0 = _this__u8e3s4.
|
|
1257
|
+
tmp_0 = _this__u8e3s4.w2r(tmp$ret$2);
|
|
1258
1258
|
} else {
|
|
1259
1259
|
tmp_0 = false;
|
|
1260
1260
|
}
|
|
1261
1261
|
if (!tmp_0) {
|
|
1262
1262
|
break $l$loop;
|
|
1263
1263
|
}
|
|
1264
|
-
var tmp_1 = _this__u8e3s4.
|
|
1264
|
+
var tmp_1 = _this__u8e3s4.t2r();
|
|
1265
1265
|
var tmp_2 = offset;
|
|
1266
1266
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1267
|
-
var b = _this__u8e3s4.
|
|
1267
|
+
var b = _this__u8e3s4.t2r().g1();
|
|
1268
1268
|
var tmp$ret$3 = endIndex <= b ? endIndex : b;
|
|
1269
1269
|
var idx = indexOf(tmp_1, byte, tmp_2, tmp$ret$3);
|
|
1270
1270
|
if (!(idx === -1n)) {
|
|
1271
1271
|
return idx;
|
|
1272
1272
|
}
|
|
1273
|
-
offset = _this__u8e3s4.
|
|
1273
|
+
offset = _this__u8e3s4.t2r().g1();
|
|
1274
1274
|
}
|
|
1275
1275
|
return -1n;
|
|
1276
1276
|
}
|
|
@@ -1278,22 +1278,22 @@ function readByteArrayImpl(_this__u8e3s4, size) {
|
|
|
1278
1278
|
var arraySize = size;
|
|
1279
1279
|
if (size === -1) {
|
|
1280
1280
|
var fetchSize = 2147483647n;
|
|
1281
|
-
while (_this__u8e3s4.
|
|
1281
|
+
while (_this__u8e3s4.t2r().g1() < 2147483647n && _this__u8e3s4.w2r(fetchSize)) {
|
|
1282
1282
|
// Inline function 'kotlin.Long.times' call
|
|
1283
1283
|
var this_0 = fetchSize;
|
|
1284
1284
|
fetchSize = multiply(this_0, fromInt(2));
|
|
1285
1285
|
}
|
|
1286
1286
|
// Inline function 'kotlin.check' call
|
|
1287
|
-
if (!(_this__u8e3s4.
|
|
1288
|
-
var message = "Can't create an array of size " + _this__u8e3s4.
|
|
1287
|
+
if (!(_this__u8e3s4.t2r().g1() < 2147483647n)) {
|
|
1288
|
+
var message = "Can't create an array of size " + _this__u8e3s4.t2r().g1().toString();
|
|
1289
1289
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1290
1290
|
}
|
|
1291
|
-
arraySize = convertToInt(_this__u8e3s4.
|
|
1291
|
+
arraySize = convertToInt(_this__u8e3s4.t2r().g1());
|
|
1292
1292
|
} else {
|
|
1293
|
-
_this__u8e3s4.
|
|
1293
|
+
_this__u8e3s4.v2r(fromInt(size));
|
|
1294
1294
|
}
|
|
1295
1295
|
var array = new Int8Array(arraySize);
|
|
1296
|
-
readTo(_this__u8e3s4.
|
|
1296
|
+
readTo(_this__u8e3s4.t2r(), array);
|
|
1297
1297
|
return array;
|
|
1298
1298
|
}
|
|
1299
1299
|
function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
@@ -1304,7 +1304,7 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
1304
1304
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1305
1305
|
var offset = startIndex;
|
|
1306
1306
|
while (offset < endIndex) {
|
|
1307
|
-
var bytesRead = _this__u8e3s4.
|
|
1307
|
+
var bytesRead = _this__u8e3s4.s2s(sink, offset, endIndex);
|
|
1308
1308
|
if (bytesRead === -1) {
|
|
1309
1309
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + (endIndex - startIndex | 0) + ' bytes. ' + ('Only ' + bytesRead + ' bytes were read.'));
|
|
1310
1310
|
}
|
|
@@ -1312,12 +1312,12 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
1314
|
function readString(_this__u8e3s4, byteCount) {
|
|
1315
|
-
_this__u8e3s4.
|
|
1316
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
1315
|
+
_this__u8e3s4.v2r(byteCount);
|
|
1316
|
+
return commonReadUtf8(_this__u8e3s4.t2r(), byteCount);
|
|
1317
1317
|
}
|
|
1318
1318
|
function readString_0(_this__u8e3s4) {
|
|
1319
|
-
_this__u8e3s4.
|
|
1320
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
1319
|
+
_this__u8e3s4.w2r(9223372036854775807n);
|
|
1320
|
+
return commonReadUtf8(_this__u8e3s4.t2r(), _this__u8e3s4.t2r().g1());
|
|
1321
1321
|
}
|
|
1322
1322
|
function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
1323
1323
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
@@ -1327,7 +1327,7 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1327
1327
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1328
1328
|
// Inline function 'kotlinx.io.writeToInternalBuffer' call
|
|
1329
1329
|
// Inline function 'kotlinx.io.commonWriteUtf8' call
|
|
1330
|
-
var this_0 = _this__u8e3s4.
|
|
1330
|
+
var this_0 = _this__u8e3s4.t2r();
|
|
1331
1331
|
var i = startIndex;
|
|
1332
1332
|
while (i < endIndex) {
|
|
1333
1333
|
var p0 = i;
|
|
@@ -1337,15 +1337,15 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1337
1337
|
if (c < 128) {
|
|
1338
1338
|
$l$block_0: {
|
|
1339
1339
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1340
|
-
var tail = this_0.
|
|
1340
|
+
var tail = this_0.z2s(1);
|
|
1341
1341
|
var ctx = get_SegmentWriteContextImpl();
|
|
1342
1342
|
var segmentOffset = -i | 0;
|
|
1343
1343
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1344
|
-
var b = i + tail.
|
|
1344
|
+
var b = i + tail.e2t() | 0;
|
|
1345
1345
|
var runLimit = Math.min(endIndex, b);
|
|
1346
1346
|
var _unary__edvuaz = i;
|
|
1347
1347
|
i = _unary__edvuaz + 1 | 0;
|
|
1348
|
-
ctx.
|
|
1348
|
+
ctx.r2u(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
|
|
1349
1349
|
$l$loop: while (i < runLimit) {
|
|
1350
1350
|
var p0_0 = i;
|
|
1351
1351
|
// Inline function 'kotlin.code' call
|
|
@@ -1355,95 +1355,95 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1355
1355
|
break $l$loop;
|
|
1356
1356
|
var _unary__edvuaz_0 = i;
|
|
1357
1357
|
i = _unary__edvuaz_0 + 1 | 0;
|
|
1358
|
-
ctx.
|
|
1358
|
+
ctx.r2u(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
|
|
1359
1359
|
}
|
|
1360
1360
|
var bytesWritten = i + segmentOffset | 0;
|
|
1361
1361
|
if (bytesWritten === 1) {
|
|
1362
|
-
tail.
|
|
1362
|
+
tail.a2s_1 = tail.a2s_1 + bytesWritten | 0;
|
|
1363
1363
|
var tmp = this_0;
|
|
1364
1364
|
// Inline function 'kotlin.Long.plus' call
|
|
1365
|
-
var this_3 = this_0.
|
|
1366
|
-
tmp.
|
|
1365
|
+
var this_3 = this_0.s2r_1;
|
|
1366
|
+
tmp.s2r_1 = add(this_3, fromInt(bytesWritten));
|
|
1367
1367
|
break $l$block_0;
|
|
1368
1368
|
}
|
|
1369
1369
|
// Inline function 'kotlin.check' call
|
|
1370
|
-
if (!(0 <= bytesWritten ? bytesWritten <= tail.
|
|
1371
|
-
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.
|
|
1370
|
+
if (!(0 <= bytesWritten ? bytesWritten <= tail.e2t() : false)) {
|
|
1371
|
+
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.e2t();
|
|
1372
1372
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1373
1373
|
}
|
|
1374
1374
|
if (!(bytesWritten === 0)) {
|
|
1375
|
-
tail.
|
|
1375
|
+
tail.a2s_1 = tail.a2s_1 + bytesWritten | 0;
|
|
1376
1376
|
var tmp_0 = this_0;
|
|
1377
1377
|
// Inline function 'kotlin.Long.plus' call
|
|
1378
|
-
var this_4 = this_0.
|
|
1379
|
-
tmp_0.
|
|
1378
|
+
var this_4 = this_0.s2r_1;
|
|
1379
|
+
tmp_0.s2r_1 = add(this_4, fromInt(bytesWritten));
|
|
1380
1380
|
break $l$block_0;
|
|
1381
1381
|
}
|
|
1382
1382
|
if (isEmpty(tail)) {
|
|
1383
|
-
this_0.
|
|
1383
|
+
this_0.t2t();
|
|
1384
1384
|
}
|
|
1385
1385
|
}
|
|
1386
1386
|
} else if (c < 2048) {
|
|
1387
1387
|
$l$block_2: {
|
|
1388
1388
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1389
|
-
var tail_0 = this_0.
|
|
1390
|
-
get_SegmentWriteContextImpl().
|
|
1389
|
+
var tail_0 = this_0.z2s(2);
|
|
1390
|
+
get_SegmentWriteContextImpl().q2u(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
1391
1391
|
var bytesWritten_0 = 2;
|
|
1392
1392
|
if (bytesWritten_0 === 2) {
|
|
1393
|
-
tail_0.
|
|
1393
|
+
tail_0.a2s_1 = tail_0.a2s_1 + bytesWritten_0 | 0;
|
|
1394
1394
|
var tmp_1 = this_0;
|
|
1395
1395
|
// Inline function 'kotlin.Long.plus' call
|
|
1396
|
-
var this_5 = this_0.
|
|
1397
|
-
tmp_1.
|
|
1396
|
+
var this_5 = this_0.s2r_1;
|
|
1397
|
+
tmp_1.s2r_1 = add(this_5, fromInt(bytesWritten_0));
|
|
1398
1398
|
break $l$block_2;
|
|
1399
1399
|
}
|
|
1400
1400
|
// Inline function 'kotlin.check' call
|
|
1401
|
-
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.
|
|
1402
|
-
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.
|
|
1401
|
+
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.e2t() : false)) {
|
|
1402
|
+
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.e2t();
|
|
1403
1403
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
1404
1404
|
}
|
|
1405
1405
|
if (!(bytesWritten_0 === 0)) {
|
|
1406
|
-
tail_0.
|
|
1406
|
+
tail_0.a2s_1 = tail_0.a2s_1 + bytesWritten_0 | 0;
|
|
1407
1407
|
var tmp_2 = this_0;
|
|
1408
1408
|
// Inline function 'kotlin.Long.plus' call
|
|
1409
|
-
var this_6 = this_0.
|
|
1410
|
-
tmp_2.
|
|
1409
|
+
var this_6 = this_0.s2r_1;
|
|
1410
|
+
tmp_2.s2r_1 = add(this_6, fromInt(bytesWritten_0));
|
|
1411
1411
|
break $l$block_2;
|
|
1412
1412
|
}
|
|
1413
1413
|
if (isEmpty(tail_0)) {
|
|
1414
|
-
this_0.
|
|
1414
|
+
this_0.t2t();
|
|
1415
1415
|
}
|
|
1416
1416
|
}
|
|
1417
1417
|
i = i + 1 | 0;
|
|
1418
1418
|
} else if (c < 55296 || c > 57343) {
|
|
1419
1419
|
$l$block_4: {
|
|
1420
1420
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1421
|
-
var tail_1 = this_0.
|
|
1422
|
-
get_SegmentWriteContextImpl().
|
|
1421
|
+
var tail_1 = this_0.z2s(3);
|
|
1422
|
+
get_SegmentWriteContextImpl().p2u(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
1423
1423
|
var bytesWritten_1 = 3;
|
|
1424
1424
|
if (bytesWritten_1 === 3) {
|
|
1425
|
-
tail_1.
|
|
1425
|
+
tail_1.a2s_1 = tail_1.a2s_1 + bytesWritten_1 | 0;
|
|
1426
1426
|
var tmp_3 = this_0;
|
|
1427
1427
|
// Inline function 'kotlin.Long.plus' call
|
|
1428
|
-
var this_7 = this_0.
|
|
1429
|
-
tmp_3.
|
|
1428
|
+
var this_7 = this_0.s2r_1;
|
|
1429
|
+
tmp_3.s2r_1 = add(this_7, fromInt(bytesWritten_1));
|
|
1430
1430
|
break $l$block_4;
|
|
1431
1431
|
}
|
|
1432
1432
|
// Inline function 'kotlin.check' call
|
|
1433
|
-
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.
|
|
1434
|
-
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.
|
|
1433
|
+
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.e2t() : false)) {
|
|
1434
|
+
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.e2t();
|
|
1435
1435
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
1436
1436
|
}
|
|
1437
1437
|
if (!(bytesWritten_1 === 0)) {
|
|
1438
|
-
tail_1.
|
|
1438
|
+
tail_1.a2s_1 = tail_1.a2s_1 + bytesWritten_1 | 0;
|
|
1439
1439
|
var tmp_4 = this_0;
|
|
1440
1440
|
// Inline function 'kotlin.Long.plus' call
|
|
1441
|
-
var this_8 = this_0.
|
|
1442
|
-
tmp_4.
|
|
1441
|
+
var this_8 = this_0.s2r_1;
|
|
1442
|
+
tmp_4.s2r_1 = add(this_8, fromInt(bytesWritten_1));
|
|
1443
1443
|
break $l$block_4;
|
|
1444
1444
|
}
|
|
1445
1445
|
if (isEmpty(tail_1)) {
|
|
1446
|
-
this_0.
|
|
1446
|
+
this_0.t2t();
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
1449
|
i = i + 1 | 0;
|
|
@@ -1462,64 +1462,64 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1462
1462
|
// Inline function 'kotlin.code' call
|
|
1463
1463
|
var this_10 = _Char___init__impl__6a9atx(63);
|
|
1464
1464
|
var tmp$ret$29 = Char__toInt_impl_vasixd(this_10);
|
|
1465
|
-
this_0.
|
|
1465
|
+
this_0.n2t(toByte(tmp$ret$29));
|
|
1466
1466
|
i = i + 1 | 0;
|
|
1467
1467
|
} else {
|
|
1468
1468
|
var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
|
|
1469
1469
|
$l$block_6: {
|
|
1470
1470
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1471
|
-
var tail_2 = this_0.
|
|
1472
|
-
get_SegmentWriteContextImpl().
|
|
1471
|
+
var tail_2 = this_0.z2s(4);
|
|
1472
|
+
get_SegmentWriteContextImpl().o2u(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
1473
1473
|
var bytesWritten_2 = 4;
|
|
1474
1474
|
if (bytesWritten_2 === 4) {
|
|
1475
|
-
tail_2.
|
|
1475
|
+
tail_2.a2s_1 = tail_2.a2s_1 + bytesWritten_2 | 0;
|
|
1476
1476
|
var tmp_6 = this_0;
|
|
1477
1477
|
// Inline function 'kotlin.Long.plus' call
|
|
1478
|
-
var this_11 = this_0.
|
|
1479
|
-
tmp_6.
|
|
1478
|
+
var this_11 = this_0.s2r_1;
|
|
1479
|
+
tmp_6.s2r_1 = add(this_11, fromInt(bytesWritten_2));
|
|
1480
1480
|
break $l$block_6;
|
|
1481
1481
|
}
|
|
1482
1482
|
// Inline function 'kotlin.check' call
|
|
1483
|
-
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.
|
|
1484
|
-
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.
|
|
1483
|
+
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.e2t() : false)) {
|
|
1484
|
+
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.e2t();
|
|
1485
1485
|
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
1486
1486
|
}
|
|
1487
1487
|
if (!(bytesWritten_2 === 0)) {
|
|
1488
|
-
tail_2.
|
|
1488
|
+
tail_2.a2s_1 = tail_2.a2s_1 + bytesWritten_2 | 0;
|
|
1489
1489
|
var tmp_7 = this_0;
|
|
1490
1490
|
// Inline function 'kotlin.Long.plus' call
|
|
1491
|
-
var this_12 = this_0.
|
|
1492
|
-
tmp_7.
|
|
1491
|
+
var this_12 = this_0.s2r_1;
|
|
1492
|
+
tmp_7.s2r_1 = add(this_12, fromInt(bytesWritten_2));
|
|
1493
1493
|
break $l$block_6;
|
|
1494
1494
|
}
|
|
1495
1495
|
if (isEmpty(tail_2)) {
|
|
1496
|
-
this_0.
|
|
1496
|
+
this_0.t2t();
|
|
1497
1497
|
}
|
|
1498
1498
|
}
|
|
1499
1499
|
i = i + 2 | 0;
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
1502
|
}
|
|
1503
|
-
_this__u8e3s4.
|
|
1503
|
+
_this__u8e3s4.j2s();
|
|
1504
1504
|
}
|
|
1505
1505
|
function commonReadUtf8(_this__u8e3s4, byteCount) {
|
|
1506
1506
|
if (byteCount === 0n)
|
|
1507
1507
|
return '';
|
|
1508
1508
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
1509
|
-
var curr = _this__u8e3s4.
|
|
1509
|
+
var curr = _this__u8e3s4.q2r_1;
|
|
1510
1510
|
while (!(curr == null)) {
|
|
1511
1511
|
get_SegmentReadContextImpl();
|
|
1512
1512
|
if (fromInt(curr.g1()) >= byteCount) {
|
|
1513
1513
|
var result = '';
|
|
1514
1514
|
// Inline function 'kotlinx.io.unsafe.withData' call
|
|
1515
|
-
var tmp0 = curr.
|
|
1516
|
-
var tmp2 = curr.
|
|
1517
|
-
var tmp0_0 = curr.
|
|
1515
|
+
var tmp0 = curr.j2u(true);
|
|
1516
|
+
var tmp2 = curr.z2r_1;
|
|
1517
|
+
var tmp0_0 = curr.a2s_1;
|
|
1518
1518
|
// Inline function 'kotlin.math.min' call
|
|
1519
1519
|
var b = tmp2 + convertToInt(byteCount) | 0;
|
|
1520
1520
|
var tmp$ret$4 = Math.min(tmp0_0, b);
|
|
1521
1521
|
result = commonToUtf8String(tmp0, tmp2, tmp$ret$4);
|
|
1522
|
-
_this__u8e3s4.
|
|
1522
|
+
_this__u8e3s4.r2s(byteCount);
|
|
1523
1523
|
return result;
|
|
1524
1524
|
}
|
|
1525
1525
|
return commonToUtf8String(readByteArray_0(_this__u8e3s4, convertToInt(byteCount)));
|
|
@@ -1890,27 +1890,27 @@ function UnsafeBufferOperations_getInstance() {
|
|
|
1890
1890
|
}
|
|
1891
1891
|
function SegmentReadContextImpl$1() {
|
|
1892
1892
|
}
|
|
1893
|
-
protoOf(SegmentReadContextImpl$1).
|
|
1894
|
-
return segment.
|
|
1893
|
+
protoOf(SegmentReadContextImpl$1).r2t = function (segment, offset) {
|
|
1894
|
+
return segment.q2s(offset);
|
|
1895
1895
|
};
|
|
1896
1896
|
function SegmentWriteContextImpl$1() {
|
|
1897
1897
|
}
|
|
1898
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1899
|
-
segment.
|
|
1898
|
+
protoOf(SegmentWriteContextImpl$1).r2u = function (segment, offset, value) {
|
|
1899
|
+
segment.k2u(offset, value);
|
|
1900
1900
|
};
|
|
1901
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1902
|
-
segment.
|
|
1901
|
+
protoOf(SegmentWriteContextImpl$1).q2u = function (segment, offset, b0, b1) {
|
|
1902
|
+
segment.l2u(offset, b0, b1);
|
|
1903
1903
|
};
|
|
1904
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1905
|
-
segment.
|
|
1904
|
+
protoOf(SegmentWriteContextImpl$1).p2u = function (segment, offset, b0, b1, b2) {
|
|
1905
|
+
segment.m2u(offset, b0, b1, b2);
|
|
1906
1906
|
};
|
|
1907
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1908
|
-
segment.
|
|
1907
|
+
protoOf(SegmentWriteContextImpl$1).o2u = function (segment, offset, b0, b1, b2, b3) {
|
|
1908
|
+
segment.n2u(offset, b0, b1, b2, b3);
|
|
1909
1909
|
};
|
|
1910
1910
|
function BufferIterationContextImpl$1() {
|
|
1911
1911
|
}
|
|
1912
|
-
protoOf(BufferIterationContextImpl$1).
|
|
1913
|
-
return get_SegmentReadContextImpl().
|
|
1912
|
+
protoOf(BufferIterationContextImpl$1).r2t = function (segment, offset) {
|
|
1913
|
+
return get_SegmentReadContextImpl().r2t(segment, offset);
|
|
1914
1914
|
};
|
|
1915
1915
|
var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
|
|
1916
1916
|
function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
@@ -1978,15 +1978,15 @@ function EOFException() {
|
|
|
1978
1978
|
captureStack(this, EOFException);
|
|
1979
1979
|
}
|
|
1980
1980
|
function SegmentPool() {
|
|
1981
|
-
this.
|
|
1982
|
-
this.
|
|
1981
|
+
this.a2t_1 = 0;
|
|
1982
|
+
this.b2t_1 = 0;
|
|
1983
1983
|
}
|
|
1984
|
-
protoOf(SegmentPool).
|
|
1985
|
-
return Companion_instance.
|
|
1984
|
+
protoOf(SegmentPool).c2t = function () {
|
|
1985
|
+
return Companion_instance.f2u();
|
|
1986
1986
|
};
|
|
1987
|
-
protoOf(SegmentPool).
|
|
1987
|
+
protoOf(SegmentPool).s2t = function (segment) {
|
|
1988
1988
|
};
|
|
1989
|
-
protoOf(SegmentPool).
|
|
1989
|
+
protoOf(SegmentPool).h2u = function () {
|
|
1990
1990
|
return AlwaysSharedCopyTracker_getInstance();
|
|
1991
1991
|
};
|
|
1992
1992
|
var SegmentPool_instance;
|
|
@@ -1994,7 +1994,7 @@ function SegmentPool_getInstance() {
|
|
|
1994
1994
|
return SegmentPool_instance;
|
|
1995
1995
|
}
|
|
1996
1996
|
//region block: post-declaration
|
|
1997
|
-
protoOf(Buffer).
|
|
1997
|
+
protoOf(Buffer).g2t = write$default;
|
|
1998
1998
|
//endregion
|
|
1999
1999
|
//region block: init
|
|
2000
2000
|
Companion_instance = new Companion();
|