@dmarket/p2p-tracker-core 1.0.0-beta.1 → 1.0.2-beta
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/dmarket-p2p-tracker-core-domain.mjs +2931 -2608
- package/dmarket-p2p-tracker-core-domain.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +13 -22
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.mjs +30 -30
- package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-core.mjs +470 -450
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/ktor-ktor-client-core.mjs +1904 -1913
- package/ktor-ktor-client-core.mjs.map +1 -1
- package/ktor-ktor-events.mjs +5 -5
- package/ktor-ktor-http-cio.mjs +313 -313
- package/ktor-ktor-http.mjs +619 -599
- package/ktor-ktor-http.mjs.map +1 -1
- package/ktor-ktor-io.mjs +741 -655
- package/ktor-ktor-io.mjs.map +1 -1
- package/ktor-ktor-utils.mjs +622 -622
- package/ktor-ktor-websockets.mjs +472 -416
- package/ktor-ktor-websockets.mjs.map +1 -1
- package/p2p-tracker-core.d.mts +5 -2
- package/p2p-tracker-core.mjs +7427 -5807
- package/p2p-tracker-core.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -50,10 +50,10 @@ function write$default(source, startIndex, endIndex, $super) {
|
|
|
50
50
|
endIndex = endIndex === VOID ? source.length : endIndex;
|
|
51
51
|
var tmp;
|
|
52
52
|
if ($super === VOID) {
|
|
53
|
-
this.
|
|
53
|
+
this.f3h(source, startIndex, endIndex);
|
|
54
54
|
tmp = Unit_instance;
|
|
55
55
|
} else {
|
|
56
|
-
tmp = $super.
|
|
56
|
+
tmp = $super.f3h.call(this, source, startIndex, endIndex);
|
|
57
57
|
}
|
|
58
58
|
return tmp;
|
|
59
59
|
}
|
|
@@ -105,20 +105,20 @@ function throwEof($this, byteCount) {
|
|
|
105
105
|
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + $this.e1().toString() + ', required: ' + byteCount.toString() + ')');
|
|
106
106
|
}
|
|
107
107
|
function Buffer() {
|
|
108
|
-
this.
|
|
109
|
-
this.
|
|
110
|
-
this.
|
|
108
|
+
this.s3f_1 = null;
|
|
109
|
+
this.t3f_1 = null;
|
|
110
|
+
this.u3f_1 = new Long(0, 0);
|
|
111
111
|
}
|
|
112
112
|
protoOf(Buffer).e1 = function () {
|
|
113
|
-
return this.
|
|
113
|
+
return this.u3f_1;
|
|
114
114
|
};
|
|
115
|
-
protoOf(Buffer).
|
|
115
|
+
protoOf(Buffer).v3f = function () {
|
|
116
116
|
return this;
|
|
117
117
|
};
|
|
118
|
-
protoOf(Buffer).
|
|
118
|
+
protoOf(Buffer).w3f = function () {
|
|
119
119
|
return equalsLong(this.e1(), new Long(0, 0));
|
|
120
120
|
};
|
|
121
|
-
protoOf(Buffer).
|
|
121
|
+
protoOf(Buffer).x3f = function (byteCount) {
|
|
122
122
|
// Inline function 'kotlin.require' call
|
|
123
123
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
124
124
|
var message = 'byteCount: ' + byteCount.toString();
|
|
@@ -128,7 +128,7 @@ protoOf(Buffer).x3e = function (byteCount) {
|
|
|
128
128
|
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + this.e1().toString() + ', required: ' + byteCount.toString() + ')');
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
|
-
protoOf(Buffer).
|
|
131
|
+
protoOf(Buffer).y3f = function (byteCount) {
|
|
132
132
|
// Inline function 'kotlin.require' call
|
|
133
133
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
134
134
|
var message = 'byteCount: ' + byteCount.toString() + ' < 0';
|
|
@@ -136,8 +136,8 @@ protoOf(Buffer).y3e = function (byteCount) {
|
|
|
136
136
|
}
|
|
137
137
|
return compare(this.e1(), byteCount) >= 0;
|
|
138
138
|
};
|
|
139
|
-
protoOf(Buffer).
|
|
140
|
-
var tmp0_elvis_lhs = this.
|
|
139
|
+
protoOf(Buffer).z3f = function () {
|
|
140
|
+
var tmp0_elvis_lhs = this.s3f_1;
|
|
141
141
|
var tmp;
|
|
142
142
|
if (tmp0_elvis_lhs == null) {
|
|
143
143
|
throwEof(this, new Long(1, 0));
|
|
@@ -147,18 +147,18 @@ protoOf(Buffer).z3e = function () {
|
|
|
147
147
|
var segment = tmp;
|
|
148
148
|
var segmentSize = segment.e1();
|
|
149
149
|
if (segmentSize === 0) {
|
|
150
|
-
this.
|
|
151
|
-
return this.
|
|
150
|
+
this.h3g();
|
|
151
|
+
return this.z3f();
|
|
152
152
|
}
|
|
153
|
-
var v = segment.
|
|
154
|
-
this.
|
|
153
|
+
var v = segment.i3g();
|
|
154
|
+
this.u3f_1 = subtract(this.u3f_1, new Long(1, 0));
|
|
155
155
|
if (segmentSize === 1) {
|
|
156
|
-
this.
|
|
156
|
+
this.h3g();
|
|
157
157
|
}
|
|
158
158
|
return v;
|
|
159
159
|
};
|
|
160
|
-
protoOf(Buffer).
|
|
161
|
-
var tmp0_elvis_lhs = this.
|
|
160
|
+
protoOf(Buffer).j3g = function () {
|
|
161
|
+
var tmp0_elvis_lhs = this.s3f_1;
|
|
162
162
|
var tmp;
|
|
163
163
|
if (tmp0_elvis_lhs == null) {
|
|
164
164
|
throwEof(this, new Long(2, 0));
|
|
@@ -168,122 +168,122 @@ protoOf(Buffer).j3f = function () {
|
|
|
168
168
|
var segment = tmp;
|
|
169
169
|
var segmentSize = segment.e1();
|
|
170
170
|
if (segmentSize < 2) {
|
|
171
|
-
this.
|
|
171
|
+
this.x3f(new Long(2, 0));
|
|
172
172
|
if (segmentSize === 0) {
|
|
173
|
-
this.
|
|
174
|
-
return this.
|
|
173
|
+
this.h3g();
|
|
174
|
+
return this.j3g();
|
|
175
175
|
}
|
|
176
176
|
// Inline function 'kotlinx.io.and' call
|
|
177
|
-
var tmp_0 = (this.
|
|
177
|
+
var tmp_0 = (this.z3f() & 255) << 8;
|
|
178
178
|
// Inline function 'kotlinx.io.and' call
|
|
179
|
-
var tmp$ret$1 = this.
|
|
179
|
+
var tmp$ret$1 = this.z3f() & 255;
|
|
180
180
|
return toShort(tmp_0 | tmp$ret$1);
|
|
181
181
|
}
|
|
182
|
-
var v = segment.
|
|
183
|
-
this.
|
|
182
|
+
var v = segment.k3g();
|
|
183
|
+
this.u3f_1 = subtract(this.u3f_1, new Long(2, 0));
|
|
184
184
|
if (segmentSize === 2) {
|
|
185
|
-
this.
|
|
185
|
+
this.h3g();
|
|
186
186
|
}
|
|
187
187
|
return v;
|
|
188
188
|
};
|
|
189
|
-
protoOf(Buffer).
|
|
189
|
+
protoOf(Buffer).l3g = function () {
|
|
190
190
|
return Unit_instance;
|
|
191
191
|
};
|
|
192
|
-
protoOf(Buffer).
|
|
192
|
+
protoOf(Buffer).m3g = function (out, startIndex, endIndex) {
|
|
193
193
|
checkBounds(this.e1(), startIndex, endIndex);
|
|
194
194
|
if (equalsLong(startIndex, endIndex))
|
|
195
195
|
return Unit_instance;
|
|
196
196
|
var currentOffset = startIndex;
|
|
197
197
|
var remainingByteCount = subtract(endIndex, startIndex);
|
|
198
|
-
out.
|
|
199
|
-
var s = this.
|
|
200
|
-
while (compare(currentOffset, fromInt(ensureNotNull(s).
|
|
201
|
-
currentOffset = subtract(currentOffset, fromInt(s.
|
|
202
|
-
s = s.
|
|
198
|
+
out.u3f_1 = add(out.u3f_1, remainingByteCount);
|
|
199
|
+
var s = this.s3f_1;
|
|
200
|
+
while (compare(currentOffset, fromInt(ensureNotNull(s).c3g_1 - s.b3g_1 | 0)) >= 0) {
|
|
201
|
+
currentOffset = subtract(currentOffset, fromInt(s.c3g_1 - s.b3g_1 | 0));
|
|
202
|
+
s = s.f3g_1;
|
|
203
203
|
}
|
|
204
204
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
205
|
-
var copy = ensureNotNull(s).
|
|
206
|
-
copy.
|
|
205
|
+
var copy = ensureNotNull(s).n3g();
|
|
206
|
+
copy.b3g_1 = copy.b3g_1 + convertToInt(currentOffset) | 0;
|
|
207
207
|
var tmp = copy;
|
|
208
|
-
var tmp0 = copy.
|
|
208
|
+
var tmp0 = copy.b3g_1 + convertToInt(remainingByteCount) | 0;
|
|
209
209
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
210
|
-
var b = copy.
|
|
211
|
-
tmp.
|
|
210
|
+
var b = copy.c3g_1;
|
|
211
|
+
tmp.c3g_1 = Math.min(tmp0, b);
|
|
212
212
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
213
|
-
if (out.
|
|
214
|
-
out.
|
|
215
|
-
out.
|
|
213
|
+
if (out.s3f_1 == null) {
|
|
214
|
+
out.s3f_1 = copy;
|
|
215
|
+
out.t3f_1 = copy;
|
|
216
216
|
} else if (false) {
|
|
217
|
-
out.
|
|
218
|
-
if (ensureNotNull(out.
|
|
219
|
-
out.
|
|
217
|
+
out.t3f_1 = ensureNotNull(out.t3f_1).o3g(copy).p3g();
|
|
218
|
+
if (ensureNotNull(out.t3f_1).g3g_1 == null) {
|
|
219
|
+
out.s3f_1 = out.t3f_1;
|
|
220
220
|
}
|
|
221
221
|
} else {
|
|
222
|
-
out.
|
|
222
|
+
out.t3f_1 = ensureNotNull(out.t3f_1).o3g(copy);
|
|
223
223
|
}
|
|
224
|
-
remainingByteCount = subtract(remainingByteCount, fromInt(copy.
|
|
224
|
+
remainingByteCount = subtract(remainingByteCount, fromInt(copy.c3g_1 - copy.b3g_1 | 0));
|
|
225
225
|
currentOffset = new Long(0, 0);
|
|
226
|
-
s = s.
|
|
226
|
+
s = s.f3g_1;
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
|
-
protoOf(Buffer).
|
|
229
|
+
protoOf(Buffer).q3g = function () {
|
|
230
230
|
var result = this.e1();
|
|
231
231
|
if (equalsLong(result, new Long(0, 0)))
|
|
232
232
|
return new Long(0, 0);
|
|
233
|
-
var tail = ensureNotNull(this.
|
|
234
|
-
if (tail.
|
|
235
|
-
result = subtract(result, fromInt(tail.
|
|
233
|
+
var tail = ensureNotNull(this.t3f_1);
|
|
234
|
+
if (tail.c3g_1 < 8192 && tail.e3g_1) {
|
|
235
|
+
result = subtract(result, fromInt(tail.c3g_1 - tail.b3g_1 | 0));
|
|
236
236
|
}
|
|
237
237
|
return result;
|
|
238
238
|
};
|
|
239
|
-
protoOf(Buffer).
|
|
239
|
+
protoOf(Buffer).r3g = function (position) {
|
|
240
240
|
if (compare(position, new Long(0, 0)) < 0 || compare(position, this.e1()) >= 0) {
|
|
241
241
|
throw IndexOutOfBoundsException_init_$Create$('position (' + position.toString() + ') is not within the range [0..size(' + this.e1().toString() + '))');
|
|
242
242
|
}
|
|
243
243
|
if (equalsLong(position, new Long(0, 0))) {
|
|
244
|
-
return ensureNotNull(this.
|
|
244
|
+
return ensureNotNull(this.s3f_1).s3g(0);
|
|
245
245
|
}
|
|
246
246
|
$l$block_1: {
|
|
247
247
|
// Inline function 'kotlinx.io.seek' call
|
|
248
|
-
if (this.
|
|
248
|
+
if (this.s3f_1 == null) {
|
|
249
249
|
var offset = new Long(-1, -1);
|
|
250
|
-
return ensureNotNull(null).
|
|
250
|
+
return ensureNotNull(null).s3g(convertToInt(subtract(position, offset)));
|
|
251
251
|
}
|
|
252
252
|
if (compare(subtract(this.e1(), position), position) < 0) {
|
|
253
|
-
var s = this.
|
|
253
|
+
var s = this.t3f_1;
|
|
254
254
|
var offset_0 = this.e1();
|
|
255
255
|
$l$loop: while (!(s == null) && compare(offset_0, position) > 0) {
|
|
256
|
-
offset_0 = subtract(offset_0, fromInt(s.
|
|
256
|
+
offset_0 = subtract(offset_0, fromInt(s.c3g_1 - s.b3g_1 | 0));
|
|
257
257
|
if (compare(offset_0, position) <= 0)
|
|
258
258
|
break $l$loop;
|
|
259
|
-
s = s.
|
|
259
|
+
s = s.g3g_1;
|
|
260
260
|
}
|
|
261
261
|
var tmp0 = s;
|
|
262
262
|
var offset_1 = offset_0;
|
|
263
|
-
return ensureNotNull(tmp0).
|
|
263
|
+
return ensureNotNull(tmp0).s3g(convertToInt(subtract(position, offset_1)));
|
|
264
264
|
} else {
|
|
265
|
-
var s_0 = this.
|
|
265
|
+
var s_0 = this.s3f_1;
|
|
266
266
|
var offset_2 = new Long(0, 0);
|
|
267
267
|
$l$loop_0: while (!(s_0 == null)) {
|
|
268
268
|
var tmp0_0 = offset_2;
|
|
269
269
|
// Inline function 'kotlin.Long.plus' call
|
|
270
|
-
var other = s_0.
|
|
270
|
+
var other = s_0.c3g_1 - s_0.b3g_1 | 0;
|
|
271
271
|
var nextOffset = add(tmp0_0, fromInt(other));
|
|
272
272
|
if (compare(nextOffset, position) > 0)
|
|
273
273
|
break $l$loop_0;
|
|
274
|
-
s_0 = s_0.
|
|
274
|
+
s_0 = s_0.f3g_1;
|
|
275
275
|
offset_2 = nextOffset;
|
|
276
276
|
}
|
|
277
277
|
var tmp0_1 = s_0;
|
|
278
278
|
var offset_3 = offset_2;
|
|
279
|
-
return ensureNotNull(tmp0_1).
|
|
279
|
+
return ensureNotNull(tmp0_1).s3g(convertToInt(subtract(position, offset_3)));
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
};
|
|
283
283
|
protoOf(Buffer).w2 = function () {
|
|
284
|
-
return this.
|
|
284
|
+
return this.t3g(this.e1());
|
|
285
285
|
};
|
|
286
|
-
protoOf(Buffer).
|
|
286
|
+
protoOf(Buffer).t3g = function (byteCount) {
|
|
287
287
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
288
288
|
// Inline function 'kotlin.require' call
|
|
289
289
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
@@ -292,7 +292,7 @@ protoOf(Buffer).t3f = function (byteCount) {
|
|
|
292
292
|
}
|
|
293
293
|
var remainingByteCount = byteCount;
|
|
294
294
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
295
|
-
var tmp0_elvis_lhs = this.
|
|
295
|
+
var tmp0_elvis_lhs = this.s3f_1;
|
|
296
296
|
var tmp;
|
|
297
297
|
if (tmp0_elvis_lhs == null) {
|
|
298
298
|
throw EOFException_init_$Create$_0('Buffer exhausted before skipping ' + byteCount.toString() + ' bytes.');
|
|
@@ -302,24 +302,24 @@ protoOf(Buffer).t3f = function (byteCount) {
|
|
|
302
302
|
var head = tmp;
|
|
303
303
|
var tmp0 = remainingByteCount;
|
|
304
304
|
// Inline function 'kotlinx.io.minOf' call
|
|
305
|
-
var b = head.
|
|
305
|
+
var b = head.c3g_1 - head.b3g_1 | 0;
|
|
306
306
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
307
307
|
var b_0 = fromInt(b);
|
|
308
308
|
var tmp$ret$3 = compare(tmp0, b_0) <= 0 ? tmp0 : b_0;
|
|
309
309
|
var toSkip = convertToInt(tmp$ret$3);
|
|
310
|
-
this.
|
|
310
|
+
this.u3f_1 = subtract(this.u3f_1, fromInt(toSkip));
|
|
311
311
|
remainingByteCount = subtract(remainingByteCount, fromInt(toSkip));
|
|
312
|
-
head.
|
|
313
|
-
if (head.
|
|
314
|
-
this.
|
|
312
|
+
head.b3g_1 = head.b3g_1 + toSkip | 0;
|
|
313
|
+
if (head.b3g_1 === head.c3g_1) {
|
|
314
|
+
this.h3g();
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
};
|
|
318
|
-
protoOf(Buffer).
|
|
318
|
+
protoOf(Buffer).u3g = function (sink, startIndex, endIndex) {
|
|
319
319
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
320
320
|
var size = sink.length;
|
|
321
321
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
322
|
-
var tmp0_elvis_lhs = this.
|
|
322
|
+
var tmp0_elvis_lhs = this.s3f_1;
|
|
323
323
|
var tmp;
|
|
324
324
|
if (tmp0_elvis_lhs == null) {
|
|
325
325
|
return -1;
|
|
@@ -331,14 +331,14 @@ protoOf(Buffer).u3f = function (sink, startIndex, endIndex) {
|
|
|
331
331
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
332
332
|
var b = s.e1();
|
|
333
333
|
var toCopy = Math.min(tmp0, b);
|
|
334
|
-
s.
|
|
335
|
-
this.
|
|
334
|
+
s.v3g(sink, startIndex, startIndex + toCopy | 0);
|
|
335
|
+
this.u3f_1 = subtract(this.u3f_1, fromInt(toCopy));
|
|
336
336
|
if (isEmpty(s)) {
|
|
337
|
-
this.
|
|
337
|
+
this.h3g();
|
|
338
338
|
}
|
|
339
339
|
return toCopy;
|
|
340
340
|
};
|
|
341
|
-
protoOf(Buffer).
|
|
341
|
+
protoOf(Buffer).w3g = function (sink, byteCount) {
|
|
342
342
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
343
343
|
// Inline function 'kotlin.require' call
|
|
344
344
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
@@ -348,10 +348,10 @@ protoOf(Buffer).w3f = function (sink, byteCount) {
|
|
|
348
348
|
if (equalsLong(this.e1(), new Long(0, 0)))
|
|
349
349
|
return new Long(-1, -1);
|
|
350
350
|
var bytesWritten = compare(byteCount, this.e1()) > 0 ? this.e1() : byteCount;
|
|
351
|
-
sink.
|
|
351
|
+
sink.x3g(this, bytesWritten);
|
|
352
352
|
return bytesWritten;
|
|
353
353
|
};
|
|
354
|
-
protoOf(Buffer).
|
|
354
|
+
protoOf(Buffer).y3g = function (sink, byteCount) {
|
|
355
355
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
356
356
|
// Inline function 'kotlin.require' call
|
|
357
357
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
@@ -359,134 +359,150 @@ protoOf(Buffer).y3f = function (sink, byteCount) {
|
|
|
359
359
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
360
360
|
}
|
|
361
361
|
if (compare(this.e1(), byteCount) < 0) {
|
|
362
|
-
sink.
|
|
362
|
+
sink.x3g(this, this.e1());
|
|
363
363
|
throw EOFException_init_$Create$_0('Buffer exhausted before writing ' + byteCount.toString() + ' bytes. Only ' + this.e1().toString() + ' bytes were written.');
|
|
364
364
|
}
|
|
365
|
-
sink.
|
|
365
|
+
sink.x3g(this, byteCount);
|
|
366
366
|
};
|
|
367
|
-
protoOf(Buffer).
|
|
367
|
+
protoOf(Buffer).z3g = function (sink) {
|
|
368
368
|
var byteCount = this.e1();
|
|
369
369
|
if (compare(byteCount, new Long(0, 0)) > 0) {
|
|
370
|
-
sink.
|
|
370
|
+
sink.x3g(this, byteCount);
|
|
371
371
|
}
|
|
372
372
|
return byteCount;
|
|
373
373
|
};
|
|
374
|
-
protoOf(Buffer).
|
|
374
|
+
protoOf(Buffer).a3h = function () {
|
|
375
375
|
return buffered(new PeekSource(this));
|
|
376
376
|
};
|
|
377
|
-
protoOf(Buffer).
|
|
377
|
+
protoOf(Buffer).b3h = function (minimumCapacity) {
|
|
378
378
|
// Inline function 'kotlin.require' call
|
|
379
379
|
if (!(minimumCapacity >= 1 && minimumCapacity <= 8192)) {
|
|
380
380
|
var message = 'unexpected capacity (' + minimumCapacity + '), should be in range [1, 8192]';
|
|
381
381
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
382
382
|
}
|
|
383
|
-
if (this.
|
|
384
|
-
var result = SegmentPool_instance.
|
|
385
|
-
this.
|
|
386
|
-
this.
|
|
383
|
+
if (this.t3f_1 == null) {
|
|
384
|
+
var result = SegmentPool_instance.e3h();
|
|
385
|
+
this.s3f_1 = result;
|
|
386
|
+
this.t3f_1 = result;
|
|
387
387
|
return result;
|
|
388
388
|
}
|
|
389
|
-
var t = ensureNotNull(this.
|
|
390
|
-
if ((t.
|
|
391
|
-
var newTail = t.
|
|
392
|
-
this.
|
|
389
|
+
var t = ensureNotNull(this.t3f_1);
|
|
390
|
+
if ((t.c3g_1 + minimumCapacity | 0) > 8192 || !t.e3g_1) {
|
|
391
|
+
var newTail = t.o3g(SegmentPool_instance.e3h());
|
|
392
|
+
this.t3f_1 = newTail;
|
|
393
393
|
return newTail;
|
|
394
394
|
}
|
|
395
395
|
return t;
|
|
396
396
|
};
|
|
397
|
-
protoOf(Buffer).
|
|
397
|
+
protoOf(Buffer).f3h = function (source, startIndex, endIndex) {
|
|
398
398
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
399
399
|
var size = source.length;
|
|
400
400
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
401
401
|
var currentOffset = startIndex;
|
|
402
402
|
while (currentOffset < endIndex) {
|
|
403
|
-
var tail = this.
|
|
403
|
+
var tail = this.b3h(1);
|
|
404
404
|
var tmp0 = endIndex - currentOffset | 0;
|
|
405
405
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
406
|
-
var b = tail.
|
|
406
|
+
var b = tail.g3h();
|
|
407
407
|
var toCopy = Math.min(tmp0, b);
|
|
408
|
-
tail.
|
|
408
|
+
tail.h3h(source, currentOffset, currentOffset + toCopy | 0);
|
|
409
409
|
currentOffset = currentOffset + toCopy | 0;
|
|
410
410
|
}
|
|
411
411
|
var tmp = this;
|
|
412
|
-
var tmp0_0 = this.
|
|
412
|
+
var tmp0_0 = this.u3f_1;
|
|
413
413
|
// Inline function 'kotlin.Long.plus' call
|
|
414
414
|
var other = endIndex - startIndex | 0;
|
|
415
|
-
tmp.
|
|
415
|
+
tmp.u3f_1 = add(tmp0_0, fromInt(other));
|
|
416
416
|
};
|
|
417
|
-
protoOf(Buffer).
|
|
417
|
+
protoOf(Buffer).j3h = function (source, byteCount) {
|
|
418
|
+
// Inline function 'kotlinx.io.checkByteCount' call
|
|
419
|
+
// Inline function 'kotlin.require' call
|
|
420
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
421
|
+
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
422
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
423
|
+
}
|
|
424
|
+
var remainingByteCount = byteCount;
|
|
425
|
+
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
426
|
+
var read = source.w3g(this, remainingByteCount);
|
|
427
|
+
if (equalsLong(read, new Long(-1, -1))) {
|
|
428
|
+
throw EOFException_init_$Create$_0('Source exhausted before reading ' + byteCount.toString() + ' bytes. ' + ('Only ' + subtract(byteCount, remainingByteCount).toString() + ' were read.'));
|
|
429
|
+
}
|
|
430
|
+
remainingByteCount = subtract(remainingByteCount, read);
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
protoOf(Buffer).x3g = function (source, byteCount) {
|
|
418
434
|
// Inline function 'kotlin.require' call
|
|
419
435
|
if (!!(source === this)) {
|
|
420
436
|
var message = 'source == this';
|
|
421
437
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
422
438
|
}
|
|
423
|
-
checkOffsetAndCount(source.
|
|
439
|
+
checkOffsetAndCount(source.u3f_1, new Long(0, 0), byteCount);
|
|
424
440
|
var remainingByteCount = byteCount;
|
|
425
441
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
426
|
-
if (compare(remainingByteCount, fromInt(ensureNotNull(source.
|
|
427
|
-
var tail = this.
|
|
442
|
+
if (compare(remainingByteCount, fromInt(ensureNotNull(source.s3f_1).e1())) < 0) {
|
|
443
|
+
var tail = this.t3f_1;
|
|
428
444
|
var tmp;
|
|
429
|
-
if (!(tail == null) && tail.
|
|
445
|
+
if (!(tail == null) && tail.e3g_1) {
|
|
430
446
|
var tmp0 = remainingByteCount;
|
|
431
447
|
// Inline function 'kotlin.Long.plus' call
|
|
432
|
-
var other = tail.
|
|
448
|
+
var other = tail.c3g_1;
|
|
433
449
|
var tmp0_0 = add(tmp0, fromInt(other));
|
|
434
450
|
// Inline function 'kotlin.Long.minus' call
|
|
435
|
-
var other_0 = tail.
|
|
451
|
+
var other_0 = tail.k3h() ? 0 : tail.b3g_1;
|
|
436
452
|
var tmp$ret$3 = subtract(tmp0_0, fromInt(other_0));
|
|
437
453
|
tmp = compare(tmp$ret$3, new Long(8192, 0)) <= 0;
|
|
438
454
|
} else {
|
|
439
455
|
tmp = false;
|
|
440
456
|
}
|
|
441
457
|
if (tmp) {
|
|
442
|
-
ensureNotNull(source.
|
|
443
|
-
source.
|
|
444
|
-
this.
|
|
458
|
+
ensureNotNull(source.s3f_1).m3h(tail, convertToInt(remainingByteCount));
|
|
459
|
+
source.u3f_1 = subtract(source.u3f_1, remainingByteCount);
|
|
460
|
+
this.u3f_1 = add(this.u3f_1, remainingByteCount);
|
|
445
461
|
return Unit_instance;
|
|
446
462
|
} else {
|
|
447
|
-
source.
|
|
463
|
+
source.s3f_1 = ensureNotNull(source.s3f_1).l3h(convertToInt(remainingByteCount));
|
|
448
464
|
}
|
|
449
465
|
}
|
|
450
|
-
var segmentToMove = ensureNotNull(source.
|
|
466
|
+
var segmentToMove = ensureNotNull(source.s3f_1);
|
|
451
467
|
var movedByteCount = fromInt(segmentToMove.e1());
|
|
452
|
-
source.
|
|
453
|
-
if (source.
|
|
454
|
-
source.
|
|
468
|
+
source.s3f_1 = segmentToMove.n3h();
|
|
469
|
+
if (source.s3f_1 == null) {
|
|
470
|
+
source.t3f_1 = null;
|
|
455
471
|
}
|
|
456
472
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
457
|
-
if (this.
|
|
458
|
-
this.
|
|
459
|
-
this.
|
|
473
|
+
if (this.s3f_1 == null) {
|
|
474
|
+
this.s3f_1 = segmentToMove;
|
|
475
|
+
this.t3f_1 = segmentToMove;
|
|
460
476
|
} else if (true) {
|
|
461
|
-
this.
|
|
462
|
-
if (ensureNotNull(this.
|
|
463
|
-
this.
|
|
477
|
+
this.t3f_1 = ensureNotNull(this.t3f_1).o3g(segmentToMove).p3g();
|
|
478
|
+
if (ensureNotNull(this.t3f_1).g3g_1 == null) {
|
|
479
|
+
this.s3f_1 = this.t3f_1;
|
|
464
480
|
}
|
|
465
481
|
} else {
|
|
466
|
-
this.
|
|
482
|
+
this.t3f_1 = ensureNotNull(this.t3f_1).o3g(segmentToMove);
|
|
467
483
|
}
|
|
468
|
-
source.
|
|
469
|
-
this.
|
|
484
|
+
source.u3f_1 = subtract(source.u3f_1, movedByteCount);
|
|
485
|
+
this.u3f_1 = add(this.u3f_1, movedByteCount);
|
|
470
486
|
remainingByteCount = subtract(remainingByteCount, movedByteCount);
|
|
471
487
|
}
|
|
472
488
|
};
|
|
473
|
-
protoOf(Buffer).
|
|
489
|
+
protoOf(Buffer).o3h = function (source) {
|
|
474
490
|
var totalBytesRead = new Long(0, 0);
|
|
475
491
|
$l$loop: while (true) {
|
|
476
|
-
var readCount = source.
|
|
492
|
+
var readCount = source.w3g(this, new Long(8192, 0));
|
|
477
493
|
if (equalsLong(readCount, new Long(-1, -1)))
|
|
478
494
|
break $l$loop;
|
|
479
495
|
totalBytesRead = add(totalBytesRead, readCount);
|
|
480
496
|
}
|
|
481
497
|
return totalBytesRead;
|
|
482
498
|
};
|
|
483
|
-
protoOf(Buffer).
|
|
484
|
-
this.
|
|
485
|
-
this.
|
|
499
|
+
protoOf(Buffer).p3h = function (byte) {
|
|
500
|
+
this.b3h(1).q3h(byte);
|
|
501
|
+
this.u3f_1 = add(this.u3f_1, new Long(1, 0));
|
|
486
502
|
};
|
|
487
|
-
protoOf(Buffer).
|
|
488
|
-
this.
|
|
489
|
-
this.
|
|
503
|
+
protoOf(Buffer).r3h = function (short) {
|
|
504
|
+
this.b3h(2).s3h(short);
|
|
505
|
+
this.u3f_1 = add(this.u3f_1, new Long(2, 0));
|
|
490
506
|
};
|
|
491
507
|
protoOf(Buffer).d4 = function () {
|
|
492
508
|
return Unit_instance;
|
|
@@ -504,7 +520,7 @@ protoOf(Buffer).toString = function () {
|
|
|
504
520
|
var builder = StringBuilder_init_$Create$(imul(len, 2) + (compare(this.e1(), fromInt(maxPrintableBytes)) > 0 ? 1 : 0) | 0);
|
|
505
521
|
var bytesWritten = 0;
|
|
506
522
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
507
|
-
var curr = this.
|
|
523
|
+
var curr = this.s3f_1;
|
|
508
524
|
while (!(curr == null)) {
|
|
509
525
|
var tmp0 = get_SegmentReadContextImpl();
|
|
510
526
|
var segment = curr;
|
|
@@ -512,7 +528,7 @@ protoOf(Buffer).toString = function () {
|
|
|
512
528
|
while (bytesWritten < len && idx < segment.e1()) {
|
|
513
529
|
var _unary__edvuaz = idx;
|
|
514
530
|
idx = _unary__edvuaz + 1 | 0;
|
|
515
|
-
var b_0 = tmp0.
|
|
531
|
+
var b_0 = tmp0.t3h(segment, _unary__edvuaz);
|
|
516
532
|
bytesWritten = bytesWritten + 1 | 0;
|
|
517
533
|
var tmp = get_HEX_DIGIT_CHARS();
|
|
518
534
|
// Inline function 'kotlinx.io.shr' call
|
|
@@ -523,36 +539,36 @@ protoOf(Buffer).toString = function () {
|
|
|
523
539
|
var tmp$ret$5 = b_0 & 15;
|
|
524
540
|
tmp_0.s(tmp_1[tmp$ret$5]);
|
|
525
541
|
}
|
|
526
|
-
curr = curr.
|
|
542
|
+
curr = curr.f3g_1;
|
|
527
543
|
}
|
|
528
544
|
if (compare(this.e1(), fromInt(maxPrintableBytes)) > 0) {
|
|
529
545
|
builder.s(_Char___init__impl__6a9atx(8230));
|
|
530
546
|
}
|
|
531
547
|
return 'Buffer(size=' + this.e1().toString() + ' hex=' + builder.toString() + ')';
|
|
532
548
|
};
|
|
533
|
-
protoOf(Buffer).
|
|
534
|
-
var oldHead = ensureNotNull(this.
|
|
535
|
-
var nextHead = oldHead.
|
|
536
|
-
this.
|
|
549
|
+
protoOf(Buffer).h3g = function () {
|
|
550
|
+
var oldHead = ensureNotNull(this.s3f_1);
|
|
551
|
+
var nextHead = oldHead.f3g_1;
|
|
552
|
+
this.s3f_1 = nextHead;
|
|
537
553
|
if (nextHead == null) {
|
|
538
|
-
this.
|
|
554
|
+
this.t3f_1 = null;
|
|
539
555
|
} else {
|
|
540
|
-
nextHead.
|
|
556
|
+
nextHead.g3g_1 = null;
|
|
541
557
|
}
|
|
542
|
-
oldHead.
|
|
543
|
-
SegmentPool_instance.
|
|
558
|
+
oldHead.f3g_1 = null;
|
|
559
|
+
SegmentPool_instance.u3h(oldHead);
|
|
544
560
|
};
|
|
545
|
-
protoOf(Buffer).
|
|
546
|
-
var oldTail = ensureNotNull(this.
|
|
547
|
-
var newTail = oldTail.
|
|
548
|
-
this.
|
|
561
|
+
protoOf(Buffer).v3h = function () {
|
|
562
|
+
var oldTail = ensureNotNull(this.t3f_1);
|
|
563
|
+
var newTail = oldTail.g3g_1;
|
|
564
|
+
this.t3f_1 = newTail;
|
|
549
565
|
if (newTail == null) {
|
|
550
|
-
this.
|
|
566
|
+
this.s3f_1 = null;
|
|
551
567
|
} else {
|
|
552
|
-
newTail.
|
|
568
|
+
newTail.f3g_1 = null;
|
|
553
569
|
}
|
|
554
|
-
oldTail.
|
|
555
|
-
SegmentPool_instance.
|
|
570
|
+
oldTail.g3g_1 = null;
|
|
571
|
+
SegmentPool_instance.u3h(oldTail);
|
|
556
572
|
};
|
|
557
573
|
function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
558
574
|
startIndex = startIndex === VOID ? new Long(0, 0) : startIndex;
|
|
@@ -565,7 +581,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
565
581
|
return new Long(-1, -1);
|
|
566
582
|
$l$block_1: {
|
|
567
583
|
// Inline function 'kotlinx.io.seek' call
|
|
568
|
-
if (_this__u8e3s4.
|
|
584
|
+
if (_this__u8e3s4.s3f_1 == null) {
|
|
569
585
|
var o = new Long(-1, -1);
|
|
570
586
|
if (equalsLong(o, new Long(-1, -1))) {
|
|
571
587
|
return new Long(-1, -1);
|
|
@@ -594,19 +610,19 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
594
610
|
// Inline function 'kotlin.Long.plus' call
|
|
595
611
|
var other = segment.e1();
|
|
596
612
|
offset = add(tmp0_0, fromInt(other));
|
|
597
|
-
segment = segment.
|
|
613
|
+
segment = segment.f3g_1;
|
|
598
614
|
}
|
|
599
615
|
while (!(segment == null) && compare(offset, endOffset) < 0);
|
|
600
616
|
return new Long(-1, -1);
|
|
601
617
|
}
|
|
602
618
|
if (compare(subtract(_this__u8e3s4.e1(), startIndex), startIndex) < 0) {
|
|
603
|
-
var s = _this__u8e3s4.
|
|
619
|
+
var s = _this__u8e3s4.t3f_1;
|
|
604
620
|
var offset_0 = _this__u8e3s4.e1();
|
|
605
621
|
$l$loop: while (!(s == null) && compare(offset_0, startIndex) > 0) {
|
|
606
|
-
offset_0 = subtract(offset_0, fromInt(s.
|
|
622
|
+
offset_0 = subtract(offset_0, fromInt(s.c3g_1 - s.b3g_1 | 0));
|
|
607
623
|
if (compare(offset_0, startIndex) <= 0)
|
|
608
624
|
break $l$loop;
|
|
609
|
-
s = s.
|
|
625
|
+
s = s.g3g_1;
|
|
610
626
|
}
|
|
611
627
|
var tmp0_1 = s;
|
|
612
628
|
var o_0 = offset_0;
|
|
@@ -637,21 +653,21 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
637
653
|
// Inline function 'kotlin.Long.plus' call
|
|
638
654
|
var other_0 = segment_0.e1();
|
|
639
655
|
offset_1 = add(tmp0_3, fromInt(other_0));
|
|
640
|
-
segment_0 = segment_0.
|
|
656
|
+
segment_0 = segment_0.f3g_1;
|
|
641
657
|
}
|
|
642
658
|
while (!(segment_0 == null) && compare(offset_1, endOffset) < 0);
|
|
643
659
|
return new Long(-1, -1);
|
|
644
660
|
} else {
|
|
645
|
-
var s_0 = _this__u8e3s4.
|
|
661
|
+
var s_0 = _this__u8e3s4.s3f_1;
|
|
646
662
|
var offset_2 = new Long(0, 0);
|
|
647
663
|
$l$loop_0: while (!(s_0 == null)) {
|
|
648
664
|
var tmp0_4 = offset_2;
|
|
649
665
|
// Inline function 'kotlin.Long.plus' call
|
|
650
|
-
var other_1 = s_0.
|
|
666
|
+
var other_1 = s_0.c3g_1 - s_0.b3g_1 | 0;
|
|
651
667
|
var nextOffset = add(tmp0_4, fromInt(other_1));
|
|
652
668
|
if (compare(nextOffset, startIndex) > 0)
|
|
653
669
|
break $l$loop_0;
|
|
654
|
-
s_0 = s_0.
|
|
670
|
+
s_0 = s_0.f3g_1;
|
|
655
671
|
offset_2 = nextOffset;
|
|
656
672
|
}
|
|
657
673
|
var tmp0_5 = s_0;
|
|
@@ -683,7 +699,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
683
699
|
// Inline function 'kotlin.Long.plus' call
|
|
684
700
|
var other_2 = segment_1.e1();
|
|
685
701
|
offset_3 = add(tmp0_7, fromInt(other_2));
|
|
686
|
-
segment_1 = segment_1.
|
|
702
|
+
segment_1 = segment_1.f3g_1;
|
|
687
703
|
}
|
|
688
704
|
while (!(segment_1 == null) && compare(offset_3, endOffset) < 0);
|
|
689
705
|
return new Long(-1, -1);
|
|
@@ -691,25 +707,25 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
691
707
|
}
|
|
692
708
|
}
|
|
693
709
|
function readByteString(_this__u8e3s4, byteCount) {
|
|
694
|
-
return UnsafeByteStringOperations_instance.
|
|
710
|
+
return UnsafeByteStringOperations_instance.r3f(readByteArray_0(_this__u8e3s4, byteCount));
|
|
695
711
|
}
|
|
696
712
|
function buffered(_this__u8e3s4) {
|
|
697
713
|
return new RealSource(_this__u8e3s4);
|
|
698
714
|
}
|
|
699
715
|
function PeekSource(upstream) {
|
|
700
|
-
this.
|
|
701
|
-
this.
|
|
702
|
-
this.
|
|
716
|
+
this.w3h_1 = upstream;
|
|
717
|
+
this.x3h_1 = this.w3h_1.v3f();
|
|
718
|
+
this.y3h_1 = this.x3h_1.s3f_1;
|
|
703
719
|
var tmp = this;
|
|
704
|
-
var tmp0_safe_receiver = this.
|
|
705
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
706
|
-
tmp.
|
|
707
|
-
this.
|
|
708
|
-
this.
|
|
720
|
+
var tmp0_safe_receiver = this.x3h_1.s3f_1;
|
|
721
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b3g_1;
|
|
722
|
+
tmp.z3h_1 = tmp1_elvis_lhs == null ? -1 : tmp1_elvis_lhs;
|
|
723
|
+
this.a3i_1 = false;
|
|
724
|
+
this.b3i_1 = new Long(0, 0);
|
|
709
725
|
}
|
|
710
|
-
protoOf(PeekSource).
|
|
726
|
+
protoOf(PeekSource).w3g = function (sink, byteCount) {
|
|
711
727
|
// Inline function 'kotlin.check' call
|
|
712
|
-
if (!!this.
|
|
728
|
+
if (!!this.a3i_1) {
|
|
713
729
|
var message = 'Source is closed.';
|
|
714
730
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
715
731
|
}
|
|
@@ -720,43 +736,43 @@ protoOf(PeekSource).w3f = function (sink, byteCount) {
|
|
|
720
736
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
721
737
|
}
|
|
722
738
|
// Inline function 'kotlin.check' call
|
|
723
|
-
if (!(this.
|
|
739
|
+
if (!(this.y3h_1 == null || (this.y3h_1 === this.x3h_1.s3f_1 && this.z3h_1 === ensureNotNull(this.x3h_1.s3f_1).b3g_1))) {
|
|
724
740
|
var message_1 = 'Peek source is invalid because upstream source was used';
|
|
725
741
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
726
742
|
}
|
|
727
743
|
if (equalsLong(byteCount, new Long(0, 0)))
|
|
728
744
|
return new Long(0, 0);
|
|
729
745
|
// Inline function 'kotlin.Long.plus' call
|
|
730
|
-
var this_0 = this.
|
|
746
|
+
var this_0 = this.b3i_1;
|
|
731
747
|
var tmp$ret$7 = add(this_0, fromInt(1));
|
|
732
|
-
if (!this.
|
|
748
|
+
if (!this.w3h_1.y3f(tmp$ret$7))
|
|
733
749
|
return new Long(-1, -1);
|
|
734
|
-
if (this.
|
|
735
|
-
this.
|
|
736
|
-
this.
|
|
750
|
+
if (this.y3h_1 == null && !(this.x3h_1.s3f_1 == null)) {
|
|
751
|
+
this.y3h_1 = this.x3h_1.s3f_1;
|
|
752
|
+
this.z3h_1 = ensureNotNull(this.x3h_1.s3f_1).b3g_1;
|
|
737
753
|
}
|
|
738
754
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
739
|
-
var b = subtract(this.
|
|
755
|
+
var b = subtract(this.x3h_1.e1(), this.b3i_1);
|
|
740
756
|
var toCopy = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
741
|
-
this.
|
|
742
|
-
this.
|
|
757
|
+
this.x3h_1.m3g(sink, this.b3i_1, add(this.b3i_1, toCopy));
|
|
758
|
+
this.b3i_1 = add(this.b3i_1, toCopy);
|
|
743
759
|
return toCopy;
|
|
744
760
|
};
|
|
745
761
|
protoOf(PeekSource).d4 = function () {
|
|
746
|
-
this.
|
|
762
|
+
this.a3i_1 = true;
|
|
747
763
|
};
|
|
748
764
|
function RealSource(source) {
|
|
749
|
-
this.
|
|
750
|
-
this.
|
|
751
|
-
this.
|
|
765
|
+
this.c3i_1 = source;
|
|
766
|
+
this.d3i_1 = false;
|
|
767
|
+
this.e3i_1 = new Buffer();
|
|
752
768
|
}
|
|
753
|
-
protoOf(RealSource).
|
|
754
|
-
return this.
|
|
769
|
+
protoOf(RealSource).v3f = function () {
|
|
770
|
+
return this.e3i_1;
|
|
755
771
|
};
|
|
756
|
-
protoOf(RealSource).
|
|
772
|
+
protoOf(RealSource).w3g = function (sink, byteCount) {
|
|
757
773
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
758
774
|
// Inline function 'kotlin.check' call
|
|
759
|
-
if (!!this.
|
|
775
|
+
if (!!this.d3i_1) {
|
|
760
776
|
var message = 'Source is closed.';
|
|
761
777
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
762
778
|
}
|
|
@@ -765,33 +781,33 @@ protoOf(RealSource).w3f = function (sink, byteCount) {
|
|
|
765
781
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
766
782
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
767
783
|
}
|
|
768
|
-
if (equalsLong(this.
|
|
769
|
-
var read = this.
|
|
784
|
+
if (equalsLong(this.e3i_1.e1(), new Long(0, 0))) {
|
|
785
|
+
var read = this.c3i_1.w3g(this.e3i_1, new Long(8192, 0));
|
|
770
786
|
if (equalsLong(read, new Long(-1, -1)))
|
|
771
787
|
return new Long(-1, -1);
|
|
772
788
|
}
|
|
773
789
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
774
|
-
var b = this.
|
|
790
|
+
var b = this.e3i_1.e1();
|
|
775
791
|
var toRead = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
776
|
-
return this.
|
|
792
|
+
return this.e3i_1.w3g(sink, toRead);
|
|
777
793
|
};
|
|
778
|
-
protoOf(RealSource).
|
|
794
|
+
protoOf(RealSource).w3f = function () {
|
|
779
795
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
780
796
|
// Inline function 'kotlin.check' call
|
|
781
|
-
if (!!this.
|
|
797
|
+
if (!!this.d3i_1) {
|
|
782
798
|
var message = 'Source is closed.';
|
|
783
799
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
784
800
|
}
|
|
785
|
-
return this.
|
|
801
|
+
return this.e3i_1.w3f() && equalsLong(this.c3i_1.w3g(this.e3i_1, new Long(8192, 0)), new Long(-1, -1));
|
|
786
802
|
};
|
|
787
|
-
protoOf(RealSource).
|
|
788
|
-
if (!this.
|
|
803
|
+
protoOf(RealSource).x3f = function (byteCount) {
|
|
804
|
+
if (!this.y3f(byteCount))
|
|
789
805
|
throw EOFException_init_$Create$_0("Source doesn't contain required number of bytes (" + byteCount.toString() + ').');
|
|
790
806
|
};
|
|
791
|
-
protoOf(RealSource).
|
|
807
|
+
protoOf(RealSource).y3f = function (byteCount) {
|
|
792
808
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
793
809
|
// Inline function 'kotlin.check' call
|
|
794
|
-
if (!!this.
|
|
810
|
+
if (!!this.d3i_1) {
|
|
795
811
|
var message = 'Source is closed.';
|
|
796
812
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
797
813
|
}
|
|
@@ -800,91 +816,91 @@ protoOf(RealSource).y3e = function (byteCount) {
|
|
|
800
816
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
801
817
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
802
818
|
}
|
|
803
|
-
while (compare(this.
|
|
804
|
-
if (equalsLong(this.
|
|
819
|
+
while (compare(this.e3i_1.e1(), byteCount) < 0) {
|
|
820
|
+
if (equalsLong(this.c3i_1.w3g(this.e3i_1, new Long(8192, 0)), new Long(-1, -1)))
|
|
805
821
|
return false;
|
|
806
822
|
}
|
|
807
823
|
return true;
|
|
808
824
|
};
|
|
809
|
-
protoOf(RealSource).
|
|
810
|
-
this.
|
|
811
|
-
return this.
|
|
825
|
+
protoOf(RealSource).z3f = function () {
|
|
826
|
+
this.x3f(new Long(1, 0));
|
|
827
|
+
return this.e3i_1.z3f();
|
|
812
828
|
};
|
|
813
|
-
protoOf(RealSource).
|
|
829
|
+
protoOf(RealSource).u3g = function (sink, startIndex, endIndex) {
|
|
814
830
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
815
831
|
var size = sink.length;
|
|
816
832
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
817
|
-
if (equalsLong(this.
|
|
818
|
-
var read = this.
|
|
833
|
+
if (equalsLong(this.e3i_1.e1(), new Long(0, 0))) {
|
|
834
|
+
var read = this.c3i_1.w3g(this.e3i_1, new Long(8192, 0));
|
|
819
835
|
if (equalsLong(read, new Long(-1, -1)))
|
|
820
836
|
return -1;
|
|
821
837
|
}
|
|
822
838
|
var tmp0 = endIndex - startIndex | 0;
|
|
823
839
|
// Inline function 'kotlinx.io.minOf' call
|
|
824
|
-
var b = this.
|
|
840
|
+
var b = this.e3i_1.e1();
|
|
825
841
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
826
842
|
var a = fromInt(tmp0);
|
|
827
843
|
var tmp$ret$1 = compare(a, b) <= 0 ? a : b;
|
|
828
844
|
var toRead = convertToInt(tmp$ret$1);
|
|
829
|
-
return this.
|
|
845
|
+
return this.e3i_1.u3g(sink, startIndex, startIndex + toRead | 0);
|
|
830
846
|
};
|
|
831
|
-
protoOf(RealSource).
|
|
847
|
+
protoOf(RealSource).y3g = function (sink, byteCount) {
|
|
832
848
|
try {
|
|
833
|
-
this.
|
|
849
|
+
this.x3f(byteCount);
|
|
834
850
|
} catch ($p) {
|
|
835
851
|
if ($p instanceof EOFException) {
|
|
836
852
|
var e = $p;
|
|
837
|
-
sink.
|
|
853
|
+
sink.x3g(this.e3i_1, this.e3i_1.e1());
|
|
838
854
|
throw e;
|
|
839
855
|
} else {
|
|
840
856
|
throw $p;
|
|
841
857
|
}
|
|
842
858
|
}
|
|
843
|
-
this.
|
|
859
|
+
this.e3i_1.y3g(sink, byteCount);
|
|
844
860
|
};
|
|
845
|
-
protoOf(RealSource).
|
|
861
|
+
protoOf(RealSource).z3g = function (sink) {
|
|
846
862
|
var totalBytesWritten = new Long(0, 0);
|
|
847
|
-
while (!equalsLong(this.
|
|
848
|
-
var emitByteCount = this.
|
|
863
|
+
while (!equalsLong(this.c3i_1.w3g(this.e3i_1, new Long(8192, 0)), new Long(-1, -1))) {
|
|
864
|
+
var emitByteCount = this.e3i_1.q3g();
|
|
849
865
|
if (compare(emitByteCount, new Long(0, 0)) > 0) {
|
|
850
866
|
totalBytesWritten = add(totalBytesWritten, emitByteCount);
|
|
851
|
-
sink.
|
|
867
|
+
sink.x3g(this.e3i_1, emitByteCount);
|
|
852
868
|
}
|
|
853
869
|
}
|
|
854
|
-
if (compare(this.
|
|
855
|
-
totalBytesWritten = add(totalBytesWritten, this.
|
|
856
|
-
sink.
|
|
870
|
+
if (compare(this.e3i_1.e1(), new Long(0, 0)) > 0) {
|
|
871
|
+
totalBytesWritten = add(totalBytesWritten, this.e3i_1.e1());
|
|
872
|
+
sink.x3g(this.e3i_1, this.e3i_1.e1());
|
|
857
873
|
}
|
|
858
874
|
return totalBytesWritten;
|
|
859
875
|
};
|
|
860
|
-
protoOf(RealSource).
|
|
861
|
-
this.
|
|
862
|
-
return this.
|
|
876
|
+
protoOf(RealSource).j3g = function () {
|
|
877
|
+
this.x3f(new Long(2, 0));
|
|
878
|
+
return this.e3i_1.j3g();
|
|
863
879
|
};
|
|
864
|
-
protoOf(RealSource).
|
|
880
|
+
protoOf(RealSource).a3h = function () {
|
|
865
881
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
866
882
|
// Inline function 'kotlin.check' call
|
|
867
|
-
if (!!this.
|
|
883
|
+
if (!!this.d3i_1) {
|
|
868
884
|
var message = 'Source is closed.';
|
|
869
885
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
870
886
|
}
|
|
871
887
|
return buffered(new PeekSource(this));
|
|
872
888
|
};
|
|
873
889
|
protoOf(RealSource).d4 = function () {
|
|
874
|
-
if (this.
|
|
890
|
+
if (this.d3i_1)
|
|
875
891
|
return Unit_instance;
|
|
876
|
-
this.
|
|
877
|
-
this.
|
|
878
|
-
this.
|
|
892
|
+
this.d3i_1 = true;
|
|
893
|
+
this.c3i_1.d4();
|
|
894
|
+
this.e3i_1.w2();
|
|
879
895
|
};
|
|
880
896
|
protoOf(RealSource).toString = function () {
|
|
881
|
-
return 'buffered(' + toString(this.
|
|
897
|
+
return 'buffered(' + toString(this.c3i_1) + ')';
|
|
882
898
|
};
|
|
883
899
|
function Segment_init_$Init$($this) {
|
|
884
900
|
Segment.call($this);
|
|
885
|
-
$this.
|
|
886
|
-
$this.
|
|
887
|
-
$this.
|
|
901
|
+
$this.a3g_1 = new Int8Array(8192);
|
|
902
|
+
$this.e3g_1 = true;
|
|
903
|
+
$this.d3g_1 = null;
|
|
888
904
|
return $this;
|
|
889
905
|
}
|
|
890
906
|
function Segment_init_$Create$() {
|
|
@@ -892,87 +908,87 @@ function Segment_init_$Create$() {
|
|
|
892
908
|
}
|
|
893
909
|
function Segment_init_$Init$_0(data, pos, limit, shareToken, owner, $this) {
|
|
894
910
|
Segment.call($this);
|
|
895
|
-
$this.
|
|
896
|
-
$this.
|
|
897
|
-
$this.
|
|
898
|
-
$this.
|
|
899
|
-
$this.
|
|
911
|
+
$this.a3g_1 = data;
|
|
912
|
+
$this.b3g_1 = pos;
|
|
913
|
+
$this.c3g_1 = limit;
|
|
914
|
+
$this.d3g_1 = shareToken;
|
|
915
|
+
$this.e3g_1 = owner;
|
|
900
916
|
return $this;
|
|
901
917
|
}
|
|
902
918
|
function Segment_init_$Create$_0(data, pos, limit, shareToken, owner) {
|
|
903
919
|
return Segment_init_$Init$_0(data, pos, limit, shareToken, owner, objectCreate(protoOf(Segment)));
|
|
904
920
|
}
|
|
905
921
|
function Companion() {
|
|
906
|
-
this.
|
|
907
|
-
this.
|
|
922
|
+
this.f3i_1 = 8192;
|
|
923
|
+
this.g3i_1 = 1024;
|
|
908
924
|
}
|
|
909
|
-
protoOf(Companion).
|
|
925
|
+
protoOf(Companion).h3i = function () {
|
|
910
926
|
return Segment_init_$Create$();
|
|
911
927
|
};
|
|
912
928
|
var Companion_instance;
|
|
913
929
|
function Companion_getInstance() {
|
|
914
930
|
return Companion_instance;
|
|
915
931
|
}
|
|
916
|
-
protoOf(Segment).
|
|
917
|
-
var tmp0_safe_receiver = this.
|
|
918
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
932
|
+
protoOf(Segment).k3h = function () {
|
|
933
|
+
var tmp0_safe_receiver = this.d3g_1;
|
|
934
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.i3i();
|
|
919
935
|
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
|
|
920
936
|
};
|
|
921
|
-
protoOf(Segment).
|
|
922
|
-
var tmp0_elvis_lhs = this.
|
|
937
|
+
protoOf(Segment).n3g = function () {
|
|
938
|
+
var tmp0_elvis_lhs = this.d3g_1;
|
|
923
939
|
var tmp;
|
|
924
940
|
if (tmp0_elvis_lhs == null) {
|
|
925
941
|
// Inline function 'kotlin.also' call
|
|
926
|
-
var this_0 = SegmentPool_instance.
|
|
927
|
-
this.
|
|
942
|
+
var this_0 = SegmentPool_instance.j3i();
|
|
943
|
+
this.d3g_1 = this_0;
|
|
928
944
|
tmp = this_0;
|
|
929
945
|
} else {
|
|
930
946
|
tmp = tmp0_elvis_lhs;
|
|
931
947
|
}
|
|
932
948
|
var t = tmp;
|
|
933
|
-
var tmp_0 = this.
|
|
934
|
-
var tmp_1 = this.
|
|
949
|
+
var tmp_0 = this.b3g_1;
|
|
950
|
+
var tmp_1 = this.c3g_1;
|
|
935
951
|
// Inline function 'kotlin.also' call
|
|
936
|
-
t.
|
|
937
|
-
return Segment_init_$Create$_0(this.
|
|
952
|
+
t.k3i();
|
|
953
|
+
return Segment_init_$Create$_0(this.a3g_1, tmp_0, tmp_1, t, false);
|
|
938
954
|
};
|
|
939
|
-
protoOf(Segment).
|
|
940
|
-
var result = this.
|
|
941
|
-
if (!(this.
|
|
942
|
-
ensureNotNull(this.
|
|
955
|
+
protoOf(Segment).n3h = function () {
|
|
956
|
+
var result = this.f3g_1;
|
|
957
|
+
if (!(this.g3g_1 == null)) {
|
|
958
|
+
ensureNotNull(this.g3g_1).f3g_1 = this.f3g_1;
|
|
943
959
|
}
|
|
944
|
-
if (!(this.
|
|
945
|
-
ensureNotNull(this.
|
|
960
|
+
if (!(this.f3g_1 == null)) {
|
|
961
|
+
ensureNotNull(this.f3g_1).g3g_1 = this.g3g_1;
|
|
946
962
|
}
|
|
947
|
-
this.
|
|
948
|
-
this.
|
|
963
|
+
this.f3g_1 = null;
|
|
964
|
+
this.g3g_1 = null;
|
|
949
965
|
return result;
|
|
950
966
|
};
|
|
951
|
-
protoOf(Segment).
|
|
952
|
-
segment.
|
|
953
|
-
segment.
|
|
954
|
-
if (!(this.
|
|
955
|
-
ensureNotNull(this.
|
|
967
|
+
protoOf(Segment).o3g = function (segment) {
|
|
968
|
+
segment.g3g_1 = this;
|
|
969
|
+
segment.f3g_1 = this.f3g_1;
|
|
970
|
+
if (!(this.f3g_1 == null)) {
|
|
971
|
+
ensureNotNull(this.f3g_1).g3g_1 = segment;
|
|
956
972
|
}
|
|
957
|
-
this.
|
|
973
|
+
this.f3g_1 = segment;
|
|
958
974
|
return segment;
|
|
959
975
|
};
|
|
960
|
-
protoOf(Segment).
|
|
976
|
+
protoOf(Segment).l3h = function (byteCount) {
|
|
961
977
|
// Inline function 'kotlin.require' call
|
|
962
|
-
if (!(byteCount > 0 && byteCount <= (this.
|
|
978
|
+
if (!(byteCount > 0 && byteCount <= (this.c3g_1 - this.b3g_1 | 0))) {
|
|
963
979
|
var message = 'byteCount out of range';
|
|
964
980
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
965
981
|
}
|
|
966
982
|
var prefix;
|
|
967
983
|
if (byteCount >= 1024) {
|
|
968
|
-
prefix = this.
|
|
984
|
+
prefix = this.n3g();
|
|
969
985
|
} else {
|
|
970
|
-
prefix = SegmentPool_instance.
|
|
971
|
-
var tmp0 = this.
|
|
972
|
-
var tmp2 = prefix.
|
|
973
|
-
var tmp5 = this.
|
|
986
|
+
prefix = SegmentPool_instance.e3h();
|
|
987
|
+
var tmp0 = this.a3g_1;
|
|
988
|
+
var tmp2 = prefix.a3g_1;
|
|
989
|
+
var tmp5 = this.b3g_1;
|
|
974
990
|
// Inline function 'kotlin.collections.copyInto' call
|
|
975
|
-
var endIndex = this.
|
|
991
|
+
var endIndex = this.b3g_1 + byteCount | 0;
|
|
976
992
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
977
993
|
// Inline function 'kotlin.js.asDynamic' call
|
|
978
994
|
var tmp = tmp0;
|
|
@@ -980,62 +996,62 @@ protoOf(Segment).k3g = function (byteCount) {
|
|
|
980
996
|
// Inline function 'kotlin.js.asDynamic' call
|
|
981
997
|
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
982
998
|
}
|
|
983
|
-
prefix.
|
|
984
|
-
this.
|
|
985
|
-
if (!(this.
|
|
986
|
-
ensureNotNull(this.
|
|
999
|
+
prefix.c3g_1 = prefix.b3g_1 + byteCount | 0;
|
|
1000
|
+
this.b3g_1 = this.b3g_1 + byteCount | 0;
|
|
1001
|
+
if (!(this.g3g_1 == null)) {
|
|
1002
|
+
ensureNotNull(this.g3g_1).o3g(prefix);
|
|
987
1003
|
} else {
|
|
988
|
-
prefix.
|
|
989
|
-
this.
|
|
1004
|
+
prefix.f3g_1 = this;
|
|
1005
|
+
this.g3g_1 = prefix;
|
|
990
1006
|
}
|
|
991
1007
|
return prefix;
|
|
992
1008
|
};
|
|
993
|
-
protoOf(Segment).
|
|
1009
|
+
protoOf(Segment).p3g = function () {
|
|
994
1010
|
// Inline function 'kotlin.check' call
|
|
995
|
-
if (!!(this.
|
|
1011
|
+
if (!!(this.g3g_1 == null)) {
|
|
996
1012
|
var message = 'cannot compact';
|
|
997
1013
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
998
1014
|
}
|
|
999
|
-
if (!ensureNotNull(this.
|
|
1015
|
+
if (!ensureNotNull(this.g3g_1).e3g_1)
|
|
1000
1016
|
return this;
|
|
1001
|
-
var byteCount = this.
|
|
1002
|
-
var availableByteCount = (8192 - ensureNotNull(this.
|
|
1017
|
+
var byteCount = this.c3g_1 - this.b3g_1 | 0;
|
|
1018
|
+
var availableByteCount = (8192 - ensureNotNull(this.g3g_1).c3g_1 | 0) + (ensureNotNull(this.g3g_1).k3h() ? 0 : ensureNotNull(this.g3g_1).b3g_1) | 0;
|
|
1003
1019
|
if (byteCount > availableByteCount)
|
|
1004
1020
|
return this;
|
|
1005
|
-
var predecessor = this.
|
|
1006
|
-
this.
|
|
1007
|
-
var successor = this.
|
|
1021
|
+
var predecessor = this.g3g_1;
|
|
1022
|
+
this.m3h(ensureNotNull(predecessor), byteCount);
|
|
1023
|
+
var successor = this.n3h();
|
|
1008
1024
|
// Inline function 'kotlin.check' call
|
|
1009
1025
|
if (!(successor == null)) {
|
|
1010
1026
|
throw IllegalStateException_init_$Create$('Check failed.');
|
|
1011
1027
|
}
|
|
1012
|
-
SegmentPool_instance.
|
|
1028
|
+
SegmentPool_instance.u3h(this);
|
|
1013
1029
|
return predecessor;
|
|
1014
1030
|
};
|
|
1015
|
-
protoOf(Segment).
|
|
1016
|
-
var _unary__edvuaz = this.
|
|
1017
|
-
this.
|
|
1018
|
-
this.
|
|
1031
|
+
protoOf(Segment).q3h = function (byte) {
|
|
1032
|
+
var _unary__edvuaz = this.c3g_1;
|
|
1033
|
+
this.c3g_1 = _unary__edvuaz + 1 | 0;
|
|
1034
|
+
this.a3g_1[_unary__edvuaz] = byte;
|
|
1019
1035
|
};
|
|
1020
|
-
protoOf(Segment).
|
|
1021
|
-
var data = this.
|
|
1022
|
-
var limit = this.
|
|
1036
|
+
protoOf(Segment).s3h = function (short) {
|
|
1037
|
+
var data = this.a3g_1;
|
|
1038
|
+
var limit = this.c3g_1;
|
|
1023
1039
|
var _unary__edvuaz = limit;
|
|
1024
1040
|
limit = _unary__edvuaz + 1 | 0;
|
|
1025
1041
|
data[_unary__edvuaz] = toByte((short >>> 8 | 0) & 255);
|
|
1026
1042
|
var _unary__edvuaz_0 = limit;
|
|
1027
1043
|
limit = _unary__edvuaz_0 + 1 | 0;
|
|
1028
1044
|
data[_unary__edvuaz_0] = toByte(short & 255);
|
|
1029
|
-
this.
|
|
1045
|
+
this.c3g_1 = limit;
|
|
1030
1046
|
};
|
|
1031
|
-
protoOf(Segment).
|
|
1032
|
-
var _unary__edvuaz = this.
|
|
1033
|
-
this.
|
|
1034
|
-
return this.
|
|
1047
|
+
protoOf(Segment).i3g = function () {
|
|
1048
|
+
var _unary__edvuaz = this.b3g_1;
|
|
1049
|
+
this.b3g_1 = _unary__edvuaz + 1 | 0;
|
|
1050
|
+
return this.a3g_1[_unary__edvuaz];
|
|
1035
1051
|
};
|
|
1036
|
-
protoOf(Segment).
|
|
1037
|
-
var data = this.
|
|
1038
|
-
var pos = this.
|
|
1052
|
+
protoOf(Segment).k3g = function () {
|
|
1053
|
+
var data = this.a3g_1;
|
|
1054
|
+
var pos = this.b3g_1;
|
|
1039
1055
|
var _unary__edvuaz = pos;
|
|
1040
1056
|
pos = _unary__edvuaz + 1 | 0;
|
|
1041
1057
|
// Inline function 'kotlinx.io.and' call
|
|
@@ -1045,118 +1061,118 @@ protoOf(Segment).k3f = function () {
|
|
|
1045
1061
|
// Inline function 'kotlinx.io.and' call
|
|
1046
1062
|
var tmp$ret$1 = data[_unary__edvuaz_0] & 255;
|
|
1047
1063
|
var s = toShort(tmp | tmp$ret$1);
|
|
1048
|
-
this.
|
|
1064
|
+
this.b3g_1 = pos;
|
|
1049
1065
|
return s;
|
|
1050
1066
|
};
|
|
1051
|
-
protoOf(Segment).
|
|
1067
|
+
protoOf(Segment).m3h = function (sink, byteCount) {
|
|
1052
1068
|
// Inline function 'kotlin.check' call
|
|
1053
|
-
if (!sink.
|
|
1069
|
+
if (!sink.e3g_1) {
|
|
1054
1070
|
var message = 'only owner can write';
|
|
1055
1071
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1056
1072
|
}
|
|
1057
|
-
if ((sink.
|
|
1058
|
-
if (sink.
|
|
1073
|
+
if ((sink.c3g_1 + byteCount | 0) > 8192) {
|
|
1074
|
+
if (sink.k3h())
|
|
1059
1075
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1060
|
-
if (((sink.
|
|
1076
|
+
if (((sink.c3g_1 + byteCount | 0) - sink.b3g_1 | 0) > 8192)
|
|
1061
1077
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1062
|
-
var tmp0 = sink.
|
|
1063
|
-
var tmp2 = sink.
|
|
1064
|
-
var tmp5 = sink.
|
|
1078
|
+
var tmp0 = sink.a3g_1;
|
|
1079
|
+
var tmp2 = sink.a3g_1;
|
|
1080
|
+
var tmp5 = sink.b3g_1;
|
|
1065
1081
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1066
|
-
var endIndex = sink.
|
|
1082
|
+
var endIndex = sink.c3g_1;
|
|
1067
1083
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1068
1084
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1069
1085
|
var tmp = tmp0;
|
|
1070
1086
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1071
1087
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1072
1088
|
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
1073
|
-
sink.
|
|
1074
|
-
sink.
|
|
1089
|
+
sink.c3g_1 = sink.c3g_1 - sink.b3g_1 | 0;
|
|
1090
|
+
sink.b3g_1 = 0;
|
|
1075
1091
|
}
|
|
1076
|
-
var tmp0_0 = this.
|
|
1077
|
-
var tmp2_0 = sink.
|
|
1078
|
-
var tmp4 = sink.
|
|
1079
|
-
var tmp6 = this.
|
|
1092
|
+
var tmp0_0 = this.a3g_1;
|
|
1093
|
+
var tmp2_0 = sink.a3g_1;
|
|
1094
|
+
var tmp4 = sink.c3g_1;
|
|
1095
|
+
var tmp6 = this.b3g_1;
|
|
1080
1096
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1081
|
-
var endIndex_0 = this.
|
|
1097
|
+
var endIndex_0 = this.b3g_1 + byteCount | 0;
|
|
1082
1098
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1083
1099
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1084
1100
|
var tmp_0 = tmp0_0;
|
|
1085
1101
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1086
1102
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1087
1103
|
arrayCopy(tmp_0, tmp2_0, tmp4, tmp6, endIndex_0);
|
|
1088
|
-
sink.
|
|
1089
|
-
this.
|
|
1104
|
+
sink.c3g_1 = sink.c3g_1 + byteCount | 0;
|
|
1105
|
+
this.b3g_1 = this.b3g_1 + byteCount | 0;
|
|
1090
1106
|
};
|
|
1091
|
-
protoOf(Segment).
|
|
1107
|
+
protoOf(Segment).v3g = function (dst, dstStartOffset, dstEndOffset) {
|
|
1092
1108
|
var len = dstEndOffset - dstStartOffset | 0;
|
|
1093
|
-
var tmp0 = this.
|
|
1094
|
-
var tmp6 = this.
|
|
1109
|
+
var tmp0 = this.a3g_1;
|
|
1110
|
+
var tmp6 = this.b3g_1;
|
|
1095
1111
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1096
|
-
var endIndex = this.
|
|
1112
|
+
var endIndex = this.b3g_1 + len | 0;
|
|
1097
1113
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1098
1114
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1099
1115
|
var tmp = tmp0;
|
|
1100
1116
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1101
1117
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1102
1118
|
arrayCopy(tmp, dst, dstStartOffset, tmp6, endIndex);
|
|
1103
|
-
this.
|
|
1119
|
+
this.b3g_1 = this.b3g_1 + len | 0;
|
|
1104
1120
|
};
|
|
1105
|
-
protoOf(Segment).
|
|
1106
|
-
var tmp2 = this.
|
|
1121
|
+
protoOf(Segment).h3h = function (src, srcStartOffset, srcEndOffset) {
|
|
1122
|
+
var tmp2 = this.a3g_1;
|
|
1107
1123
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1108
|
-
var destinationOffset = this.
|
|
1124
|
+
var destinationOffset = this.c3g_1;
|
|
1109
1125
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1110
1126
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1111
1127
|
var tmp = src;
|
|
1112
1128
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1113
1129
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1114
1130
|
arrayCopy(tmp, tmp2, destinationOffset, srcStartOffset, srcEndOffset);
|
|
1115
|
-
this.
|
|
1131
|
+
this.c3g_1 = this.c3g_1 + (srcEndOffset - srcStartOffset | 0) | 0;
|
|
1116
1132
|
};
|
|
1117
1133
|
protoOf(Segment).e1 = function () {
|
|
1118
|
-
return this.
|
|
1134
|
+
return this.c3g_1 - this.b3g_1 | 0;
|
|
1119
1135
|
};
|
|
1120
|
-
protoOf(Segment).
|
|
1121
|
-
return this.
|
|
1136
|
+
protoOf(Segment).g3h = function () {
|
|
1137
|
+
return this.a3g_1.length - this.c3g_1 | 0;
|
|
1122
1138
|
};
|
|
1123
|
-
protoOf(Segment).
|
|
1124
|
-
return this.
|
|
1139
|
+
protoOf(Segment).l3i = function (readOnly) {
|
|
1140
|
+
return this.a3g_1;
|
|
1125
1141
|
};
|
|
1126
|
-
protoOf(Segment).
|
|
1127
|
-
return this.
|
|
1142
|
+
protoOf(Segment).s3g = function (index) {
|
|
1143
|
+
return this.a3g_1[this.b3g_1 + index | 0];
|
|
1128
1144
|
};
|
|
1129
|
-
protoOf(Segment).
|
|
1130
|
-
this.
|
|
1145
|
+
protoOf(Segment).m3i = function (index, value) {
|
|
1146
|
+
this.a3g_1[this.c3g_1 + index | 0] = value;
|
|
1131
1147
|
};
|
|
1132
|
-
protoOf(Segment).
|
|
1133
|
-
var d = this.
|
|
1134
|
-
var l = this.
|
|
1148
|
+
protoOf(Segment).n3i = function (index, b0, b1) {
|
|
1149
|
+
var d = this.a3g_1;
|
|
1150
|
+
var l = this.c3g_1;
|
|
1135
1151
|
d[l + index | 0] = b0;
|
|
1136
1152
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1137
1153
|
};
|
|
1138
|
-
protoOf(Segment).
|
|
1139
|
-
var d = this.
|
|
1140
|
-
var l = this.
|
|
1154
|
+
protoOf(Segment).o3i = function (index, b0, b1, b2) {
|
|
1155
|
+
var d = this.a3g_1;
|
|
1156
|
+
var l = this.c3g_1;
|
|
1141
1157
|
d[l + index | 0] = b0;
|
|
1142
1158
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1143
1159
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1144
1160
|
};
|
|
1145
|
-
protoOf(Segment).
|
|
1146
|
-
var d = this.
|
|
1147
|
-
var l = this.
|
|
1161
|
+
protoOf(Segment).p3i = function (index, b0, b1, b2, b3) {
|
|
1162
|
+
var d = this.a3g_1;
|
|
1163
|
+
var l = this.c3g_1;
|
|
1148
1164
|
d[l + index | 0] = b0;
|
|
1149
1165
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1150
1166
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1151
1167
|
d[(l + index | 0) + 3 | 0] = b3;
|
|
1152
1168
|
};
|
|
1153
1169
|
function Segment() {
|
|
1154
|
-
this.
|
|
1155
|
-
this.
|
|
1156
|
-
this.
|
|
1157
|
-
this.
|
|
1158
|
-
this.
|
|
1159
|
-
this.
|
|
1170
|
+
this.b3g_1 = 0;
|
|
1171
|
+
this.c3g_1 = 0;
|
|
1172
|
+
this.d3g_1 = null;
|
|
1173
|
+
this.e3g_1 = false;
|
|
1174
|
+
this.f3g_1 = null;
|
|
1175
|
+
this.g3g_1 = null;
|
|
1160
1176
|
}
|
|
1161
1177
|
function isEmpty(_this__u8e3s4) {
|
|
1162
1178
|
return _this__u8e3s4.e1() === 0;
|
|
@@ -1167,10 +1183,10 @@ function AlwaysSharedCopyTracker() {
|
|
|
1167
1183
|
AlwaysSharedCopyTracker_instance = this;
|
|
1168
1184
|
SegmentCopyTracker.call(this);
|
|
1169
1185
|
}
|
|
1170
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1186
|
+
protoOf(AlwaysSharedCopyTracker).i3i = function () {
|
|
1171
1187
|
return true;
|
|
1172
1188
|
};
|
|
1173
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1189
|
+
protoOf(AlwaysSharedCopyTracker).k3i = function () {
|
|
1174
1190
|
return Unit_instance;
|
|
1175
1191
|
};
|
|
1176
1192
|
var AlwaysSharedCopyTracker_instance;
|
|
@@ -1190,8 +1206,8 @@ function indexOf_0(_this__u8e3s4, byte, startOffset, endOffset) {
|
|
|
1190
1206
|
var message_0 = '' + endOffset;
|
|
1191
1207
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1192
1208
|
}
|
|
1193
|
-
var p = _this__u8e3s4.
|
|
1194
|
-
var data = _this__u8e3s4.
|
|
1209
|
+
var p = _this__u8e3s4.b3g_1;
|
|
1210
|
+
var data = _this__u8e3s4.l3i(true);
|
|
1195
1211
|
var inductionVariable = startOffset;
|
|
1196
1212
|
if (inductionVariable < endOffset)
|
|
1197
1213
|
do {
|
|
@@ -1244,23 +1260,23 @@ function indexOf_1(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
1244
1260
|
// Inline function 'kotlin.Long.plus' call
|
|
1245
1261
|
var this_0 = offset;
|
|
1246
1262
|
var tmp$ret$2 = add(this_0, fromInt(1));
|
|
1247
|
-
tmp_0 = _this__u8e3s4.
|
|
1263
|
+
tmp_0 = _this__u8e3s4.y3f(tmp$ret$2);
|
|
1248
1264
|
} else {
|
|
1249
1265
|
tmp_0 = false;
|
|
1250
1266
|
}
|
|
1251
1267
|
if (!tmp_0) {
|
|
1252
1268
|
break $l$loop;
|
|
1253
1269
|
}
|
|
1254
|
-
var tmp_1 = _this__u8e3s4.
|
|
1270
|
+
var tmp_1 = _this__u8e3s4.v3f();
|
|
1255
1271
|
var tmp_2 = offset;
|
|
1256
1272
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1257
|
-
var b = _this__u8e3s4.
|
|
1273
|
+
var b = _this__u8e3s4.v3f().e1();
|
|
1258
1274
|
var tmp$ret$3 = compare(endIndex, b) <= 0 ? endIndex : b;
|
|
1259
1275
|
var idx = indexOf(tmp_1, byte, tmp_2, tmp$ret$3);
|
|
1260
1276
|
if (!equalsLong(idx, new Long(-1, -1))) {
|
|
1261
1277
|
return idx;
|
|
1262
1278
|
}
|
|
1263
|
-
offset = _this__u8e3s4.
|
|
1279
|
+
offset = _this__u8e3s4.v3f().e1();
|
|
1264
1280
|
}
|
|
1265
1281
|
return new Long(-1, -1);
|
|
1266
1282
|
}
|
|
@@ -1268,22 +1284,22 @@ function readByteArrayImpl(_this__u8e3s4, size) {
|
|
|
1268
1284
|
var arraySize = size;
|
|
1269
1285
|
if (size === -1) {
|
|
1270
1286
|
var fetchSize = new Long(2147483647, 0);
|
|
1271
|
-
while (compare(_this__u8e3s4.
|
|
1287
|
+
while (compare(_this__u8e3s4.v3f().e1(), new Long(2147483647, 0)) < 0 && _this__u8e3s4.y3f(fetchSize)) {
|
|
1272
1288
|
// Inline function 'kotlin.Long.times' call
|
|
1273
1289
|
var this_0 = fetchSize;
|
|
1274
1290
|
fetchSize = multiply(this_0, fromInt(2));
|
|
1275
1291
|
}
|
|
1276
1292
|
// Inline function 'kotlin.check' call
|
|
1277
|
-
if (!(compare(_this__u8e3s4.
|
|
1278
|
-
var message = "Can't create an array of size " + _this__u8e3s4.
|
|
1293
|
+
if (!(compare(_this__u8e3s4.v3f().e1(), new Long(2147483647, 0)) < 0)) {
|
|
1294
|
+
var message = "Can't create an array of size " + _this__u8e3s4.v3f().e1().toString();
|
|
1279
1295
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1280
1296
|
}
|
|
1281
|
-
arraySize = convertToInt(_this__u8e3s4.
|
|
1297
|
+
arraySize = convertToInt(_this__u8e3s4.v3f().e1());
|
|
1282
1298
|
} else {
|
|
1283
|
-
_this__u8e3s4.
|
|
1299
|
+
_this__u8e3s4.x3f(fromInt(size));
|
|
1284
1300
|
}
|
|
1285
1301
|
var array = new Int8Array(arraySize);
|
|
1286
|
-
readTo(_this__u8e3s4.
|
|
1302
|
+
readTo(_this__u8e3s4.v3f(), array);
|
|
1287
1303
|
return array;
|
|
1288
1304
|
}
|
|
1289
1305
|
function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
@@ -1294,7 +1310,7 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
1294
1310
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1295
1311
|
var offset = startIndex;
|
|
1296
1312
|
while (offset < endIndex) {
|
|
1297
|
-
var bytesRead = _this__u8e3s4.
|
|
1313
|
+
var bytesRead = _this__u8e3s4.u3g(sink, offset, endIndex);
|
|
1298
1314
|
if (bytesRead === -1) {
|
|
1299
1315
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + (endIndex - startIndex | 0) + ' bytes. ' + ('Only ' + bytesRead + ' bytes were read.'));
|
|
1300
1316
|
}
|
|
@@ -1302,12 +1318,15 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
1302
1318
|
}
|
|
1303
1319
|
}
|
|
1304
1320
|
function readString(_this__u8e3s4, byteCount) {
|
|
1305
|
-
_this__u8e3s4.
|
|
1306
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
1321
|
+
_this__u8e3s4.x3f(byteCount);
|
|
1322
|
+
return commonReadUtf8(_this__u8e3s4.v3f(), byteCount);
|
|
1307
1323
|
}
|
|
1308
1324
|
function readString_0(_this__u8e3s4) {
|
|
1309
|
-
|
|
1310
|
-
|
|
1325
|
+
return commonReadUtf8(_this__u8e3s4, _this__u8e3s4.e1());
|
|
1326
|
+
}
|
|
1327
|
+
function readString_1(_this__u8e3s4) {
|
|
1328
|
+
_this__u8e3s4.y3f(new Long(-1, 2147483647));
|
|
1329
|
+
return commonReadUtf8(_this__u8e3s4.v3f(), _this__u8e3s4.v3f().e1());
|
|
1311
1330
|
}
|
|
1312
1331
|
function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
1313
1332
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
@@ -1317,7 +1336,7 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1317
1336
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1318
1337
|
// Inline function 'kotlinx.io.writeToInternalBuffer' call
|
|
1319
1338
|
// Inline function 'kotlinx.io.commonWriteUtf8' call
|
|
1320
|
-
var this_0 = _this__u8e3s4.
|
|
1339
|
+
var this_0 = _this__u8e3s4.v3f();
|
|
1321
1340
|
var i = startIndex;
|
|
1322
1341
|
while (i < endIndex) {
|
|
1323
1342
|
var p0 = i;
|
|
@@ -1327,15 +1346,15 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1327
1346
|
if (c < 128) {
|
|
1328
1347
|
$l$block_0: {
|
|
1329
1348
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1330
|
-
var tail = this_0.
|
|
1349
|
+
var tail = this_0.b3h(1);
|
|
1331
1350
|
var ctx = get_SegmentWriteContextImpl();
|
|
1332
1351
|
var segmentOffset = -i | 0;
|
|
1333
1352
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1334
|
-
var b = i + tail.
|
|
1353
|
+
var b = i + tail.g3h() | 0;
|
|
1335
1354
|
var runLimit = Math.min(endIndex, b);
|
|
1336
1355
|
var _unary__edvuaz = i;
|
|
1337
1356
|
i = _unary__edvuaz + 1 | 0;
|
|
1338
|
-
ctx.
|
|
1357
|
+
ctx.t3i(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
|
|
1339
1358
|
$l$loop: while (i < runLimit) {
|
|
1340
1359
|
var p0_0 = i;
|
|
1341
1360
|
// Inline function 'kotlin.code' call
|
|
@@ -1345,95 +1364,95 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1345
1364
|
break $l$loop;
|
|
1346
1365
|
var _unary__edvuaz_0 = i;
|
|
1347
1366
|
i = _unary__edvuaz_0 + 1 | 0;
|
|
1348
|
-
ctx.
|
|
1367
|
+
ctx.t3i(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
|
|
1349
1368
|
}
|
|
1350
1369
|
var bytesWritten = i + segmentOffset | 0;
|
|
1351
1370
|
if (bytesWritten === 1) {
|
|
1352
|
-
tail.
|
|
1371
|
+
tail.c3g_1 = tail.c3g_1 + bytesWritten | 0;
|
|
1353
1372
|
var tmp = this_0;
|
|
1354
1373
|
// Inline function 'kotlin.Long.plus' call
|
|
1355
|
-
var this_3 = this_0.
|
|
1356
|
-
tmp.
|
|
1374
|
+
var this_3 = this_0.u3f_1;
|
|
1375
|
+
tmp.u3f_1 = add(this_3, fromInt(bytesWritten));
|
|
1357
1376
|
break $l$block_0;
|
|
1358
1377
|
}
|
|
1359
1378
|
// Inline function 'kotlin.check' call
|
|
1360
|
-
if (!(0 <= bytesWritten ? bytesWritten <= tail.
|
|
1361
|
-
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.
|
|
1379
|
+
if (!(0 <= bytesWritten ? bytesWritten <= tail.g3h() : false)) {
|
|
1380
|
+
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.g3h();
|
|
1362
1381
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1363
1382
|
}
|
|
1364
1383
|
if (!(bytesWritten === 0)) {
|
|
1365
|
-
tail.
|
|
1384
|
+
tail.c3g_1 = tail.c3g_1 + bytesWritten | 0;
|
|
1366
1385
|
var tmp_0 = this_0;
|
|
1367
1386
|
// Inline function 'kotlin.Long.plus' call
|
|
1368
|
-
var this_4 = this_0.
|
|
1369
|
-
tmp_0.
|
|
1387
|
+
var this_4 = this_0.u3f_1;
|
|
1388
|
+
tmp_0.u3f_1 = add(this_4, fromInt(bytesWritten));
|
|
1370
1389
|
break $l$block_0;
|
|
1371
1390
|
}
|
|
1372
1391
|
if (isEmpty(tail)) {
|
|
1373
|
-
this_0.
|
|
1392
|
+
this_0.v3h();
|
|
1374
1393
|
}
|
|
1375
1394
|
}
|
|
1376
1395
|
} else if (c < 2048) {
|
|
1377
1396
|
$l$block_2: {
|
|
1378
1397
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1379
|
-
var tail_0 = this_0.
|
|
1380
|
-
get_SegmentWriteContextImpl().
|
|
1398
|
+
var tail_0 = this_0.b3h(2);
|
|
1399
|
+
get_SegmentWriteContextImpl().s3i(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
1381
1400
|
var bytesWritten_0 = 2;
|
|
1382
1401
|
if (bytesWritten_0 === 2) {
|
|
1383
|
-
tail_0.
|
|
1402
|
+
tail_0.c3g_1 = tail_0.c3g_1 + bytesWritten_0 | 0;
|
|
1384
1403
|
var tmp_1 = this_0;
|
|
1385
1404
|
// Inline function 'kotlin.Long.plus' call
|
|
1386
|
-
var this_5 = this_0.
|
|
1387
|
-
tmp_1.
|
|
1405
|
+
var this_5 = this_0.u3f_1;
|
|
1406
|
+
tmp_1.u3f_1 = add(this_5, fromInt(bytesWritten_0));
|
|
1388
1407
|
break $l$block_2;
|
|
1389
1408
|
}
|
|
1390
1409
|
// Inline function 'kotlin.check' call
|
|
1391
|
-
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.
|
|
1392
|
-
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.
|
|
1410
|
+
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.g3h() : false)) {
|
|
1411
|
+
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.g3h();
|
|
1393
1412
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
1394
1413
|
}
|
|
1395
1414
|
if (!(bytesWritten_0 === 0)) {
|
|
1396
|
-
tail_0.
|
|
1415
|
+
tail_0.c3g_1 = tail_0.c3g_1 + bytesWritten_0 | 0;
|
|
1397
1416
|
var tmp_2 = this_0;
|
|
1398
1417
|
// Inline function 'kotlin.Long.plus' call
|
|
1399
|
-
var this_6 = this_0.
|
|
1400
|
-
tmp_2.
|
|
1418
|
+
var this_6 = this_0.u3f_1;
|
|
1419
|
+
tmp_2.u3f_1 = add(this_6, fromInt(bytesWritten_0));
|
|
1401
1420
|
break $l$block_2;
|
|
1402
1421
|
}
|
|
1403
1422
|
if (isEmpty(tail_0)) {
|
|
1404
|
-
this_0.
|
|
1423
|
+
this_0.v3h();
|
|
1405
1424
|
}
|
|
1406
1425
|
}
|
|
1407
1426
|
i = i + 1 | 0;
|
|
1408
1427
|
} else if (c < 55296 || c > 57343) {
|
|
1409
1428
|
$l$block_4: {
|
|
1410
1429
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1411
|
-
var tail_1 = this_0.
|
|
1412
|
-
get_SegmentWriteContextImpl().
|
|
1430
|
+
var tail_1 = this_0.b3h(3);
|
|
1431
|
+
get_SegmentWriteContextImpl().r3i(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
1413
1432
|
var bytesWritten_1 = 3;
|
|
1414
1433
|
if (bytesWritten_1 === 3) {
|
|
1415
|
-
tail_1.
|
|
1434
|
+
tail_1.c3g_1 = tail_1.c3g_1 + bytesWritten_1 | 0;
|
|
1416
1435
|
var tmp_3 = this_0;
|
|
1417
1436
|
// Inline function 'kotlin.Long.plus' call
|
|
1418
|
-
var this_7 = this_0.
|
|
1419
|
-
tmp_3.
|
|
1437
|
+
var this_7 = this_0.u3f_1;
|
|
1438
|
+
tmp_3.u3f_1 = add(this_7, fromInt(bytesWritten_1));
|
|
1420
1439
|
break $l$block_4;
|
|
1421
1440
|
}
|
|
1422
1441
|
// Inline function 'kotlin.check' call
|
|
1423
|
-
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.
|
|
1424
|
-
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.
|
|
1442
|
+
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.g3h() : false)) {
|
|
1443
|
+
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.g3h();
|
|
1425
1444
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
1426
1445
|
}
|
|
1427
1446
|
if (!(bytesWritten_1 === 0)) {
|
|
1428
|
-
tail_1.
|
|
1447
|
+
tail_1.c3g_1 = tail_1.c3g_1 + bytesWritten_1 | 0;
|
|
1429
1448
|
var tmp_4 = this_0;
|
|
1430
1449
|
// Inline function 'kotlin.Long.plus' call
|
|
1431
|
-
var this_8 = this_0.
|
|
1432
|
-
tmp_4.
|
|
1450
|
+
var this_8 = this_0.u3f_1;
|
|
1451
|
+
tmp_4.u3f_1 = add(this_8, fromInt(bytesWritten_1));
|
|
1433
1452
|
break $l$block_4;
|
|
1434
1453
|
}
|
|
1435
1454
|
if (isEmpty(tail_1)) {
|
|
1436
|
-
this_0.
|
|
1455
|
+
this_0.v3h();
|
|
1437
1456
|
}
|
|
1438
1457
|
}
|
|
1439
1458
|
i = i + 1 | 0;
|
|
@@ -1452,64 +1471,64 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1452
1471
|
// Inline function 'kotlin.code' call
|
|
1453
1472
|
var this_10 = _Char___init__impl__6a9atx(63);
|
|
1454
1473
|
var tmp$ret$29 = Char__toInt_impl_vasixd(this_10);
|
|
1455
|
-
this_0.
|
|
1474
|
+
this_0.p3h(toByte(tmp$ret$29));
|
|
1456
1475
|
i = i + 1 | 0;
|
|
1457
1476
|
} else {
|
|
1458
1477
|
var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
|
|
1459
1478
|
$l$block_6: {
|
|
1460
1479
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1461
|
-
var tail_2 = this_0.
|
|
1462
|
-
get_SegmentWriteContextImpl().
|
|
1480
|
+
var tail_2 = this_0.b3h(4);
|
|
1481
|
+
get_SegmentWriteContextImpl().q3i(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
1463
1482
|
var bytesWritten_2 = 4;
|
|
1464
1483
|
if (bytesWritten_2 === 4) {
|
|
1465
|
-
tail_2.
|
|
1484
|
+
tail_2.c3g_1 = tail_2.c3g_1 + bytesWritten_2 | 0;
|
|
1466
1485
|
var tmp_6 = this_0;
|
|
1467
1486
|
// Inline function 'kotlin.Long.plus' call
|
|
1468
|
-
var this_11 = this_0.
|
|
1469
|
-
tmp_6.
|
|
1487
|
+
var this_11 = this_0.u3f_1;
|
|
1488
|
+
tmp_6.u3f_1 = add(this_11, fromInt(bytesWritten_2));
|
|
1470
1489
|
break $l$block_6;
|
|
1471
1490
|
}
|
|
1472
1491
|
// Inline function 'kotlin.check' call
|
|
1473
|
-
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.
|
|
1474
|
-
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.
|
|
1492
|
+
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.g3h() : false)) {
|
|
1493
|
+
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.g3h();
|
|
1475
1494
|
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
1476
1495
|
}
|
|
1477
1496
|
if (!(bytesWritten_2 === 0)) {
|
|
1478
|
-
tail_2.
|
|
1497
|
+
tail_2.c3g_1 = tail_2.c3g_1 + bytesWritten_2 | 0;
|
|
1479
1498
|
var tmp_7 = this_0;
|
|
1480
1499
|
// Inline function 'kotlin.Long.plus' call
|
|
1481
|
-
var this_12 = this_0.
|
|
1482
|
-
tmp_7.
|
|
1500
|
+
var this_12 = this_0.u3f_1;
|
|
1501
|
+
tmp_7.u3f_1 = add(this_12, fromInt(bytesWritten_2));
|
|
1483
1502
|
break $l$block_6;
|
|
1484
1503
|
}
|
|
1485
1504
|
if (isEmpty(tail_2)) {
|
|
1486
|
-
this_0.
|
|
1505
|
+
this_0.v3h();
|
|
1487
1506
|
}
|
|
1488
1507
|
}
|
|
1489
1508
|
i = i + 2 | 0;
|
|
1490
1509
|
}
|
|
1491
1510
|
}
|
|
1492
1511
|
}
|
|
1493
|
-
_this__u8e3s4.
|
|
1512
|
+
_this__u8e3s4.l3g();
|
|
1494
1513
|
}
|
|
1495
1514
|
function commonReadUtf8(_this__u8e3s4, byteCount) {
|
|
1496
1515
|
if (equalsLong(byteCount, new Long(0, 0)))
|
|
1497
1516
|
return '';
|
|
1498
1517
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
1499
|
-
var curr = _this__u8e3s4.
|
|
1518
|
+
var curr = _this__u8e3s4.s3f_1;
|
|
1500
1519
|
while (!(curr == null)) {
|
|
1501
1520
|
get_SegmentReadContextImpl();
|
|
1502
1521
|
if (compare(fromInt(curr.e1()), byteCount) >= 0) {
|
|
1503
1522
|
var result = '';
|
|
1504
1523
|
// Inline function 'kotlinx.io.unsafe.withData' call
|
|
1505
|
-
var tmp0 = curr.
|
|
1506
|
-
var tmp2 = curr.
|
|
1507
|
-
var tmp0_0 = curr.
|
|
1524
|
+
var tmp0 = curr.l3i(true);
|
|
1525
|
+
var tmp2 = curr.b3g_1;
|
|
1526
|
+
var tmp0_0 = curr.c3g_1;
|
|
1508
1527
|
// Inline function 'kotlin.math.min' call
|
|
1509
1528
|
var b = tmp2 + convertToInt(byteCount) | 0;
|
|
1510
1529
|
var tmp$ret$4 = Math.min(tmp0_0, b);
|
|
1511
1530
|
result = commonToUtf8String(tmp0, tmp2, tmp$ret$4);
|
|
1512
|
-
_this__u8e3s4.
|
|
1531
|
+
_this__u8e3s4.t3g(byteCount);
|
|
1513
1532
|
return result;
|
|
1514
1533
|
}
|
|
1515
1534
|
return commonToUtf8String(readByteArray_0(_this__u8e3s4, convertToInt(byteCount)));
|
|
@@ -1880,27 +1899,27 @@ function UnsafeBufferOperations_getInstance() {
|
|
|
1880
1899
|
}
|
|
1881
1900
|
function SegmentReadContextImpl$1() {
|
|
1882
1901
|
}
|
|
1883
|
-
protoOf(SegmentReadContextImpl$1).
|
|
1884
|
-
return segment.
|
|
1902
|
+
protoOf(SegmentReadContextImpl$1).t3h = function (segment, offset) {
|
|
1903
|
+
return segment.s3g(offset);
|
|
1885
1904
|
};
|
|
1886
1905
|
function SegmentWriteContextImpl$1() {
|
|
1887
1906
|
}
|
|
1888
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1889
|
-
segment.
|
|
1907
|
+
protoOf(SegmentWriteContextImpl$1).t3i = function (segment, offset, value) {
|
|
1908
|
+
segment.m3i(offset, value);
|
|
1890
1909
|
};
|
|
1891
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1892
|
-
segment.
|
|
1910
|
+
protoOf(SegmentWriteContextImpl$1).s3i = function (segment, offset, b0, b1) {
|
|
1911
|
+
segment.n3i(offset, b0, b1);
|
|
1893
1912
|
};
|
|
1894
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1895
|
-
segment.
|
|
1913
|
+
protoOf(SegmentWriteContextImpl$1).r3i = function (segment, offset, b0, b1, b2) {
|
|
1914
|
+
segment.o3i(offset, b0, b1, b2);
|
|
1896
1915
|
};
|
|
1897
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1898
|
-
segment.
|
|
1916
|
+
protoOf(SegmentWriteContextImpl$1).q3i = function (segment, offset, b0, b1, b2, b3) {
|
|
1917
|
+
segment.p3i(offset, b0, b1, b2, b3);
|
|
1899
1918
|
};
|
|
1900
1919
|
function BufferIterationContextImpl$1() {
|
|
1901
1920
|
}
|
|
1902
|
-
protoOf(BufferIterationContextImpl$1).
|
|
1903
|
-
return get_SegmentReadContextImpl().
|
|
1921
|
+
protoOf(BufferIterationContextImpl$1).t3h = function (segment, offset) {
|
|
1922
|
+
return get_SegmentReadContextImpl().t3h(segment, offset);
|
|
1904
1923
|
};
|
|
1905
1924
|
var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
|
|
1906
1925
|
function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
@@ -1968,15 +1987,15 @@ function EOFException() {
|
|
|
1968
1987
|
captureStack(this, EOFException);
|
|
1969
1988
|
}
|
|
1970
1989
|
function SegmentPool() {
|
|
1971
|
-
this.
|
|
1972
|
-
this.
|
|
1990
|
+
this.c3h_1 = 0;
|
|
1991
|
+
this.d3h_1 = 0;
|
|
1973
1992
|
}
|
|
1974
|
-
protoOf(SegmentPool).
|
|
1975
|
-
return Companion_instance.
|
|
1993
|
+
protoOf(SegmentPool).e3h = function () {
|
|
1994
|
+
return Companion_instance.h3i();
|
|
1976
1995
|
};
|
|
1977
|
-
protoOf(SegmentPool).
|
|
1996
|
+
protoOf(SegmentPool).u3h = function (segment) {
|
|
1978
1997
|
};
|
|
1979
|
-
protoOf(SegmentPool).
|
|
1998
|
+
protoOf(SegmentPool).j3i = function () {
|
|
1980
1999
|
return AlwaysSharedCopyTracker_getInstance();
|
|
1981
2000
|
};
|
|
1982
2001
|
var SegmentPool_instance;
|
|
@@ -1984,7 +2003,7 @@ function SegmentPool_getInstance() {
|
|
|
1984
2003
|
return SegmentPool_instance;
|
|
1985
2004
|
}
|
|
1986
2005
|
//region block: post-declaration
|
|
1987
|
-
protoOf(Buffer).
|
|
2006
|
+
protoOf(Buffer).i3h = write$default;
|
|
1988
2007
|
//endregion
|
|
1989
2008
|
//region block: init
|
|
1990
2009
|
Companion_instance = new Companion();
|
|
@@ -2005,8 +2024,9 @@ export {
|
|
|
2005
2024
|
readByteArray_0 as readByteArray1fhzfwi2j014k,
|
|
2006
2025
|
readByteArray as readByteArray1ri21h2rciakw,
|
|
2007
2026
|
readByteString as readByteString2hnsbql6t4ads,
|
|
2008
|
-
|
|
2027
|
+
readString_1 as readString2nvggcfaijfhd,
|
|
2009
2028
|
readString as readString3v6duspiz33tv,
|
|
2029
|
+
readString_0 as readStringo8i62qxt5m4m,
|
|
2010
2030
|
writeString as writeString33ca4btrgctw7,
|
|
2011
2031
|
};
|
|
2012
2032
|
//endregion
|