@dmarket/p2p-tracker-core 1.2.1-SNAPSHOT-development.165 → 1.3.1-SNAPSHOT-development.204
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 +3110 -2220
- package/dmarket-p2p-tracker-core-domain.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +4 -4
- package/kotlinx-coroutines-core.mjs +7 -7
- package/kotlinx-coroutines-core.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.mjs +30 -30
- package/kotlinx-io-kotlinx-io-core.mjs +451 -451
- package/ktor-ktor-client-core.mjs +1863 -1863
- package/ktor-ktor-events.mjs +5 -5
- package/ktor-ktor-http-cio.mjs +313 -313
- package/ktor-ktor-http.mjs +626 -626
- package/ktor-ktor-io.mjs +607 -607
- package/ktor-ktor-utils.mjs +661 -661
- package/ktor-ktor-websockets.mjs +367 -367
- package/p2p-tracker-core.mjs +7612 -7181
- 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.a3r(source, startIndex, endIndex);
|
|
54
54
|
tmp = Unit_instance;
|
|
55
55
|
} else {
|
|
56
|
-
tmp = $super.
|
|
56
|
+
tmp = $super.a3r.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.n3p_1 = null;
|
|
109
|
+
this.o3p_1 = null;
|
|
110
|
+
this.p3p_1 = new Long(0, 0);
|
|
111
111
|
}
|
|
112
112
|
protoOf(Buffer).e1 = function () {
|
|
113
|
-
return this.
|
|
113
|
+
return this.p3p_1;
|
|
114
114
|
};
|
|
115
|
-
protoOf(Buffer).
|
|
115
|
+
protoOf(Buffer).q3p = function () {
|
|
116
116
|
return this;
|
|
117
117
|
};
|
|
118
|
-
protoOf(Buffer).
|
|
118
|
+
protoOf(Buffer).r3p = function () {
|
|
119
119
|
return equalsLong(this.e1(), new Long(0, 0));
|
|
120
120
|
};
|
|
121
|
-
protoOf(Buffer).
|
|
121
|
+
protoOf(Buffer).s3p = 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).z3n = 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).t3p = 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).a3o = 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).u3p = function () {
|
|
140
|
+
var tmp0_elvis_lhs = this.n3p_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).b3o = function () {
|
|
|
147
147
|
var segment = tmp;
|
|
148
148
|
var segmentSize = segment.e1();
|
|
149
149
|
if (segmentSize === 0) {
|
|
150
|
-
this.
|
|
151
|
-
return this.
|
|
150
|
+
this.c3q();
|
|
151
|
+
return this.u3p();
|
|
152
152
|
}
|
|
153
|
-
var v = segment.
|
|
154
|
-
this.
|
|
153
|
+
var v = segment.d3q();
|
|
154
|
+
this.p3p_1 = subtract(this.p3p_1, new Long(1, 0));
|
|
155
155
|
if (segmentSize === 1) {
|
|
156
|
-
this.
|
|
156
|
+
this.c3q();
|
|
157
157
|
}
|
|
158
158
|
return v;
|
|
159
159
|
};
|
|
160
|
-
protoOf(Buffer).
|
|
161
|
-
var tmp0_elvis_lhs = this.
|
|
160
|
+
protoOf(Buffer).e3q = function () {
|
|
161
|
+
var tmp0_elvis_lhs = this.n3p_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).l3o = function () {
|
|
|
168
168
|
var segment = tmp;
|
|
169
169
|
var segmentSize = segment.e1();
|
|
170
170
|
if (segmentSize < 2) {
|
|
171
|
-
this.
|
|
171
|
+
this.s3p(new Long(2, 0));
|
|
172
172
|
if (segmentSize === 0) {
|
|
173
|
-
this.
|
|
174
|
-
return this.
|
|
173
|
+
this.c3q();
|
|
174
|
+
return this.e3q();
|
|
175
175
|
}
|
|
176
176
|
// Inline function 'kotlinx.io.and' call
|
|
177
|
-
var tmp_0 = (this.
|
|
177
|
+
var tmp_0 = (this.u3p() & 255) << 8;
|
|
178
178
|
// Inline function 'kotlinx.io.and' call
|
|
179
|
-
var tmp$ret$1 = this.
|
|
179
|
+
var tmp$ret$1 = this.u3p() & 255;
|
|
180
180
|
return toShort(tmp_0 | tmp$ret$1);
|
|
181
181
|
}
|
|
182
|
-
var v = segment.
|
|
183
|
-
this.
|
|
182
|
+
var v = segment.f3q();
|
|
183
|
+
this.p3p_1 = subtract(this.p3p_1, new Long(2, 0));
|
|
184
184
|
if (segmentSize === 2) {
|
|
185
|
-
this.
|
|
185
|
+
this.c3q();
|
|
186
186
|
}
|
|
187
187
|
return v;
|
|
188
188
|
};
|
|
189
|
-
protoOf(Buffer).
|
|
189
|
+
protoOf(Buffer).g3q = function () {
|
|
190
190
|
return Unit_instance;
|
|
191
191
|
};
|
|
192
|
-
protoOf(Buffer).
|
|
192
|
+
protoOf(Buffer).h3q = 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.p3p_1 = add(out.p3p_1, remainingByteCount);
|
|
199
|
+
var s = this.n3p_1;
|
|
200
|
+
while (compare(currentOffset, fromInt(ensureNotNull(s).x3p_1 - s.w3p_1 | 0)) >= 0) {
|
|
201
|
+
currentOffset = subtract(currentOffset, fromInt(s.x3p_1 - s.w3p_1 | 0));
|
|
202
|
+
s = s.a3q_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).i3q();
|
|
206
|
+
copy.w3p_1 = copy.w3p_1 + convertToInt(currentOffset) | 0;
|
|
207
207
|
var tmp = copy;
|
|
208
|
-
var tmp0 = copy.
|
|
208
|
+
var tmp0 = copy.w3p_1 + convertToInt(remainingByteCount) | 0;
|
|
209
209
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
210
|
-
var b = copy.
|
|
211
|
-
tmp.
|
|
210
|
+
var b = copy.x3p_1;
|
|
211
|
+
tmp.x3p_1 = Math.min(tmp0, b);
|
|
212
212
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
213
|
-
if (out.
|
|
214
|
-
out.
|
|
215
|
-
out.
|
|
213
|
+
if (out.n3p_1 == null) {
|
|
214
|
+
out.n3p_1 = copy;
|
|
215
|
+
out.o3p_1 = copy;
|
|
216
216
|
} else if (false) {
|
|
217
|
-
out.
|
|
218
|
-
if (ensureNotNull(out.
|
|
219
|
-
out.
|
|
217
|
+
out.o3p_1 = ensureNotNull(out.o3p_1).j3q(copy).k3q();
|
|
218
|
+
if (ensureNotNull(out.o3p_1).b3q_1 == null) {
|
|
219
|
+
out.n3p_1 = out.o3p_1;
|
|
220
220
|
}
|
|
221
221
|
} else {
|
|
222
|
-
out.
|
|
222
|
+
out.o3p_1 = ensureNotNull(out.o3p_1).j3q(copy);
|
|
223
223
|
}
|
|
224
|
-
remainingByteCount = subtract(remainingByteCount, fromInt(copy.
|
|
224
|
+
remainingByteCount = subtract(remainingByteCount, fromInt(copy.x3p_1 - copy.w3p_1 | 0));
|
|
225
225
|
currentOffset = new Long(0, 0);
|
|
226
|
-
s = s.
|
|
226
|
+
s = s.a3q_1;
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
|
-
protoOf(Buffer).
|
|
229
|
+
protoOf(Buffer).l3q = 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.o3p_1);
|
|
234
|
+
if (tail.x3p_1 < 8192 && tail.z3p_1) {
|
|
235
|
+
result = subtract(result, fromInt(tail.x3p_1 - tail.w3p_1 | 0));
|
|
236
236
|
}
|
|
237
237
|
return result;
|
|
238
238
|
};
|
|
239
|
-
protoOf(Buffer).
|
|
239
|
+
protoOf(Buffer).m3q = 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.n3p_1).n3q(0);
|
|
245
245
|
}
|
|
246
246
|
$l$block_1: {
|
|
247
247
|
// Inline function 'kotlinx.io.seek' call
|
|
248
|
-
if (this.
|
|
248
|
+
if (this.n3p_1 == null) {
|
|
249
249
|
var offset = new Long(-1, -1);
|
|
250
|
-
return ensureNotNull(null).
|
|
250
|
+
return ensureNotNull(null).n3q(convertToInt(subtract(position, offset)));
|
|
251
251
|
}
|
|
252
252
|
if (compare(subtract(this.e1(), position), position) < 0) {
|
|
253
|
-
var s = this.
|
|
253
|
+
var s = this.o3p_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.x3p_1 - s.w3p_1 | 0));
|
|
257
257
|
if (compare(offset_0, position) <= 0)
|
|
258
258
|
break $l$loop;
|
|
259
|
-
s = s.
|
|
259
|
+
s = s.b3q_1;
|
|
260
260
|
}
|
|
261
261
|
var tmp0 = s;
|
|
262
262
|
var offset_1 = offset_0;
|
|
263
|
-
return ensureNotNull(tmp0).
|
|
263
|
+
return ensureNotNull(tmp0).n3q(convertToInt(subtract(position, offset_1)));
|
|
264
264
|
} else {
|
|
265
|
-
var s_0 = this.
|
|
265
|
+
var s_0 = this.n3p_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.x3p_1 - s_0.w3p_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.a3q_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).n3q(convertToInt(subtract(position, offset_3)));
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
};
|
|
283
283
|
protoOf(Buffer).b3 = function () {
|
|
284
|
-
return this.
|
|
284
|
+
return this.o3q(this.e1());
|
|
285
285
|
};
|
|
286
|
-
protoOf(Buffer).
|
|
286
|
+
protoOf(Buffer).o3q = 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).v3o = 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.n3p_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).v3o = 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.x3p_1 - head.w3p_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.p3p_1 = subtract(this.p3p_1, fromInt(toSkip));
|
|
311
311
|
remainingByteCount = subtract(remainingByteCount, fromInt(toSkip));
|
|
312
|
-
head.
|
|
313
|
-
if (head.
|
|
314
|
-
this.
|
|
312
|
+
head.w3p_1 = head.w3p_1 + toSkip | 0;
|
|
313
|
+
if (head.w3p_1 === head.x3p_1) {
|
|
314
|
+
this.c3q();
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
};
|
|
318
|
-
protoOf(Buffer).
|
|
318
|
+
protoOf(Buffer).p3q = 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.n3p_1;
|
|
323
323
|
var tmp;
|
|
324
324
|
if (tmp0_elvis_lhs == null) {
|
|
325
325
|
return -1;
|
|
@@ -331,14 +331,14 @@ protoOf(Buffer).w3o = 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.q3q(sink, startIndex, startIndex + toCopy | 0);
|
|
335
|
+
this.p3p_1 = subtract(this.p3p_1, fromInt(toCopy));
|
|
336
336
|
if (isEmpty(s)) {
|
|
337
|
-
this.
|
|
337
|
+
this.c3q();
|
|
338
338
|
}
|
|
339
339
|
return toCopy;
|
|
340
340
|
};
|
|
341
|
-
protoOf(Buffer).
|
|
341
|
+
protoOf(Buffer).r3q = 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).y3o = 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.s3q(this, bytesWritten);
|
|
352
352
|
return bytesWritten;
|
|
353
353
|
};
|
|
354
|
-
protoOf(Buffer).
|
|
354
|
+
protoOf(Buffer).t3q = 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,62 +359,62 @@ protoOf(Buffer).a3p = 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.s3q(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.s3q(this, byteCount);
|
|
366
366
|
};
|
|
367
|
-
protoOf(Buffer).
|
|
367
|
+
protoOf(Buffer).u3q = function (sink) {
|
|
368
368
|
var byteCount = this.e1();
|
|
369
369
|
if (compare(byteCount, new Long(0, 0)) > 0) {
|
|
370
|
-
sink.
|
|
370
|
+
sink.s3q(this, byteCount);
|
|
371
371
|
}
|
|
372
372
|
return byteCount;
|
|
373
373
|
};
|
|
374
|
-
protoOf(Buffer).
|
|
374
|
+
protoOf(Buffer).v3q = function () {
|
|
375
375
|
return buffered(new PeekSource(this));
|
|
376
376
|
};
|
|
377
|
-
protoOf(Buffer).
|
|
377
|
+
protoOf(Buffer).w3q = 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.o3p_1 == null) {
|
|
384
|
+
var result = SegmentPool_instance.z3q();
|
|
385
|
+
this.n3p_1 = result;
|
|
386
|
+
this.o3p_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.o3p_1);
|
|
390
|
+
if ((t.x3p_1 + minimumCapacity | 0) > 8192 || !t.z3p_1) {
|
|
391
|
+
var newTail = t.j3q(SegmentPool_instance.z3q());
|
|
392
|
+
this.o3p_1 = newTail;
|
|
393
393
|
return newTail;
|
|
394
394
|
}
|
|
395
395
|
return t;
|
|
396
396
|
};
|
|
397
|
-
protoOf(Buffer).
|
|
397
|
+
protoOf(Buffer).a3r = 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.w3q(1);
|
|
404
404
|
var tmp0 = endIndex - currentOffset | 0;
|
|
405
405
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
406
|
-
var b = tail.
|
|
406
|
+
var b = tail.b3r();
|
|
407
407
|
var toCopy = Math.min(tmp0, b);
|
|
408
|
-
tail.
|
|
408
|
+
tail.c3r(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.p3p_1;
|
|
413
413
|
// Inline function 'kotlin.Long.plus' call
|
|
414
414
|
var other = endIndex - startIndex | 0;
|
|
415
|
-
tmp.
|
|
415
|
+
tmp.p3p_1 = add(tmp0_0, fromInt(other));
|
|
416
416
|
};
|
|
417
|
-
protoOf(Buffer).
|
|
417
|
+
protoOf(Buffer).e3r = function (source, byteCount) {
|
|
418
418
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
419
419
|
// Inline function 'kotlin.require' call
|
|
420
420
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
@@ -423,86 +423,86 @@ protoOf(Buffer).l3p = function (source, byteCount) {
|
|
|
423
423
|
}
|
|
424
424
|
var remainingByteCount = byteCount;
|
|
425
425
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
426
|
-
var read = source.
|
|
426
|
+
var read = source.r3q(this, remainingByteCount);
|
|
427
427
|
if (equalsLong(read, new Long(-1, -1))) {
|
|
428
428
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + byteCount.toString() + ' bytes. ' + ('Only ' + subtract(byteCount, remainingByteCount).toString() + ' were read.'));
|
|
429
429
|
}
|
|
430
430
|
remainingByteCount = subtract(remainingByteCount, read);
|
|
431
431
|
}
|
|
432
432
|
};
|
|
433
|
-
protoOf(Buffer).
|
|
433
|
+
protoOf(Buffer).s3q = function (source, byteCount) {
|
|
434
434
|
// Inline function 'kotlin.require' call
|
|
435
435
|
if (!!(source === this)) {
|
|
436
436
|
var message = 'source == this';
|
|
437
437
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
438
438
|
}
|
|
439
|
-
checkOffsetAndCount(source.
|
|
439
|
+
checkOffsetAndCount(source.p3p_1, new Long(0, 0), byteCount);
|
|
440
440
|
var remainingByteCount = byteCount;
|
|
441
441
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
442
|
-
if (compare(remainingByteCount, fromInt(ensureNotNull(source.
|
|
443
|
-
var tail = this.
|
|
442
|
+
if (compare(remainingByteCount, fromInt(ensureNotNull(source.n3p_1).e1())) < 0) {
|
|
443
|
+
var tail = this.o3p_1;
|
|
444
444
|
var tmp;
|
|
445
|
-
if (!(tail == null) && tail.
|
|
445
|
+
if (!(tail == null) && tail.z3p_1) {
|
|
446
446
|
var tmp0 = remainingByteCount;
|
|
447
447
|
// Inline function 'kotlin.Long.plus' call
|
|
448
|
-
var other = tail.
|
|
448
|
+
var other = tail.x3p_1;
|
|
449
449
|
var tmp0_0 = add(tmp0, fromInt(other));
|
|
450
450
|
// Inline function 'kotlin.Long.minus' call
|
|
451
|
-
var other_0 = tail.
|
|
451
|
+
var other_0 = tail.f3r() ? 0 : tail.w3p_1;
|
|
452
452
|
var tmp$ret$3 = subtract(tmp0_0, fromInt(other_0));
|
|
453
453
|
tmp = compare(tmp$ret$3, new Long(8192, 0)) <= 0;
|
|
454
454
|
} else {
|
|
455
455
|
tmp = false;
|
|
456
456
|
}
|
|
457
457
|
if (tmp) {
|
|
458
|
-
ensureNotNull(source.
|
|
459
|
-
source.
|
|
460
|
-
this.
|
|
458
|
+
ensureNotNull(source.n3p_1).h3r(tail, convertToInt(remainingByteCount));
|
|
459
|
+
source.p3p_1 = subtract(source.p3p_1, remainingByteCount);
|
|
460
|
+
this.p3p_1 = add(this.p3p_1, remainingByteCount);
|
|
461
461
|
return Unit_instance;
|
|
462
462
|
} else {
|
|
463
|
-
source.
|
|
463
|
+
source.n3p_1 = ensureNotNull(source.n3p_1).g3r(convertToInt(remainingByteCount));
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
var segmentToMove = ensureNotNull(source.
|
|
466
|
+
var segmentToMove = ensureNotNull(source.n3p_1);
|
|
467
467
|
var movedByteCount = fromInt(segmentToMove.e1());
|
|
468
|
-
source.
|
|
469
|
-
if (source.
|
|
470
|
-
source.
|
|
468
|
+
source.n3p_1 = segmentToMove.i3r();
|
|
469
|
+
if (source.n3p_1 == null) {
|
|
470
|
+
source.o3p_1 = null;
|
|
471
471
|
}
|
|
472
472
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
473
|
-
if (this.
|
|
474
|
-
this.
|
|
475
|
-
this.
|
|
473
|
+
if (this.n3p_1 == null) {
|
|
474
|
+
this.n3p_1 = segmentToMove;
|
|
475
|
+
this.o3p_1 = segmentToMove;
|
|
476
476
|
} else if (true) {
|
|
477
|
-
this.
|
|
478
|
-
if (ensureNotNull(this.
|
|
479
|
-
this.
|
|
477
|
+
this.o3p_1 = ensureNotNull(this.o3p_1).j3q(segmentToMove).k3q();
|
|
478
|
+
if (ensureNotNull(this.o3p_1).b3q_1 == null) {
|
|
479
|
+
this.n3p_1 = this.o3p_1;
|
|
480
480
|
}
|
|
481
481
|
} else {
|
|
482
|
-
this.
|
|
482
|
+
this.o3p_1 = ensureNotNull(this.o3p_1).j3q(segmentToMove);
|
|
483
483
|
}
|
|
484
|
-
source.
|
|
485
|
-
this.
|
|
484
|
+
source.p3p_1 = subtract(source.p3p_1, movedByteCount);
|
|
485
|
+
this.p3p_1 = add(this.p3p_1, movedByteCount);
|
|
486
486
|
remainingByteCount = subtract(remainingByteCount, movedByteCount);
|
|
487
487
|
}
|
|
488
488
|
};
|
|
489
|
-
protoOf(Buffer).
|
|
489
|
+
protoOf(Buffer).j3r = function (source) {
|
|
490
490
|
var totalBytesRead = new Long(0, 0);
|
|
491
491
|
$l$loop: while (true) {
|
|
492
|
-
var readCount = source.
|
|
492
|
+
var readCount = source.r3q(this, new Long(8192, 0));
|
|
493
493
|
if (equalsLong(readCount, new Long(-1, -1)))
|
|
494
494
|
break $l$loop;
|
|
495
495
|
totalBytesRead = add(totalBytesRead, readCount);
|
|
496
496
|
}
|
|
497
497
|
return totalBytesRead;
|
|
498
498
|
};
|
|
499
|
-
protoOf(Buffer).
|
|
500
|
-
this.
|
|
501
|
-
this.
|
|
499
|
+
protoOf(Buffer).k3r = function (byte) {
|
|
500
|
+
this.w3q(1).l3r(byte);
|
|
501
|
+
this.p3p_1 = add(this.p3p_1, new Long(1, 0));
|
|
502
502
|
};
|
|
503
|
-
protoOf(Buffer).
|
|
504
|
-
this.
|
|
505
|
-
this.
|
|
503
|
+
protoOf(Buffer).m3r = function (short) {
|
|
504
|
+
this.w3q(2).n3r(short);
|
|
505
|
+
this.p3p_1 = add(this.p3p_1, new Long(2, 0));
|
|
506
506
|
};
|
|
507
507
|
protoOf(Buffer).j4 = function () {
|
|
508
508
|
return Unit_instance;
|
|
@@ -520,7 +520,7 @@ protoOf(Buffer).toString = function () {
|
|
|
520
520
|
var builder = StringBuilder_init_$Create$(imul(len, 2) + (compare(this.e1(), fromInt(maxPrintableBytes)) > 0 ? 1 : 0) | 0);
|
|
521
521
|
var bytesWritten = 0;
|
|
522
522
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
523
|
-
var curr = this.
|
|
523
|
+
var curr = this.n3p_1;
|
|
524
524
|
while (!(curr == null)) {
|
|
525
525
|
var tmp0 = get_SegmentReadContextImpl();
|
|
526
526
|
var segment = curr;
|
|
@@ -528,7 +528,7 @@ protoOf(Buffer).toString = function () {
|
|
|
528
528
|
while (bytesWritten < len && idx < segment.e1()) {
|
|
529
529
|
var _unary__edvuaz = idx;
|
|
530
530
|
idx = _unary__edvuaz + 1 | 0;
|
|
531
|
-
var b_0 = tmp0.
|
|
531
|
+
var b_0 = tmp0.o3r(segment, _unary__edvuaz);
|
|
532
532
|
bytesWritten = bytesWritten + 1 | 0;
|
|
533
533
|
var tmp = get_HEX_DIGIT_CHARS();
|
|
534
534
|
// Inline function 'kotlinx.io.shr' call
|
|
@@ -539,36 +539,36 @@ protoOf(Buffer).toString = function () {
|
|
|
539
539
|
var tmp$ret$5 = b_0 & 15;
|
|
540
540
|
tmp_0.s(tmp_1[tmp$ret$5]);
|
|
541
541
|
}
|
|
542
|
-
curr = curr.
|
|
542
|
+
curr = curr.a3q_1;
|
|
543
543
|
}
|
|
544
544
|
if (compare(this.e1(), fromInt(maxPrintableBytes)) > 0) {
|
|
545
545
|
builder.s(_Char___init__impl__6a9atx(8230));
|
|
546
546
|
}
|
|
547
547
|
return 'Buffer(size=' + this.e1().toString() + ' hex=' + builder.toString() + ')';
|
|
548
548
|
};
|
|
549
|
-
protoOf(Buffer).
|
|
550
|
-
var oldHead = ensureNotNull(this.
|
|
551
|
-
var nextHead = oldHead.
|
|
552
|
-
this.
|
|
549
|
+
protoOf(Buffer).c3q = function () {
|
|
550
|
+
var oldHead = ensureNotNull(this.n3p_1);
|
|
551
|
+
var nextHead = oldHead.a3q_1;
|
|
552
|
+
this.n3p_1 = nextHead;
|
|
553
553
|
if (nextHead == null) {
|
|
554
|
-
this.
|
|
554
|
+
this.o3p_1 = null;
|
|
555
555
|
} else {
|
|
556
|
-
nextHead.
|
|
556
|
+
nextHead.b3q_1 = null;
|
|
557
557
|
}
|
|
558
|
-
oldHead.
|
|
559
|
-
SegmentPool_instance.
|
|
558
|
+
oldHead.a3q_1 = null;
|
|
559
|
+
SegmentPool_instance.p3r(oldHead);
|
|
560
560
|
};
|
|
561
|
-
protoOf(Buffer).
|
|
562
|
-
var oldTail = ensureNotNull(this.
|
|
563
|
-
var newTail = oldTail.
|
|
564
|
-
this.
|
|
561
|
+
protoOf(Buffer).q3r = function () {
|
|
562
|
+
var oldTail = ensureNotNull(this.o3p_1);
|
|
563
|
+
var newTail = oldTail.b3q_1;
|
|
564
|
+
this.o3p_1 = newTail;
|
|
565
565
|
if (newTail == null) {
|
|
566
|
-
this.
|
|
566
|
+
this.n3p_1 = null;
|
|
567
567
|
} else {
|
|
568
|
-
newTail.
|
|
568
|
+
newTail.a3q_1 = null;
|
|
569
569
|
}
|
|
570
|
-
oldTail.
|
|
571
|
-
SegmentPool_instance.
|
|
570
|
+
oldTail.b3q_1 = null;
|
|
571
|
+
SegmentPool_instance.p3r(oldTail);
|
|
572
572
|
};
|
|
573
573
|
function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
574
574
|
startIndex = startIndex === VOID ? new Long(0, 0) : startIndex;
|
|
@@ -581,7 +581,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
581
581
|
return new Long(-1, -1);
|
|
582
582
|
$l$block_1: {
|
|
583
583
|
// Inline function 'kotlinx.io.seek' call
|
|
584
|
-
if (_this__u8e3s4.
|
|
584
|
+
if (_this__u8e3s4.n3p_1 == null) {
|
|
585
585
|
var o = new Long(-1, -1);
|
|
586
586
|
if (equalsLong(o, new Long(-1, -1))) {
|
|
587
587
|
return new Long(-1, -1);
|
|
@@ -610,19 +610,19 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
610
610
|
// Inline function 'kotlin.Long.plus' call
|
|
611
611
|
var other = segment.e1();
|
|
612
612
|
offset = add(tmp0_0, fromInt(other));
|
|
613
|
-
segment = segment.
|
|
613
|
+
segment = segment.a3q_1;
|
|
614
614
|
}
|
|
615
615
|
while (!(segment == null) && compare(offset, endOffset) < 0);
|
|
616
616
|
return new Long(-1, -1);
|
|
617
617
|
}
|
|
618
618
|
if (compare(subtract(_this__u8e3s4.e1(), startIndex), startIndex) < 0) {
|
|
619
|
-
var s = _this__u8e3s4.
|
|
619
|
+
var s = _this__u8e3s4.o3p_1;
|
|
620
620
|
var offset_0 = _this__u8e3s4.e1();
|
|
621
621
|
$l$loop: while (!(s == null) && compare(offset_0, startIndex) > 0) {
|
|
622
|
-
offset_0 = subtract(offset_0, fromInt(s.
|
|
622
|
+
offset_0 = subtract(offset_0, fromInt(s.x3p_1 - s.w3p_1 | 0));
|
|
623
623
|
if (compare(offset_0, startIndex) <= 0)
|
|
624
624
|
break $l$loop;
|
|
625
|
-
s = s.
|
|
625
|
+
s = s.b3q_1;
|
|
626
626
|
}
|
|
627
627
|
var tmp0_1 = s;
|
|
628
628
|
var o_0 = offset_0;
|
|
@@ -653,21 +653,21 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
653
653
|
// Inline function 'kotlin.Long.plus' call
|
|
654
654
|
var other_0 = segment_0.e1();
|
|
655
655
|
offset_1 = add(tmp0_3, fromInt(other_0));
|
|
656
|
-
segment_0 = segment_0.
|
|
656
|
+
segment_0 = segment_0.a3q_1;
|
|
657
657
|
}
|
|
658
658
|
while (!(segment_0 == null) && compare(offset_1, endOffset) < 0);
|
|
659
659
|
return new Long(-1, -1);
|
|
660
660
|
} else {
|
|
661
|
-
var s_0 = _this__u8e3s4.
|
|
661
|
+
var s_0 = _this__u8e3s4.n3p_1;
|
|
662
662
|
var offset_2 = new Long(0, 0);
|
|
663
663
|
$l$loop_0: while (!(s_0 == null)) {
|
|
664
664
|
var tmp0_4 = offset_2;
|
|
665
665
|
// Inline function 'kotlin.Long.plus' call
|
|
666
|
-
var other_1 = s_0.
|
|
666
|
+
var other_1 = s_0.x3p_1 - s_0.w3p_1 | 0;
|
|
667
667
|
var nextOffset = add(tmp0_4, fromInt(other_1));
|
|
668
668
|
if (compare(nextOffset, startIndex) > 0)
|
|
669
669
|
break $l$loop_0;
|
|
670
|
-
s_0 = s_0.
|
|
670
|
+
s_0 = s_0.a3q_1;
|
|
671
671
|
offset_2 = nextOffset;
|
|
672
672
|
}
|
|
673
673
|
var tmp0_5 = s_0;
|
|
@@ -699,7 +699,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
699
699
|
// Inline function 'kotlin.Long.plus' call
|
|
700
700
|
var other_2 = segment_1.e1();
|
|
701
701
|
offset_3 = add(tmp0_7, fromInt(other_2));
|
|
702
|
-
segment_1 = segment_1.
|
|
702
|
+
segment_1 = segment_1.a3q_1;
|
|
703
703
|
}
|
|
704
704
|
while (!(segment_1 == null) && compare(offset_3, endOffset) < 0);
|
|
705
705
|
return new Long(-1, -1);
|
|
@@ -707,25 +707,25 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
709
|
function readByteString(_this__u8e3s4, byteCount) {
|
|
710
|
-
return UnsafeByteStringOperations_instance.
|
|
710
|
+
return UnsafeByteStringOperations_instance.m3p(readByteArray_0(_this__u8e3s4, byteCount));
|
|
711
711
|
}
|
|
712
712
|
function buffered(_this__u8e3s4) {
|
|
713
713
|
return new RealSource(_this__u8e3s4);
|
|
714
714
|
}
|
|
715
715
|
function PeekSource(upstream) {
|
|
716
|
-
this.
|
|
717
|
-
this.
|
|
718
|
-
this.
|
|
716
|
+
this.r3r_1 = upstream;
|
|
717
|
+
this.s3r_1 = this.r3r_1.q3p();
|
|
718
|
+
this.t3r_1 = this.s3r_1.n3p_1;
|
|
719
719
|
var tmp = this;
|
|
720
|
-
var tmp0_safe_receiver = this.
|
|
721
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
722
|
-
tmp.
|
|
723
|
-
this.
|
|
724
|
-
this.
|
|
720
|
+
var tmp0_safe_receiver = this.s3r_1.n3p_1;
|
|
721
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w3p_1;
|
|
722
|
+
tmp.u3r_1 = tmp1_elvis_lhs == null ? -1 : tmp1_elvis_lhs;
|
|
723
|
+
this.v3r_1 = false;
|
|
724
|
+
this.w3r_1 = new Long(0, 0);
|
|
725
725
|
}
|
|
726
|
-
protoOf(PeekSource).
|
|
726
|
+
protoOf(PeekSource).r3q = function (sink, byteCount) {
|
|
727
727
|
// Inline function 'kotlin.check' call
|
|
728
|
-
if (!!this.
|
|
728
|
+
if (!!this.v3r_1) {
|
|
729
729
|
var message = 'Source is closed.';
|
|
730
730
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
731
731
|
}
|
|
@@ -736,43 +736,43 @@ protoOf(PeekSource).y3o = function (sink, byteCount) {
|
|
|
736
736
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
737
737
|
}
|
|
738
738
|
// Inline function 'kotlin.check' call
|
|
739
|
-
if (!(this.
|
|
739
|
+
if (!(this.t3r_1 == null || (this.t3r_1 === this.s3r_1.n3p_1 && this.u3r_1 === ensureNotNull(this.s3r_1.n3p_1).w3p_1))) {
|
|
740
740
|
var message_1 = 'Peek source is invalid because upstream source was used';
|
|
741
741
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
742
742
|
}
|
|
743
743
|
if (equalsLong(byteCount, new Long(0, 0)))
|
|
744
744
|
return new Long(0, 0);
|
|
745
745
|
// Inline function 'kotlin.Long.plus' call
|
|
746
|
-
var this_0 = this.
|
|
746
|
+
var this_0 = this.w3r_1;
|
|
747
747
|
var tmp$ret$7 = add(this_0, fromInt(1));
|
|
748
|
-
if (!this.
|
|
748
|
+
if (!this.r3r_1.t3p(tmp$ret$7))
|
|
749
749
|
return new Long(-1, -1);
|
|
750
|
-
if (this.
|
|
751
|
-
this.
|
|
752
|
-
this.
|
|
750
|
+
if (this.t3r_1 == null && !(this.s3r_1.n3p_1 == null)) {
|
|
751
|
+
this.t3r_1 = this.s3r_1.n3p_1;
|
|
752
|
+
this.u3r_1 = ensureNotNull(this.s3r_1.n3p_1).w3p_1;
|
|
753
753
|
}
|
|
754
754
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
755
|
-
var b = subtract(this.
|
|
755
|
+
var b = subtract(this.s3r_1.e1(), this.w3r_1);
|
|
756
756
|
var toCopy = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
757
|
-
this.
|
|
758
|
-
this.
|
|
757
|
+
this.s3r_1.h3q(sink, this.w3r_1, add(this.w3r_1, toCopy));
|
|
758
|
+
this.w3r_1 = add(this.w3r_1, toCopy);
|
|
759
759
|
return toCopy;
|
|
760
760
|
};
|
|
761
761
|
protoOf(PeekSource).j4 = function () {
|
|
762
|
-
this.
|
|
762
|
+
this.v3r_1 = true;
|
|
763
763
|
};
|
|
764
764
|
function RealSource(source) {
|
|
765
|
-
this.
|
|
766
|
-
this.
|
|
767
|
-
this.
|
|
765
|
+
this.x3r_1 = source;
|
|
766
|
+
this.y3r_1 = false;
|
|
767
|
+
this.z3r_1 = new Buffer();
|
|
768
768
|
}
|
|
769
|
-
protoOf(RealSource).
|
|
770
|
-
return this.
|
|
769
|
+
protoOf(RealSource).q3p = function () {
|
|
770
|
+
return this.z3r_1;
|
|
771
771
|
};
|
|
772
|
-
protoOf(RealSource).
|
|
772
|
+
protoOf(RealSource).r3q = function (sink, byteCount) {
|
|
773
773
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
774
774
|
// Inline function 'kotlin.check' call
|
|
775
|
-
if (!!this.
|
|
775
|
+
if (!!this.y3r_1) {
|
|
776
776
|
var message = 'Source is closed.';
|
|
777
777
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
778
778
|
}
|
|
@@ -781,33 +781,33 @@ protoOf(RealSource).y3o = function (sink, byteCount) {
|
|
|
781
781
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
782
782
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
783
783
|
}
|
|
784
|
-
if (equalsLong(this.
|
|
785
|
-
var read = this.
|
|
784
|
+
if (equalsLong(this.z3r_1.e1(), new Long(0, 0))) {
|
|
785
|
+
var read = this.x3r_1.r3q(this.z3r_1, new Long(8192, 0));
|
|
786
786
|
if (equalsLong(read, new Long(-1, -1)))
|
|
787
787
|
return new Long(-1, -1);
|
|
788
788
|
}
|
|
789
789
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
790
|
-
var b = this.
|
|
790
|
+
var b = this.z3r_1.e1();
|
|
791
791
|
var toRead = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
792
|
-
return this.
|
|
792
|
+
return this.z3r_1.r3q(sink, toRead);
|
|
793
793
|
};
|
|
794
|
-
protoOf(RealSource).
|
|
794
|
+
protoOf(RealSource).r3p = function () {
|
|
795
795
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
796
796
|
// Inline function 'kotlin.check' call
|
|
797
|
-
if (!!this.
|
|
797
|
+
if (!!this.y3r_1) {
|
|
798
798
|
var message = 'Source is closed.';
|
|
799
799
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
800
800
|
}
|
|
801
|
-
return this.
|
|
801
|
+
return this.z3r_1.r3p() && equalsLong(this.x3r_1.r3q(this.z3r_1, new Long(8192, 0)), new Long(-1, -1));
|
|
802
802
|
};
|
|
803
|
-
protoOf(RealSource).
|
|
804
|
-
if (!this.
|
|
803
|
+
protoOf(RealSource).s3p = function (byteCount) {
|
|
804
|
+
if (!this.t3p(byteCount))
|
|
805
805
|
throw EOFException_init_$Create$_0("Source doesn't contain required number of bytes (" + byteCount.toString() + ').');
|
|
806
806
|
};
|
|
807
|
-
protoOf(RealSource).
|
|
807
|
+
protoOf(RealSource).t3p = function (byteCount) {
|
|
808
808
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
809
809
|
// Inline function 'kotlin.check' call
|
|
810
|
-
if (!!this.
|
|
810
|
+
if (!!this.y3r_1) {
|
|
811
811
|
var message = 'Source is closed.';
|
|
812
812
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
813
813
|
}
|
|
@@ -816,91 +816,91 @@ protoOf(RealSource).a3o = function (byteCount) {
|
|
|
816
816
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
817
817
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
818
818
|
}
|
|
819
|
-
while (compare(this.
|
|
820
|
-
if (equalsLong(this.
|
|
819
|
+
while (compare(this.z3r_1.e1(), byteCount) < 0) {
|
|
820
|
+
if (equalsLong(this.x3r_1.r3q(this.z3r_1, new Long(8192, 0)), new Long(-1, -1)))
|
|
821
821
|
return false;
|
|
822
822
|
}
|
|
823
823
|
return true;
|
|
824
824
|
};
|
|
825
|
-
protoOf(RealSource).
|
|
826
|
-
this.
|
|
827
|
-
return this.
|
|
825
|
+
protoOf(RealSource).u3p = function () {
|
|
826
|
+
this.s3p(new Long(1, 0));
|
|
827
|
+
return this.z3r_1.u3p();
|
|
828
828
|
};
|
|
829
|
-
protoOf(RealSource).
|
|
829
|
+
protoOf(RealSource).p3q = function (sink, startIndex, endIndex) {
|
|
830
830
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
831
831
|
var size = sink.length;
|
|
832
832
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
833
|
-
if (equalsLong(this.
|
|
834
|
-
var read = this.
|
|
833
|
+
if (equalsLong(this.z3r_1.e1(), new Long(0, 0))) {
|
|
834
|
+
var read = this.x3r_1.r3q(this.z3r_1, new Long(8192, 0));
|
|
835
835
|
if (equalsLong(read, new Long(-1, -1)))
|
|
836
836
|
return -1;
|
|
837
837
|
}
|
|
838
838
|
var tmp0 = endIndex - startIndex | 0;
|
|
839
839
|
// Inline function 'kotlinx.io.minOf' call
|
|
840
|
-
var b = this.
|
|
840
|
+
var b = this.z3r_1.e1();
|
|
841
841
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
842
842
|
var a = fromInt(tmp0);
|
|
843
843
|
var tmp$ret$1 = compare(a, b) <= 0 ? a : b;
|
|
844
844
|
var toRead = convertToInt(tmp$ret$1);
|
|
845
|
-
return this.
|
|
845
|
+
return this.z3r_1.p3q(sink, startIndex, startIndex + toRead | 0);
|
|
846
846
|
};
|
|
847
|
-
protoOf(RealSource).
|
|
847
|
+
protoOf(RealSource).t3q = function (sink, byteCount) {
|
|
848
848
|
try {
|
|
849
|
-
this.
|
|
849
|
+
this.s3p(byteCount);
|
|
850
850
|
} catch ($p) {
|
|
851
851
|
if ($p instanceof EOFException) {
|
|
852
852
|
var e = $p;
|
|
853
|
-
sink.
|
|
853
|
+
sink.s3q(this.z3r_1, this.z3r_1.e1());
|
|
854
854
|
throw e;
|
|
855
855
|
} else {
|
|
856
856
|
throw $p;
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
|
-
this.
|
|
859
|
+
this.z3r_1.t3q(sink, byteCount);
|
|
860
860
|
};
|
|
861
|
-
protoOf(RealSource).
|
|
861
|
+
protoOf(RealSource).u3q = function (sink) {
|
|
862
862
|
var totalBytesWritten = new Long(0, 0);
|
|
863
|
-
while (!equalsLong(this.
|
|
864
|
-
var emitByteCount = this.
|
|
863
|
+
while (!equalsLong(this.x3r_1.r3q(this.z3r_1, new Long(8192, 0)), new Long(-1, -1))) {
|
|
864
|
+
var emitByteCount = this.z3r_1.l3q();
|
|
865
865
|
if (compare(emitByteCount, new Long(0, 0)) > 0) {
|
|
866
866
|
totalBytesWritten = add(totalBytesWritten, emitByteCount);
|
|
867
|
-
sink.
|
|
867
|
+
sink.s3q(this.z3r_1, emitByteCount);
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
|
-
if (compare(this.
|
|
871
|
-
totalBytesWritten = add(totalBytesWritten, this.
|
|
872
|
-
sink.
|
|
870
|
+
if (compare(this.z3r_1.e1(), new Long(0, 0)) > 0) {
|
|
871
|
+
totalBytesWritten = add(totalBytesWritten, this.z3r_1.e1());
|
|
872
|
+
sink.s3q(this.z3r_1, this.z3r_1.e1());
|
|
873
873
|
}
|
|
874
874
|
return totalBytesWritten;
|
|
875
875
|
};
|
|
876
|
-
protoOf(RealSource).
|
|
877
|
-
this.
|
|
878
|
-
return this.
|
|
876
|
+
protoOf(RealSource).e3q = function () {
|
|
877
|
+
this.s3p(new Long(2, 0));
|
|
878
|
+
return this.z3r_1.e3q();
|
|
879
879
|
};
|
|
880
|
-
protoOf(RealSource).
|
|
880
|
+
protoOf(RealSource).v3q = function () {
|
|
881
881
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
882
882
|
// Inline function 'kotlin.check' call
|
|
883
|
-
if (!!this.
|
|
883
|
+
if (!!this.y3r_1) {
|
|
884
884
|
var message = 'Source is closed.';
|
|
885
885
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
886
886
|
}
|
|
887
887
|
return buffered(new PeekSource(this));
|
|
888
888
|
};
|
|
889
889
|
protoOf(RealSource).j4 = function () {
|
|
890
|
-
if (this.
|
|
890
|
+
if (this.y3r_1)
|
|
891
891
|
return Unit_instance;
|
|
892
|
-
this.
|
|
893
|
-
this.
|
|
894
|
-
this.
|
|
892
|
+
this.y3r_1 = true;
|
|
893
|
+
this.x3r_1.j4();
|
|
894
|
+
this.z3r_1.b3();
|
|
895
895
|
};
|
|
896
896
|
protoOf(RealSource).toString = function () {
|
|
897
|
-
return 'buffered(' + toString(this.
|
|
897
|
+
return 'buffered(' + toString(this.x3r_1) + ')';
|
|
898
898
|
};
|
|
899
899
|
function Segment_init_$Init$($this) {
|
|
900
900
|
Segment.call($this);
|
|
901
|
-
$this.
|
|
902
|
-
$this.
|
|
903
|
-
$this.
|
|
901
|
+
$this.v3p_1 = new Int8Array(8192);
|
|
902
|
+
$this.z3p_1 = true;
|
|
903
|
+
$this.y3p_1 = null;
|
|
904
904
|
return $this;
|
|
905
905
|
}
|
|
906
906
|
function Segment_init_$Create$() {
|
|
@@ -908,87 +908,87 @@ function Segment_init_$Create$() {
|
|
|
908
908
|
}
|
|
909
909
|
function Segment_init_$Init$_0(data, pos, limit, shareToken, owner, $this) {
|
|
910
910
|
Segment.call($this);
|
|
911
|
-
$this.
|
|
912
|
-
$this.
|
|
913
|
-
$this.
|
|
914
|
-
$this.
|
|
915
|
-
$this.
|
|
911
|
+
$this.v3p_1 = data;
|
|
912
|
+
$this.w3p_1 = pos;
|
|
913
|
+
$this.x3p_1 = limit;
|
|
914
|
+
$this.y3p_1 = shareToken;
|
|
915
|
+
$this.z3p_1 = owner;
|
|
916
916
|
return $this;
|
|
917
917
|
}
|
|
918
918
|
function Segment_init_$Create$_0(data, pos, limit, shareToken, owner) {
|
|
919
919
|
return Segment_init_$Init$_0(data, pos, limit, shareToken, owner, objectCreate(protoOf(Segment)));
|
|
920
920
|
}
|
|
921
921
|
function Companion() {
|
|
922
|
-
this.
|
|
923
|
-
this.
|
|
922
|
+
this.a3s_1 = 8192;
|
|
923
|
+
this.b3s_1 = 1024;
|
|
924
924
|
}
|
|
925
|
-
protoOf(Companion).
|
|
925
|
+
protoOf(Companion).c3s = function () {
|
|
926
926
|
return Segment_init_$Create$();
|
|
927
927
|
};
|
|
928
928
|
var Companion_instance;
|
|
929
929
|
function Companion_getInstance() {
|
|
930
930
|
return Companion_instance;
|
|
931
931
|
}
|
|
932
|
-
protoOf(Segment).
|
|
933
|
-
var tmp0_safe_receiver = this.
|
|
934
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
932
|
+
protoOf(Segment).f3r = function () {
|
|
933
|
+
var tmp0_safe_receiver = this.y3p_1;
|
|
934
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.d3s();
|
|
935
935
|
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
|
|
936
936
|
};
|
|
937
|
-
protoOf(Segment).
|
|
938
|
-
var tmp0_elvis_lhs = this.
|
|
937
|
+
protoOf(Segment).i3q = function () {
|
|
938
|
+
var tmp0_elvis_lhs = this.y3p_1;
|
|
939
939
|
var tmp;
|
|
940
940
|
if (tmp0_elvis_lhs == null) {
|
|
941
941
|
// Inline function 'kotlin.also' call
|
|
942
|
-
var this_0 = SegmentPool_instance.
|
|
943
|
-
this.
|
|
942
|
+
var this_0 = SegmentPool_instance.e3s();
|
|
943
|
+
this.y3p_1 = this_0;
|
|
944
944
|
tmp = this_0;
|
|
945
945
|
} else {
|
|
946
946
|
tmp = tmp0_elvis_lhs;
|
|
947
947
|
}
|
|
948
948
|
var t = tmp;
|
|
949
|
-
var tmp_0 = this.
|
|
950
|
-
var tmp_1 = this.
|
|
949
|
+
var tmp_0 = this.w3p_1;
|
|
950
|
+
var tmp_1 = this.x3p_1;
|
|
951
951
|
// Inline function 'kotlin.also' call
|
|
952
|
-
t.
|
|
953
|
-
return Segment_init_$Create$_0(this.
|
|
952
|
+
t.f3s();
|
|
953
|
+
return Segment_init_$Create$_0(this.v3p_1, tmp_0, tmp_1, t, false);
|
|
954
954
|
};
|
|
955
|
-
protoOf(Segment).
|
|
956
|
-
var result = this.
|
|
957
|
-
if (!(this.
|
|
958
|
-
ensureNotNull(this.
|
|
955
|
+
protoOf(Segment).i3r = function () {
|
|
956
|
+
var result = this.a3q_1;
|
|
957
|
+
if (!(this.b3q_1 == null)) {
|
|
958
|
+
ensureNotNull(this.b3q_1).a3q_1 = this.a3q_1;
|
|
959
959
|
}
|
|
960
|
-
if (!(this.
|
|
961
|
-
ensureNotNull(this.
|
|
960
|
+
if (!(this.a3q_1 == null)) {
|
|
961
|
+
ensureNotNull(this.a3q_1).b3q_1 = this.b3q_1;
|
|
962
962
|
}
|
|
963
|
-
this.
|
|
964
|
-
this.
|
|
963
|
+
this.a3q_1 = null;
|
|
964
|
+
this.b3q_1 = null;
|
|
965
965
|
return result;
|
|
966
966
|
};
|
|
967
|
-
protoOf(Segment).
|
|
968
|
-
segment.
|
|
969
|
-
segment.
|
|
970
|
-
if (!(this.
|
|
971
|
-
ensureNotNull(this.
|
|
967
|
+
protoOf(Segment).j3q = function (segment) {
|
|
968
|
+
segment.b3q_1 = this;
|
|
969
|
+
segment.a3q_1 = this.a3q_1;
|
|
970
|
+
if (!(this.a3q_1 == null)) {
|
|
971
|
+
ensureNotNull(this.a3q_1).b3q_1 = segment;
|
|
972
972
|
}
|
|
973
|
-
this.
|
|
973
|
+
this.a3q_1 = segment;
|
|
974
974
|
return segment;
|
|
975
975
|
};
|
|
976
|
-
protoOf(Segment).
|
|
976
|
+
protoOf(Segment).g3r = function (byteCount) {
|
|
977
977
|
// Inline function 'kotlin.require' call
|
|
978
|
-
if (!(byteCount > 0 && byteCount <= (this.
|
|
978
|
+
if (!(byteCount > 0 && byteCount <= (this.x3p_1 - this.w3p_1 | 0))) {
|
|
979
979
|
var message = 'byteCount out of range';
|
|
980
980
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
981
981
|
}
|
|
982
982
|
var prefix;
|
|
983
983
|
if (byteCount >= 1024) {
|
|
984
|
-
prefix = this.
|
|
984
|
+
prefix = this.i3q();
|
|
985
985
|
} else {
|
|
986
|
-
prefix = SegmentPool_instance.
|
|
987
|
-
var tmp0 = this.
|
|
988
|
-
var tmp2 = prefix.
|
|
989
|
-
var tmp5 = this.
|
|
986
|
+
prefix = SegmentPool_instance.z3q();
|
|
987
|
+
var tmp0 = this.v3p_1;
|
|
988
|
+
var tmp2 = prefix.v3p_1;
|
|
989
|
+
var tmp5 = this.w3p_1;
|
|
990
990
|
// Inline function 'kotlin.collections.copyInto' call
|
|
991
|
-
var endIndex = this.
|
|
991
|
+
var endIndex = this.w3p_1 + byteCount | 0;
|
|
992
992
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
993
993
|
// Inline function 'kotlin.js.asDynamic' call
|
|
994
994
|
var tmp = tmp0;
|
|
@@ -996,62 +996,62 @@ protoOf(Segment).n3p = function (byteCount) {
|
|
|
996
996
|
// Inline function 'kotlin.js.asDynamic' call
|
|
997
997
|
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
998
998
|
}
|
|
999
|
-
prefix.
|
|
1000
|
-
this.
|
|
1001
|
-
if (!(this.
|
|
1002
|
-
ensureNotNull(this.
|
|
999
|
+
prefix.x3p_1 = prefix.w3p_1 + byteCount | 0;
|
|
1000
|
+
this.w3p_1 = this.w3p_1 + byteCount | 0;
|
|
1001
|
+
if (!(this.b3q_1 == null)) {
|
|
1002
|
+
ensureNotNull(this.b3q_1).j3q(prefix);
|
|
1003
1003
|
} else {
|
|
1004
|
-
prefix.
|
|
1005
|
-
this.
|
|
1004
|
+
prefix.a3q_1 = this;
|
|
1005
|
+
this.b3q_1 = prefix;
|
|
1006
1006
|
}
|
|
1007
1007
|
return prefix;
|
|
1008
1008
|
};
|
|
1009
|
-
protoOf(Segment).
|
|
1009
|
+
protoOf(Segment).k3q = function () {
|
|
1010
1010
|
// Inline function 'kotlin.check' call
|
|
1011
|
-
if (!!(this.
|
|
1011
|
+
if (!!(this.b3q_1 == null)) {
|
|
1012
1012
|
var message = 'cannot compact';
|
|
1013
1013
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1014
1014
|
}
|
|
1015
|
-
if (!ensureNotNull(this.
|
|
1015
|
+
if (!ensureNotNull(this.b3q_1).z3p_1)
|
|
1016
1016
|
return this;
|
|
1017
|
-
var byteCount = this.
|
|
1018
|
-
var availableByteCount = (8192 - ensureNotNull(this.
|
|
1017
|
+
var byteCount = this.x3p_1 - this.w3p_1 | 0;
|
|
1018
|
+
var availableByteCount = (8192 - ensureNotNull(this.b3q_1).x3p_1 | 0) + (ensureNotNull(this.b3q_1).f3r() ? 0 : ensureNotNull(this.b3q_1).w3p_1) | 0;
|
|
1019
1019
|
if (byteCount > availableByteCount)
|
|
1020
1020
|
return this;
|
|
1021
|
-
var predecessor = this.
|
|
1022
|
-
this.
|
|
1023
|
-
var successor = this.
|
|
1021
|
+
var predecessor = this.b3q_1;
|
|
1022
|
+
this.h3r(ensureNotNull(predecessor), byteCount);
|
|
1023
|
+
var successor = this.i3r();
|
|
1024
1024
|
// Inline function 'kotlin.check' call
|
|
1025
1025
|
if (!(successor == null)) {
|
|
1026
1026
|
throw IllegalStateException_init_$Create$('Check failed.');
|
|
1027
1027
|
}
|
|
1028
|
-
SegmentPool_instance.
|
|
1028
|
+
SegmentPool_instance.p3r(this);
|
|
1029
1029
|
return predecessor;
|
|
1030
1030
|
};
|
|
1031
|
-
protoOf(Segment).
|
|
1032
|
-
var _unary__edvuaz = this.
|
|
1033
|
-
this.
|
|
1034
|
-
this.
|
|
1031
|
+
protoOf(Segment).l3r = function (byte) {
|
|
1032
|
+
var _unary__edvuaz = this.x3p_1;
|
|
1033
|
+
this.x3p_1 = _unary__edvuaz + 1 | 0;
|
|
1034
|
+
this.v3p_1[_unary__edvuaz] = byte;
|
|
1035
1035
|
};
|
|
1036
|
-
protoOf(Segment).
|
|
1037
|
-
var data = this.
|
|
1038
|
-
var limit = this.
|
|
1036
|
+
protoOf(Segment).n3r = function (short) {
|
|
1037
|
+
var data = this.v3p_1;
|
|
1038
|
+
var limit = this.x3p_1;
|
|
1039
1039
|
var _unary__edvuaz = limit;
|
|
1040
1040
|
limit = _unary__edvuaz + 1 | 0;
|
|
1041
1041
|
data[_unary__edvuaz] = toByte((short >>> 8 | 0) & 255);
|
|
1042
1042
|
var _unary__edvuaz_0 = limit;
|
|
1043
1043
|
limit = _unary__edvuaz_0 + 1 | 0;
|
|
1044
1044
|
data[_unary__edvuaz_0] = toByte(short & 255);
|
|
1045
|
-
this.
|
|
1045
|
+
this.x3p_1 = limit;
|
|
1046
1046
|
};
|
|
1047
|
-
protoOf(Segment).
|
|
1048
|
-
var _unary__edvuaz = this.
|
|
1049
|
-
this.
|
|
1050
|
-
return this.
|
|
1047
|
+
protoOf(Segment).d3q = function () {
|
|
1048
|
+
var _unary__edvuaz = this.w3p_1;
|
|
1049
|
+
this.w3p_1 = _unary__edvuaz + 1 | 0;
|
|
1050
|
+
return this.v3p_1[_unary__edvuaz];
|
|
1051
1051
|
};
|
|
1052
|
-
protoOf(Segment).
|
|
1053
|
-
var data = this.
|
|
1054
|
-
var pos = this.
|
|
1052
|
+
protoOf(Segment).f3q = function () {
|
|
1053
|
+
var data = this.v3p_1;
|
|
1054
|
+
var pos = this.w3p_1;
|
|
1055
1055
|
var _unary__edvuaz = pos;
|
|
1056
1056
|
pos = _unary__edvuaz + 1 | 0;
|
|
1057
1057
|
// Inline function 'kotlinx.io.and' call
|
|
@@ -1061,118 +1061,118 @@ protoOf(Segment).m3o = function () {
|
|
|
1061
1061
|
// Inline function 'kotlinx.io.and' call
|
|
1062
1062
|
var tmp$ret$1 = data[_unary__edvuaz_0] & 255;
|
|
1063
1063
|
var s = toShort(tmp | tmp$ret$1);
|
|
1064
|
-
this.
|
|
1064
|
+
this.w3p_1 = pos;
|
|
1065
1065
|
return s;
|
|
1066
1066
|
};
|
|
1067
|
-
protoOf(Segment).
|
|
1067
|
+
protoOf(Segment).h3r = function (sink, byteCount) {
|
|
1068
1068
|
// Inline function 'kotlin.check' call
|
|
1069
|
-
if (!sink.
|
|
1069
|
+
if (!sink.z3p_1) {
|
|
1070
1070
|
var message = 'only owner can write';
|
|
1071
1071
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1072
1072
|
}
|
|
1073
|
-
if ((sink.
|
|
1074
|
-
if (sink.
|
|
1073
|
+
if ((sink.x3p_1 + byteCount | 0) > 8192) {
|
|
1074
|
+
if (sink.f3r())
|
|
1075
1075
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1076
|
-
if (((sink.
|
|
1076
|
+
if (((sink.x3p_1 + byteCount | 0) - sink.w3p_1 | 0) > 8192)
|
|
1077
1077
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1078
|
-
var tmp0 = sink.
|
|
1079
|
-
var tmp2 = sink.
|
|
1080
|
-
var tmp5 = sink.
|
|
1078
|
+
var tmp0 = sink.v3p_1;
|
|
1079
|
+
var tmp2 = sink.v3p_1;
|
|
1080
|
+
var tmp5 = sink.w3p_1;
|
|
1081
1081
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1082
|
-
var endIndex = sink.
|
|
1082
|
+
var endIndex = sink.x3p_1;
|
|
1083
1083
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1084
1084
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1085
1085
|
var tmp = tmp0;
|
|
1086
1086
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1087
1087
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1088
1088
|
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
1089
|
-
sink.
|
|
1090
|
-
sink.
|
|
1089
|
+
sink.x3p_1 = sink.x3p_1 - sink.w3p_1 | 0;
|
|
1090
|
+
sink.w3p_1 = 0;
|
|
1091
1091
|
}
|
|
1092
|
-
var tmp0_0 = this.
|
|
1093
|
-
var tmp2_0 = sink.
|
|
1094
|
-
var tmp4 = sink.
|
|
1095
|
-
var tmp6 = this.
|
|
1092
|
+
var tmp0_0 = this.v3p_1;
|
|
1093
|
+
var tmp2_0 = sink.v3p_1;
|
|
1094
|
+
var tmp4 = sink.x3p_1;
|
|
1095
|
+
var tmp6 = this.w3p_1;
|
|
1096
1096
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1097
|
-
var endIndex_0 = this.
|
|
1097
|
+
var endIndex_0 = this.w3p_1 + byteCount | 0;
|
|
1098
1098
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1099
1099
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1100
1100
|
var tmp_0 = tmp0_0;
|
|
1101
1101
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1102
1102
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1103
1103
|
arrayCopy(tmp_0, tmp2_0, tmp4, tmp6, endIndex_0);
|
|
1104
|
-
sink.
|
|
1105
|
-
this.
|
|
1104
|
+
sink.x3p_1 = sink.x3p_1 + byteCount | 0;
|
|
1105
|
+
this.w3p_1 = this.w3p_1 + byteCount | 0;
|
|
1106
1106
|
};
|
|
1107
|
-
protoOf(Segment).
|
|
1107
|
+
protoOf(Segment).q3q = function (dst, dstStartOffset, dstEndOffset) {
|
|
1108
1108
|
var len = dstEndOffset - dstStartOffset | 0;
|
|
1109
|
-
var tmp0 = this.
|
|
1110
|
-
var tmp6 = this.
|
|
1109
|
+
var tmp0 = this.v3p_1;
|
|
1110
|
+
var tmp6 = this.w3p_1;
|
|
1111
1111
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1112
|
-
var endIndex = this.
|
|
1112
|
+
var endIndex = this.w3p_1 + len | 0;
|
|
1113
1113
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1114
1114
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1115
1115
|
var tmp = tmp0;
|
|
1116
1116
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1117
1117
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1118
1118
|
arrayCopy(tmp, dst, dstStartOffset, tmp6, endIndex);
|
|
1119
|
-
this.
|
|
1119
|
+
this.w3p_1 = this.w3p_1 + len | 0;
|
|
1120
1120
|
};
|
|
1121
|
-
protoOf(Segment).
|
|
1122
|
-
var tmp2 = this.
|
|
1121
|
+
protoOf(Segment).c3r = function (src, srcStartOffset, srcEndOffset) {
|
|
1122
|
+
var tmp2 = this.v3p_1;
|
|
1123
1123
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1124
|
-
var destinationOffset = this.
|
|
1124
|
+
var destinationOffset = this.x3p_1;
|
|
1125
1125
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1126
1126
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1127
1127
|
var tmp = src;
|
|
1128
1128
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1129
1129
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1130
1130
|
arrayCopy(tmp, tmp2, destinationOffset, srcStartOffset, srcEndOffset);
|
|
1131
|
-
this.
|
|
1131
|
+
this.x3p_1 = this.x3p_1 + (srcEndOffset - srcStartOffset | 0) | 0;
|
|
1132
1132
|
};
|
|
1133
1133
|
protoOf(Segment).e1 = function () {
|
|
1134
|
-
return this.
|
|
1134
|
+
return this.x3p_1 - this.w3p_1 | 0;
|
|
1135
1135
|
};
|
|
1136
|
-
protoOf(Segment).
|
|
1137
|
-
return this.
|
|
1136
|
+
protoOf(Segment).b3r = function () {
|
|
1137
|
+
return this.v3p_1.length - this.x3p_1 | 0;
|
|
1138
1138
|
};
|
|
1139
|
-
protoOf(Segment).
|
|
1140
|
-
return this.
|
|
1139
|
+
protoOf(Segment).g3s = function (readOnly) {
|
|
1140
|
+
return this.v3p_1;
|
|
1141
1141
|
};
|
|
1142
|
-
protoOf(Segment).
|
|
1143
|
-
return this.
|
|
1142
|
+
protoOf(Segment).n3q = function (index) {
|
|
1143
|
+
return this.v3p_1[this.w3p_1 + index | 0];
|
|
1144
1144
|
};
|
|
1145
|
-
protoOf(Segment).
|
|
1146
|
-
this.
|
|
1145
|
+
protoOf(Segment).h3s = function (index, value) {
|
|
1146
|
+
this.v3p_1[this.x3p_1 + index | 0] = value;
|
|
1147
1147
|
};
|
|
1148
|
-
protoOf(Segment).
|
|
1149
|
-
var d = this.
|
|
1150
|
-
var l = this.
|
|
1148
|
+
protoOf(Segment).i3s = function (index, b0, b1) {
|
|
1149
|
+
var d = this.v3p_1;
|
|
1150
|
+
var l = this.x3p_1;
|
|
1151
1151
|
d[l + index | 0] = b0;
|
|
1152
1152
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1153
1153
|
};
|
|
1154
|
-
protoOf(Segment).
|
|
1155
|
-
var d = this.
|
|
1156
|
-
var l = this.
|
|
1154
|
+
protoOf(Segment).j3s = function (index, b0, b1, b2) {
|
|
1155
|
+
var d = this.v3p_1;
|
|
1156
|
+
var l = this.x3p_1;
|
|
1157
1157
|
d[l + index | 0] = b0;
|
|
1158
1158
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1159
1159
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1160
1160
|
};
|
|
1161
|
-
protoOf(Segment).
|
|
1162
|
-
var d = this.
|
|
1163
|
-
var l = this.
|
|
1161
|
+
protoOf(Segment).k3s = function (index, b0, b1, b2, b3) {
|
|
1162
|
+
var d = this.v3p_1;
|
|
1163
|
+
var l = this.x3p_1;
|
|
1164
1164
|
d[l + index | 0] = b0;
|
|
1165
1165
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1166
1166
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1167
1167
|
d[(l + index | 0) + 3 | 0] = b3;
|
|
1168
1168
|
};
|
|
1169
1169
|
function Segment() {
|
|
1170
|
-
this.
|
|
1171
|
-
this.
|
|
1172
|
-
this.
|
|
1173
|
-
this.
|
|
1174
|
-
this.
|
|
1175
|
-
this.
|
|
1170
|
+
this.w3p_1 = 0;
|
|
1171
|
+
this.x3p_1 = 0;
|
|
1172
|
+
this.y3p_1 = null;
|
|
1173
|
+
this.z3p_1 = false;
|
|
1174
|
+
this.a3q_1 = null;
|
|
1175
|
+
this.b3q_1 = null;
|
|
1176
1176
|
}
|
|
1177
1177
|
function isEmpty(_this__u8e3s4) {
|
|
1178
1178
|
return _this__u8e3s4.e1() === 0;
|
|
@@ -1183,10 +1183,10 @@ function AlwaysSharedCopyTracker() {
|
|
|
1183
1183
|
AlwaysSharedCopyTracker_instance = this;
|
|
1184
1184
|
SegmentCopyTracker.call(this);
|
|
1185
1185
|
}
|
|
1186
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1186
|
+
protoOf(AlwaysSharedCopyTracker).d3s = function () {
|
|
1187
1187
|
return true;
|
|
1188
1188
|
};
|
|
1189
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1189
|
+
protoOf(AlwaysSharedCopyTracker).f3s = function () {
|
|
1190
1190
|
return Unit_instance;
|
|
1191
1191
|
};
|
|
1192
1192
|
var AlwaysSharedCopyTracker_instance;
|
|
@@ -1206,8 +1206,8 @@ function indexOf_0(_this__u8e3s4, byte, startOffset, endOffset) {
|
|
|
1206
1206
|
var message_0 = '' + endOffset;
|
|
1207
1207
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1208
1208
|
}
|
|
1209
|
-
var p = _this__u8e3s4.
|
|
1210
|
-
var data = _this__u8e3s4.
|
|
1209
|
+
var p = _this__u8e3s4.w3p_1;
|
|
1210
|
+
var data = _this__u8e3s4.g3s(true);
|
|
1211
1211
|
var inductionVariable = startOffset;
|
|
1212
1212
|
if (inductionVariable < endOffset)
|
|
1213
1213
|
do {
|
|
@@ -1260,23 +1260,23 @@ function indexOf_1(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
1260
1260
|
// Inline function 'kotlin.Long.plus' call
|
|
1261
1261
|
var this_0 = offset;
|
|
1262
1262
|
var tmp$ret$2 = add(this_0, fromInt(1));
|
|
1263
|
-
tmp_0 = _this__u8e3s4.
|
|
1263
|
+
tmp_0 = _this__u8e3s4.t3p(tmp$ret$2);
|
|
1264
1264
|
} else {
|
|
1265
1265
|
tmp_0 = false;
|
|
1266
1266
|
}
|
|
1267
1267
|
if (!tmp_0) {
|
|
1268
1268
|
break $l$loop;
|
|
1269
1269
|
}
|
|
1270
|
-
var tmp_1 = _this__u8e3s4.
|
|
1270
|
+
var tmp_1 = _this__u8e3s4.q3p();
|
|
1271
1271
|
var tmp_2 = offset;
|
|
1272
1272
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1273
|
-
var b = _this__u8e3s4.
|
|
1273
|
+
var b = _this__u8e3s4.q3p().e1();
|
|
1274
1274
|
var tmp$ret$3 = compare(endIndex, b) <= 0 ? endIndex : b;
|
|
1275
1275
|
var idx = indexOf(tmp_1, byte, tmp_2, tmp$ret$3);
|
|
1276
1276
|
if (!equalsLong(idx, new Long(-1, -1))) {
|
|
1277
1277
|
return idx;
|
|
1278
1278
|
}
|
|
1279
|
-
offset = _this__u8e3s4.
|
|
1279
|
+
offset = _this__u8e3s4.q3p().e1();
|
|
1280
1280
|
}
|
|
1281
1281
|
return new Long(-1, -1);
|
|
1282
1282
|
}
|
|
@@ -1284,22 +1284,22 @@ function readByteArrayImpl(_this__u8e3s4, size) {
|
|
|
1284
1284
|
var arraySize = size;
|
|
1285
1285
|
if (size === -1) {
|
|
1286
1286
|
var fetchSize = new Long(2147483647, 0);
|
|
1287
|
-
while (compare(_this__u8e3s4.
|
|
1287
|
+
while (compare(_this__u8e3s4.q3p().e1(), new Long(2147483647, 0)) < 0 && _this__u8e3s4.t3p(fetchSize)) {
|
|
1288
1288
|
// Inline function 'kotlin.Long.times' call
|
|
1289
1289
|
var this_0 = fetchSize;
|
|
1290
1290
|
fetchSize = multiply(this_0, fromInt(2));
|
|
1291
1291
|
}
|
|
1292
1292
|
// Inline function 'kotlin.check' call
|
|
1293
|
-
if (!(compare(_this__u8e3s4.
|
|
1294
|
-
var message = "Can't create an array of size " + _this__u8e3s4.
|
|
1293
|
+
if (!(compare(_this__u8e3s4.q3p().e1(), new Long(2147483647, 0)) < 0)) {
|
|
1294
|
+
var message = "Can't create an array of size " + _this__u8e3s4.q3p().e1().toString();
|
|
1295
1295
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1296
1296
|
}
|
|
1297
|
-
arraySize = convertToInt(_this__u8e3s4.
|
|
1297
|
+
arraySize = convertToInt(_this__u8e3s4.q3p().e1());
|
|
1298
1298
|
} else {
|
|
1299
|
-
_this__u8e3s4.
|
|
1299
|
+
_this__u8e3s4.s3p(fromInt(size));
|
|
1300
1300
|
}
|
|
1301
1301
|
var array = new Int8Array(arraySize);
|
|
1302
|
-
readTo(_this__u8e3s4.
|
|
1302
|
+
readTo(_this__u8e3s4.q3p(), array);
|
|
1303
1303
|
return array;
|
|
1304
1304
|
}
|
|
1305
1305
|
function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
@@ -1310,7 +1310,7 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
1310
1310
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1311
1311
|
var offset = startIndex;
|
|
1312
1312
|
while (offset < endIndex) {
|
|
1313
|
-
var bytesRead = _this__u8e3s4.
|
|
1313
|
+
var bytesRead = _this__u8e3s4.p3q(sink, offset, endIndex);
|
|
1314
1314
|
if (bytesRead === -1) {
|
|
1315
1315
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + (endIndex - startIndex | 0) + ' bytes. ' + ('Only ' + bytesRead + ' bytes were read.'));
|
|
1316
1316
|
}
|
|
@@ -1318,15 +1318,15 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
1320
|
function readString(_this__u8e3s4, byteCount) {
|
|
1321
|
-
_this__u8e3s4.
|
|
1322
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
1321
|
+
_this__u8e3s4.s3p(byteCount);
|
|
1322
|
+
return commonReadUtf8(_this__u8e3s4.q3p(), byteCount);
|
|
1323
1323
|
}
|
|
1324
1324
|
function readString_0(_this__u8e3s4) {
|
|
1325
1325
|
return commonReadUtf8(_this__u8e3s4, _this__u8e3s4.e1());
|
|
1326
1326
|
}
|
|
1327
1327
|
function readString_1(_this__u8e3s4) {
|
|
1328
|
-
_this__u8e3s4.
|
|
1329
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
1328
|
+
_this__u8e3s4.t3p(new Long(-1, 2147483647));
|
|
1329
|
+
return commonReadUtf8(_this__u8e3s4.q3p(), _this__u8e3s4.q3p().e1());
|
|
1330
1330
|
}
|
|
1331
1331
|
function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
1332
1332
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
@@ -1336,7 +1336,7 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1336
1336
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1337
1337
|
// Inline function 'kotlinx.io.writeToInternalBuffer' call
|
|
1338
1338
|
// Inline function 'kotlinx.io.commonWriteUtf8' call
|
|
1339
|
-
var this_0 = _this__u8e3s4.
|
|
1339
|
+
var this_0 = _this__u8e3s4.q3p();
|
|
1340
1340
|
var i = startIndex;
|
|
1341
1341
|
while (i < endIndex) {
|
|
1342
1342
|
var p0 = i;
|
|
@@ -1346,15 +1346,15 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1346
1346
|
if (c < 128) {
|
|
1347
1347
|
$l$block_0: {
|
|
1348
1348
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1349
|
-
var tail = this_0.
|
|
1349
|
+
var tail = this_0.w3q(1);
|
|
1350
1350
|
var ctx = get_SegmentWriteContextImpl();
|
|
1351
1351
|
var segmentOffset = -i | 0;
|
|
1352
1352
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1353
|
-
var b = i + tail.
|
|
1353
|
+
var b = i + tail.b3r() | 0;
|
|
1354
1354
|
var runLimit = Math.min(endIndex, b);
|
|
1355
1355
|
var _unary__edvuaz = i;
|
|
1356
1356
|
i = _unary__edvuaz + 1 | 0;
|
|
1357
|
-
ctx.
|
|
1357
|
+
ctx.o3s(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
|
|
1358
1358
|
$l$loop: while (i < runLimit) {
|
|
1359
1359
|
var p0_0 = i;
|
|
1360
1360
|
// Inline function 'kotlin.code' call
|
|
@@ -1364,95 +1364,95 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1364
1364
|
break $l$loop;
|
|
1365
1365
|
var _unary__edvuaz_0 = i;
|
|
1366
1366
|
i = _unary__edvuaz_0 + 1 | 0;
|
|
1367
|
-
ctx.
|
|
1367
|
+
ctx.o3s(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
|
|
1368
1368
|
}
|
|
1369
1369
|
var bytesWritten = i + segmentOffset | 0;
|
|
1370
1370
|
if (bytesWritten === 1) {
|
|
1371
|
-
tail.
|
|
1371
|
+
tail.x3p_1 = tail.x3p_1 + bytesWritten | 0;
|
|
1372
1372
|
var tmp = this_0;
|
|
1373
1373
|
// Inline function 'kotlin.Long.plus' call
|
|
1374
|
-
var this_3 = this_0.
|
|
1375
|
-
tmp.
|
|
1374
|
+
var this_3 = this_0.p3p_1;
|
|
1375
|
+
tmp.p3p_1 = add(this_3, fromInt(bytesWritten));
|
|
1376
1376
|
break $l$block_0;
|
|
1377
1377
|
}
|
|
1378
1378
|
// Inline function 'kotlin.check' call
|
|
1379
|
-
if (!(0 <= bytesWritten ? bytesWritten <= tail.
|
|
1380
|
-
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.
|
|
1379
|
+
if (!(0 <= bytesWritten ? bytesWritten <= tail.b3r() : false)) {
|
|
1380
|
+
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.b3r();
|
|
1381
1381
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1382
1382
|
}
|
|
1383
1383
|
if (!(bytesWritten === 0)) {
|
|
1384
|
-
tail.
|
|
1384
|
+
tail.x3p_1 = tail.x3p_1 + bytesWritten | 0;
|
|
1385
1385
|
var tmp_0 = this_0;
|
|
1386
1386
|
// Inline function 'kotlin.Long.plus' call
|
|
1387
|
-
var this_4 = this_0.
|
|
1388
|
-
tmp_0.
|
|
1387
|
+
var this_4 = this_0.p3p_1;
|
|
1388
|
+
tmp_0.p3p_1 = add(this_4, fromInt(bytesWritten));
|
|
1389
1389
|
break $l$block_0;
|
|
1390
1390
|
}
|
|
1391
1391
|
if (isEmpty(tail)) {
|
|
1392
|
-
this_0.
|
|
1392
|
+
this_0.q3r();
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
1395
|
} else if (c < 2048) {
|
|
1396
1396
|
$l$block_2: {
|
|
1397
1397
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1398
|
-
var tail_0 = this_0.
|
|
1399
|
-
get_SegmentWriteContextImpl().
|
|
1398
|
+
var tail_0 = this_0.w3q(2);
|
|
1399
|
+
get_SegmentWriteContextImpl().n3s(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
1400
1400
|
var bytesWritten_0 = 2;
|
|
1401
1401
|
if (bytesWritten_0 === 2) {
|
|
1402
|
-
tail_0.
|
|
1402
|
+
tail_0.x3p_1 = tail_0.x3p_1 + bytesWritten_0 | 0;
|
|
1403
1403
|
var tmp_1 = this_0;
|
|
1404
1404
|
// Inline function 'kotlin.Long.plus' call
|
|
1405
|
-
var this_5 = this_0.
|
|
1406
|
-
tmp_1.
|
|
1405
|
+
var this_5 = this_0.p3p_1;
|
|
1406
|
+
tmp_1.p3p_1 = add(this_5, fromInt(bytesWritten_0));
|
|
1407
1407
|
break $l$block_2;
|
|
1408
1408
|
}
|
|
1409
1409
|
// Inline function 'kotlin.check' call
|
|
1410
|
-
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.
|
|
1411
|
-
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.b3r() : false)) {
|
|
1411
|
+
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.b3r();
|
|
1412
1412
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
1413
1413
|
}
|
|
1414
1414
|
if (!(bytesWritten_0 === 0)) {
|
|
1415
|
-
tail_0.
|
|
1415
|
+
tail_0.x3p_1 = tail_0.x3p_1 + bytesWritten_0 | 0;
|
|
1416
1416
|
var tmp_2 = this_0;
|
|
1417
1417
|
// Inline function 'kotlin.Long.plus' call
|
|
1418
|
-
var this_6 = this_0.
|
|
1419
|
-
tmp_2.
|
|
1418
|
+
var this_6 = this_0.p3p_1;
|
|
1419
|
+
tmp_2.p3p_1 = add(this_6, fromInt(bytesWritten_0));
|
|
1420
1420
|
break $l$block_2;
|
|
1421
1421
|
}
|
|
1422
1422
|
if (isEmpty(tail_0)) {
|
|
1423
|
-
this_0.
|
|
1423
|
+
this_0.q3r();
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
1426
1426
|
i = i + 1 | 0;
|
|
1427
1427
|
} else if (c < 55296 || c > 57343) {
|
|
1428
1428
|
$l$block_4: {
|
|
1429
1429
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1430
|
-
var tail_1 = this_0.
|
|
1431
|
-
get_SegmentWriteContextImpl().
|
|
1430
|
+
var tail_1 = this_0.w3q(3);
|
|
1431
|
+
get_SegmentWriteContextImpl().m3s(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
1432
1432
|
var bytesWritten_1 = 3;
|
|
1433
1433
|
if (bytesWritten_1 === 3) {
|
|
1434
|
-
tail_1.
|
|
1434
|
+
tail_1.x3p_1 = tail_1.x3p_1 + bytesWritten_1 | 0;
|
|
1435
1435
|
var tmp_3 = this_0;
|
|
1436
1436
|
// Inline function 'kotlin.Long.plus' call
|
|
1437
|
-
var this_7 = this_0.
|
|
1438
|
-
tmp_3.
|
|
1437
|
+
var this_7 = this_0.p3p_1;
|
|
1438
|
+
tmp_3.p3p_1 = add(this_7, fromInt(bytesWritten_1));
|
|
1439
1439
|
break $l$block_4;
|
|
1440
1440
|
}
|
|
1441
1441
|
// Inline function 'kotlin.check' call
|
|
1442
|
-
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.
|
|
1443
|
-
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.b3r() : false)) {
|
|
1443
|
+
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.b3r();
|
|
1444
1444
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
1445
1445
|
}
|
|
1446
1446
|
if (!(bytesWritten_1 === 0)) {
|
|
1447
|
-
tail_1.
|
|
1447
|
+
tail_1.x3p_1 = tail_1.x3p_1 + bytesWritten_1 | 0;
|
|
1448
1448
|
var tmp_4 = this_0;
|
|
1449
1449
|
// Inline function 'kotlin.Long.plus' call
|
|
1450
|
-
var this_8 = this_0.
|
|
1451
|
-
tmp_4.
|
|
1450
|
+
var this_8 = this_0.p3p_1;
|
|
1451
|
+
tmp_4.p3p_1 = add(this_8, fromInt(bytesWritten_1));
|
|
1452
1452
|
break $l$block_4;
|
|
1453
1453
|
}
|
|
1454
1454
|
if (isEmpty(tail_1)) {
|
|
1455
|
-
this_0.
|
|
1455
|
+
this_0.q3r();
|
|
1456
1456
|
}
|
|
1457
1457
|
}
|
|
1458
1458
|
i = i + 1 | 0;
|
|
@@ -1471,64 +1471,64 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1471
1471
|
// Inline function 'kotlin.code' call
|
|
1472
1472
|
var this_10 = _Char___init__impl__6a9atx(63);
|
|
1473
1473
|
var tmp$ret$29 = Char__toInt_impl_vasixd(this_10);
|
|
1474
|
-
this_0.
|
|
1474
|
+
this_0.k3r(toByte(tmp$ret$29));
|
|
1475
1475
|
i = i + 1 | 0;
|
|
1476
1476
|
} else {
|
|
1477
1477
|
var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
|
|
1478
1478
|
$l$block_6: {
|
|
1479
1479
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1480
|
-
var tail_2 = this_0.
|
|
1481
|
-
get_SegmentWriteContextImpl().
|
|
1480
|
+
var tail_2 = this_0.w3q(4);
|
|
1481
|
+
get_SegmentWriteContextImpl().l3s(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
1482
1482
|
var bytesWritten_2 = 4;
|
|
1483
1483
|
if (bytesWritten_2 === 4) {
|
|
1484
|
-
tail_2.
|
|
1484
|
+
tail_2.x3p_1 = tail_2.x3p_1 + bytesWritten_2 | 0;
|
|
1485
1485
|
var tmp_6 = this_0;
|
|
1486
1486
|
// Inline function 'kotlin.Long.plus' call
|
|
1487
|
-
var this_11 = this_0.
|
|
1488
|
-
tmp_6.
|
|
1487
|
+
var this_11 = this_0.p3p_1;
|
|
1488
|
+
tmp_6.p3p_1 = add(this_11, fromInt(bytesWritten_2));
|
|
1489
1489
|
break $l$block_6;
|
|
1490
1490
|
}
|
|
1491
1491
|
// Inline function 'kotlin.check' call
|
|
1492
|
-
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.
|
|
1493
|
-
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.b3r() : false)) {
|
|
1493
|
+
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.b3r();
|
|
1494
1494
|
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
1495
1495
|
}
|
|
1496
1496
|
if (!(bytesWritten_2 === 0)) {
|
|
1497
|
-
tail_2.
|
|
1497
|
+
tail_2.x3p_1 = tail_2.x3p_1 + bytesWritten_2 | 0;
|
|
1498
1498
|
var tmp_7 = this_0;
|
|
1499
1499
|
// Inline function 'kotlin.Long.plus' call
|
|
1500
|
-
var this_12 = this_0.
|
|
1501
|
-
tmp_7.
|
|
1500
|
+
var this_12 = this_0.p3p_1;
|
|
1501
|
+
tmp_7.p3p_1 = add(this_12, fromInt(bytesWritten_2));
|
|
1502
1502
|
break $l$block_6;
|
|
1503
1503
|
}
|
|
1504
1504
|
if (isEmpty(tail_2)) {
|
|
1505
|
-
this_0.
|
|
1505
|
+
this_0.q3r();
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
1508
|
i = i + 2 | 0;
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
|
-
_this__u8e3s4.
|
|
1512
|
+
_this__u8e3s4.g3q();
|
|
1513
1513
|
}
|
|
1514
1514
|
function commonReadUtf8(_this__u8e3s4, byteCount) {
|
|
1515
1515
|
if (equalsLong(byteCount, new Long(0, 0)))
|
|
1516
1516
|
return '';
|
|
1517
1517
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
1518
|
-
var curr = _this__u8e3s4.
|
|
1518
|
+
var curr = _this__u8e3s4.n3p_1;
|
|
1519
1519
|
while (!(curr == null)) {
|
|
1520
1520
|
get_SegmentReadContextImpl();
|
|
1521
1521
|
if (compare(fromInt(curr.e1()), byteCount) >= 0) {
|
|
1522
1522
|
var result = '';
|
|
1523
1523
|
// Inline function 'kotlinx.io.unsafe.withData' call
|
|
1524
|
-
var tmp0 = curr.
|
|
1525
|
-
var tmp2 = curr.
|
|
1526
|
-
var tmp0_0 = curr.
|
|
1524
|
+
var tmp0 = curr.g3s(true);
|
|
1525
|
+
var tmp2 = curr.w3p_1;
|
|
1526
|
+
var tmp0_0 = curr.x3p_1;
|
|
1527
1527
|
// Inline function 'kotlin.math.min' call
|
|
1528
1528
|
var b = tmp2 + convertToInt(byteCount) | 0;
|
|
1529
1529
|
var tmp$ret$4 = Math.min(tmp0_0, b);
|
|
1530
1530
|
result = commonToUtf8String(tmp0, tmp2, tmp$ret$4);
|
|
1531
|
-
_this__u8e3s4.
|
|
1531
|
+
_this__u8e3s4.o3q(byteCount);
|
|
1532
1532
|
return result;
|
|
1533
1533
|
}
|
|
1534
1534
|
return commonToUtf8String(readByteArray_0(_this__u8e3s4, convertToInt(byteCount)));
|
|
@@ -1899,27 +1899,27 @@ function UnsafeBufferOperations_getInstance() {
|
|
|
1899
1899
|
}
|
|
1900
1900
|
function SegmentReadContextImpl$1() {
|
|
1901
1901
|
}
|
|
1902
|
-
protoOf(SegmentReadContextImpl$1).
|
|
1903
|
-
return segment.
|
|
1902
|
+
protoOf(SegmentReadContextImpl$1).o3r = function (segment, offset) {
|
|
1903
|
+
return segment.n3q(offset);
|
|
1904
1904
|
};
|
|
1905
1905
|
function SegmentWriteContextImpl$1() {
|
|
1906
1906
|
}
|
|
1907
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1908
|
-
segment.
|
|
1907
|
+
protoOf(SegmentWriteContextImpl$1).o3s = function (segment, offset, value) {
|
|
1908
|
+
segment.h3s(offset, value);
|
|
1909
1909
|
};
|
|
1910
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1911
|
-
segment.
|
|
1910
|
+
protoOf(SegmentWriteContextImpl$1).n3s = function (segment, offset, b0, b1) {
|
|
1911
|
+
segment.i3s(offset, b0, b1);
|
|
1912
1912
|
};
|
|
1913
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1914
|
-
segment.
|
|
1913
|
+
protoOf(SegmentWriteContextImpl$1).m3s = function (segment, offset, b0, b1, b2) {
|
|
1914
|
+
segment.j3s(offset, b0, b1, b2);
|
|
1915
1915
|
};
|
|
1916
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1917
|
-
segment.
|
|
1916
|
+
protoOf(SegmentWriteContextImpl$1).l3s = function (segment, offset, b0, b1, b2, b3) {
|
|
1917
|
+
segment.k3s(offset, b0, b1, b2, b3);
|
|
1918
1918
|
};
|
|
1919
1919
|
function BufferIterationContextImpl$1() {
|
|
1920
1920
|
}
|
|
1921
|
-
protoOf(BufferIterationContextImpl$1).
|
|
1922
|
-
return get_SegmentReadContextImpl().
|
|
1921
|
+
protoOf(BufferIterationContextImpl$1).o3r = function (segment, offset) {
|
|
1922
|
+
return get_SegmentReadContextImpl().o3r(segment, offset);
|
|
1923
1923
|
};
|
|
1924
1924
|
var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
|
|
1925
1925
|
function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
@@ -1987,15 +1987,15 @@ function EOFException() {
|
|
|
1987
1987
|
captureStack(this, EOFException);
|
|
1988
1988
|
}
|
|
1989
1989
|
function SegmentPool() {
|
|
1990
|
-
this.
|
|
1991
|
-
this.
|
|
1990
|
+
this.x3q_1 = 0;
|
|
1991
|
+
this.y3q_1 = 0;
|
|
1992
1992
|
}
|
|
1993
|
-
protoOf(SegmentPool).
|
|
1994
|
-
return Companion_instance.
|
|
1993
|
+
protoOf(SegmentPool).z3q = function () {
|
|
1994
|
+
return Companion_instance.c3s();
|
|
1995
1995
|
};
|
|
1996
|
-
protoOf(SegmentPool).
|
|
1996
|
+
protoOf(SegmentPool).p3r = function (segment) {
|
|
1997
1997
|
};
|
|
1998
|
-
protoOf(SegmentPool).
|
|
1998
|
+
protoOf(SegmentPool).e3s = function () {
|
|
1999
1999
|
return AlwaysSharedCopyTracker_getInstance();
|
|
2000
2000
|
};
|
|
2001
2001
|
var SegmentPool_instance;
|
|
@@ -2003,7 +2003,7 @@ function SegmentPool_getInstance() {
|
|
|
2003
2003
|
return SegmentPool_instance;
|
|
2004
2004
|
}
|
|
2005
2005
|
//region block: post-declaration
|
|
2006
|
-
protoOf(Buffer).
|
|
2006
|
+
protoOf(Buffer).d3r = write$default;
|
|
2007
2007
|
//endregion
|
|
2008
2008
|
//region block: init
|
|
2009
2009
|
Companion_instance = new Companion();
|