@dmarket/p2p-tracker-core 0.1.0-SNAPSHOT.99 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION +14 -0
- package/dmarket-p2p-tracker-core-domain.mjs +10678 -4377
- package/dmarket-p2p-tracker-core-domain.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +3172 -2659
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlinx-atomicfu.mjs +13 -13
- package/kotlinx-coroutines-core.mjs +2763 -2433
- package/kotlinx-coroutines-core.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.mjs +44 -44
- package/kotlinx-io-kotlinx-io-core.mjs +496 -496
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1791 -1790
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1586 -1564
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/ktor-ktor-client-core.mjs +3008 -3000
- package/ktor-ktor-client-core.mjs.map +1 -1
- package/ktor-ktor-events.mjs +6 -6
- package/ktor-ktor-http-cio.mjs +491 -491
- package/ktor-ktor-http.mjs +646 -646
- package/ktor-ktor-io.mjs +1015 -1015
- package/ktor-ktor-utils.mjs +794 -786
- package/ktor-ktor-utils.mjs.map +1 -1
- package/ktor-ktor-websockets.mjs +747 -747
- package/p2p-tracker-core.d.mts +107 -40
- package/p2p-tracker-core.mjs +26723 -10673
- package/p2p-tracker-core.mjs.map +1 -1
- package/package.json +2 -4
- package/pkg/README.md +92 -0
- package/pkg/client_wasm.d.ts +312 -0
- package/pkg/client_wasm.js +1187 -0
- package/pkg/client_wasm_bg.wasm +0 -0
- package/pkg/client_wasm_bg.wasm.d.ts +32 -0
- package/pkg/package.json +19 -0
- package/pkg/snippets/web-spawn-05868593a72e2d44/js/spawn.js +73 -0
- package/pkg/spawn.js +73 -0
- package/transport/README.md +172 -0
- package/transport/dist/channel.d.ts +48 -0
- package/transport/dist/channel.d.ts.map +1 -0
- package/transport/dist/channel.js +150 -0
- package/transport/dist/channel.js.map +1 -0
- package/transport/dist/index.d.ts +8 -0
- package/transport/dist/index.d.ts.map +1 -0
- package/transport/dist/index.js +18 -0
- package/transport/dist/index.js.map +1 -0
- package/transport/dist/prover.d.ts +103 -0
- package/transport/dist/prover.d.ts.map +1 -0
- package/transport/dist/prover.js +139 -0
- package/transport/dist/prover.js.map +1 -0
- package/transport/dist/transport.d.ts +31 -0
- package/transport/dist/transport.d.ts.map +1 -0
- package/transport/dist/transport.js +75 -0
- package/transport/dist/transport.js.map +1 -0
- package/transport/dist/types.d.ts +162 -0
- package/transport/dist/types.d.ts.map +1 -0
- package/transport/dist/types.js +21 -0
- package/transport/dist/types.js.map +1 -0
- package/transport/dist/wasm-compat.d.ts +2 -0
- package/transport/dist/wasm-compat.d.ts.map +1 -0
- package/transport/dist/wasm-compat.js +15 -0
- package/transport/dist/wasm-compat.js.map +1 -0
- package/transport/package.json +28 -0
|
@@ -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.f3g(source, startIndex, endIndex);
|
|
54
54
|
tmp = Unit_instance;
|
|
55
55
|
} else {
|
|
56
|
-
tmp = $super.
|
|
56
|
+
tmp = $super.f3g.call(this, source, startIndex, endIndex);
|
|
57
57
|
}
|
|
58
58
|
return tmp;
|
|
59
59
|
}
|
|
@@ -102,42 +102,42 @@ function _init_properties__Util_kt__g8tcl9() {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
function throwEof($this, byteCount) {
|
|
105
|
-
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + $this.
|
|
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.s3e_1 = null;
|
|
109
|
+
this.t3e_1 = null;
|
|
110
|
+
this.u3e_1 = new Long(0, 0);
|
|
111
111
|
}
|
|
112
|
-
protoOf(Buffer).
|
|
113
|
-
return this.
|
|
112
|
+
protoOf(Buffer).e1 = function () {
|
|
113
|
+
return this.u3e_1;
|
|
114
114
|
};
|
|
115
|
-
protoOf(Buffer).
|
|
115
|
+
protoOf(Buffer).v3e = function () {
|
|
116
116
|
return this;
|
|
117
117
|
};
|
|
118
|
-
protoOf(Buffer).
|
|
119
|
-
return equalsLong(this.
|
|
118
|
+
protoOf(Buffer).w3e = function () {
|
|
119
|
+
return equalsLong(this.e1(), new Long(0, 0));
|
|
120
120
|
};
|
|
121
|
-
protoOf(Buffer).
|
|
121
|
+
protoOf(Buffer).x3e = 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();
|
|
125
125
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
126
126
|
}
|
|
127
|
-
if (compare(this.
|
|
128
|
-
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + this.
|
|
127
|
+
if (compare(this.e1(), byteCount) < 0) {
|
|
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).y3e = 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';
|
|
135
135
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
136
136
|
}
|
|
137
|
-
return compare(this.
|
|
137
|
+
return compare(this.e1(), byteCount) >= 0;
|
|
138
138
|
};
|
|
139
|
-
protoOf(Buffer).
|
|
140
|
-
var tmp0_elvis_lhs = this.
|
|
139
|
+
protoOf(Buffer).z3e = function () {
|
|
140
|
+
var tmp0_elvis_lhs = this.s3e_1;
|
|
141
141
|
var tmp;
|
|
142
142
|
if (tmp0_elvis_lhs == null) {
|
|
143
143
|
throwEof(this, new Long(1, 0));
|
|
@@ -145,20 +145,20 @@ protoOf(Buffer).h2y = function () {
|
|
|
145
145
|
tmp = tmp0_elvis_lhs;
|
|
146
146
|
}
|
|
147
147
|
var segment = tmp;
|
|
148
|
-
var segmentSize = segment.
|
|
148
|
+
var segmentSize = segment.e1();
|
|
149
149
|
if (segmentSize === 0) {
|
|
150
|
-
this.
|
|
151
|
-
return this.
|
|
150
|
+
this.h3f();
|
|
151
|
+
return this.z3e();
|
|
152
152
|
}
|
|
153
|
-
var v = segment.
|
|
154
|
-
this.
|
|
153
|
+
var v = segment.i3f();
|
|
154
|
+
this.u3e_1 = subtract(this.u3e_1, new Long(1, 0));
|
|
155
155
|
if (segmentSize === 1) {
|
|
156
|
-
this.
|
|
156
|
+
this.h3f();
|
|
157
157
|
}
|
|
158
158
|
return v;
|
|
159
159
|
};
|
|
160
|
-
protoOf(Buffer).
|
|
161
|
-
var tmp0_elvis_lhs = this.
|
|
160
|
+
protoOf(Buffer).j3f = function () {
|
|
161
|
+
var tmp0_elvis_lhs = this.s3e_1;
|
|
162
162
|
var tmp;
|
|
163
163
|
if (tmp0_elvis_lhs == null) {
|
|
164
164
|
throwEof(this, new Long(2, 0));
|
|
@@ -166,124 +166,124 @@ protoOf(Buffer).r2y = function () {
|
|
|
166
166
|
tmp = tmp0_elvis_lhs;
|
|
167
167
|
}
|
|
168
168
|
var segment = tmp;
|
|
169
|
-
var segmentSize = segment.
|
|
169
|
+
var segmentSize = segment.e1();
|
|
170
170
|
if (segmentSize < 2) {
|
|
171
|
-
this.
|
|
171
|
+
this.x3e(new Long(2, 0));
|
|
172
172
|
if (segmentSize === 0) {
|
|
173
|
-
this.
|
|
174
|
-
return this.
|
|
173
|
+
this.h3f();
|
|
174
|
+
return this.j3f();
|
|
175
175
|
}
|
|
176
176
|
// Inline function 'kotlinx.io.and' call
|
|
177
|
-
var tmp_0 = (this.
|
|
177
|
+
var tmp_0 = (this.z3e() & 255) << 8;
|
|
178
178
|
// Inline function 'kotlinx.io.and' call
|
|
179
|
-
var tmp$ret$1 = this.
|
|
179
|
+
var tmp$ret$1 = this.z3e() & 255;
|
|
180
180
|
return toShort(tmp_0 | tmp$ret$1);
|
|
181
181
|
}
|
|
182
|
-
var v = segment.
|
|
183
|
-
this.
|
|
182
|
+
var v = segment.k3f();
|
|
183
|
+
this.u3e_1 = subtract(this.u3e_1, new Long(2, 0));
|
|
184
184
|
if (segmentSize === 2) {
|
|
185
|
-
this.
|
|
185
|
+
this.h3f();
|
|
186
186
|
}
|
|
187
187
|
return v;
|
|
188
188
|
};
|
|
189
|
-
protoOf(Buffer).
|
|
189
|
+
protoOf(Buffer).l3f = function () {
|
|
190
190
|
return Unit_instance;
|
|
191
191
|
};
|
|
192
|
-
protoOf(Buffer).
|
|
193
|
-
checkBounds(this.
|
|
192
|
+
protoOf(Buffer).m3f = function (out, startIndex, endIndex) {
|
|
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.u3e_1 = add(out.u3e_1, remainingByteCount);
|
|
199
|
+
var s = this.s3e_1;
|
|
200
|
+
while (compare(currentOffset, fromInt(ensureNotNull(s).c3f_1 - s.b3f_1 | 0)) >= 0) {
|
|
201
|
+
currentOffset = subtract(currentOffset, fromInt(s.c3f_1 - s.b3f_1 | 0));
|
|
202
|
+
s = s.f3f_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).n3f();
|
|
206
|
+
copy.b3f_1 = copy.b3f_1 + convertToInt(currentOffset) | 0;
|
|
207
207
|
var tmp = copy;
|
|
208
|
-
var tmp0 = copy.
|
|
208
|
+
var tmp0 = copy.b3f_1 + convertToInt(remainingByteCount) | 0;
|
|
209
209
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
210
|
-
var b = copy.
|
|
211
|
-
tmp.
|
|
210
|
+
var b = copy.c3f_1;
|
|
211
|
+
tmp.c3f_1 = Math.min(tmp0, b);
|
|
212
212
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
213
|
-
if (out.
|
|
214
|
-
out.
|
|
215
|
-
out.
|
|
213
|
+
if (out.s3e_1 == null) {
|
|
214
|
+
out.s3e_1 = copy;
|
|
215
|
+
out.t3e_1 = copy;
|
|
216
216
|
} else if (false) {
|
|
217
|
-
out.
|
|
218
|
-
if (ensureNotNull(out.
|
|
219
|
-
out.
|
|
217
|
+
out.t3e_1 = ensureNotNull(out.t3e_1).o3f(copy).p3f();
|
|
218
|
+
if (ensureNotNull(out.t3e_1).g3f_1 == null) {
|
|
219
|
+
out.s3e_1 = out.t3e_1;
|
|
220
220
|
}
|
|
221
221
|
} else {
|
|
222
|
-
out.
|
|
222
|
+
out.t3e_1 = ensureNotNull(out.t3e_1).o3f(copy);
|
|
223
223
|
}
|
|
224
|
-
remainingByteCount = subtract(remainingByteCount, fromInt(copy.
|
|
224
|
+
remainingByteCount = subtract(remainingByteCount, fromInt(copy.c3f_1 - copy.b3f_1 | 0));
|
|
225
225
|
currentOffset = new Long(0, 0);
|
|
226
|
-
s = s.
|
|
226
|
+
s = s.f3f_1;
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
|
-
protoOf(Buffer).
|
|
230
|
-
var result = this.
|
|
229
|
+
protoOf(Buffer).q3f = function () {
|
|
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.t3e_1);
|
|
234
|
+
if (tail.c3f_1 < 8192 && tail.e3f_1) {
|
|
235
|
+
result = subtract(result, fromInt(tail.c3f_1 - tail.b3f_1 | 0));
|
|
236
236
|
}
|
|
237
237
|
return result;
|
|
238
238
|
};
|
|
239
|
-
protoOf(Buffer).
|
|
240
|
-
if (compare(position, new Long(0, 0)) < 0 || compare(position, this.
|
|
241
|
-
throw IndexOutOfBoundsException_init_$Create$('position (' + position.toString() + ') is not within the range [0..size(' + this.
|
|
239
|
+
protoOf(Buffer).r3f = function (position) {
|
|
240
|
+
if (compare(position, new Long(0, 0)) < 0 || compare(position, this.e1()) >= 0) {
|
|
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.s3e_1).s3f(0);
|
|
245
245
|
}
|
|
246
246
|
$l$block_1: {
|
|
247
247
|
// Inline function 'kotlinx.io.seek' call
|
|
248
|
-
if (this.
|
|
248
|
+
if (this.s3e_1 == null) {
|
|
249
249
|
var offset = new Long(-1, -1);
|
|
250
|
-
return ensureNotNull(null).
|
|
250
|
+
return ensureNotNull(null).s3f(convertToInt(subtract(position, offset)));
|
|
251
251
|
}
|
|
252
|
-
if (compare(subtract(this.
|
|
253
|
-
var s = this.
|
|
254
|
-
var offset_0 = this.
|
|
252
|
+
if (compare(subtract(this.e1(), position), position) < 0) {
|
|
253
|
+
var s = this.t3e_1;
|
|
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.c3f_1 - s.b3f_1 | 0));
|
|
257
257
|
if (compare(offset_0, position) <= 0)
|
|
258
258
|
break $l$loop;
|
|
259
|
-
s = s.
|
|
259
|
+
s = s.g3f_1;
|
|
260
260
|
}
|
|
261
261
|
var tmp0 = s;
|
|
262
262
|
var offset_1 = offset_0;
|
|
263
|
-
return ensureNotNull(tmp0).
|
|
263
|
+
return ensureNotNull(tmp0).s3f(convertToInt(subtract(position, offset_1)));
|
|
264
264
|
} else {
|
|
265
|
-
var s_0 = this.
|
|
265
|
+
var s_0 = this.s3e_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.c3f_1 - s_0.b3f_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.f3f_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).s3f(convertToInt(subtract(position, offset_3)));
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
};
|
|
283
|
-
protoOf(Buffer).
|
|
284
|
-
return this.
|
|
283
|
+
protoOf(Buffer).w2 = function () {
|
|
284
|
+
return this.t3f(this.e1());
|
|
285
285
|
};
|
|
286
|
-
protoOf(Buffer).
|
|
286
|
+
protoOf(Buffer).t3f = 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).b2z = 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.s3e_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).b2z = 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.c3f_1 - head.b3f_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.u3e_1 = subtract(this.u3e_1, fromInt(toSkip));
|
|
311
311
|
remainingByteCount = subtract(remainingByteCount, fromInt(toSkip));
|
|
312
|
-
head.
|
|
313
|
-
if (head.
|
|
314
|
-
this.
|
|
312
|
+
head.b3f_1 = head.b3f_1 + toSkip | 0;
|
|
313
|
+
if (head.b3f_1 === head.c3f_1) {
|
|
314
|
+
this.h3f();
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
};
|
|
318
|
-
protoOf(Buffer).
|
|
318
|
+
protoOf(Buffer).u3f = 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.s3e_1;
|
|
323
323
|
var tmp;
|
|
324
324
|
if (tmp0_elvis_lhs == null) {
|
|
325
325
|
return -1;
|
|
@@ -329,190 +329,190 @@ protoOf(Buffer).c2z = function (sink, startIndex, endIndex) {
|
|
|
329
329
|
var s = tmp;
|
|
330
330
|
var tmp0 = endIndex - startIndex | 0;
|
|
331
331
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
332
|
-
var b = s.
|
|
332
|
+
var b = s.e1();
|
|
333
333
|
var toCopy = Math.min(tmp0, b);
|
|
334
|
-
s.
|
|
335
|
-
this.
|
|
334
|
+
s.v3f(sink, startIndex, startIndex + toCopy | 0);
|
|
335
|
+
this.u3e_1 = subtract(this.u3e_1, fromInt(toCopy));
|
|
336
336
|
if (isEmpty(s)) {
|
|
337
|
-
this.
|
|
337
|
+
this.h3f();
|
|
338
338
|
}
|
|
339
339
|
return toCopy;
|
|
340
340
|
};
|
|
341
|
-
protoOf(Buffer).
|
|
341
|
+
protoOf(Buffer).w3f = 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)) {
|
|
345
345
|
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
346
346
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
347
347
|
}
|
|
348
|
-
if (equalsLong(this.
|
|
348
|
+
if (equalsLong(this.e1(), new Long(0, 0)))
|
|
349
349
|
return new Long(-1, -1);
|
|
350
|
-
var bytesWritten = compare(byteCount, this.
|
|
351
|
-
sink.
|
|
350
|
+
var bytesWritten = compare(byteCount, this.e1()) > 0 ? this.e1() : byteCount;
|
|
351
|
+
sink.x3f(this, bytesWritten);
|
|
352
352
|
return bytesWritten;
|
|
353
353
|
};
|
|
354
|
-
protoOf(Buffer).
|
|
354
|
+
protoOf(Buffer).y3f = 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)) {
|
|
358
358
|
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
359
359
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
360
360
|
}
|
|
361
|
-
if (compare(this.
|
|
362
|
-
sink.
|
|
363
|
-
throw EOFException_init_$Create$_0('Buffer exhausted before writing ' + byteCount.toString() + ' bytes. Only ' + this.
|
|
361
|
+
if (compare(this.e1(), byteCount) < 0) {
|
|
362
|
+
sink.x3f(this, this.e1());
|
|
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.x3f(this, byteCount);
|
|
366
366
|
};
|
|
367
|
-
protoOf(Buffer).
|
|
368
|
-
var byteCount = this.
|
|
367
|
+
protoOf(Buffer).z3f = function (sink) {
|
|
368
|
+
var byteCount = this.e1();
|
|
369
369
|
if (compare(byteCount, new Long(0, 0)) > 0) {
|
|
370
|
-
sink.
|
|
370
|
+
sink.x3f(this, byteCount);
|
|
371
371
|
}
|
|
372
372
|
return byteCount;
|
|
373
373
|
};
|
|
374
|
-
protoOf(Buffer).
|
|
374
|
+
protoOf(Buffer).a3g = function () {
|
|
375
375
|
return buffered(new PeekSource(this));
|
|
376
376
|
};
|
|
377
|
-
protoOf(Buffer).
|
|
377
|
+
protoOf(Buffer).b3g = 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.t3e_1 == null) {
|
|
384
|
+
var result = SegmentPool_instance.e3g();
|
|
385
|
+
this.s3e_1 = result;
|
|
386
|
+
this.t3e_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.t3e_1);
|
|
390
|
+
if ((t.c3f_1 + minimumCapacity | 0) > 8192 || !t.e3f_1) {
|
|
391
|
+
var newTail = t.o3f(SegmentPool_instance.e3g());
|
|
392
|
+
this.t3e_1 = newTail;
|
|
393
393
|
return newTail;
|
|
394
394
|
}
|
|
395
395
|
return t;
|
|
396
396
|
};
|
|
397
|
-
protoOf(Buffer).
|
|
397
|
+
protoOf(Buffer).f3g = 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.b3g(1);
|
|
404
404
|
var tmp0 = endIndex - currentOffset | 0;
|
|
405
405
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
406
|
-
var b = tail.
|
|
406
|
+
var b = tail.g3g();
|
|
407
407
|
var toCopy = Math.min(tmp0, b);
|
|
408
|
-
tail.
|
|
408
|
+
tail.h3g(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.u3e_1;
|
|
413
413
|
// Inline function 'kotlin.Long.plus' call
|
|
414
414
|
var other = endIndex - startIndex | 0;
|
|
415
|
-
tmp.
|
|
415
|
+
tmp.u3e_1 = add(tmp0_0, fromInt(other));
|
|
416
416
|
};
|
|
417
|
-
protoOf(Buffer).
|
|
417
|
+
protoOf(Buffer).x3f = function (source, byteCount) {
|
|
418
418
|
// Inline function 'kotlin.require' call
|
|
419
419
|
if (!!(source === this)) {
|
|
420
420
|
var message = 'source == this';
|
|
421
421
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
422
422
|
}
|
|
423
|
-
checkOffsetAndCount(source.
|
|
423
|
+
checkOffsetAndCount(source.u3e_1, new Long(0, 0), byteCount);
|
|
424
424
|
var remainingByteCount = byteCount;
|
|
425
425
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
426
|
-
if (compare(remainingByteCount, fromInt(ensureNotNull(source.
|
|
427
|
-
var tail = this.
|
|
426
|
+
if (compare(remainingByteCount, fromInt(ensureNotNull(source.s3e_1).e1())) < 0) {
|
|
427
|
+
var tail = this.t3e_1;
|
|
428
428
|
var tmp;
|
|
429
|
-
if (!(tail == null) && tail.
|
|
429
|
+
if (!(tail == null) && tail.e3f_1) {
|
|
430
430
|
var tmp0 = remainingByteCount;
|
|
431
431
|
// Inline function 'kotlin.Long.plus' call
|
|
432
|
-
var other = tail.
|
|
432
|
+
var other = tail.c3f_1;
|
|
433
433
|
var tmp0_0 = add(tmp0, fromInt(other));
|
|
434
434
|
// Inline function 'kotlin.Long.minus' call
|
|
435
|
-
var other_0 = tail.
|
|
435
|
+
var other_0 = tail.j3g() ? 0 : tail.b3f_1;
|
|
436
436
|
var tmp$ret$3 = subtract(tmp0_0, fromInt(other_0));
|
|
437
437
|
tmp = compare(tmp$ret$3, new Long(8192, 0)) <= 0;
|
|
438
438
|
} else {
|
|
439
439
|
tmp = false;
|
|
440
440
|
}
|
|
441
441
|
if (tmp) {
|
|
442
|
-
ensureNotNull(source.
|
|
443
|
-
source.
|
|
444
|
-
this.
|
|
442
|
+
ensureNotNull(source.s3e_1).l3g(tail, convertToInt(remainingByteCount));
|
|
443
|
+
source.u3e_1 = subtract(source.u3e_1, remainingByteCount);
|
|
444
|
+
this.u3e_1 = add(this.u3e_1, remainingByteCount);
|
|
445
445
|
return Unit_instance;
|
|
446
446
|
} else {
|
|
447
|
-
source.
|
|
447
|
+
source.s3e_1 = ensureNotNull(source.s3e_1).k3g(convertToInt(remainingByteCount));
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
var segmentToMove = ensureNotNull(source.
|
|
451
|
-
var movedByteCount = fromInt(segmentToMove.
|
|
452
|
-
source.
|
|
453
|
-
if (source.
|
|
454
|
-
source.
|
|
450
|
+
var segmentToMove = ensureNotNull(source.s3e_1);
|
|
451
|
+
var movedByteCount = fromInt(segmentToMove.e1());
|
|
452
|
+
source.s3e_1 = segmentToMove.m3g();
|
|
453
|
+
if (source.s3e_1 == null) {
|
|
454
|
+
source.t3e_1 = null;
|
|
455
455
|
}
|
|
456
456
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
457
|
-
if (this.
|
|
458
|
-
this.
|
|
459
|
-
this.
|
|
457
|
+
if (this.s3e_1 == null) {
|
|
458
|
+
this.s3e_1 = segmentToMove;
|
|
459
|
+
this.t3e_1 = segmentToMove;
|
|
460
460
|
} else if (true) {
|
|
461
|
-
this.
|
|
462
|
-
if (ensureNotNull(this.
|
|
463
|
-
this.
|
|
461
|
+
this.t3e_1 = ensureNotNull(this.t3e_1).o3f(segmentToMove).p3f();
|
|
462
|
+
if (ensureNotNull(this.t3e_1).g3f_1 == null) {
|
|
463
|
+
this.s3e_1 = this.t3e_1;
|
|
464
464
|
}
|
|
465
465
|
} else {
|
|
466
|
-
this.
|
|
466
|
+
this.t3e_1 = ensureNotNull(this.t3e_1).o3f(segmentToMove);
|
|
467
467
|
}
|
|
468
|
-
source.
|
|
469
|
-
this.
|
|
468
|
+
source.u3e_1 = subtract(source.u3e_1, movedByteCount);
|
|
469
|
+
this.u3e_1 = add(this.u3e_1, movedByteCount);
|
|
470
470
|
remainingByteCount = subtract(remainingByteCount, movedByteCount);
|
|
471
471
|
}
|
|
472
472
|
};
|
|
473
|
-
protoOf(Buffer).
|
|
473
|
+
protoOf(Buffer).n3g = function (source) {
|
|
474
474
|
var totalBytesRead = new Long(0, 0);
|
|
475
475
|
$l$loop: while (true) {
|
|
476
|
-
var readCount = source.
|
|
476
|
+
var readCount = source.w3f(this, new Long(8192, 0));
|
|
477
477
|
if (equalsLong(readCount, new Long(-1, -1)))
|
|
478
478
|
break $l$loop;
|
|
479
479
|
totalBytesRead = add(totalBytesRead, readCount);
|
|
480
480
|
}
|
|
481
481
|
return totalBytesRead;
|
|
482
482
|
};
|
|
483
|
-
protoOf(Buffer).
|
|
484
|
-
this.
|
|
485
|
-
this.
|
|
483
|
+
protoOf(Buffer).o3g = function (byte) {
|
|
484
|
+
this.b3g(1).p3g(byte);
|
|
485
|
+
this.u3e_1 = add(this.u3e_1, new Long(1, 0));
|
|
486
486
|
};
|
|
487
|
-
protoOf(Buffer).
|
|
488
|
-
this.
|
|
489
|
-
this.
|
|
487
|
+
protoOf(Buffer).q3g = function (short) {
|
|
488
|
+
this.b3g(2).r3g(short);
|
|
489
|
+
this.u3e_1 = add(this.u3e_1, new Long(2, 0));
|
|
490
490
|
};
|
|
491
|
-
protoOf(Buffer).
|
|
491
|
+
protoOf(Buffer).d4 = function () {
|
|
492
492
|
return Unit_instance;
|
|
493
493
|
};
|
|
494
494
|
protoOf(Buffer).toString = function () {
|
|
495
|
-
if (equalsLong(this.
|
|
495
|
+
if (equalsLong(this.e1(), new Long(0, 0)))
|
|
496
496
|
return 'Buffer(size=0)';
|
|
497
497
|
var maxPrintableBytes = 64;
|
|
498
498
|
// Inline function 'kotlinx.io.minOf' call
|
|
499
|
-
var b = this.
|
|
499
|
+
var b = this.e1();
|
|
500
500
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
501
501
|
var a = fromInt(maxPrintableBytes);
|
|
502
502
|
var tmp$ret$0 = compare(a, b) <= 0 ? a : b;
|
|
503
503
|
var len = convertToInt(tmp$ret$0);
|
|
504
|
-
var builder = StringBuilder_init_$Create$(imul(len, 2) + (compare(this.
|
|
504
|
+
var builder = StringBuilder_init_$Create$(imul(len, 2) + (compare(this.e1(), fromInt(maxPrintableBytes)) > 0 ? 1 : 0) | 0);
|
|
505
505
|
var bytesWritten = 0;
|
|
506
506
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
507
|
-
var curr = this.
|
|
507
|
+
var curr = this.s3e_1;
|
|
508
508
|
while (!(curr == null)) {
|
|
509
509
|
var tmp0 = get_SegmentReadContextImpl();
|
|
510
510
|
var segment = curr;
|
|
511
511
|
var idx = 0;
|
|
512
|
-
while (bytesWritten < len && idx < segment.
|
|
512
|
+
while (bytesWritten < len && idx < segment.e1()) {
|
|
513
513
|
var _unary__edvuaz = idx;
|
|
514
514
|
idx = _unary__edvuaz + 1 | 0;
|
|
515
|
-
var b_0 = tmp0.
|
|
515
|
+
var b_0 = tmp0.s3g(segment, _unary__edvuaz);
|
|
516
516
|
bytesWritten = bytesWritten + 1 | 0;
|
|
517
517
|
var tmp = get_HEX_DIGIT_CHARS();
|
|
518
518
|
// Inline function 'kotlinx.io.shr' call
|
|
@@ -523,49 +523,49 @@ protoOf(Buffer).toString = function () {
|
|
|
523
523
|
var tmp$ret$5 = b_0 & 15;
|
|
524
524
|
tmp_0.s(tmp_1[tmp$ret$5]);
|
|
525
525
|
}
|
|
526
|
-
curr = curr.
|
|
526
|
+
curr = curr.f3f_1;
|
|
527
527
|
}
|
|
528
|
-
if (compare(this.
|
|
528
|
+
if (compare(this.e1(), fromInt(maxPrintableBytes)) > 0) {
|
|
529
529
|
builder.s(_Char___init__impl__6a9atx(8230));
|
|
530
530
|
}
|
|
531
|
-
return 'Buffer(size=' + this.
|
|
531
|
+
return 'Buffer(size=' + this.e1().toString() + ' hex=' + builder.toString() + ')';
|
|
532
532
|
};
|
|
533
|
-
protoOf(Buffer).
|
|
534
|
-
var oldHead = ensureNotNull(this.
|
|
535
|
-
var nextHead = oldHead.
|
|
536
|
-
this.
|
|
533
|
+
protoOf(Buffer).h3f = function () {
|
|
534
|
+
var oldHead = ensureNotNull(this.s3e_1);
|
|
535
|
+
var nextHead = oldHead.f3f_1;
|
|
536
|
+
this.s3e_1 = nextHead;
|
|
537
537
|
if (nextHead == null) {
|
|
538
|
-
this.
|
|
538
|
+
this.t3e_1 = null;
|
|
539
539
|
} else {
|
|
540
|
-
nextHead.
|
|
540
|
+
nextHead.g3f_1 = null;
|
|
541
541
|
}
|
|
542
|
-
oldHead.
|
|
543
|
-
SegmentPool_instance.
|
|
542
|
+
oldHead.f3f_1 = null;
|
|
543
|
+
SegmentPool_instance.t3g(oldHead);
|
|
544
544
|
};
|
|
545
|
-
protoOf(Buffer).
|
|
546
|
-
var oldTail = ensureNotNull(this.
|
|
547
|
-
var newTail = oldTail.
|
|
548
|
-
this.
|
|
545
|
+
protoOf(Buffer).u3g = function () {
|
|
546
|
+
var oldTail = ensureNotNull(this.t3e_1);
|
|
547
|
+
var newTail = oldTail.g3f_1;
|
|
548
|
+
this.t3e_1 = newTail;
|
|
549
549
|
if (newTail == null) {
|
|
550
|
-
this.
|
|
550
|
+
this.s3e_1 = null;
|
|
551
551
|
} else {
|
|
552
|
-
newTail.
|
|
552
|
+
newTail.f3f_1 = null;
|
|
553
553
|
}
|
|
554
|
-
oldTail.
|
|
555
|
-
SegmentPool_instance.
|
|
554
|
+
oldTail.g3f_1 = null;
|
|
555
|
+
SegmentPool_instance.t3g(oldTail);
|
|
556
556
|
};
|
|
557
557
|
function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
558
558
|
startIndex = startIndex === VOID ? new Long(0, 0) : startIndex;
|
|
559
|
-
endIndex = endIndex === VOID ? _this__u8e3s4.
|
|
559
|
+
endIndex = endIndex === VOID ? _this__u8e3s4.e1() : endIndex;
|
|
560
560
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
561
|
-
var b = _this__u8e3s4.
|
|
561
|
+
var b = _this__u8e3s4.e1();
|
|
562
562
|
var endOffset = compare(endIndex, b) <= 0 ? endIndex : b;
|
|
563
|
-
checkBounds(_this__u8e3s4.
|
|
563
|
+
checkBounds(_this__u8e3s4.e1(), startIndex, endOffset);
|
|
564
564
|
if (equalsLong(startIndex, endOffset))
|
|
565
565
|
return new Long(-1, -1);
|
|
566
566
|
$l$block_1: {
|
|
567
567
|
// Inline function 'kotlinx.io.seek' call
|
|
568
|
-
if (_this__u8e3s4.
|
|
568
|
+
if (_this__u8e3s4.s3e_1 == null) {
|
|
569
569
|
var o = new Long(-1, -1);
|
|
570
570
|
if (equalsLong(o, new Long(-1, -1))) {
|
|
571
571
|
return new Long(-1, -1);
|
|
@@ -582,7 +582,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
582
582
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
583
583
|
var a = convertToInt(subtract(startIndex, offset));
|
|
584
584
|
var tmp_0 = Math.max(a, 0);
|
|
585
|
-
var tmp0 = segment.
|
|
585
|
+
var tmp0 = segment.e1();
|
|
586
586
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
587
587
|
var b_0 = convertToInt(subtract(endOffset, offset));
|
|
588
588
|
var tmp$ret$5 = Math.min(tmp0, b_0);
|
|
@@ -592,21 +592,21 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
592
592
|
}
|
|
593
593
|
var tmp0_0 = offset;
|
|
594
594
|
// Inline function 'kotlin.Long.plus' call
|
|
595
|
-
var other = segment.
|
|
595
|
+
var other = segment.e1();
|
|
596
596
|
offset = add(tmp0_0, fromInt(other));
|
|
597
|
-
segment = segment.
|
|
597
|
+
segment = segment.f3f_1;
|
|
598
598
|
}
|
|
599
599
|
while (!(segment == null) && compare(offset, endOffset) < 0);
|
|
600
600
|
return new Long(-1, -1);
|
|
601
601
|
}
|
|
602
|
-
if (compare(subtract(_this__u8e3s4.
|
|
603
|
-
var s = _this__u8e3s4.
|
|
604
|
-
var offset_0 = _this__u8e3s4.
|
|
602
|
+
if (compare(subtract(_this__u8e3s4.e1(), startIndex), startIndex) < 0) {
|
|
603
|
+
var s = _this__u8e3s4.t3e_1;
|
|
604
|
+
var offset_0 = _this__u8e3s4.e1();
|
|
605
605
|
$l$loop: while (!(s == null) && compare(offset_0, startIndex) > 0) {
|
|
606
|
-
offset_0 = subtract(offset_0, fromInt(s.
|
|
606
|
+
offset_0 = subtract(offset_0, fromInt(s.c3f_1 - s.b3f_1 | 0));
|
|
607
607
|
if (compare(offset_0, startIndex) <= 0)
|
|
608
608
|
break $l$loop;
|
|
609
|
-
s = s.
|
|
609
|
+
s = s.g3f_1;
|
|
610
610
|
}
|
|
611
611
|
var tmp0_1 = s;
|
|
612
612
|
var o_0 = offset_0;
|
|
@@ -625,7 +625,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
625
625
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
626
626
|
var a_0 = convertToInt(subtract(startIndex, offset_1));
|
|
627
627
|
var tmp_2 = Math.max(a_0, 0);
|
|
628
|
-
var tmp0_2 = segment_0.
|
|
628
|
+
var tmp0_2 = segment_0.e1();
|
|
629
629
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
630
630
|
var b_1 = convertToInt(subtract(endOffset, offset_1));
|
|
631
631
|
var tmp$ret$10 = Math.min(tmp0_2, b_1);
|
|
@@ -635,23 +635,23 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
635
635
|
}
|
|
636
636
|
var tmp0_3 = offset_1;
|
|
637
637
|
// Inline function 'kotlin.Long.plus' call
|
|
638
|
-
var other_0 = segment_0.
|
|
638
|
+
var other_0 = segment_0.e1();
|
|
639
639
|
offset_1 = add(tmp0_3, fromInt(other_0));
|
|
640
|
-
segment_0 = segment_0.
|
|
640
|
+
segment_0 = segment_0.f3f_1;
|
|
641
641
|
}
|
|
642
642
|
while (!(segment_0 == null) && compare(offset_1, endOffset) < 0);
|
|
643
643
|
return new Long(-1, -1);
|
|
644
644
|
} else {
|
|
645
|
-
var s_0 = _this__u8e3s4.
|
|
645
|
+
var s_0 = _this__u8e3s4.s3e_1;
|
|
646
646
|
var offset_2 = new Long(0, 0);
|
|
647
647
|
$l$loop_0: while (!(s_0 == null)) {
|
|
648
648
|
var tmp0_4 = offset_2;
|
|
649
649
|
// Inline function 'kotlin.Long.plus' call
|
|
650
|
-
var other_1 = s_0.
|
|
650
|
+
var other_1 = s_0.c3f_1 - s_0.b3f_1 | 0;
|
|
651
651
|
var nextOffset = add(tmp0_4, fromInt(other_1));
|
|
652
652
|
if (compare(nextOffset, startIndex) > 0)
|
|
653
653
|
break $l$loop_0;
|
|
654
|
-
s_0 = s_0.
|
|
654
|
+
s_0 = s_0.f3f_1;
|
|
655
655
|
offset_2 = nextOffset;
|
|
656
656
|
}
|
|
657
657
|
var tmp0_5 = s_0;
|
|
@@ -671,7 +671,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
671
671
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
672
672
|
var a_1 = convertToInt(subtract(startIndex, offset_3));
|
|
673
673
|
var tmp_4 = Math.max(a_1, 0);
|
|
674
|
-
var tmp0_6 = segment_1.
|
|
674
|
+
var tmp0_6 = segment_1.e1();
|
|
675
675
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
676
676
|
var b_2 = convertToInt(subtract(endOffset, offset_3));
|
|
677
677
|
var tmp$ret$16 = Math.min(tmp0_6, b_2);
|
|
@@ -681,9 +681,9 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
681
681
|
}
|
|
682
682
|
var tmp0_7 = offset_3;
|
|
683
683
|
// Inline function 'kotlin.Long.plus' call
|
|
684
|
-
var other_2 = segment_1.
|
|
684
|
+
var other_2 = segment_1.e1();
|
|
685
685
|
offset_3 = add(tmp0_7, fromInt(other_2));
|
|
686
|
-
segment_1 = segment_1.
|
|
686
|
+
segment_1 = segment_1.f3f_1;
|
|
687
687
|
}
|
|
688
688
|
while (!(segment_1 == null) && compare(offset_3, endOffset) < 0);
|
|
689
689
|
return new Long(-1, -1);
|
|
@@ -691,25 +691,25 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
693
|
function readByteString(_this__u8e3s4, byteCount) {
|
|
694
|
-
return UnsafeByteStringOperations_instance.
|
|
694
|
+
return UnsafeByteStringOperations_instance.r3e(readByteArray_0(_this__u8e3s4, byteCount));
|
|
695
695
|
}
|
|
696
696
|
function buffered(_this__u8e3s4) {
|
|
697
697
|
return new RealSource(_this__u8e3s4);
|
|
698
698
|
}
|
|
699
699
|
function PeekSource(upstream) {
|
|
700
|
-
this.
|
|
701
|
-
this.
|
|
702
|
-
this.
|
|
700
|
+
this.v3g_1 = upstream;
|
|
701
|
+
this.w3g_1 = this.v3g_1.v3e();
|
|
702
|
+
this.x3g_1 = this.w3g_1.s3e_1;
|
|
703
703
|
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.
|
|
704
|
+
var tmp0_safe_receiver = this.w3g_1.s3e_1;
|
|
705
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b3f_1;
|
|
706
|
+
tmp.y3g_1 = tmp1_elvis_lhs == null ? -1 : tmp1_elvis_lhs;
|
|
707
|
+
this.z3g_1 = false;
|
|
708
|
+
this.a3h_1 = new Long(0, 0);
|
|
709
709
|
}
|
|
710
|
-
protoOf(PeekSource).
|
|
710
|
+
protoOf(PeekSource).w3f = function (sink, byteCount) {
|
|
711
711
|
// Inline function 'kotlin.check' call
|
|
712
|
-
if (!!this.
|
|
712
|
+
if (!!this.z3g_1) {
|
|
713
713
|
var message = 'Source is closed.';
|
|
714
714
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
715
715
|
}
|
|
@@ -720,43 +720,43 @@ protoOf(PeekSource).e2z = function (sink, byteCount) {
|
|
|
720
720
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
721
721
|
}
|
|
722
722
|
// Inline function 'kotlin.check' call
|
|
723
|
-
if (!(this.
|
|
723
|
+
if (!(this.x3g_1 == null || (this.x3g_1 === this.w3g_1.s3e_1 && this.y3g_1 === ensureNotNull(this.w3g_1.s3e_1).b3f_1))) {
|
|
724
724
|
var message_1 = 'Peek source is invalid because upstream source was used';
|
|
725
725
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
726
726
|
}
|
|
727
727
|
if (equalsLong(byteCount, new Long(0, 0)))
|
|
728
728
|
return new Long(0, 0);
|
|
729
729
|
// Inline function 'kotlin.Long.plus' call
|
|
730
|
-
var this_0 = this.
|
|
730
|
+
var this_0 = this.a3h_1;
|
|
731
731
|
var tmp$ret$7 = add(this_0, fromInt(1));
|
|
732
|
-
if (!this.
|
|
732
|
+
if (!this.v3g_1.y3e(tmp$ret$7))
|
|
733
733
|
return new Long(-1, -1);
|
|
734
|
-
if (this.
|
|
735
|
-
this.
|
|
736
|
-
this.
|
|
734
|
+
if (this.x3g_1 == null && !(this.w3g_1.s3e_1 == null)) {
|
|
735
|
+
this.x3g_1 = this.w3g_1.s3e_1;
|
|
736
|
+
this.y3g_1 = ensureNotNull(this.w3g_1.s3e_1).b3f_1;
|
|
737
737
|
}
|
|
738
738
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
739
|
-
var b = subtract(this.
|
|
739
|
+
var b = subtract(this.w3g_1.e1(), this.a3h_1);
|
|
740
740
|
var toCopy = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
741
|
-
this.
|
|
742
|
-
this.
|
|
741
|
+
this.w3g_1.m3f(sink, this.a3h_1, add(this.a3h_1, toCopy));
|
|
742
|
+
this.a3h_1 = add(this.a3h_1, toCopy);
|
|
743
743
|
return toCopy;
|
|
744
744
|
};
|
|
745
|
-
protoOf(PeekSource).
|
|
746
|
-
this.
|
|
745
|
+
protoOf(PeekSource).d4 = function () {
|
|
746
|
+
this.z3g_1 = true;
|
|
747
747
|
};
|
|
748
748
|
function RealSource(source) {
|
|
749
|
-
this.
|
|
750
|
-
this.
|
|
751
|
-
this.
|
|
749
|
+
this.b3h_1 = source;
|
|
750
|
+
this.c3h_1 = false;
|
|
751
|
+
this.d3h_1 = new Buffer();
|
|
752
752
|
}
|
|
753
|
-
protoOf(RealSource).
|
|
754
|
-
return this.
|
|
753
|
+
protoOf(RealSource).v3e = function () {
|
|
754
|
+
return this.d3h_1;
|
|
755
755
|
};
|
|
756
|
-
protoOf(RealSource).
|
|
756
|
+
protoOf(RealSource).w3f = function (sink, byteCount) {
|
|
757
757
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
758
758
|
// Inline function 'kotlin.check' call
|
|
759
|
-
if (!!this.
|
|
759
|
+
if (!!this.c3h_1) {
|
|
760
760
|
var message = 'Source is closed.';
|
|
761
761
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
762
762
|
}
|
|
@@ -765,33 +765,33 @@ protoOf(RealSource).e2z = function (sink, byteCount) {
|
|
|
765
765
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
766
766
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
767
767
|
}
|
|
768
|
-
if (equalsLong(this.
|
|
769
|
-
var read = this.
|
|
768
|
+
if (equalsLong(this.d3h_1.e1(), new Long(0, 0))) {
|
|
769
|
+
var read = this.b3h_1.w3f(this.d3h_1, new Long(8192, 0));
|
|
770
770
|
if (equalsLong(read, new Long(-1, -1)))
|
|
771
771
|
return new Long(-1, -1);
|
|
772
772
|
}
|
|
773
773
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
774
|
-
var b = this.
|
|
774
|
+
var b = this.d3h_1.e1();
|
|
775
775
|
var toRead = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
776
|
-
return this.
|
|
776
|
+
return this.d3h_1.w3f(sink, toRead);
|
|
777
777
|
};
|
|
778
|
-
protoOf(RealSource).
|
|
778
|
+
protoOf(RealSource).w3e = function () {
|
|
779
779
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
780
780
|
// Inline function 'kotlin.check' call
|
|
781
|
-
if (!!this.
|
|
781
|
+
if (!!this.c3h_1) {
|
|
782
782
|
var message = 'Source is closed.';
|
|
783
783
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
784
784
|
}
|
|
785
|
-
return this.
|
|
785
|
+
return this.d3h_1.w3e() && equalsLong(this.b3h_1.w3f(this.d3h_1, new Long(8192, 0)), new Long(-1, -1));
|
|
786
786
|
};
|
|
787
|
-
protoOf(RealSource).
|
|
788
|
-
if (!this.
|
|
787
|
+
protoOf(RealSource).x3e = function (byteCount) {
|
|
788
|
+
if (!this.y3e(byteCount))
|
|
789
789
|
throw EOFException_init_$Create$_0("Source doesn't contain required number of bytes (" + byteCount.toString() + ').');
|
|
790
790
|
};
|
|
791
|
-
protoOf(RealSource).
|
|
791
|
+
protoOf(RealSource).y3e = function (byteCount) {
|
|
792
792
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
793
793
|
// Inline function 'kotlin.check' call
|
|
794
|
-
if (!!this.
|
|
794
|
+
if (!!this.c3h_1) {
|
|
795
795
|
var message = 'Source is closed.';
|
|
796
796
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
797
797
|
}
|
|
@@ -800,91 +800,91 @@ protoOf(RealSource).g2y = function (byteCount) {
|
|
|
800
800
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
801
801
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
802
802
|
}
|
|
803
|
-
while (compare(this.
|
|
804
|
-
if (equalsLong(this.
|
|
803
|
+
while (compare(this.d3h_1.e1(), byteCount) < 0) {
|
|
804
|
+
if (equalsLong(this.b3h_1.w3f(this.d3h_1, new Long(8192, 0)), new Long(-1, -1)))
|
|
805
805
|
return false;
|
|
806
806
|
}
|
|
807
807
|
return true;
|
|
808
808
|
};
|
|
809
|
-
protoOf(RealSource).
|
|
810
|
-
this.
|
|
811
|
-
return this.
|
|
809
|
+
protoOf(RealSource).z3e = function () {
|
|
810
|
+
this.x3e(new Long(1, 0));
|
|
811
|
+
return this.d3h_1.z3e();
|
|
812
812
|
};
|
|
813
|
-
protoOf(RealSource).
|
|
813
|
+
protoOf(RealSource).u3f = function (sink, startIndex, endIndex) {
|
|
814
814
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
815
815
|
var size = sink.length;
|
|
816
816
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
817
|
-
if (equalsLong(this.
|
|
818
|
-
var read = this.
|
|
817
|
+
if (equalsLong(this.d3h_1.e1(), new Long(0, 0))) {
|
|
818
|
+
var read = this.b3h_1.w3f(this.d3h_1, new Long(8192, 0));
|
|
819
819
|
if (equalsLong(read, new Long(-1, -1)))
|
|
820
820
|
return -1;
|
|
821
821
|
}
|
|
822
822
|
var tmp0 = endIndex - startIndex | 0;
|
|
823
823
|
// Inline function 'kotlinx.io.minOf' call
|
|
824
|
-
var b = this.
|
|
824
|
+
var b = this.d3h_1.e1();
|
|
825
825
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
826
826
|
var a = fromInt(tmp0);
|
|
827
827
|
var tmp$ret$1 = compare(a, b) <= 0 ? a : b;
|
|
828
828
|
var toRead = convertToInt(tmp$ret$1);
|
|
829
|
-
return this.
|
|
829
|
+
return this.d3h_1.u3f(sink, startIndex, startIndex + toRead | 0);
|
|
830
830
|
};
|
|
831
|
-
protoOf(RealSource).
|
|
831
|
+
protoOf(RealSource).y3f = function (sink, byteCount) {
|
|
832
832
|
try {
|
|
833
|
-
this.
|
|
833
|
+
this.x3e(byteCount);
|
|
834
834
|
} catch ($p) {
|
|
835
835
|
if ($p instanceof EOFException) {
|
|
836
836
|
var e = $p;
|
|
837
|
-
sink.
|
|
837
|
+
sink.x3f(this.d3h_1, this.d3h_1.e1());
|
|
838
838
|
throw e;
|
|
839
839
|
} else {
|
|
840
840
|
throw $p;
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
|
-
this.
|
|
843
|
+
this.d3h_1.y3f(sink, byteCount);
|
|
844
844
|
};
|
|
845
|
-
protoOf(RealSource).
|
|
845
|
+
protoOf(RealSource).z3f = function (sink) {
|
|
846
846
|
var totalBytesWritten = new Long(0, 0);
|
|
847
|
-
while (!equalsLong(this.
|
|
848
|
-
var emitByteCount = this.
|
|
847
|
+
while (!equalsLong(this.b3h_1.w3f(this.d3h_1, new Long(8192, 0)), new Long(-1, -1))) {
|
|
848
|
+
var emitByteCount = this.d3h_1.q3f();
|
|
849
849
|
if (compare(emitByteCount, new Long(0, 0)) > 0) {
|
|
850
850
|
totalBytesWritten = add(totalBytesWritten, emitByteCount);
|
|
851
|
-
sink.
|
|
851
|
+
sink.x3f(this.d3h_1, emitByteCount);
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
|
-
if (compare(this.
|
|
855
|
-
totalBytesWritten = add(totalBytesWritten, this.
|
|
856
|
-
sink.
|
|
854
|
+
if (compare(this.d3h_1.e1(), new Long(0, 0)) > 0) {
|
|
855
|
+
totalBytesWritten = add(totalBytesWritten, this.d3h_1.e1());
|
|
856
|
+
sink.x3f(this.d3h_1, this.d3h_1.e1());
|
|
857
857
|
}
|
|
858
858
|
return totalBytesWritten;
|
|
859
859
|
};
|
|
860
|
-
protoOf(RealSource).
|
|
861
|
-
this.
|
|
862
|
-
return this.
|
|
860
|
+
protoOf(RealSource).j3f = function () {
|
|
861
|
+
this.x3e(new Long(2, 0));
|
|
862
|
+
return this.d3h_1.j3f();
|
|
863
863
|
};
|
|
864
|
-
protoOf(RealSource).
|
|
864
|
+
protoOf(RealSource).a3g = function () {
|
|
865
865
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
866
866
|
// Inline function 'kotlin.check' call
|
|
867
|
-
if (!!this.
|
|
867
|
+
if (!!this.c3h_1) {
|
|
868
868
|
var message = 'Source is closed.';
|
|
869
869
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
870
870
|
}
|
|
871
871
|
return buffered(new PeekSource(this));
|
|
872
872
|
};
|
|
873
|
-
protoOf(RealSource).
|
|
874
|
-
if (this.
|
|
873
|
+
protoOf(RealSource).d4 = function () {
|
|
874
|
+
if (this.c3h_1)
|
|
875
875
|
return Unit_instance;
|
|
876
|
-
this.
|
|
877
|
-
this.
|
|
878
|
-
this.
|
|
876
|
+
this.c3h_1 = true;
|
|
877
|
+
this.b3h_1.d4();
|
|
878
|
+
this.d3h_1.w2();
|
|
879
879
|
};
|
|
880
880
|
protoOf(RealSource).toString = function () {
|
|
881
|
-
return 'buffered(' + toString(this.
|
|
881
|
+
return 'buffered(' + toString(this.b3h_1) + ')';
|
|
882
882
|
};
|
|
883
883
|
function Segment_init_$Init$($this) {
|
|
884
884
|
Segment.call($this);
|
|
885
|
-
$this.
|
|
886
|
-
$this.
|
|
887
|
-
$this.
|
|
885
|
+
$this.a3f_1 = new Int8Array(8192);
|
|
886
|
+
$this.e3f_1 = true;
|
|
887
|
+
$this.d3f_1 = null;
|
|
888
888
|
return $this;
|
|
889
889
|
}
|
|
890
890
|
function Segment_init_$Create$() {
|
|
@@ -892,87 +892,87 @@ function Segment_init_$Create$() {
|
|
|
892
892
|
}
|
|
893
893
|
function Segment_init_$Init$_0(data, pos, limit, shareToken, owner, $this) {
|
|
894
894
|
Segment.call($this);
|
|
895
|
-
$this.
|
|
896
|
-
$this.
|
|
897
|
-
$this.
|
|
898
|
-
$this.
|
|
899
|
-
$this.
|
|
895
|
+
$this.a3f_1 = data;
|
|
896
|
+
$this.b3f_1 = pos;
|
|
897
|
+
$this.c3f_1 = limit;
|
|
898
|
+
$this.d3f_1 = shareToken;
|
|
899
|
+
$this.e3f_1 = owner;
|
|
900
900
|
return $this;
|
|
901
901
|
}
|
|
902
902
|
function Segment_init_$Create$_0(data, pos, limit, shareToken, owner) {
|
|
903
903
|
return Segment_init_$Init$_0(data, pos, limit, shareToken, owner, objectCreate(protoOf(Segment)));
|
|
904
904
|
}
|
|
905
905
|
function Companion() {
|
|
906
|
-
this.
|
|
907
|
-
this.
|
|
906
|
+
this.e3h_1 = 8192;
|
|
907
|
+
this.f3h_1 = 1024;
|
|
908
908
|
}
|
|
909
|
-
protoOf(Companion).
|
|
909
|
+
protoOf(Companion).g3h = function () {
|
|
910
910
|
return Segment_init_$Create$();
|
|
911
911
|
};
|
|
912
912
|
var Companion_instance;
|
|
913
913
|
function Companion_getInstance() {
|
|
914
914
|
return Companion_instance;
|
|
915
915
|
}
|
|
916
|
-
protoOf(Segment).
|
|
917
|
-
var tmp0_safe_receiver = this.
|
|
918
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
916
|
+
protoOf(Segment).j3g = function () {
|
|
917
|
+
var tmp0_safe_receiver = this.d3f_1;
|
|
918
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.h3h();
|
|
919
919
|
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
|
|
920
920
|
};
|
|
921
|
-
protoOf(Segment).
|
|
922
|
-
var tmp0_elvis_lhs = this.
|
|
921
|
+
protoOf(Segment).n3f = function () {
|
|
922
|
+
var tmp0_elvis_lhs = this.d3f_1;
|
|
923
923
|
var tmp;
|
|
924
924
|
if (tmp0_elvis_lhs == null) {
|
|
925
925
|
// Inline function 'kotlin.also' call
|
|
926
|
-
var this_0 = SegmentPool_instance.
|
|
927
|
-
this.
|
|
926
|
+
var this_0 = SegmentPool_instance.i3h();
|
|
927
|
+
this.d3f_1 = this_0;
|
|
928
928
|
tmp = this_0;
|
|
929
929
|
} else {
|
|
930
930
|
tmp = tmp0_elvis_lhs;
|
|
931
931
|
}
|
|
932
932
|
var t = tmp;
|
|
933
|
-
var tmp_0 = this.
|
|
934
|
-
var tmp_1 = this.
|
|
933
|
+
var tmp_0 = this.b3f_1;
|
|
934
|
+
var tmp_1 = this.c3f_1;
|
|
935
935
|
// Inline function 'kotlin.also' call
|
|
936
|
-
t.
|
|
937
|
-
return Segment_init_$Create$_0(this.
|
|
936
|
+
t.j3h();
|
|
937
|
+
return Segment_init_$Create$_0(this.a3f_1, tmp_0, tmp_1, t, false);
|
|
938
938
|
};
|
|
939
|
-
protoOf(Segment).
|
|
940
|
-
var result = this.
|
|
941
|
-
if (!(this.
|
|
942
|
-
ensureNotNull(this.
|
|
939
|
+
protoOf(Segment).m3g = function () {
|
|
940
|
+
var result = this.f3f_1;
|
|
941
|
+
if (!(this.g3f_1 == null)) {
|
|
942
|
+
ensureNotNull(this.g3f_1).f3f_1 = this.f3f_1;
|
|
943
943
|
}
|
|
944
|
-
if (!(this.
|
|
945
|
-
ensureNotNull(this.
|
|
944
|
+
if (!(this.f3f_1 == null)) {
|
|
945
|
+
ensureNotNull(this.f3f_1).g3f_1 = this.g3f_1;
|
|
946
946
|
}
|
|
947
|
-
this.
|
|
948
|
-
this.
|
|
947
|
+
this.f3f_1 = null;
|
|
948
|
+
this.g3f_1 = null;
|
|
949
949
|
return result;
|
|
950
950
|
};
|
|
951
|
-
protoOf(Segment).
|
|
952
|
-
segment.
|
|
953
|
-
segment.
|
|
954
|
-
if (!(this.
|
|
955
|
-
ensureNotNull(this.
|
|
951
|
+
protoOf(Segment).o3f = function (segment) {
|
|
952
|
+
segment.g3f_1 = this;
|
|
953
|
+
segment.f3f_1 = this.f3f_1;
|
|
954
|
+
if (!(this.f3f_1 == null)) {
|
|
955
|
+
ensureNotNull(this.f3f_1).g3f_1 = segment;
|
|
956
956
|
}
|
|
957
|
-
this.
|
|
957
|
+
this.f3f_1 = segment;
|
|
958
958
|
return segment;
|
|
959
959
|
};
|
|
960
|
-
protoOf(Segment).
|
|
960
|
+
protoOf(Segment).k3g = function (byteCount) {
|
|
961
961
|
// Inline function 'kotlin.require' call
|
|
962
|
-
if (!(byteCount > 0 && byteCount <= (this.
|
|
962
|
+
if (!(byteCount > 0 && byteCount <= (this.c3f_1 - this.b3f_1 | 0))) {
|
|
963
963
|
var message = 'byteCount out of range';
|
|
964
964
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
965
965
|
}
|
|
966
966
|
var prefix;
|
|
967
967
|
if (byteCount >= 1024) {
|
|
968
|
-
prefix = this.
|
|
968
|
+
prefix = this.n3f();
|
|
969
969
|
} else {
|
|
970
|
-
prefix = SegmentPool_instance.
|
|
971
|
-
var tmp0 = this.
|
|
972
|
-
var tmp2 = prefix.
|
|
973
|
-
var tmp5 = this.
|
|
970
|
+
prefix = SegmentPool_instance.e3g();
|
|
971
|
+
var tmp0 = this.a3f_1;
|
|
972
|
+
var tmp2 = prefix.a3f_1;
|
|
973
|
+
var tmp5 = this.b3f_1;
|
|
974
974
|
// Inline function 'kotlin.collections.copyInto' call
|
|
975
|
-
var endIndex = this.
|
|
975
|
+
var endIndex = this.b3f_1 + byteCount | 0;
|
|
976
976
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
977
977
|
// Inline function 'kotlin.js.asDynamic' call
|
|
978
978
|
var tmp = tmp0;
|
|
@@ -980,62 +980,62 @@ protoOf(Segment).s2z = function (byteCount) {
|
|
|
980
980
|
// Inline function 'kotlin.js.asDynamic' call
|
|
981
981
|
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
982
982
|
}
|
|
983
|
-
prefix.
|
|
984
|
-
this.
|
|
985
|
-
if (!(this.
|
|
986
|
-
ensureNotNull(this.
|
|
983
|
+
prefix.c3f_1 = prefix.b3f_1 + byteCount | 0;
|
|
984
|
+
this.b3f_1 = this.b3f_1 + byteCount | 0;
|
|
985
|
+
if (!(this.g3f_1 == null)) {
|
|
986
|
+
ensureNotNull(this.g3f_1).o3f(prefix);
|
|
987
987
|
} else {
|
|
988
|
-
prefix.
|
|
989
|
-
this.
|
|
988
|
+
prefix.f3f_1 = this;
|
|
989
|
+
this.g3f_1 = prefix;
|
|
990
990
|
}
|
|
991
991
|
return prefix;
|
|
992
992
|
};
|
|
993
|
-
protoOf(Segment).
|
|
993
|
+
protoOf(Segment).p3f = function () {
|
|
994
994
|
// Inline function 'kotlin.check' call
|
|
995
|
-
if (!!(this.
|
|
995
|
+
if (!!(this.g3f_1 == null)) {
|
|
996
996
|
var message = 'cannot compact';
|
|
997
997
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
998
998
|
}
|
|
999
|
-
if (!ensureNotNull(this.
|
|
999
|
+
if (!ensureNotNull(this.g3f_1).e3f_1)
|
|
1000
1000
|
return this;
|
|
1001
|
-
var byteCount = this.
|
|
1002
|
-
var availableByteCount = (8192 - ensureNotNull(this.
|
|
1001
|
+
var byteCount = this.c3f_1 - this.b3f_1 | 0;
|
|
1002
|
+
var availableByteCount = (8192 - ensureNotNull(this.g3f_1).c3f_1 | 0) + (ensureNotNull(this.g3f_1).j3g() ? 0 : ensureNotNull(this.g3f_1).b3f_1) | 0;
|
|
1003
1003
|
if (byteCount > availableByteCount)
|
|
1004
1004
|
return this;
|
|
1005
|
-
var predecessor = this.
|
|
1006
|
-
this.
|
|
1007
|
-
var successor = this.
|
|
1005
|
+
var predecessor = this.g3f_1;
|
|
1006
|
+
this.l3g(ensureNotNull(predecessor), byteCount);
|
|
1007
|
+
var successor = this.m3g();
|
|
1008
1008
|
// Inline function 'kotlin.check' call
|
|
1009
1009
|
if (!(successor == null)) {
|
|
1010
1010
|
throw IllegalStateException_init_$Create$('Check failed.');
|
|
1011
1011
|
}
|
|
1012
|
-
SegmentPool_instance.
|
|
1012
|
+
SegmentPool_instance.t3g(this);
|
|
1013
1013
|
return predecessor;
|
|
1014
1014
|
};
|
|
1015
|
-
protoOf(Segment).
|
|
1016
|
-
var _unary__edvuaz = this.
|
|
1017
|
-
this.
|
|
1018
|
-
this.
|
|
1015
|
+
protoOf(Segment).p3g = function (byte) {
|
|
1016
|
+
var _unary__edvuaz = this.c3f_1;
|
|
1017
|
+
this.c3f_1 = _unary__edvuaz + 1 | 0;
|
|
1018
|
+
this.a3f_1[_unary__edvuaz] = byte;
|
|
1019
1019
|
};
|
|
1020
|
-
protoOf(Segment).
|
|
1021
|
-
var data = this.
|
|
1022
|
-
var limit = this.
|
|
1020
|
+
protoOf(Segment).r3g = function (short) {
|
|
1021
|
+
var data = this.a3f_1;
|
|
1022
|
+
var limit = this.c3f_1;
|
|
1023
1023
|
var _unary__edvuaz = limit;
|
|
1024
1024
|
limit = _unary__edvuaz + 1 | 0;
|
|
1025
1025
|
data[_unary__edvuaz] = toByte((short >>> 8 | 0) & 255);
|
|
1026
1026
|
var _unary__edvuaz_0 = limit;
|
|
1027
1027
|
limit = _unary__edvuaz_0 + 1 | 0;
|
|
1028
1028
|
data[_unary__edvuaz_0] = toByte(short & 255);
|
|
1029
|
-
this.
|
|
1029
|
+
this.c3f_1 = limit;
|
|
1030
1030
|
};
|
|
1031
|
-
protoOf(Segment).
|
|
1032
|
-
var _unary__edvuaz = this.
|
|
1033
|
-
this.
|
|
1034
|
-
return this.
|
|
1031
|
+
protoOf(Segment).i3f = function () {
|
|
1032
|
+
var _unary__edvuaz = this.b3f_1;
|
|
1033
|
+
this.b3f_1 = _unary__edvuaz + 1 | 0;
|
|
1034
|
+
return this.a3f_1[_unary__edvuaz];
|
|
1035
1035
|
};
|
|
1036
|
-
protoOf(Segment).
|
|
1037
|
-
var data = this.
|
|
1038
|
-
var pos = this.
|
|
1036
|
+
protoOf(Segment).k3f = function () {
|
|
1037
|
+
var data = this.a3f_1;
|
|
1038
|
+
var pos = this.b3f_1;
|
|
1039
1039
|
var _unary__edvuaz = pos;
|
|
1040
1040
|
pos = _unary__edvuaz + 1 | 0;
|
|
1041
1041
|
// Inline function 'kotlinx.io.and' call
|
|
@@ -1045,121 +1045,121 @@ protoOf(Segment).s2y = function () {
|
|
|
1045
1045
|
// Inline function 'kotlinx.io.and' call
|
|
1046
1046
|
var tmp$ret$1 = data[_unary__edvuaz_0] & 255;
|
|
1047
1047
|
var s = toShort(tmp | tmp$ret$1);
|
|
1048
|
-
this.
|
|
1048
|
+
this.b3f_1 = pos;
|
|
1049
1049
|
return s;
|
|
1050
1050
|
};
|
|
1051
|
-
protoOf(Segment).
|
|
1051
|
+
protoOf(Segment).l3g = function (sink, byteCount) {
|
|
1052
1052
|
// Inline function 'kotlin.check' call
|
|
1053
|
-
if (!sink.
|
|
1053
|
+
if (!sink.e3f_1) {
|
|
1054
1054
|
var message = 'only owner can write';
|
|
1055
1055
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1056
1056
|
}
|
|
1057
|
-
if ((sink.
|
|
1058
|
-
if (sink.
|
|
1057
|
+
if ((sink.c3f_1 + byteCount | 0) > 8192) {
|
|
1058
|
+
if (sink.j3g())
|
|
1059
1059
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1060
|
-
if (((sink.
|
|
1060
|
+
if (((sink.c3f_1 + byteCount | 0) - sink.b3f_1 | 0) > 8192)
|
|
1061
1061
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1062
|
-
var tmp0 = sink.
|
|
1063
|
-
var tmp2 = sink.
|
|
1064
|
-
var tmp5 = sink.
|
|
1062
|
+
var tmp0 = sink.a3f_1;
|
|
1063
|
+
var tmp2 = sink.a3f_1;
|
|
1064
|
+
var tmp5 = sink.b3f_1;
|
|
1065
1065
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1066
|
-
var endIndex = sink.
|
|
1066
|
+
var endIndex = sink.c3f_1;
|
|
1067
1067
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1068
1068
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1069
1069
|
var tmp = tmp0;
|
|
1070
1070
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1071
1071
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1072
1072
|
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
1073
|
-
sink.
|
|
1074
|
-
sink.
|
|
1073
|
+
sink.c3f_1 = sink.c3f_1 - sink.b3f_1 | 0;
|
|
1074
|
+
sink.b3f_1 = 0;
|
|
1075
1075
|
}
|
|
1076
|
-
var tmp0_0 = this.
|
|
1077
|
-
var tmp2_0 = sink.
|
|
1078
|
-
var tmp4 = sink.
|
|
1079
|
-
var tmp6 = this.
|
|
1076
|
+
var tmp0_0 = this.a3f_1;
|
|
1077
|
+
var tmp2_0 = sink.a3f_1;
|
|
1078
|
+
var tmp4 = sink.c3f_1;
|
|
1079
|
+
var tmp6 = this.b3f_1;
|
|
1080
1080
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1081
|
-
var endIndex_0 = this.
|
|
1081
|
+
var endIndex_0 = this.b3f_1 + byteCount | 0;
|
|
1082
1082
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1083
1083
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1084
1084
|
var tmp_0 = tmp0_0;
|
|
1085
1085
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1086
1086
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1087
1087
|
arrayCopy(tmp_0, tmp2_0, tmp4, tmp6, endIndex_0);
|
|
1088
|
-
sink.
|
|
1089
|
-
this.
|
|
1088
|
+
sink.c3f_1 = sink.c3f_1 + byteCount | 0;
|
|
1089
|
+
this.b3f_1 = this.b3f_1 + byteCount | 0;
|
|
1090
1090
|
};
|
|
1091
|
-
protoOf(Segment).
|
|
1091
|
+
protoOf(Segment).v3f = function (dst, dstStartOffset, dstEndOffset) {
|
|
1092
1092
|
var len = dstEndOffset - dstStartOffset | 0;
|
|
1093
|
-
var tmp0 = this.
|
|
1094
|
-
var tmp6 = this.
|
|
1093
|
+
var tmp0 = this.a3f_1;
|
|
1094
|
+
var tmp6 = this.b3f_1;
|
|
1095
1095
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1096
|
-
var endIndex = this.
|
|
1096
|
+
var endIndex = this.b3f_1 + len | 0;
|
|
1097
1097
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1098
1098
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1099
1099
|
var tmp = tmp0;
|
|
1100
1100
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1101
1101
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1102
1102
|
arrayCopy(tmp, dst, dstStartOffset, tmp6, endIndex);
|
|
1103
|
-
this.
|
|
1103
|
+
this.b3f_1 = this.b3f_1 + len | 0;
|
|
1104
1104
|
};
|
|
1105
|
-
protoOf(Segment).
|
|
1106
|
-
var tmp2 = this.
|
|
1105
|
+
protoOf(Segment).h3g = function (src, srcStartOffset, srcEndOffset) {
|
|
1106
|
+
var tmp2 = this.a3f_1;
|
|
1107
1107
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1108
|
-
var destinationOffset = this.
|
|
1108
|
+
var destinationOffset = this.c3f_1;
|
|
1109
1109
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1110
1110
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1111
1111
|
var tmp = src;
|
|
1112
1112
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1113
1113
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1114
1114
|
arrayCopy(tmp, tmp2, destinationOffset, srcStartOffset, srcEndOffset);
|
|
1115
|
-
this.
|
|
1115
|
+
this.c3f_1 = this.c3f_1 + (srcEndOffset - srcStartOffset | 0) | 0;
|
|
1116
1116
|
};
|
|
1117
|
-
protoOf(Segment).
|
|
1118
|
-
return this.
|
|
1117
|
+
protoOf(Segment).e1 = function () {
|
|
1118
|
+
return this.c3f_1 - this.b3f_1 | 0;
|
|
1119
1119
|
};
|
|
1120
|
-
protoOf(Segment).
|
|
1121
|
-
return this.
|
|
1120
|
+
protoOf(Segment).g3g = function () {
|
|
1121
|
+
return this.a3f_1.length - this.c3f_1 | 0;
|
|
1122
1122
|
};
|
|
1123
|
-
protoOf(Segment).
|
|
1124
|
-
return this.
|
|
1123
|
+
protoOf(Segment).k3h = function (readOnly) {
|
|
1124
|
+
return this.a3f_1;
|
|
1125
1125
|
};
|
|
1126
|
-
protoOf(Segment).
|
|
1127
|
-
return this.
|
|
1126
|
+
protoOf(Segment).s3f = function (index) {
|
|
1127
|
+
return this.a3f_1[this.b3f_1 + index | 0];
|
|
1128
1128
|
};
|
|
1129
|
-
protoOf(Segment).
|
|
1130
|
-
this.
|
|
1129
|
+
protoOf(Segment).l3h = function (index, value) {
|
|
1130
|
+
this.a3f_1[this.c3f_1 + index | 0] = value;
|
|
1131
1131
|
};
|
|
1132
|
-
protoOf(Segment).
|
|
1133
|
-
var d = this.
|
|
1134
|
-
var l = this.
|
|
1132
|
+
protoOf(Segment).m3h = function (index, b0, b1) {
|
|
1133
|
+
var d = this.a3f_1;
|
|
1134
|
+
var l = this.c3f_1;
|
|
1135
1135
|
d[l + index | 0] = b0;
|
|
1136
1136
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1137
1137
|
};
|
|
1138
|
-
protoOf(Segment).
|
|
1139
|
-
var d = this.
|
|
1140
|
-
var l = this.
|
|
1138
|
+
protoOf(Segment).n3h = function (index, b0, b1, b2) {
|
|
1139
|
+
var d = this.a3f_1;
|
|
1140
|
+
var l = this.c3f_1;
|
|
1141
1141
|
d[l + index | 0] = b0;
|
|
1142
1142
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1143
1143
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1144
1144
|
};
|
|
1145
|
-
protoOf(Segment).
|
|
1146
|
-
var d = this.
|
|
1147
|
-
var l = this.
|
|
1145
|
+
protoOf(Segment).o3h = function (index, b0, b1, b2, b3) {
|
|
1146
|
+
var d = this.a3f_1;
|
|
1147
|
+
var l = this.c3f_1;
|
|
1148
1148
|
d[l + index | 0] = b0;
|
|
1149
1149
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1150
1150
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1151
1151
|
d[(l + index | 0) + 3 | 0] = b3;
|
|
1152
1152
|
};
|
|
1153
1153
|
function Segment() {
|
|
1154
|
-
this.
|
|
1155
|
-
this.
|
|
1156
|
-
this.
|
|
1157
|
-
this.
|
|
1158
|
-
this.
|
|
1159
|
-
this.
|
|
1154
|
+
this.b3f_1 = 0;
|
|
1155
|
+
this.c3f_1 = 0;
|
|
1156
|
+
this.d3f_1 = null;
|
|
1157
|
+
this.e3f_1 = false;
|
|
1158
|
+
this.f3f_1 = null;
|
|
1159
|
+
this.g3f_1 = null;
|
|
1160
1160
|
}
|
|
1161
1161
|
function isEmpty(_this__u8e3s4) {
|
|
1162
|
-
return _this__u8e3s4.
|
|
1162
|
+
return _this__u8e3s4.e1() === 0;
|
|
1163
1163
|
}
|
|
1164
1164
|
function SegmentCopyTracker() {
|
|
1165
1165
|
}
|
|
@@ -1167,10 +1167,10 @@ function AlwaysSharedCopyTracker() {
|
|
|
1167
1167
|
AlwaysSharedCopyTracker_instance = this;
|
|
1168
1168
|
SegmentCopyTracker.call(this);
|
|
1169
1169
|
}
|
|
1170
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1170
|
+
protoOf(AlwaysSharedCopyTracker).h3h = function () {
|
|
1171
1171
|
return true;
|
|
1172
1172
|
};
|
|
1173
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1173
|
+
protoOf(AlwaysSharedCopyTracker).j3h = function () {
|
|
1174
1174
|
return Unit_instance;
|
|
1175
1175
|
};
|
|
1176
1176
|
var AlwaysSharedCopyTracker_instance;
|
|
@@ -1181,17 +1181,17 @@ function AlwaysSharedCopyTracker_getInstance() {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
function indexOf_0(_this__u8e3s4, byte, startOffset, endOffset) {
|
|
1183
1183
|
// Inline function 'kotlin.require' call
|
|
1184
|
-
if (!(0 <= startOffset ? startOffset < _this__u8e3s4.
|
|
1184
|
+
if (!(0 <= startOffset ? startOffset < _this__u8e3s4.e1() : false)) {
|
|
1185
1185
|
var message = '' + startOffset;
|
|
1186
1186
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1187
1187
|
}
|
|
1188
1188
|
// Inline function 'kotlin.require' call
|
|
1189
|
-
if (!(startOffset <= endOffset ? endOffset <= _this__u8e3s4.
|
|
1189
|
+
if (!(startOffset <= endOffset ? endOffset <= _this__u8e3s4.e1() : false)) {
|
|
1190
1190
|
var message_0 = '' + endOffset;
|
|
1191
1191
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1192
1192
|
}
|
|
1193
|
-
var p = _this__u8e3s4.
|
|
1194
|
-
var data = _this__u8e3s4.
|
|
1193
|
+
var p = _this__u8e3s4.b3f_1;
|
|
1194
|
+
var data = _this__u8e3s4.k3h(true);
|
|
1195
1195
|
var inductionVariable = startOffset;
|
|
1196
1196
|
if (inductionVariable < endOffset)
|
|
1197
1197
|
do {
|
|
@@ -1244,23 +1244,23 @@ function indexOf_1(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
1244
1244
|
// Inline function 'kotlin.Long.plus' call
|
|
1245
1245
|
var this_0 = offset;
|
|
1246
1246
|
var tmp$ret$2 = add(this_0, fromInt(1));
|
|
1247
|
-
tmp_0 = _this__u8e3s4.
|
|
1247
|
+
tmp_0 = _this__u8e3s4.y3e(tmp$ret$2);
|
|
1248
1248
|
} else {
|
|
1249
1249
|
tmp_0 = false;
|
|
1250
1250
|
}
|
|
1251
1251
|
if (!tmp_0) {
|
|
1252
1252
|
break $l$loop;
|
|
1253
1253
|
}
|
|
1254
|
-
var tmp_1 = _this__u8e3s4.
|
|
1254
|
+
var tmp_1 = _this__u8e3s4.v3e();
|
|
1255
1255
|
var tmp_2 = offset;
|
|
1256
1256
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1257
|
-
var b = _this__u8e3s4.
|
|
1257
|
+
var b = _this__u8e3s4.v3e().e1();
|
|
1258
1258
|
var tmp$ret$3 = compare(endIndex, b) <= 0 ? endIndex : b;
|
|
1259
1259
|
var idx = indexOf(tmp_1, byte, tmp_2, tmp$ret$3);
|
|
1260
1260
|
if (!equalsLong(idx, new Long(-1, -1))) {
|
|
1261
1261
|
return idx;
|
|
1262
1262
|
}
|
|
1263
|
-
offset = _this__u8e3s4.
|
|
1263
|
+
offset = _this__u8e3s4.v3e().e1();
|
|
1264
1264
|
}
|
|
1265
1265
|
return new Long(-1, -1);
|
|
1266
1266
|
}
|
|
@@ -1268,22 +1268,22 @@ function readByteArrayImpl(_this__u8e3s4, size) {
|
|
|
1268
1268
|
var arraySize = size;
|
|
1269
1269
|
if (size === -1) {
|
|
1270
1270
|
var fetchSize = new Long(2147483647, 0);
|
|
1271
|
-
while (compare(_this__u8e3s4.
|
|
1271
|
+
while (compare(_this__u8e3s4.v3e().e1(), new Long(2147483647, 0)) < 0 && _this__u8e3s4.y3e(fetchSize)) {
|
|
1272
1272
|
// Inline function 'kotlin.Long.times' call
|
|
1273
1273
|
var this_0 = fetchSize;
|
|
1274
1274
|
fetchSize = multiply(this_0, fromInt(2));
|
|
1275
1275
|
}
|
|
1276
1276
|
// Inline function 'kotlin.check' call
|
|
1277
|
-
if (!(compare(_this__u8e3s4.
|
|
1278
|
-
var message = "Can't create an array of size " + _this__u8e3s4.
|
|
1277
|
+
if (!(compare(_this__u8e3s4.v3e().e1(), new Long(2147483647, 0)) < 0)) {
|
|
1278
|
+
var message = "Can't create an array of size " + _this__u8e3s4.v3e().e1().toString();
|
|
1279
1279
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1280
1280
|
}
|
|
1281
|
-
arraySize = convertToInt(_this__u8e3s4.
|
|
1281
|
+
arraySize = convertToInt(_this__u8e3s4.v3e().e1());
|
|
1282
1282
|
} else {
|
|
1283
|
-
_this__u8e3s4.
|
|
1283
|
+
_this__u8e3s4.x3e(fromInt(size));
|
|
1284
1284
|
}
|
|
1285
1285
|
var array = new Int8Array(arraySize);
|
|
1286
|
-
readTo(_this__u8e3s4.
|
|
1286
|
+
readTo(_this__u8e3s4.v3e(), array);
|
|
1287
1287
|
return array;
|
|
1288
1288
|
}
|
|
1289
1289
|
function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
@@ -1294,7 +1294,7 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
1294
1294
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1295
1295
|
var offset = startIndex;
|
|
1296
1296
|
while (offset < endIndex) {
|
|
1297
|
-
var bytesRead = _this__u8e3s4.
|
|
1297
|
+
var bytesRead = _this__u8e3s4.u3f(sink, offset, endIndex);
|
|
1298
1298
|
if (bytesRead === -1) {
|
|
1299
1299
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + (endIndex - startIndex | 0) + ' bytes. ' + ('Only ' + bytesRead + ' bytes were read.'));
|
|
1300
1300
|
}
|
|
@@ -1302,12 +1302,12 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
1302
1302
|
}
|
|
1303
1303
|
}
|
|
1304
1304
|
function readString(_this__u8e3s4, byteCount) {
|
|
1305
|
-
_this__u8e3s4.
|
|
1306
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
1305
|
+
_this__u8e3s4.x3e(byteCount);
|
|
1306
|
+
return commonReadUtf8(_this__u8e3s4.v3e(), byteCount);
|
|
1307
1307
|
}
|
|
1308
1308
|
function readString_0(_this__u8e3s4) {
|
|
1309
|
-
_this__u8e3s4.
|
|
1310
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
1309
|
+
_this__u8e3s4.y3e(new Long(-1, 2147483647));
|
|
1310
|
+
return commonReadUtf8(_this__u8e3s4.v3e(), _this__u8e3s4.v3e().e1());
|
|
1311
1311
|
}
|
|
1312
1312
|
function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
1313
1313
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
@@ -1317,7 +1317,7 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1317
1317
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1318
1318
|
// Inline function 'kotlinx.io.writeToInternalBuffer' call
|
|
1319
1319
|
// Inline function 'kotlinx.io.commonWriteUtf8' call
|
|
1320
|
-
var this_0 = _this__u8e3s4.
|
|
1320
|
+
var this_0 = _this__u8e3s4.v3e();
|
|
1321
1321
|
var i = startIndex;
|
|
1322
1322
|
while (i < endIndex) {
|
|
1323
1323
|
var p0 = i;
|
|
@@ -1327,15 +1327,15 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1327
1327
|
if (c < 128) {
|
|
1328
1328
|
$l$block_0: {
|
|
1329
1329
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1330
|
-
var tail = this_0.
|
|
1330
|
+
var tail = this_0.b3g(1);
|
|
1331
1331
|
var ctx = get_SegmentWriteContextImpl();
|
|
1332
1332
|
var segmentOffset = -i | 0;
|
|
1333
1333
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1334
|
-
var b = i + tail.
|
|
1334
|
+
var b = i + tail.g3g() | 0;
|
|
1335
1335
|
var runLimit = Math.min(endIndex, b);
|
|
1336
1336
|
var _unary__edvuaz = i;
|
|
1337
1337
|
i = _unary__edvuaz + 1 | 0;
|
|
1338
|
-
ctx.
|
|
1338
|
+
ctx.s3h(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
|
|
1339
1339
|
$l$loop: while (i < runLimit) {
|
|
1340
1340
|
var p0_0 = i;
|
|
1341
1341
|
// Inline function 'kotlin.code' call
|
|
@@ -1345,95 +1345,95 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1345
1345
|
break $l$loop;
|
|
1346
1346
|
var _unary__edvuaz_0 = i;
|
|
1347
1347
|
i = _unary__edvuaz_0 + 1 | 0;
|
|
1348
|
-
ctx.
|
|
1348
|
+
ctx.s3h(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
|
|
1349
1349
|
}
|
|
1350
1350
|
var bytesWritten = i + segmentOffset | 0;
|
|
1351
1351
|
if (bytesWritten === 1) {
|
|
1352
|
-
tail.
|
|
1352
|
+
tail.c3f_1 = tail.c3f_1 + bytesWritten | 0;
|
|
1353
1353
|
var tmp = this_0;
|
|
1354
1354
|
// Inline function 'kotlin.Long.plus' call
|
|
1355
|
-
var this_3 = this_0.
|
|
1356
|
-
tmp.
|
|
1355
|
+
var this_3 = this_0.u3e_1;
|
|
1356
|
+
tmp.u3e_1 = add(this_3, fromInt(bytesWritten));
|
|
1357
1357
|
break $l$block_0;
|
|
1358
1358
|
}
|
|
1359
1359
|
// 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.
|
|
1360
|
+
if (!(0 <= bytesWritten ? bytesWritten <= tail.g3g() : false)) {
|
|
1361
|
+
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.g3g();
|
|
1362
1362
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1363
1363
|
}
|
|
1364
1364
|
if (!(bytesWritten === 0)) {
|
|
1365
|
-
tail.
|
|
1365
|
+
tail.c3f_1 = tail.c3f_1 + bytesWritten | 0;
|
|
1366
1366
|
var tmp_0 = this_0;
|
|
1367
1367
|
// Inline function 'kotlin.Long.plus' call
|
|
1368
|
-
var this_4 = this_0.
|
|
1369
|
-
tmp_0.
|
|
1368
|
+
var this_4 = this_0.u3e_1;
|
|
1369
|
+
tmp_0.u3e_1 = add(this_4, fromInt(bytesWritten));
|
|
1370
1370
|
break $l$block_0;
|
|
1371
1371
|
}
|
|
1372
1372
|
if (isEmpty(tail)) {
|
|
1373
|
-
this_0.
|
|
1373
|
+
this_0.u3g();
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
1376
|
} else if (c < 2048) {
|
|
1377
1377
|
$l$block_2: {
|
|
1378
1378
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1379
|
-
var tail_0 = this_0.
|
|
1380
|
-
get_SegmentWriteContextImpl().
|
|
1379
|
+
var tail_0 = this_0.b3g(2);
|
|
1380
|
+
get_SegmentWriteContextImpl().r3h(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
1381
1381
|
var bytesWritten_0 = 2;
|
|
1382
1382
|
if (bytesWritten_0 === 2) {
|
|
1383
|
-
tail_0.
|
|
1383
|
+
tail_0.c3f_1 = tail_0.c3f_1 + bytesWritten_0 | 0;
|
|
1384
1384
|
var tmp_1 = this_0;
|
|
1385
1385
|
// Inline function 'kotlin.Long.plus' call
|
|
1386
|
-
var this_5 = this_0.
|
|
1387
|
-
tmp_1.
|
|
1386
|
+
var this_5 = this_0.u3e_1;
|
|
1387
|
+
tmp_1.u3e_1 = add(this_5, fromInt(bytesWritten_0));
|
|
1388
1388
|
break $l$block_2;
|
|
1389
1389
|
}
|
|
1390
1390
|
// 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.
|
|
1391
|
+
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.g3g() : false)) {
|
|
1392
|
+
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.g3g();
|
|
1393
1393
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
1394
1394
|
}
|
|
1395
1395
|
if (!(bytesWritten_0 === 0)) {
|
|
1396
|
-
tail_0.
|
|
1396
|
+
tail_0.c3f_1 = tail_0.c3f_1 + bytesWritten_0 | 0;
|
|
1397
1397
|
var tmp_2 = this_0;
|
|
1398
1398
|
// Inline function 'kotlin.Long.plus' call
|
|
1399
|
-
var this_6 = this_0.
|
|
1400
|
-
tmp_2.
|
|
1399
|
+
var this_6 = this_0.u3e_1;
|
|
1400
|
+
tmp_2.u3e_1 = add(this_6, fromInt(bytesWritten_0));
|
|
1401
1401
|
break $l$block_2;
|
|
1402
1402
|
}
|
|
1403
1403
|
if (isEmpty(tail_0)) {
|
|
1404
|
-
this_0.
|
|
1404
|
+
this_0.u3g();
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
1407
|
i = i + 1 | 0;
|
|
1408
1408
|
} else if (c < 55296 || c > 57343) {
|
|
1409
1409
|
$l$block_4: {
|
|
1410
1410
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1411
|
-
var tail_1 = this_0.
|
|
1412
|
-
get_SegmentWriteContextImpl().
|
|
1411
|
+
var tail_1 = this_0.b3g(3);
|
|
1412
|
+
get_SegmentWriteContextImpl().q3h(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
1413
1413
|
var bytesWritten_1 = 3;
|
|
1414
1414
|
if (bytesWritten_1 === 3) {
|
|
1415
|
-
tail_1.
|
|
1415
|
+
tail_1.c3f_1 = tail_1.c3f_1 + bytesWritten_1 | 0;
|
|
1416
1416
|
var tmp_3 = this_0;
|
|
1417
1417
|
// Inline function 'kotlin.Long.plus' call
|
|
1418
|
-
var this_7 = this_0.
|
|
1419
|
-
tmp_3.
|
|
1418
|
+
var this_7 = this_0.u3e_1;
|
|
1419
|
+
tmp_3.u3e_1 = add(this_7, fromInt(bytesWritten_1));
|
|
1420
1420
|
break $l$block_4;
|
|
1421
1421
|
}
|
|
1422
1422
|
// 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.
|
|
1423
|
+
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.g3g() : false)) {
|
|
1424
|
+
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.g3g();
|
|
1425
1425
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
1426
1426
|
}
|
|
1427
1427
|
if (!(bytesWritten_1 === 0)) {
|
|
1428
|
-
tail_1.
|
|
1428
|
+
tail_1.c3f_1 = tail_1.c3f_1 + bytesWritten_1 | 0;
|
|
1429
1429
|
var tmp_4 = this_0;
|
|
1430
1430
|
// Inline function 'kotlin.Long.plus' call
|
|
1431
|
-
var this_8 = this_0.
|
|
1432
|
-
tmp_4.
|
|
1431
|
+
var this_8 = this_0.u3e_1;
|
|
1432
|
+
tmp_4.u3e_1 = add(this_8, fromInt(bytesWritten_1));
|
|
1433
1433
|
break $l$block_4;
|
|
1434
1434
|
}
|
|
1435
1435
|
if (isEmpty(tail_1)) {
|
|
1436
|
-
this_0.
|
|
1436
|
+
this_0.u3g();
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
1439
|
i = i + 1 | 0;
|
|
@@ -1452,64 +1452,64 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1452
1452
|
// Inline function 'kotlin.code' call
|
|
1453
1453
|
var this_10 = _Char___init__impl__6a9atx(63);
|
|
1454
1454
|
var tmp$ret$29 = Char__toInt_impl_vasixd(this_10);
|
|
1455
|
-
this_0.
|
|
1455
|
+
this_0.o3g(toByte(tmp$ret$29));
|
|
1456
1456
|
i = i + 1 | 0;
|
|
1457
1457
|
} else {
|
|
1458
1458
|
var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
|
|
1459
1459
|
$l$block_6: {
|
|
1460
1460
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1461
|
-
var tail_2 = this_0.
|
|
1462
|
-
get_SegmentWriteContextImpl().
|
|
1461
|
+
var tail_2 = this_0.b3g(4);
|
|
1462
|
+
get_SegmentWriteContextImpl().p3h(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
1463
1463
|
var bytesWritten_2 = 4;
|
|
1464
1464
|
if (bytesWritten_2 === 4) {
|
|
1465
|
-
tail_2.
|
|
1465
|
+
tail_2.c3f_1 = tail_2.c3f_1 + bytesWritten_2 | 0;
|
|
1466
1466
|
var tmp_6 = this_0;
|
|
1467
1467
|
// Inline function 'kotlin.Long.plus' call
|
|
1468
|
-
var this_11 = this_0.
|
|
1469
|
-
tmp_6.
|
|
1468
|
+
var this_11 = this_0.u3e_1;
|
|
1469
|
+
tmp_6.u3e_1 = add(this_11, fromInt(bytesWritten_2));
|
|
1470
1470
|
break $l$block_6;
|
|
1471
1471
|
}
|
|
1472
1472
|
// 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.
|
|
1473
|
+
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.g3g() : false)) {
|
|
1474
|
+
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.g3g();
|
|
1475
1475
|
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
1476
1476
|
}
|
|
1477
1477
|
if (!(bytesWritten_2 === 0)) {
|
|
1478
|
-
tail_2.
|
|
1478
|
+
tail_2.c3f_1 = tail_2.c3f_1 + bytesWritten_2 | 0;
|
|
1479
1479
|
var tmp_7 = this_0;
|
|
1480
1480
|
// Inline function 'kotlin.Long.plus' call
|
|
1481
|
-
var this_12 = this_0.
|
|
1482
|
-
tmp_7.
|
|
1481
|
+
var this_12 = this_0.u3e_1;
|
|
1482
|
+
tmp_7.u3e_1 = add(this_12, fromInt(bytesWritten_2));
|
|
1483
1483
|
break $l$block_6;
|
|
1484
1484
|
}
|
|
1485
1485
|
if (isEmpty(tail_2)) {
|
|
1486
|
-
this_0.
|
|
1486
|
+
this_0.u3g();
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
1489
|
i = i + 2 | 0;
|
|
1490
1490
|
}
|
|
1491
1491
|
}
|
|
1492
1492
|
}
|
|
1493
|
-
_this__u8e3s4.
|
|
1493
|
+
_this__u8e3s4.l3f();
|
|
1494
1494
|
}
|
|
1495
1495
|
function commonReadUtf8(_this__u8e3s4, byteCount) {
|
|
1496
1496
|
if (equalsLong(byteCount, new Long(0, 0)))
|
|
1497
1497
|
return '';
|
|
1498
1498
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
1499
|
-
var curr = _this__u8e3s4.
|
|
1499
|
+
var curr = _this__u8e3s4.s3e_1;
|
|
1500
1500
|
while (!(curr == null)) {
|
|
1501
1501
|
get_SegmentReadContextImpl();
|
|
1502
|
-
if (compare(fromInt(curr.
|
|
1502
|
+
if (compare(fromInt(curr.e1()), byteCount) >= 0) {
|
|
1503
1503
|
var result = '';
|
|
1504
1504
|
// Inline function 'kotlinx.io.unsafe.withData' call
|
|
1505
|
-
var tmp0 = curr.
|
|
1506
|
-
var tmp2 = curr.
|
|
1507
|
-
var tmp0_0 = curr.
|
|
1505
|
+
var tmp0 = curr.k3h(true);
|
|
1506
|
+
var tmp2 = curr.b3f_1;
|
|
1507
|
+
var tmp0_0 = curr.c3f_1;
|
|
1508
1508
|
// Inline function 'kotlin.math.min' call
|
|
1509
1509
|
var b = tmp2 + convertToInt(byteCount) | 0;
|
|
1510
1510
|
var tmp$ret$4 = Math.min(tmp0_0, b);
|
|
1511
1511
|
result = commonToUtf8String(tmp0, tmp2, tmp$ret$4);
|
|
1512
|
-
_this__u8e3s4.
|
|
1512
|
+
_this__u8e3s4.t3f(byteCount);
|
|
1513
1513
|
return result;
|
|
1514
1514
|
}
|
|
1515
1515
|
return commonToUtf8String(readByteArray_0(_this__u8e3s4, convertToInt(byteCount)));
|
|
@@ -1880,27 +1880,27 @@ function UnsafeBufferOperations_getInstance() {
|
|
|
1880
1880
|
}
|
|
1881
1881
|
function SegmentReadContextImpl$1() {
|
|
1882
1882
|
}
|
|
1883
|
-
protoOf(SegmentReadContextImpl$1).
|
|
1884
|
-
return segment.
|
|
1883
|
+
protoOf(SegmentReadContextImpl$1).s3g = function (segment, offset) {
|
|
1884
|
+
return segment.s3f(offset);
|
|
1885
1885
|
};
|
|
1886
1886
|
function SegmentWriteContextImpl$1() {
|
|
1887
1887
|
}
|
|
1888
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1889
|
-
segment.
|
|
1888
|
+
protoOf(SegmentWriteContextImpl$1).s3h = function (segment, offset, value) {
|
|
1889
|
+
segment.l3h(offset, value);
|
|
1890
1890
|
};
|
|
1891
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1892
|
-
segment.
|
|
1891
|
+
protoOf(SegmentWriteContextImpl$1).r3h = function (segment, offset, b0, b1) {
|
|
1892
|
+
segment.m3h(offset, b0, b1);
|
|
1893
1893
|
};
|
|
1894
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1895
|
-
segment.
|
|
1894
|
+
protoOf(SegmentWriteContextImpl$1).q3h = function (segment, offset, b0, b1, b2) {
|
|
1895
|
+
segment.n3h(offset, b0, b1, b2);
|
|
1896
1896
|
};
|
|
1897
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1898
|
-
segment.
|
|
1897
|
+
protoOf(SegmentWriteContextImpl$1).p3h = function (segment, offset, b0, b1, b2, b3) {
|
|
1898
|
+
segment.o3h(offset, b0, b1, b2, b3);
|
|
1899
1899
|
};
|
|
1900
1900
|
function BufferIterationContextImpl$1() {
|
|
1901
1901
|
}
|
|
1902
|
-
protoOf(BufferIterationContextImpl$1).
|
|
1903
|
-
return get_SegmentReadContextImpl().
|
|
1902
|
+
protoOf(BufferIterationContextImpl$1).s3g = function (segment, offset) {
|
|
1903
|
+
return get_SegmentReadContextImpl().s3g(segment, offset);
|
|
1904
1904
|
};
|
|
1905
1905
|
var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
|
|
1906
1906
|
function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
@@ -1968,15 +1968,15 @@ function EOFException() {
|
|
|
1968
1968
|
captureStack(this, EOFException);
|
|
1969
1969
|
}
|
|
1970
1970
|
function SegmentPool() {
|
|
1971
|
-
this.
|
|
1972
|
-
this.
|
|
1971
|
+
this.c3g_1 = 0;
|
|
1972
|
+
this.d3g_1 = 0;
|
|
1973
1973
|
}
|
|
1974
|
-
protoOf(SegmentPool).
|
|
1975
|
-
return Companion_instance.
|
|
1974
|
+
protoOf(SegmentPool).e3g = function () {
|
|
1975
|
+
return Companion_instance.g3h();
|
|
1976
1976
|
};
|
|
1977
|
-
protoOf(SegmentPool).
|
|
1977
|
+
protoOf(SegmentPool).t3g = function (segment) {
|
|
1978
1978
|
};
|
|
1979
|
-
protoOf(SegmentPool).
|
|
1979
|
+
protoOf(SegmentPool).i3h = function () {
|
|
1980
1980
|
return AlwaysSharedCopyTracker_getInstance();
|
|
1981
1981
|
};
|
|
1982
1982
|
var SegmentPool_instance;
|
|
@@ -1984,7 +1984,7 @@ function SegmentPool_getInstance() {
|
|
|
1984
1984
|
return SegmentPool_instance;
|
|
1985
1985
|
}
|
|
1986
1986
|
//region block: post-declaration
|
|
1987
|
-
protoOf(Buffer).
|
|
1987
|
+
protoOf(Buffer).i3g = write$default;
|
|
1988
1988
|
//endregion
|
|
1989
1989
|
//region block: init
|
|
1990
1990
|
Companion_instance = new Companion();
|