@doordeck/doordeck-headless-sdk 0.162.0 → 0.164.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kotlin/Kermit-kermit-core.js +50 -50
- package/kotlin/Kermit-kermit.js +5 -5
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +21 -21
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +21 -21
- package/kotlin/doordeck-sdk.js +10121 -10121
- package/kotlin/kotlin-kotlin-stdlib.js +835 -970
- package/kotlin/kotlinx-atomicfu.js +15 -15
- package/kotlin/kotlinx-coroutines-core.js +1894 -1894
- package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +39 -39
- package/kotlin/kotlinx-io-kotlinx-io-core.js +462 -462
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1795 -1795
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1395 -1395
- package/kotlin/ktor-ktor-client-auth.js +241 -241
- package/kotlin/ktor-ktor-client-content-negotiation.js +146 -144
- package/kotlin/ktor-ktor-client-core.js +1831 -1819
- package/kotlin/ktor-ktor-client-logging.js +631 -631
- package/kotlin/ktor-ktor-events.js +9 -9
- package/kotlin/ktor-ktor-http-cio.js +339 -339
- package/kotlin/ktor-ktor-http.js +741 -745
- package/kotlin/ktor-ktor-io.js +621 -625
- package/kotlin/ktor-ktor-serialization-kotlinx-json.js +7 -7
- package/kotlin/ktor-ktor-serialization-kotlinx.js +136 -136
- package/kotlin/ktor-ktor-serialization.js +60 -60
- package/kotlin/ktor-ktor-utils.js +690 -696
- package/kotlin/ktor-ktor-websockets.js +43 -46
- package/package.json +1 -1
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
//region block: imports
|
|
4
4
|
var imul = Math.imul;
|
|
5
5
|
var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.u1;
|
|
6
|
-
var Long = kotlin_kotlin.$_$.
|
|
6
|
+
var Long = kotlin_kotlin.$_$.sf;
|
|
7
7
|
var compare = kotlin_kotlin.$_$.p9;
|
|
8
8
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.n1;
|
|
9
9
|
var subtract = kotlin_kotlin.$_$.da;
|
|
10
10
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.f2;
|
|
11
11
|
var charArrayOf = kotlin_kotlin.$_$.ka;
|
|
12
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
12
|
+
var protoOf = kotlin_kotlin.$_$.yb;
|
|
13
13
|
var equalsLong = kotlin_kotlin.$_$.u9;
|
|
14
|
-
var toString = kotlin_kotlin.$_$.
|
|
14
|
+
var toString = kotlin_kotlin.$_$.bc;
|
|
15
15
|
var Unit_instance = kotlin_kotlin.$_$.z4;
|
|
16
|
-
var toShort = kotlin_kotlin.$_$.
|
|
16
|
+
var toShort = kotlin_kotlin.$_$.ac;
|
|
17
17
|
var add = kotlin_kotlin.$_$.m9;
|
|
18
|
-
var ensureNotNull = kotlin_kotlin.$_$.
|
|
18
|
+
var ensureNotNull = kotlin_kotlin.$_$.pg;
|
|
19
19
|
var fromInt = kotlin_kotlin.$_$.v9;
|
|
20
20
|
var convertToInt = kotlin_kotlin.$_$.r9;
|
|
21
21
|
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.c1;
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
var VOID = kotlin_kotlin.$_$.b;
|
|
24
24
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.r1;
|
|
25
25
|
var UnsafeByteStringOperations_instance = kotlin_org_jetbrains_kotlinx_kotlinx_io_bytestring.$_$.b;
|
|
26
|
-
var AutoCloseable = kotlin_kotlin.$_$.
|
|
27
|
-
var objectCreate = kotlin_kotlin.$_$.
|
|
26
|
+
var AutoCloseable = kotlin_kotlin.$_$.gf;
|
|
27
|
+
var objectCreate = kotlin_kotlin.$_$.xb;
|
|
28
28
|
var initMetadataForCompanion = kotlin_kotlin.$_$.ab;
|
|
29
29
|
var arrayCopy = kotlin_kotlin.$_$.r5;
|
|
30
|
-
var toByte = kotlin_kotlin.$_$.
|
|
30
|
+
var toByte = kotlin_kotlin.$_$.zb;
|
|
31
31
|
var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.l1;
|
|
32
32
|
var initMetadataForObject = kotlin_kotlin.$_$.fb;
|
|
33
33
|
var initMetadataForInterface = kotlin_kotlin.$_$.db;
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
var charCodeAt = kotlin_kotlin.$_$.ma;
|
|
36
36
|
var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.l2;
|
|
37
37
|
var charArray = kotlin_kotlin.$_$.la;
|
|
38
|
-
var numberToChar = kotlin_kotlin.$_$.
|
|
39
|
-
var concatToString = kotlin_kotlin.$_$.
|
|
38
|
+
var numberToChar = kotlin_kotlin.$_$.wb;
|
|
39
|
+
var concatToString = kotlin_kotlin.$_$.zc;
|
|
40
40
|
var Exception_init_$Init$ = kotlin_kotlin.$_$.g1;
|
|
41
41
|
var captureStack = kotlin_kotlin.$_$.ja;
|
|
42
42
|
var Exception_init_$Init$_0 = kotlin_kotlin.$_$.h1;
|
|
43
43
|
var Exception_init_$Init$_1 = kotlin_kotlin.$_$.j1;
|
|
44
|
-
var Exception = kotlin_kotlin.$_$.
|
|
44
|
+
var Exception = kotlin_kotlin.$_$.pf;
|
|
45
45
|
//endregion
|
|
46
46
|
//region block: pre-declaration
|
|
47
47
|
initMetadataForInterface(Source, 'Source', VOID, VOID, [AutoCloseable]);
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
endIndex = endIndex === VOID ? source.length : endIndex;
|
|
51
51
|
var tmp;
|
|
52
52
|
if ($super === VOID) {
|
|
53
|
-
this.
|
|
53
|
+
this.hq(source, startIndex, endIndex);
|
|
54
54
|
tmp = Unit_instance;
|
|
55
55
|
} else {
|
|
56
|
-
tmp = $super.
|
|
56
|
+
tmp = $super.hq.call(this, source, startIndex, endIndex);
|
|
57
57
|
}
|
|
58
58
|
return tmp;
|
|
59
59
|
}
|
|
@@ -105,20 +105,20 @@
|
|
|
105
105
|
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + $this.u().toString() + ', required: ' + byteCount.toString() + ')');
|
|
106
106
|
}
|
|
107
107
|
function Buffer() {
|
|
108
|
-
this.
|
|
109
|
-
this.
|
|
110
|
-
this.
|
|
108
|
+
this.uo_1 = null;
|
|
109
|
+
this.vo_1 = null;
|
|
110
|
+
this.wo_1 = new Long(0, 0);
|
|
111
111
|
}
|
|
112
112
|
protoOf(Buffer).u = function () {
|
|
113
|
-
return this.
|
|
113
|
+
return this.wo_1;
|
|
114
114
|
};
|
|
115
|
-
protoOf(Buffer).
|
|
115
|
+
protoOf(Buffer).xo = function () {
|
|
116
116
|
return this;
|
|
117
117
|
};
|
|
118
|
-
protoOf(Buffer).
|
|
118
|
+
protoOf(Buffer).yo = function () {
|
|
119
119
|
return equalsLong(this.u(), new Long(0, 0));
|
|
120
120
|
};
|
|
121
|
-
protoOf(Buffer).
|
|
121
|
+
protoOf(Buffer).zo = 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 @@
|
|
|
128
128
|
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + this.u().toString() + ', required: ' + byteCount.toString() + ')');
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
|
-
protoOf(Buffer).
|
|
131
|
+
protoOf(Buffer).ap = 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 @@
|
|
|
136
136
|
}
|
|
137
137
|
return compare(this.u(), byteCount) >= 0;
|
|
138
138
|
};
|
|
139
|
-
protoOf(Buffer).
|
|
140
|
-
var tmp0_elvis_lhs = this.
|
|
139
|
+
protoOf(Buffer).bp = function () {
|
|
140
|
+
var tmp0_elvis_lhs = this.uo_1;
|
|
141
141
|
var tmp;
|
|
142
142
|
if (tmp0_elvis_lhs == null) {
|
|
143
143
|
throwEof(this, new Long(1, 0));
|
|
@@ -147,18 +147,18 @@
|
|
|
147
147
|
var segment = tmp;
|
|
148
148
|
var segmentSize = segment.u();
|
|
149
149
|
if (segmentSize === 0) {
|
|
150
|
-
this.
|
|
151
|
-
return this.
|
|
150
|
+
this.jp();
|
|
151
|
+
return this.bp();
|
|
152
152
|
}
|
|
153
|
-
var v = segment.
|
|
154
|
-
this.
|
|
153
|
+
var v = segment.kp();
|
|
154
|
+
this.wo_1 = subtract(this.wo_1, new Long(1, 0));
|
|
155
155
|
if (segmentSize === 1) {
|
|
156
|
-
this.
|
|
156
|
+
this.jp();
|
|
157
157
|
}
|
|
158
158
|
return v;
|
|
159
159
|
};
|
|
160
|
-
protoOf(Buffer).
|
|
161
|
-
var tmp0_elvis_lhs = this.
|
|
160
|
+
protoOf(Buffer).lp = function () {
|
|
161
|
+
var tmp0_elvis_lhs = this.uo_1;
|
|
162
162
|
var tmp;
|
|
163
163
|
if (tmp0_elvis_lhs == null) {
|
|
164
164
|
throwEof(this, new Long(2, 0));
|
|
@@ -168,120 +168,120 @@
|
|
|
168
168
|
var segment = tmp;
|
|
169
169
|
var segmentSize = segment.u();
|
|
170
170
|
if (segmentSize < 2) {
|
|
171
|
-
this.
|
|
171
|
+
this.zo(new Long(2, 0));
|
|
172
172
|
if (segmentSize === 0) {
|
|
173
|
-
this.
|
|
174
|
-
return this.
|
|
173
|
+
this.jp();
|
|
174
|
+
return this.lp();
|
|
175
175
|
}
|
|
176
176
|
// Inline function 'kotlinx.io.and' call
|
|
177
|
-
var tmp_0 = (this.
|
|
177
|
+
var tmp_0 = (this.bp() & 255) << 8;
|
|
178
178
|
// Inline function 'kotlinx.io.and' call
|
|
179
|
-
var tmp$ret$1 = this.
|
|
179
|
+
var tmp$ret$1 = this.bp() & 255;
|
|
180
180
|
return toShort(tmp_0 | tmp$ret$1);
|
|
181
181
|
}
|
|
182
|
-
var v = segment.
|
|
183
|
-
this.
|
|
182
|
+
var v = segment.mp();
|
|
183
|
+
this.wo_1 = subtract(this.wo_1, new Long(2, 0));
|
|
184
184
|
if (segmentSize === 2) {
|
|
185
|
-
this.
|
|
185
|
+
this.jp();
|
|
186
186
|
}
|
|
187
187
|
return v;
|
|
188
188
|
};
|
|
189
|
-
protoOf(Buffer).
|
|
189
|
+
protoOf(Buffer).np = function () {
|
|
190
190
|
return Unit_instance;
|
|
191
191
|
};
|
|
192
|
-
protoOf(Buffer).
|
|
192
|
+
protoOf(Buffer).op = function (out, startIndex, endIndex) {
|
|
193
193
|
checkBounds(this.u(), 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.wo_1 = add(out.wo_1, remainingByteCount);
|
|
199
|
+
var s = this.uo_1;
|
|
200
|
+
while (compare(currentOffset, fromInt(ensureNotNull(s).ep_1 - s.dp_1 | 0)) >= 0) {
|
|
201
|
+
currentOffset = subtract(currentOffset, fromInt(s.ep_1 - s.dp_1 | 0));
|
|
202
|
+
s = s.hp_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).pp();
|
|
206
|
+
copy.dp_1 = copy.dp_1 + convertToInt(currentOffset) | 0;
|
|
207
207
|
var tmp = copy;
|
|
208
|
-
var tmp0 = copy.
|
|
208
|
+
var tmp0 = copy.dp_1 + convertToInt(remainingByteCount) | 0;
|
|
209
209
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
210
|
-
var b = copy.
|
|
211
|
-
tmp.
|
|
210
|
+
var b = copy.ep_1;
|
|
211
|
+
tmp.ep_1 = Math.min(tmp0, b);
|
|
212
212
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
213
|
-
if (out.
|
|
214
|
-
out.
|
|
215
|
-
out.
|
|
213
|
+
if (out.uo_1 == null) {
|
|
214
|
+
out.uo_1 = copy;
|
|
215
|
+
out.vo_1 = copy;
|
|
216
216
|
} else if (false) {
|
|
217
|
-
out.
|
|
218
|
-
if (ensureNotNull(out.
|
|
219
|
-
out.
|
|
217
|
+
out.vo_1 = ensureNotNull(out.vo_1).qp(copy).rp();
|
|
218
|
+
if (ensureNotNull(out.vo_1).ip_1 == null) {
|
|
219
|
+
out.uo_1 = out.vo_1;
|
|
220
220
|
}
|
|
221
221
|
} else {
|
|
222
|
-
out.
|
|
222
|
+
out.vo_1 = ensureNotNull(out.vo_1).qp(copy);
|
|
223
223
|
}
|
|
224
|
-
remainingByteCount = subtract(remainingByteCount, fromInt(copy.
|
|
224
|
+
remainingByteCount = subtract(remainingByteCount, fromInt(copy.ep_1 - copy.dp_1 | 0));
|
|
225
225
|
currentOffset = new Long(0, 0);
|
|
226
|
-
s = s.
|
|
226
|
+
s = s.hp_1;
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
|
-
protoOf(Buffer).
|
|
229
|
+
protoOf(Buffer).sp = function () {
|
|
230
230
|
var result = this.u();
|
|
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.vo_1);
|
|
234
|
+
if (tail.ep_1 < 8192 && tail.gp_1) {
|
|
235
|
+
result = subtract(result, fromInt(tail.ep_1 - tail.dp_1 | 0));
|
|
236
236
|
}
|
|
237
237
|
return result;
|
|
238
238
|
};
|
|
239
|
-
protoOf(Buffer).
|
|
239
|
+
protoOf(Buffer).tp = function (position) {
|
|
240
240
|
if (compare(position, new Long(0, 0)) < 0 || compare(position, this.u()) >= 0) {
|
|
241
241
|
throw IndexOutOfBoundsException_init_$Create$('position (' + position.toString() + ') is not within the range [0..size(' + this.u().toString() + '))');
|
|
242
242
|
}
|
|
243
243
|
if (equalsLong(position, new Long(0, 0))) {
|
|
244
|
-
return ensureNotNull(this.
|
|
244
|
+
return ensureNotNull(this.uo_1).up(0);
|
|
245
245
|
}
|
|
246
246
|
// Inline function 'kotlinx.io.seek' call
|
|
247
|
-
if (this.
|
|
247
|
+
if (this.uo_1 == null) {
|
|
248
248
|
var offset = new Long(-1, -1);
|
|
249
|
-
return ensureNotNull(null).
|
|
249
|
+
return ensureNotNull(null).up(convertToInt(subtract(position, offset)));
|
|
250
250
|
}
|
|
251
251
|
if (compare(subtract(this.u(), position), position) < 0) {
|
|
252
|
-
var s = this.
|
|
252
|
+
var s = this.vo_1;
|
|
253
253
|
var offset_0 = this.u();
|
|
254
254
|
$l$loop: while (!(s == null) && compare(offset_0, position) > 0) {
|
|
255
|
-
offset_0 = subtract(offset_0, fromInt(s.
|
|
255
|
+
offset_0 = subtract(offset_0, fromInt(s.ep_1 - s.dp_1 | 0));
|
|
256
256
|
if (compare(offset_0, position) <= 0)
|
|
257
257
|
break $l$loop;
|
|
258
|
-
s = s.
|
|
258
|
+
s = s.ip_1;
|
|
259
259
|
}
|
|
260
260
|
var tmp0 = s;
|
|
261
261
|
var offset_1 = offset_0;
|
|
262
|
-
return ensureNotNull(tmp0).
|
|
262
|
+
return ensureNotNull(tmp0).up(convertToInt(subtract(position, offset_1)));
|
|
263
263
|
} else {
|
|
264
|
-
var s_0 = this.
|
|
264
|
+
var s_0 = this.uo_1;
|
|
265
265
|
var offset_2 = new Long(0, 0);
|
|
266
266
|
$l$loop_0: while (!(s_0 == null)) {
|
|
267
267
|
var tmp0_0 = offset_2;
|
|
268
268
|
// Inline function 'kotlin.Long.plus' call
|
|
269
|
-
var other = s_0.
|
|
269
|
+
var other = s_0.ep_1 - s_0.dp_1 | 0;
|
|
270
270
|
var nextOffset = add(tmp0_0, fromInt(other));
|
|
271
271
|
if (compare(nextOffset, position) > 0)
|
|
272
272
|
break $l$loop_0;
|
|
273
|
-
s_0 = s_0.
|
|
273
|
+
s_0 = s_0.hp_1;
|
|
274
274
|
offset_2 = nextOffset;
|
|
275
275
|
}
|
|
276
276
|
var tmp0_1 = s_0;
|
|
277
277
|
var offset_3 = offset_2;
|
|
278
|
-
return ensureNotNull(tmp0_1).
|
|
278
|
+
return ensureNotNull(tmp0_1).up(convertToInt(subtract(position, offset_3)));
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
281
|
protoOf(Buffer).b2 = function () {
|
|
282
|
-
return this.
|
|
282
|
+
return this.vp(this.u());
|
|
283
283
|
};
|
|
284
|
-
protoOf(Buffer).
|
|
284
|
+
protoOf(Buffer).vp = function (byteCount) {
|
|
285
285
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
286
286
|
// Inline function 'kotlin.require' call
|
|
287
287
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
@@ -290,7 +290,7 @@
|
|
|
290
290
|
}
|
|
291
291
|
var remainingByteCount = byteCount;
|
|
292
292
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
293
|
-
var tmp0_elvis_lhs = this.
|
|
293
|
+
var tmp0_elvis_lhs = this.uo_1;
|
|
294
294
|
var tmp;
|
|
295
295
|
if (tmp0_elvis_lhs == null) {
|
|
296
296
|
throw EOFException_init_$Create$_0('Buffer exhausted before skipping ' + byteCount.toString() + ' bytes.');
|
|
@@ -300,24 +300,24 @@
|
|
|
300
300
|
var head = tmp;
|
|
301
301
|
var tmp0 = remainingByteCount;
|
|
302
302
|
// Inline function 'kotlinx.io.minOf' call
|
|
303
|
-
var b = head.
|
|
303
|
+
var b = head.ep_1 - head.dp_1 | 0;
|
|
304
304
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
305
305
|
var b_0 = fromInt(b);
|
|
306
306
|
var tmp$ret$4 = compare(tmp0, b_0) <= 0 ? tmp0 : b_0;
|
|
307
307
|
var toSkip = convertToInt(tmp$ret$4);
|
|
308
|
-
this.
|
|
308
|
+
this.wo_1 = subtract(this.wo_1, fromInt(toSkip));
|
|
309
309
|
remainingByteCount = subtract(remainingByteCount, fromInt(toSkip));
|
|
310
|
-
head.
|
|
311
|
-
if (head.
|
|
312
|
-
this.
|
|
310
|
+
head.dp_1 = head.dp_1 + toSkip | 0;
|
|
311
|
+
if (head.dp_1 === head.ep_1) {
|
|
312
|
+
this.jp();
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
|
-
protoOf(Buffer).
|
|
316
|
+
protoOf(Buffer).wp = function (sink, startIndex, endIndex) {
|
|
317
317
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
318
318
|
var size = sink.length;
|
|
319
319
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
320
|
-
var tmp0_elvis_lhs = this.
|
|
320
|
+
var tmp0_elvis_lhs = this.uo_1;
|
|
321
321
|
var tmp;
|
|
322
322
|
if (tmp0_elvis_lhs == null) {
|
|
323
323
|
return -1;
|
|
@@ -329,14 +329,14 @@
|
|
|
329
329
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
330
330
|
var b = s.u();
|
|
331
331
|
var toCopy = Math.min(tmp0, b);
|
|
332
|
-
s.
|
|
333
|
-
this.
|
|
332
|
+
s.xp(sink, startIndex, startIndex + toCopy | 0);
|
|
333
|
+
this.wo_1 = subtract(this.wo_1, fromInt(toCopy));
|
|
334
334
|
if (isEmpty(s)) {
|
|
335
|
-
this.
|
|
335
|
+
this.jp();
|
|
336
336
|
}
|
|
337
337
|
return toCopy;
|
|
338
338
|
};
|
|
339
|
-
protoOf(Buffer).
|
|
339
|
+
protoOf(Buffer).yp = function (sink, byteCount) {
|
|
340
340
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
341
341
|
// Inline function 'kotlin.require' call
|
|
342
342
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
@@ -346,10 +346,10 @@
|
|
|
346
346
|
if (equalsLong(this.u(), new Long(0, 0)))
|
|
347
347
|
return new Long(-1, -1);
|
|
348
348
|
var bytesWritten = compare(byteCount, this.u()) > 0 ? this.u() : byteCount;
|
|
349
|
-
sink.
|
|
349
|
+
sink.zp(this, bytesWritten);
|
|
350
350
|
return bytesWritten;
|
|
351
351
|
};
|
|
352
|
-
protoOf(Buffer).
|
|
352
|
+
protoOf(Buffer).aq = function (sink, byteCount) {
|
|
353
353
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
354
354
|
// Inline function 'kotlin.require' call
|
|
355
355
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
@@ -357,62 +357,62 @@
|
|
|
357
357
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
358
358
|
}
|
|
359
359
|
if (compare(this.u(), byteCount) < 0) {
|
|
360
|
-
sink.
|
|
360
|
+
sink.zp(this, this.u());
|
|
361
361
|
throw EOFException_init_$Create$_0('Buffer exhausted before writing ' + byteCount.toString() + ' bytes. Only ' + this.u().toString() + ' bytes were written.');
|
|
362
362
|
}
|
|
363
|
-
sink.
|
|
363
|
+
sink.zp(this, byteCount);
|
|
364
364
|
};
|
|
365
|
-
protoOf(Buffer).
|
|
365
|
+
protoOf(Buffer).bq = function (sink) {
|
|
366
366
|
var byteCount = this.u();
|
|
367
367
|
if (compare(byteCount, new Long(0, 0)) > 0) {
|
|
368
|
-
sink.
|
|
368
|
+
sink.zp(this, byteCount);
|
|
369
369
|
}
|
|
370
370
|
return byteCount;
|
|
371
371
|
};
|
|
372
|
-
protoOf(Buffer).
|
|
372
|
+
protoOf(Buffer).cq = function () {
|
|
373
373
|
return buffered(new PeekSource(this));
|
|
374
374
|
};
|
|
375
|
-
protoOf(Buffer).
|
|
375
|
+
protoOf(Buffer).dq = function (minimumCapacity) {
|
|
376
376
|
// Inline function 'kotlin.require' call
|
|
377
377
|
if (!(minimumCapacity >= 1 && minimumCapacity <= 8192)) {
|
|
378
378
|
var message = 'unexpected capacity (' + minimumCapacity + '), should be in range [1, 8192]';
|
|
379
379
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
380
380
|
}
|
|
381
|
-
if (this.
|
|
382
|
-
var result = SegmentPool_instance.
|
|
383
|
-
this.
|
|
384
|
-
this.
|
|
381
|
+
if (this.vo_1 == null) {
|
|
382
|
+
var result = SegmentPool_instance.gq();
|
|
383
|
+
this.uo_1 = result;
|
|
384
|
+
this.vo_1 = result;
|
|
385
385
|
return result;
|
|
386
386
|
}
|
|
387
|
-
var t = ensureNotNull(this.
|
|
388
|
-
if ((t.
|
|
389
|
-
var newTail = t.
|
|
390
|
-
this.
|
|
387
|
+
var t = ensureNotNull(this.vo_1);
|
|
388
|
+
if ((t.ep_1 + minimumCapacity | 0) > 8192 || !t.gp_1) {
|
|
389
|
+
var newTail = t.qp(SegmentPool_instance.gq());
|
|
390
|
+
this.vo_1 = newTail;
|
|
391
391
|
return newTail;
|
|
392
392
|
}
|
|
393
393
|
return t;
|
|
394
394
|
};
|
|
395
|
-
protoOf(Buffer).
|
|
395
|
+
protoOf(Buffer).hq = function (source, startIndex, endIndex) {
|
|
396
396
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
397
397
|
var size = source.length;
|
|
398
398
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
399
399
|
var currentOffset = startIndex;
|
|
400
400
|
while (currentOffset < endIndex) {
|
|
401
|
-
var tail = this.
|
|
401
|
+
var tail = this.dq(1);
|
|
402
402
|
var tmp0 = endIndex - currentOffset | 0;
|
|
403
403
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
404
|
-
var b = tail.
|
|
404
|
+
var b = tail.iq();
|
|
405
405
|
var toCopy = Math.min(tmp0, b);
|
|
406
|
-
tail.
|
|
406
|
+
tail.jq(source, currentOffset, currentOffset + toCopy | 0);
|
|
407
407
|
currentOffset = currentOffset + toCopy | 0;
|
|
408
408
|
}
|
|
409
409
|
var tmp = this;
|
|
410
|
-
var tmp0_0 = this.
|
|
410
|
+
var tmp0_0 = this.wo_1;
|
|
411
411
|
// Inline function 'kotlin.Long.plus' call
|
|
412
412
|
var other = endIndex - startIndex | 0;
|
|
413
|
-
tmp.
|
|
413
|
+
tmp.wo_1 = add(tmp0_0, fromInt(other));
|
|
414
414
|
};
|
|
415
|
-
protoOf(Buffer).
|
|
415
|
+
protoOf(Buffer).lq = function (source, byteCount) {
|
|
416
416
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
417
417
|
// Inline function 'kotlin.require' call
|
|
418
418
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
@@ -421,86 +421,86 @@
|
|
|
421
421
|
}
|
|
422
422
|
var remainingByteCount = byteCount;
|
|
423
423
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
424
|
-
var read = source.
|
|
424
|
+
var read = source.yp(this, remainingByteCount);
|
|
425
425
|
if (equalsLong(read, new Long(-1, -1))) {
|
|
426
426
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + byteCount.toString() + ' bytes. ' + ('Only ' + subtract(byteCount, remainingByteCount).toString() + ' were read.'));
|
|
427
427
|
}
|
|
428
428
|
remainingByteCount = subtract(remainingByteCount, read);
|
|
429
429
|
}
|
|
430
430
|
};
|
|
431
|
-
protoOf(Buffer).
|
|
431
|
+
protoOf(Buffer).zp = function (source, byteCount) {
|
|
432
432
|
// Inline function 'kotlin.require' call
|
|
433
433
|
if (!!(source === this)) {
|
|
434
434
|
var message = 'source == this';
|
|
435
435
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
436
436
|
}
|
|
437
|
-
checkOffsetAndCount(source.
|
|
437
|
+
checkOffsetAndCount(source.wo_1, new Long(0, 0), byteCount);
|
|
438
438
|
var remainingByteCount = byteCount;
|
|
439
439
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
440
|
-
if (compare(remainingByteCount, fromInt(ensureNotNull(source.
|
|
441
|
-
var tail = this.
|
|
440
|
+
if (compare(remainingByteCount, fromInt(ensureNotNull(source.uo_1).u())) < 0) {
|
|
441
|
+
var tail = this.vo_1;
|
|
442
442
|
var tmp;
|
|
443
|
-
if (!(tail == null) && tail.
|
|
443
|
+
if (!(tail == null) && tail.gp_1) {
|
|
444
444
|
var tmp0 = remainingByteCount;
|
|
445
445
|
// Inline function 'kotlin.Long.plus' call
|
|
446
|
-
var other = tail.
|
|
446
|
+
var other = tail.ep_1;
|
|
447
447
|
var tmp0_0 = add(tmp0, fromInt(other));
|
|
448
448
|
// Inline function 'kotlin.Long.minus' call
|
|
449
|
-
var other_0 = tail.
|
|
449
|
+
var other_0 = tail.mq() ? 0 : tail.dp_1;
|
|
450
450
|
var tmp$ret$3 = subtract(tmp0_0, fromInt(other_0));
|
|
451
451
|
tmp = compare(tmp$ret$3, new Long(8192, 0)) <= 0;
|
|
452
452
|
} else {
|
|
453
453
|
tmp = false;
|
|
454
454
|
}
|
|
455
455
|
if (tmp) {
|
|
456
|
-
ensureNotNull(source.
|
|
457
|
-
source.
|
|
458
|
-
this.
|
|
456
|
+
ensureNotNull(source.uo_1).oq(tail, convertToInt(remainingByteCount));
|
|
457
|
+
source.wo_1 = subtract(source.wo_1, remainingByteCount);
|
|
458
|
+
this.wo_1 = add(this.wo_1, remainingByteCount);
|
|
459
459
|
return Unit_instance;
|
|
460
460
|
} else {
|
|
461
|
-
source.
|
|
461
|
+
source.uo_1 = ensureNotNull(source.uo_1).nq(convertToInt(remainingByteCount));
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
var segmentToMove = ensureNotNull(source.
|
|
464
|
+
var segmentToMove = ensureNotNull(source.uo_1);
|
|
465
465
|
var movedByteCount = fromInt(segmentToMove.u());
|
|
466
|
-
source.
|
|
467
|
-
if (source.
|
|
468
|
-
source.
|
|
466
|
+
source.uo_1 = segmentToMove.pq();
|
|
467
|
+
if (source.uo_1 == null) {
|
|
468
|
+
source.vo_1 = null;
|
|
469
469
|
}
|
|
470
470
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
471
|
-
if (this.
|
|
472
|
-
this.
|
|
473
|
-
this.
|
|
471
|
+
if (this.uo_1 == null) {
|
|
472
|
+
this.uo_1 = segmentToMove;
|
|
473
|
+
this.vo_1 = segmentToMove;
|
|
474
474
|
} else if (true) {
|
|
475
|
-
this.
|
|
476
|
-
if (ensureNotNull(this.
|
|
477
|
-
this.
|
|
475
|
+
this.vo_1 = ensureNotNull(this.vo_1).qp(segmentToMove).rp();
|
|
476
|
+
if (ensureNotNull(this.vo_1).ip_1 == null) {
|
|
477
|
+
this.uo_1 = this.vo_1;
|
|
478
478
|
}
|
|
479
479
|
} else {
|
|
480
|
-
this.
|
|
480
|
+
this.vo_1 = ensureNotNull(this.vo_1).qp(segmentToMove);
|
|
481
481
|
}
|
|
482
|
-
source.
|
|
483
|
-
this.
|
|
482
|
+
source.wo_1 = subtract(source.wo_1, movedByteCount);
|
|
483
|
+
this.wo_1 = add(this.wo_1, movedByteCount);
|
|
484
484
|
remainingByteCount = subtract(remainingByteCount, movedByteCount);
|
|
485
485
|
}
|
|
486
486
|
};
|
|
487
|
-
protoOf(Buffer).
|
|
487
|
+
protoOf(Buffer).qq = function (source) {
|
|
488
488
|
var totalBytesRead = new Long(0, 0);
|
|
489
489
|
$l$loop: while (true) {
|
|
490
|
-
var readCount = source.
|
|
490
|
+
var readCount = source.yp(this, new Long(8192, 0));
|
|
491
491
|
if (equalsLong(readCount, new Long(-1, -1)))
|
|
492
492
|
break $l$loop;
|
|
493
493
|
totalBytesRead = add(totalBytesRead, readCount);
|
|
494
494
|
}
|
|
495
495
|
return totalBytesRead;
|
|
496
496
|
};
|
|
497
|
-
protoOf(Buffer).
|
|
498
|
-
this.
|
|
499
|
-
this.
|
|
497
|
+
protoOf(Buffer).rq = function (byte) {
|
|
498
|
+
this.dq(1).sq(byte);
|
|
499
|
+
this.wo_1 = add(this.wo_1, new Long(1, 0));
|
|
500
500
|
};
|
|
501
|
-
protoOf(Buffer).
|
|
502
|
-
this.
|
|
503
|
-
this.
|
|
501
|
+
protoOf(Buffer).tq = function (short) {
|
|
502
|
+
this.dq(2).uq(short);
|
|
503
|
+
this.wo_1 = add(this.wo_1, new Long(2, 0));
|
|
504
504
|
};
|
|
505
505
|
protoOf(Buffer).b4 = function () {
|
|
506
506
|
return Unit_instance;
|
|
@@ -518,7 +518,7 @@
|
|
|
518
518
|
var builder = StringBuilder_init_$Create$(imul(len, 2) + (compare(this.u(), fromInt(maxPrintableBytes)) > 0 ? 1 : 0) | 0);
|
|
519
519
|
var bytesWritten = 0;
|
|
520
520
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
521
|
-
var curr = this.
|
|
521
|
+
var curr = this.uo_1;
|
|
522
522
|
while (!(curr == null)) {
|
|
523
523
|
var tmp0 = get_SegmentReadContextImpl();
|
|
524
524
|
var segment = curr;
|
|
@@ -526,7 +526,7 @@
|
|
|
526
526
|
while (bytesWritten < len && idx < segment.u()) {
|
|
527
527
|
var _unary__edvuaz = idx;
|
|
528
528
|
idx = _unary__edvuaz + 1 | 0;
|
|
529
|
-
var b_0 = tmp0.
|
|
529
|
+
var b_0 = tmp0.vq(segment, _unary__edvuaz);
|
|
530
530
|
bytesWritten = bytesWritten + 1 | 0;
|
|
531
531
|
var tmp = get_HEX_DIGIT_CHARS();
|
|
532
532
|
// Inline function 'kotlinx.io.shr' call
|
|
@@ -537,36 +537,36 @@
|
|
|
537
537
|
var tmp$ret$3 = b_0 & 15;
|
|
538
538
|
tmp_0.g8(tmp_1[tmp$ret$3]);
|
|
539
539
|
}
|
|
540
|
-
curr = curr.
|
|
540
|
+
curr = curr.hp_1;
|
|
541
541
|
}
|
|
542
542
|
if (compare(this.u(), fromInt(maxPrintableBytes)) > 0) {
|
|
543
543
|
builder.g8(_Char___init__impl__6a9atx(8230));
|
|
544
544
|
}
|
|
545
545
|
return 'Buffer(size=' + this.u().toString() + ' hex=' + builder.toString() + ')';
|
|
546
546
|
};
|
|
547
|
-
protoOf(Buffer).
|
|
548
|
-
var oldHead = ensureNotNull(this.
|
|
549
|
-
var nextHead = oldHead.
|
|
550
|
-
this.
|
|
547
|
+
protoOf(Buffer).jp = function () {
|
|
548
|
+
var oldHead = ensureNotNull(this.uo_1);
|
|
549
|
+
var nextHead = oldHead.hp_1;
|
|
550
|
+
this.uo_1 = nextHead;
|
|
551
551
|
if (nextHead == null) {
|
|
552
|
-
this.
|
|
552
|
+
this.vo_1 = null;
|
|
553
553
|
} else {
|
|
554
|
-
nextHead.
|
|
554
|
+
nextHead.ip_1 = null;
|
|
555
555
|
}
|
|
556
|
-
oldHead.
|
|
557
|
-
SegmentPool_instance.
|
|
556
|
+
oldHead.hp_1 = null;
|
|
557
|
+
SegmentPool_instance.wq(oldHead);
|
|
558
558
|
};
|
|
559
|
-
protoOf(Buffer).
|
|
560
|
-
var oldTail = ensureNotNull(this.
|
|
561
|
-
var newTail = oldTail.
|
|
562
|
-
this.
|
|
559
|
+
protoOf(Buffer).xq = function () {
|
|
560
|
+
var oldTail = ensureNotNull(this.vo_1);
|
|
561
|
+
var newTail = oldTail.ip_1;
|
|
562
|
+
this.vo_1 = newTail;
|
|
563
563
|
if (newTail == null) {
|
|
564
|
-
this.
|
|
564
|
+
this.uo_1 = null;
|
|
565
565
|
} else {
|
|
566
|
-
newTail.
|
|
566
|
+
newTail.hp_1 = null;
|
|
567
567
|
}
|
|
568
|
-
oldTail.
|
|
569
|
-
SegmentPool_instance.
|
|
568
|
+
oldTail.ip_1 = null;
|
|
569
|
+
SegmentPool_instance.wq(oldTail);
|
|
570
570
|
};
|
|
571
571
|
function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
572
572
|
startIndex = startIndex === VOID ? new Long(0, 0) : startIndex;
|
|
@@ -578,7 +578,7 @@
|
|
|
578
578
|
if (equalsLong(startIndex, endOffset))
|
|
579
579
|
return new Long(-1, -1);
|
|
580
580
|
// Inline function 'kotlinx.io.seek' call
|
|
581
|
-
if (_this__u8e3s4.
|
|
581
|
+
if (_this__u8e3s4.uo_1 == null) {
|
|
582
582
|
var o = new Long(-1, -1);
|
|
583
583
|
if (equalsLong(o, new Long(-1, -1))) {
|
|
584
584
|
return new Long(-1, -1);
|
|
@@ -607,19 +607,19 @@
|
|
|
607
607
|
// Inline function 'kotlin.Long.plus' call
|
|
608
608
|
var other = segment.u();
|
|
609
609
|
offset = add(tmp0_0, fromInt(other));
|
|
610
|
-
segment = segment.
|
|
610
|
+
segment = segment.hp_1;
|
|
611
611
|
}
|
|
612
612
|
while (!(segment == null) && compare(offset, endOffset) < 0);
|
|
613
613
|
return new Long(-1, -1);
|
|
614
614
|
}
|
|
615
615
|
if (compare(subtract(_this__u8e3s4.u(), startIndex), startIndex) < 0) {
|
|
616
|
-
var s = _this__u8e3s4.
|
|
616
|
+
var s = _this__u8e3s4.vo_1;
|
|
617
617
|
var offset_0 = _this__u8e3s4.u();
|
|
618
618
|
$l$loop: while (!(s == null) && compare(offset_0, startIndex) > 0) {
|
|
619
|
-
offset_0 = subtract(offset_0, fromInt(s.
|
|
619
|
+
offset_0 = subtract(offset_0, fromInt(s.ep_1 - s.dp_1 | 0));
|
|
620
620
|
if (compare(offset_0, startIndex) <= 0)
|
|
621
621
|
break $l$loop;
|
|
622
|
-
s = s.
|
|
622
|
+
s = s.ip_1;
|
|
623
623
|
}
|
|
624
624
|
var tmp0_1 = s;
|
|
625
625
|
var o_0 = offset_0;
|
|
@@ -650,21 +650,21 @@
|
|
|
650
650
|
// Inline function 'kotlin.Long.plus' call
|
|
651
651
|
var other_0 = segment_0.u();
|
|
652
652
|
offset_1 = add(tmp0_3, fromInt(other_0));
|
|
653
|
-
segment_0 = segment_0.
|
|
653
|
+
segment_0 = segment_0.hp_1;
|
|
654
654
|
}
|
|
655
655
|
while (!(segment_0 == null) && compare(offset_1, endOffset) < 0);
|
|
656
656
|
return new Long(-1, -1);
|
|
657
657
|
} else {
|
|
658
|
-
var s_0 = _this__u8e3s4.
|
|
658
|
+
var s_0 = _this__u8e3s4.uo_1;
|
|
659
659
|
var offset_2 = new Long(0, 0);
|
|
660
660
|
$l$loop_0: while (!(s_0 == null)) {
|
|
661
661
|
var tmp0_4 = offset_2;
|
|
662
662
|
// Inline function 'kotlin.Long.plus' call
|
|
663
|
-
var other_1 = s_0.
|
|
663
|
+
var other_1 = s_0.ep_1 - s_0.dp_1 | 0;
|
|
664
664
|
var nextOffset = add(tmp0_4, fromInt(other_1));
|
|
665
665
|
if (compare(nextOffset, startIndex) > 0)
|
|
666
666
|
break $l$loop_0;
|
|
667
|
-
s_0 = s_0.
|
|
667
|
+
s_0 = s_0.hp_1;
|
|
668
668
|
offset_2 = nextOffset;
|
|
669
669
|
}
|
|
670
670
|
var tmp0_5 = s_0;
|
|
@@ -696,32 +696,32 @@
|
|
|
696
696
|
// Inline function 'kotlin.Long.plus' call
|
|
697
697
|
var other_2 = segment_1.u();
|
|
698
698
|
offset_3 = add(tmp0_7, fromInt(other_2));
|
|
699
|
-
segment_1 = segment_1.
|
|
699
|
+
segment_1 = segment_1.hp_1;
|
|
700
700
|
}
|
|
701
701
|
while (!(segment_1 == null) && compare(offset_3, endOffset) < 0);
|
|
702
702
|
return new Long(-1, -1);
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
705
|
function readByteString(_this__u8e3s4, byteCount) {
|
|
706
|
-
return UnsafeByteStringOperations_instance.
|
|
706
|
+
return UnsafeByteStringOperations_instance.to(readByteArray_0(_this__u8e3s4, byteCount));
|
|
707
707
|
}
|
|
708
708
|
function buffered(_this__u8e3s4) {
|
|
709
709
|
return new RealSource(_this__u8e3s4);
|
|
710
710
|
}
|
|
711
711
|
function PeekSource(upstream) {
|
|
712
|
-
this.
|
|
713
|
-
this.
|
|
714
|
-
this.
|
|
712
|
+
this.yq_1 = upstream;
|
|
713
|
+
this.zq_1 = this.yq_1.xo();
|
|
714
|
+
this.ar_1 = this.zq_1.uo_1;
|
|
715
715
|
var tmp = this;
|
|
716
|
-
var tmp0_safe_receiver = this.
|
|
717
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
718
|
-
tmp.
|
|
719
|
-
this.
|
|
720
|
-
this.
|
|
716
|
+
var tmp0_safe_receiver = this.zq_1.uo_1;
|
|
717
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dp_1;
|
|
718
|
+
tmp.br_1 = tmp1_elvis_lhs == null ? -1 : tmp1_elvis_lhs;
|
|
719
|
+
this.cr_1 = false;
|
|
720
|
+
this.dr_1 = new Long(0, 0);
|
|
721
721
|
}
|
|
722
|
-
protoOf(PeekSource).
|
|
722
|
+
protoOf(PeekSource).yp = function (sink, byteCount) {
|
|
723
723
|
// Inline function 'kotlin.check' call
|
|
724
|
-
if (!!this.
|
|
724
|
+
if (!!this.cr_1) {
|
|
725
725
|
var message = 'Source is closed.';
|
|
726
726
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
727
727
|
}
|
|
@@ -732,43 +732,43 @@
|
|
|
732
732
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
733
733
|
}
|
|
734
734
|
// Inline function 'kotlin.check' call
|
|
735
|
-
if (!(this.
|
|
735
|
+
if (!(this.ar_1 == null || (this.ar_1 === this.zq_1.uo_1 && this.br_1 === ensureNotNull(this.zq_1.uo_1).dp_1))) {
|
|
736
736
|
var message_1 = 'Peek source is invalid because upstream source was used';
|
|
737
737
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
738
738
|
}
|
|
739
739
|
if (equalsLong(byteCount, new Long(0, 0)))
|
|
740
740
|
return new Long(0, 0);
|
|
741
741
|
// Inline function 'kotlin.Long.plus' call
|
|
742
|
-
var this_0 = this.
|
|
742
|
+
var this_0 = this.dr_1;
|
|
743
743
|
var tmp$ret$7 = add(this_0, fromInt(1));
|
|
744
|
-
if (!this.
|
|
744
|
+
if (!this.yq_1.ap(tmp$ret$7))
|
|
745
745
|
return new Long(-1, -1);
|
|
746
|
-
if (this.
|
|
747
|
-
this.
|
|
748
|
-
this.
|
|
746
|
+
if (this.ar_1 == null && !(this.zq_1.uo_1 == null)) {
|
|
747
|
+
this.ar_1 = this.zq_1.uo_1;
|
|
748
|
+
this.br_1 = ensureNotNull(this.zq_1.uo_1).dp_1;
|
|
749
749
|
}
|
|
750
750
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
751
|
-
var b = subtract(this.
|
|
751
|
+
var b = subtract(this.zq_1.u(), this.dr_1);
|
|
752
752
|
var toCopy = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
753
|
-
this.
|
|
754
|
-
this.
|
|
753
|
+
this.zq_1.op(sink, this.dr_1, add(this.dr_1, toCopy));
|
|
754
|
+
this.dr_1 = add(this.dr_1, toCopy);
|
|
755
755
|
return toCopy;
|
|
756
756
|
};
|
|
757
757
|
protoOf(PeekSource).b4 = function () {
|
|
758
|
-
this.
|
|
758
|
+
this.cr_1 = true;
|
|
759
759
|
};
|
|
760
760
|
function RealSource(source) {
|
|
761
|
-
this.
|
|
762
|
-
this.
|
|
763
|
-
this.
|
|
761
|
+
this.er_1 = source;
|
|
762
|
+
this.fr_1 = false;
|
|
763
|
+
this.gr_1 = new Buffer();
|
|
764
764
|
}
|
|
765
|
-
protoOf(RealSource).
|
|
766
|
-
return this.
|
|
765
|
+
protoOf(RealSource).xo = function () {
|
|
766
|
+
return this.gr_1;
|
|
767
767
|
};
|
|
768
|
-
protoOf(RealSource).
|
|
768
|
+
protoOf(RealSource).yp = function (sink, byteCount) {
|
|
769
769
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
770
770
|
// Inline function 'kotlin.check' call
|
|
771
|
-
if (!!this.
|
|
771
|
+
if (!!this.fr_1) {
|
|
772
772
|
var message = 'Source is closed.';
|
|
773
773
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
774
774
|
}
|
|
@@ -777,33 +777,33 @@
|
|
|
777
777
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
778
778
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
779
779
|
}
|
|
780
|
-
if (equalsLong(this.
|
|
781
|
-
var read = this.
|
|
780
|
+
if (equalsLong(this.gr_1.u(), new Long(0, 0))) {
|
|
781
|
+
var read = this.er_1.yp(this.gr_1, new Long(8192, 0));
|
|
782
782
|
if (equalsLong(read, new Long(-1, -1)))
|
|
783
783
|
return new Long(-1, -1);
|
|
784
784
|
}
|
|
785
785
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
786
|
-
var b = this.
|
|
786
|
+
var b = this.gr_1.u();
|
|
787
787
|
var toRead = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
788
|
-
return this.
|
|
788
|
+
return this.gr_1.yp(sink, toRead);
|
|
789
789
|
};
|
|
790
|
-
protoOf(RealSource).
|
|
790
|
+
protoOf(RealSource).yo = function () {
|
|
791
791
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
792
792
|
// Inline function 'kotlin.check' call
|
|
793
|
-
if (!!this.
|
|
793
|
+
if (!!this.fr_1) {
|
|
794
794
|
var message = 'Source is closed.';
|
|
795
795
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
796
796
|
}
|
|
797
|
-
return this.
|
|
797
|
+
return this.gr_1.yo() && equalsLong(this.er_1.yp(this.gr_1, new Long(8192, 0)), new Long(-1, -1));
|
|
798
798
|
};
|
|
799
|
-
protoOf(RealSource).
|
|
800
|
-
if (!this.
|
|
799
|
+
protoOf(RealSource).zo = function (byteCount) {
|
|
800
|
+
if (!this.ap(byteCount))
|
|
801
801
|
throw EOFException_init_$Create$_0("Source doesn't contain required number of bytes (" + byteCount.toString() + ').');
|
|
802
802
|
};
|
|
803
|
-
protoOf(RealSource).
|
|
803
|
+
protoOf(RealSource).ap = function (byteCount) {
|
|
804
804
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
805
805
|
// Inline function 'kotlin.check' call
|
|
806
|
-
if (!!this.
|
|
806
|
+
if (!!this.fr_1) {
|
|
807
807
|
var message = 'Source is closed.';
|
|
808
808
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
809
809
|
}
|
|
@@ -812,91 +812,91 @@
|
|
|
812
812
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
813
813
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
814
814
|
}
|
|
815
|
-
while (compare(this.
|
|
816
|
-
if (equalsLong(this.
|
|
815
|
+
while (compare(this.gr_1.u(), byteCount) < 0) {
|
|
816
|
+
if (equalsLong(this.er_1.yp(this.gr_1, new Long(8192, 0)), new Long(-1, -1)))
|
|
817
817
|
return false;
|
|
818
818
|
}
|
|
819
819
|
return true;
|
|
820
820
|
};
|
|
821
|
-
protoOf(RealSource).
|
|
822
|
-
this.
|
|
823
|
-
return this.
|
|
821
|
+
protoOf(RealSource).bp = function () {
|
|
822
|
+
this.zo(new Long(1, 0));
|
|
823
|
+
return this.gr_1.bp();
|
|
824
824
|
};
|
|
825
|
-
protoOf(RealSource).
|
|
825
|
+
protoOf(RealSource).wp = function (sink, startIndex, endIndex) {
|
|
826
826
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
827
827
|
var size = sink.length;
|
|
828
828
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
829
|
-
if (equalsLong(this.
|
|
830
|
-
var read = this.
|
|
829
|
+
if (equalsLong(this.gr_1.u(), new Long(0, 0))) {
|
|
830
|
+
var read = this.er_1.yp(this.gr_1, new Long(8192, 0));
|
|
831
831
|
if (equalsLong(read, new Long(-1, -1)))
|
|
832
832
|
return -1;
|
|
833
833
|
}
|
|
834
834
|
var tmp0 = endIndex - startIndex | 0;
|
|
835
835
|
// Inline function 'kotlinx.io.minOf' call
|
|
836
|
-
var b = this.
|
|
836
|
+
var b = this.gr_1.u();
|
|
837
837
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
838
838
|
var a = fromInt(tmp0);
|
|
839
839
|
var tmp$ret$2 = compare(a, b) <= 0 ? a : b;
|
|
840
840
|
var toRead = convertToInt(tmp$ret$2);
|
|
841
|
-
return this.
|
|
841
|
+
return this.gr_1.wp(sink, startIndex, startIndex + toRead | 0);
|
|
842
842
|
};
|
|
843
|
-
protoOf(RealSource).
|
|
843
|
+
protoOf(RealSource).aq = function (sink, byteCount) {
|
|
844
844
|
try {
|
|
845
|
-
this.
|
|
845
|
+
this.zo(byteCount);
|
|
846
846
|
} catch ($p) {
|
|
847
847
|
if ($p instanceof EOFException) {
|
|
848
848
|
var e = $p;
|
|
849
|
-
sink.
|
|
849
|
+
sink.zp(this.gr_1, this.gr_1.u());
|
|
850
850
|
throw e;
|
|
851
851
|
} else {
|
|
852
852
|
throw $p;
|
|
853
853
|
}
|
|
854
854
|
}
|
|
855
|
-
this.
|
|
855
|
+
this.gr_1.aq(sink, byteCount);
|
|
856
856
|
};
|
|
857
|
-
protoOf(RealSource).
|
|
857
|
+
protoOf(RealSource).bq = function (sink) {
|
|
858
858
|
var totalBytesWritten = new Long(0, 0);
|
|
859
|
-
while (!equalsLong(this.
|
|
860
|
-
var emitByteCount = this.
|
|
859
|
+
while (!equalsLong(this.er_1.yp(this.gr_1, new Long(8192, 0)), new Long(-1, -1))) {
|
|
860
|
+
var emitByteCount = this.gr_1.sp();
|
|
861
861
|
if (compare(emitByteCount, new Long(0, 0)) > 0) {
|
|
862
862
|
totalBytesWritten = add(totalBytesWritten, emitByteCount);
|
|
863
|
-
sink.
|
|
863
|
+
sink.zp(this.gr_1, emitByteCount);
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
|
-
if (compare(this.
|
|
867
|
-
totalBytesWritten = add(totalBytesWritten, this.
|
|
868
|
-
sink.
|
|
866
|
+
if (compare(this.gr_1.u(), new Long(0, 0)) > 0) {
|
|
867
|
+
totalBytesWritten = add(totalBytesWritten, this.gr_1.u());
|
|
868
|
+
sink.zp(this.gr_1, this.gr_1.u());
|
|
869
869
|
}
|
|
870
870
|
return totalBytesWritten;
|
|
871
871
|
};
|
|
872
|
-
protoOf(RealSource).
|
|
873
|
-
this.
|
|
874
|
-
return this.
|
|
872
|
+
protoOf(RealSource).lp = function () {
|
|
873
|
+
this.zo(new Long(2, 0));
|
|
874
|
+
return this.gr_1.lp();
|
|
875
875
|
};
|
|
876
|
-
protoOf(RealSource).
|
|
876
|
+
protoOf(RealSource).cq = function () {
|
|
877
877
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
878
878
|
// Inline function 'kotlin.check' call
|
|
879
|
-
if (!!this.
|
|
879
|
+
if (!!this.fr_1) {
|
|
880
880
|
var message = 'Source is closed.';
|
|
881
881
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
882
882
|
}
|
|
883
883
|
return buffered(new PeekSource(this));
|
|
884
884
|
};
|
|
885
885
|
protoOf(RealSource).b4 = function () {
|
|
886
|
-
if (this.
|
|
886
|
+
if (this.fr_1)
|
|
887
887
|
return Unit_instance;
|
|
888
|
-
this.
|
|
889
|
-
this.
|
|
890
|
-
this.
|
|
888
|
+
this.fr_1 = true;
|
|
889
|
+
this.er_1.b4();
|
|
890
|
+
this.gr_1.b2();
|
|
891
891
|
};
|
|
892
892
|
protoOf(RealSource).toString = function () {
|
|
893
|
-
return 'buffered(' + toString(this.
|
|
893
|
+
return 'buffered(' + toString(this.er_1) + ')';
|
|
894
894
|
};
|
|
895
895
|
function Segment_init_$Init$($this) {
|
|
896
896
|
Segment.call($this);
|
|
897
|
-
$this.
|
|
898
|
-
$this.
|
|
899
|
-
$this.
|
|
897
|
+
$this.cp_1 = new Int8Array(8192);
|
|
898
|
+
$this.gp_1 = true;
|
|
899
|
+
$this.fp_1 = null;
|
|
900
900
|
return $this;
|
|
901
901
|
}
|
|
902
902
|
function Segment_init_$Create$() {
|
|
@@ -904,87 +904,87 @@
|
|
|
904
904
|
}
|
|
905
905
|
function Segment_init_$Init$_0(data, pos, limit, shareToken, owner, $this) {
|
|
906
906
|
Segment.call($this);
|
|
907
|
-
$this.
|
|
908
|
-
$this.
|
|
909
|
-
$this.
|
|
910
|
-
$this.
|
|
911
|
-
$this.
|
|
907
|
+
$this.cp_1 = data;
|
|
908
|
+
$this.dp_1 = pos;
|
|
909
|
+
$this.ep_1 = limit;
|
|
910
|
+
$this.fp_1 = shareToken;
|
|
911
|
+
$this.gp_1 = owner;
|
|
912
912
|
return $this;
|
|
913
913
|
}
|
|
914
914
|
function Segment_init_$Create$_0(data, pos, limit, shareToken, owner) {
|
|
915
915
|
return Segment_init_$Init$_0(data, pos, limit, shareToken, owner, objectCreate(protoOf(Segment)));
|
|
916
916
|
}
|
|
917
917
|
function Companion() {
|
|
918
|
-
this.
|
|
919
|
-
this.
|
|
918
|
+
this.hr_1 = 8192;
|
|
919
|
+
this.ir_1 = 1024;
|
|
920
920
|
}
|
|
921
|
-
protoOf(Companion).
|
|
921
|
+
protoOf(Companion).jr = function () {
|
|
922
922
|
return Segment_init_$Create$();
|
|
923
923
|
};
|
|
924
924
|
var Companion_instance;
|
|
925
925
|
function Companion_getInstance() {
|
|
926
926
|
return Companion_instance;
|
|
927
927
|
}
|
|
928
|
-
protoOf(Segment).
|
|
929
|
-
var tmp0_safe_receiver = this.
|
|
930
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
928
|
+
protoOf(Segment).mq = function () {
|
|
929
|
+
var tmp0_safe_receiver = this.fp_1;
|
|
930
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kr();
|
|
931
931
|
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
|
|
932
932
|
};
|
|
933
|
-
protoOf(Segment).
|
|
934
|
-
var tmp0_elvis_lhs = this.
|
|
933
|
+
protoOf(Segment).pp = function () {
|
|
934
|
+
var tmp0_elvis_lhs = this.fp_1;
|
|
935
935
|
var tmp;
|
|
936
936
|
if (tmp0_elvis_lhs == null) {
|
|
937
937
|
// Inline function 'kotlin.also' call
|
|
938
|
-
var this_0 = SegmentPool_instance.
|
|
939
|
-
this.
|
|
938
|
+
var this_0 = SegmentPool_instance.lr();
|
|
939
|
+
this.fp_1 = this_0;
|
|
940
940
|
tmp = this_0;
|
|
941
941
|
} else {
|
|
942
942
|
tmp = tmp0_elvis_lhs;
|
|
943
943
|
}
|
|
944
944
|
var t = tmp;
|
|
945
|
-
var tmp_0 = this.
|
|
946
|
-
var tmp_1 = this.
|
|
945
|
+
var tmp_0 = this.dp_1;
|
|
946
|
+
var tmp_1 = this.ep_1;
|
|
947
947
|
// Inline function 'kotlin.also' call
|
|
948
|
-
t.
|
|
949
|
-
return Segment_init_$Create$_0(this.
|
|
948
|
+
t.mr();
|
|
949
|
+
return Segment_init_$Create$_0(this.cp_1, tmp_0, tmp_1, t, false);
|
|
950
950
|
};
|
|
951
|
-
protoOf(Segment).
|
|
952
|
-
var result = this.
|
|
953
|
-
if (!(this.
|
|
954
|
-
ensureNotNull(this.
|
|
951
|
+
protoOf(Segment).pq = function () {
|
|
952
|
+
var result = this.hp_1;
|
|
953
|
+
if (!(this.ip_1 == null)) {
|
|
954
|
+
ensureNotNull(this.ip_1).hp_1 = this.hp_1;
|
|
955
955
|
}
|
|
956
|
-
if (!(this.
|
|
957
|
-
ensureNotNull(this.
|
|
956
|
+
if (!(this.hp_1 == null)) {
|
|
957
|
+
ensureNotNull(this.hp_1).ip_1 = this.ip_1;
|
|
958
958
|
}
|
|
959
|
-
this.
|
|
960
|
-
this.
|
|
959
|
+
this.hp_1 = null;
|
|
960
|
+
this.ip_1 = null;
|
|
961
961
|
return result;
|
|
962
962
|
};
|
|
963
|
-
protoOf(Segment).
|
|
964
|
-
segment.
|
|
965
|
-
segment.
|
|
966
|
-
if (!(this.
|
|
967
|
-
ensureNotNull(this.
|
|
963
|
+
protoOf(Segment).qp = function (segment) {
|
|
964
|
+
segment.ip_1 = this;
|
|
965
|
+
segment.hp_1 = this.hp_1;
|
|
966
|
+
if (!(this.hp_1 == null)) {
|
|
967
|
+
ensureNotNull(this.hp_1).ip_1 = segment;
|
|
968
968
|
}
|
|
969
|
-
this.
|
|
969
|
+
this.hp_1 = segment;
|
|
970
970
|
return segment;
|
|
971
971
|
};
|
|
972
|
-
protoOf(Segment).
|
|
972
|
+
protoOf(Segment).nq = function (byteCount) {
|
|
973
973
|
// Inline function 'kotlin.require' call
|
|
974
|
-
if (!(byteCount > 0 && byteCount <= (this.
|
|
974
|
+
if (!(byteCount > 0 && byteCount <= (this.ep_1 - this.dp_1 | 0))) {
|
|
975
975
|
var message = 'byteCount out of range';
|
|
976
976
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
977
977
|
}
|
|
978
978
|
var prefix;
|
|
979
979
|
if (byteCount >= 1024) {
|
|
980
|
-
prefix = this.
|
|
980
|
+
prefix = this.pp();
|
|
981
981
|
} else {
|
|
982
|
-
prefix = SegmentPool_instance.
|
|
983
|
-
var tmp0 = this.
|
|
984
|
-
var tmp2 = prefix.
|
|
985
|
-
var tmp4 = this.
|
|
982
|
+
prefix = SegmentPool_instance.gq();
|
|
983
|
+
var tmp0 = this.cp_1;
|
|
984
|
+
var tmp2 = prefix.cp_1;
|
|
985
|
+
var tmp4 = this.dp_1;
|
|
986
986
|
// Inline function 'kotlin.collections.copyInto' call
|
|
987
|
-
var endIndex = this.
|
|
987
|
+
var endIndex = this.dp_1 + byteCount | 0;
|
|
988
988
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
989
989
|
// Inline function 'kotlin.js.asDynamic' call
|
|
990
990
|
var tmp = tmp0;
|
|
@@ -992,62 +992,62 @@
|
|
|
992
992
|
// Inline function 'kotlin.js.asDynamic' call
|
|
993
993
|
arrayCopy(tmp, tmp2, 0, tmp4, endIndex);
|
|
994
994
|
}
|
|
995
|
-
prefix.
|
|
996
|
-
this.
|
|
997
|
-
if (!(this.
|
|
998
|
-
ensureNotNull(this.
|
|
995
|
+
prefix.ep_1 = prefix.dp_1 + byteCount | 0;
|
|
996
|
+
this.dp_1 = this.dp_1 + byteCount | 0;
|
|
997
|
+
if (!(this.ip_1 == null)) {
|
|
998
|
+
ensureNotNull(this.ip_1).qp(prefix);
|
|
999
999
|
} else {
|
|
1000
|
-
prefix.
|
|
1001
|
-
this.
|
|
1000
|
+
prefix.hp_1 = this;
|
|
1001
|
+
this.ip_1 = prefix;
|
|
1002
1002
|
}
|
|
1003
1003
|
return prefix;
|
|
1004
1004
|
};
|
|
1005
|
-
protoOf(Segment).
|
|
1005
|
+
protoOf(Segment).rp = function () {
|
|
1006
1006
|
// Inline function 'kotlin.check' call
|
|
1007
|
-
if (!!(this.
|
|
1007
|
+
if (!!(this.ip_1 == null)) {
|
|
1008
1008
|
var message = 'cannot compact';
|
|
1009
1009
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1010
1010
|
}
|
|
1011
|
-
if (!ensureNotNull(this.
|
|
1011
|
+
if (!ensureNotNull(this.ip_1).gp_1)
|
|
1012
1012
|
return this;
|
|
1013
|
-
var byteCount = this.
|
|
1014
|
-
var availableByteCount = (8192 - ensureNotNull(this.
|
|
1013
|
+
var byteCount = this.ep_1 - this.dp_1 | 0;
|
|
1014
|
+
var availableByteCount = (8192 - ensureNotNull(this.ip_1).ep_1 | 0) + (ensureNotNull(this.ip_1).mq() ? 0 : ensureNotNull(this.ip_1).dp_1) | 0;
|
|
1015
1015
|
if (byteCount > availableByteCount)
|
|
1016
1016
|
return this;
|
|
1017
|
-
var predecessor = this.
|
|
1018
|
-
this.
|
|
1019
|
-
var successor = this.
|
|
1017
|
+
var predecessor = this.ip_1;
|
|
1018
|
+
this.oq(ensureNotNull(predecessor), byteCount);
|
|
1019
|
+
var successor = this.pq();
|
|
1020
1020
|
// Inline function 'kotlin.check' call
|
|
1021
1021
|
if (!(successor == null)) {
|
|
1022
1022
|
throw IllegalStateException_init_$Create$('Check failed.');
|
|
1023
1023
|
}
|
|
1024
|
-
SegmentPool_instance.
|
|
1024
|
+
SegmentPool_instance.wq(this);
|
|
1025
1025
|
return predecessor;
|
|
1026
1026
|
};
|
|
1027
|
-
protoOf(Segment).
|
|
1028
|
-
var _unary__edvuaz = this.
|
|
1029
|
-
this.
|
|
1030
|
-
this.
|
|
1027
|
+
protoOf(Segment).sq = function (byte) {
|
|
1028
|
+
var _unary__edvuaz = this.ep_1;
|
|
1029
|
+
this.ep_1 = _unary__edvuaz + 1 | 0;
|
|
1030
|
+
this.cp_1[_unary__edvuaz] = byte;
|
|
1031
1031
|
};
|
|
1032
|
-
protoOf(Segment).
|
|
1033
|
-
var data = this.
|
|
1034
|
-
var limit = this.
|
|
1032
|
+
protoOf(Segment).uq = function (short) {
|
|
1033
|
+
var data = this.cp_1;
|
|
1034
|
+
var limit = this.ep_1;
|
|
1035
1035
|
var _unary__edvuaz = limit;
|
|
1036
1036
|
limit = _unary__edvuaz + 1 | 0;
|
|
1037
1037
|
data[_unary__edvuaz] = toByte((short >>> 8 | 0) & 255);
|
|
1038
1038
|
var _unary__edvuaz_0 = limit;
|
|
1039
1039
|
limit = _unary__edvuaz_0 + 1 | 0;
|
|
1040
1040
|
data[_unary__edvuaz_0] = toByte(short & 255);
|
|
1041
|
-
this.
|
|
1041
|
+
this.ep_1 = limit;
|
|
1042
1042
|
};
|
|
1043
|
-
protoOf(Segment).
|
|
1044
|
-
var _unary__edvuaz = this.
|
|
1045
|
-
this.
|
|
1046
|
-
return this.
|
|
1043
|
+
protoOf(Segment).kp = function () {
|
|
1044
|
+
var _unary__edvuaz = this.dp_1;
|
|
1045
|
+
this.dp_1 = _unary__edvuaz + 1 | 0;
|
|
1046
|
+
return this.cp_1[_unary__edvuaz];
|
|
1047
1047
|
};
|
|
1048
|
-
protoOf(Segment).
|
|
1049
|
-
var data = this.
|
|
1050
|
-
var pos = this.
|
|
1048
|
+
protoOf(Segment).mp = function () {
|
|
1049
|
+
var data = this.cp_1;
|
|
1050
|
+
var pos = this.dp_1;
|
|
1051
1051
|
var _unary__edvuaz = pos;
|
|
1052
1052
|
pos = _unary__edvuaz + 1 | 0;
|
|
1053
1053
|
// Inline function 'kotlinx.io.and' call
|
|
@@ -1057,118 +1057,118 @@
|
|
|
1057
1057
|
// Inline function 'kotlinx.io.and' call
|
|
1058
1058
|
var tmp$ret$1 = data[_unary__edvuaz_0] & 255;
|
|
1059
1059
|
var s = toShort(tmp | tmp$ret$1);
|
|
1060
|
-
this.
|
|
1060
|
+
this.dp_1 = pos;
|
|
1061
1061
|
return s;
|
|
1062
1062
|
};
|
|
1063
|
-
protoOf(Segment).
|
|
1063
|
+
protoOf(Segment).oq = function (sink, byteCount) {
|
|
1064
1064
|
// Inline function 'kotlin.check' call
|
|
1065
|
-
if (!sink.
|
|
1065
|
+
if (!sink.gp_1) {
|
|
1066
1066
|
var message = 'only owner can write';
|
|
1067
1067
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1068
1068
|
}
|
|
1069
|
-
if ((sink.
|
|
1070
|
-
if (sink.
|
|
1069
|
+
if ((sink.ep_1 + byteCount | 0) > 8192) {
|
|
1070
|
+
if (sink.mq())
|
|
1071
1071
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1072
|
-
if (((sink.
|
|
1072
|
+
if (((sink.ep_1 + byteCount | 0) - sink.dp_1 | 0) > 8192)
|
|
1073
1073
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1074
|
-
var tmp0 = sink.
|
|
1075
|
-
var tmp2 = sink.
|
|
1076
|
-
var tmp4 = sink.
|
|
1074
|
+
var tmp0 = sink.cp_1;
|
|
1075
|
+
var tmp2 = sink.cp_1;
|
|
1076
|
+
var tmp4 = sink.dp_1;
|
|
1077
1077
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1078
|
-
var endIndex = sink.
|
|
1078
|
+
var endIndex = sink.ep_1;
|
|
1079
1079
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1080
1080
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1081
1081
|
var tmp = tmp0;
|
|
1082
1082
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1083
1083
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1084
1084
|
arrayCopy(tmp, tmp2, 0, tmp4, endIndex);
|
|
1085
|
-
sink.
|
|
1086
|
-
sink.
|
|
1085
|
+
sink.ep_1 = sink.ep_1 - sink.dp_1 | 0;
|
|
1086
|
+
sink.dp_1 = 0;
|
|
1087
1087
|
}
|
|
1088
|
-
var tmp0_0 = this.
|
|
1089
|
-
var tmp2_0 = sink.
|
|
1090
|
-
var tmp4_0 = sink.
|
|
1091
|
-
var tmp6 = this.
|
|
1088
|
+
var tmp0_0 = this.cp_1;
|
|
1089
|
+
var tmp2_0 = sink.cp_1;
|
|
1090
|
+
var tmp4_0 = sink.ep_1;
|
|
1091
|
+
var tmp6 = this.dp_1;
|
|
1092
1092
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1093
|
-
var endIndex_0 = this.
|
|
1093
|
+
var endIndex_0 = this.dp_1 + byteCount | 0;
|
|
1094
1094
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1095
1095
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1096
1096
|
var tmp_0 = tmp0_0;
|
|
1097
1097
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1098
1098
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1099
1099
|
arrayCopy(tmp_0, tmp2_0, tmp4_0, tmp6, endIndex_0);
|
|
1100
|
-
sink.
|
|
1101
|
-
this.
|
|
1100
|
+
sink.ep_1 = sink.ep_1 + byteCount | 0;
|
|
1101
|
+
this.dp_1 = this.dp_1 + byteCount | 0;
|
|
1102
1102
|
};
|
|
1103
|
-
protoOf(Segment).
|
|
1103
|
+
protoOf(Segment).xp = function (dst, dstStartOffset, dstEndOffset) {
|
|
1104
1104
|
var len = dstEndOffset - dstStartOffset | 0;
|
|
1105
|
-
var tmp0 = this.
|
|
1106
|
-
var tmp6 = this.
|
|
1105
|
+
var tmp0 = this.cp_1;
|
|
1106
|
+
var tmp6 = this.dp_1;
|
|
1107
1107
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1108
|
-
var endIndex = this.
|
|
1108
|
+
var endIndex = this.dp_1 + len | 0;
|
|
1109
1109
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1110
1110
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1111
1111
|
var tmp = tmp0;
|
|
1112
1112
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1113
1113
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1114
1114
|
arrayCopy(tmp, dst, dstStartOffset, tmp6, endIndex);
|
|
1115
|
-
this.
|
|
1115
|
+
this.dp_1 = this.dp_1 + len | 0;
|
|
1116
1116
|
};
|
|
1117
|
-
protoOf(Segment).
|
|
1118
|
-
var tmp2 = this.
|
|
1117
|
+
protoOf(Segment).jq = function (src, srcStartOffset, srcEndOffset) {
|
|
1118
|
+
var tmp2 = this.cp_1;
|
|
1119
1119
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1120
|
-
var destinationOffset = this.
|
|
1120
|
+
var destinationOffset = this.ep_1;
|
|
1121
1121
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1122
1122
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1123
1123
|
var tmp = src;
|
|
1124
1124
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1125
1125
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1126
1126
|
arrayCopy(tmp, tmp2, destinationOffset, srcStartOffset, srcEndOffset);
|
|
1127
|
-
this.
|
|
1127
|
+
this.ep_1 = this.ep_1 + (srcEndOffset - srcStartOffset | 0) | 0;
|
|
1128
1128
|
};
|
|
1129
1129
|
protoOf(Segment).u = function () {
|
|
1130
|
-
return this.
|
|
1130
|
+
return this.ep_1 - this.dp_1 | 0;
|
|
1131
1131
|
};
|
|
1132
|
-
protoOf(Segment).
|
|
1133
|
-
return this.
|
|
1132
|
+
protoOf(Segment).iq = function () {
|
|
1133
|
+
return this.cp_1.length - this.ep_1 | 0;
|
|
1134
1134
|
};
|
|
1135
|
-
protoOf(Segment).
|
|
1136
|
-
return this.
|
|
1135
|
+
protoOf(Segment).nr = function (readOnly) {
|
|
1136
|
+
return this.cp_1;
|
|
1137
1137
|
};
|
|
1138
|
-
protoOf(Segment).
|
|
1139
|
-
return this.
|
|
1138
|
+
protoOf(Segment).up = function (index) {
|
|
1139
|
+
return this.cp_1[this.dp_1 + index | 0];
|
|
1140
1140
|
};
|
|
1141
|
-
protoOf(Segment).
|
|
1142
|
-
this.
|
|
1141
|
+
protoOf(Segment).or = function (index, value) {
|
|
1142
|
+
this.cp_1[this.ep_1 + index | 0] = value;
|
|
1143
1143
|
};
|
|
1144
|
-
protoOf(Segment).
|
|
1145
|
-
var d = this.
|
|
1146
|
-
var l = this.
|
|
1144
|
+
protoOf(Segment).pr = function (index, b0, b1) {
|
|
1145
|
+
var d = this.cp_1;
|
|
1146
|
+
var l = this.ep_1;
|
|
1147
1147
|
d[l + index | 0] = b0;
|
|
1148
1148
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1149
1149
|
};
|
|
1150
|
-
protoOf(Segment).
|
|
1151
|
-
var d = this.
|
|
1152
|
-
var l = this.
|
|
1150
|
+
protoOf(Segment).qr = function (index, b0, b1, b2) {
|
|
1151
|
+
var d = this.cp_1;
|
|
1152
|
+
var l = this.ep_1;
|
|
1153
1153
|
d[l + index | 0] = b0;
|
|
1154
1154
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1155
1155
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1156
1156
|
};
|
|
1157
|
-
protoOf(Segment).
|
|
1158
|
-
var d = this.
|
|
1159
|
-
var l = this.
|
|
1157
|
+
protoOf(Segment).rr = function (index, b0, b1, b2, b3) {
|
|
1158
|
+
var d = this.cp_1;
|
|
1159
|
+
var l = this.ep_1;
|
|
1160
1160
|
d[l + index | 0] = b0;
|
|
1161
1161
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1162
1162
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1163
1163
|
d[(l + index | 0) + 3 | 0] = b3;
|
|
1164
1164
|
};
|
|
1165
1165
|
function Segment() {
|
|
1166
|
-
this.
|
|
1167
|
-
this.
|
|
1168
|
-
this.
|
|
1169
|
-
this.
|
|
1170
|
-
this.
|
|
1171
|
-
this.
|
|
1166
|
+
this.dp_1 = 0;
|
|
1167
|
+
this.ep_1 = 0;
|
|
1168
|
+
this.fp_1 = null;
|
|
1169
|
+
this.gp_1 = false;
|
|
1170
|
+
this.hp_1 = null;
|
|
1171
|
+
this.ip_1 = null;
|
|
1172
1172
|
}
|
|
1173
1173
|
function isEmpty(_this__u8e3s4) {
|
|
1174
1174
|
return _this__u8e3s4.u() === 0;
|
|
@@ -1179,10 +1179,10 @@
|
|
|
1179
1179
|
AlwaysSharedCopyTracker_instance = this;
|
|
1180
1180
|
SegmentCopyTracker.call(this);
|
|
1181
1181
|
}
|
|
1182
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1182
|
+
protoOf(AlwaysSharedCopyTracker).kr = function () {
|
|
1183
1183
|
return true;
|
|
1184
1184
|
};
|
|
1185
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1185
|
+
protoOf(AlwaysSharedCopyTracker).mr = function () {
|
|
1186
1186
|
return Unit_instance;
|
|
1187
1187
|
};
|
|
1188
1188
|
var AlwaysSharedCopyTracker_instance;
|
|
@@ -1202,8 +1202,8 @@
|
|
|
1202
1202
|
var message_0 = '' + endOffset;
|
|
1203
1203
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1204
1204
|
}
|
|
1205
|
-
var p = _this__u8e3s4.
|
|
1206
|
-
var data = _this__u8e3s4.
|
|
1205
|
+
var p = _this__u8e3s4.dp_1;
|
|
1206
|
+
var data = _this__u8e3s4.nr(true);
|
|
1207
1207
|
var inductionVariable = startOffset;
|
|
1208
1208
|
if (inductionVariable < endOffset)
|
|
1209
1209
|
do {
|
|
@@ -1256,23 +1256,23 @@
|
|
|
1256
1256
|
// Inline function 'kotlin.Long.plus' call
|
|
1257
1257
|
var this_0 = offset;
|
|
1258
1258
|
var tmp$ret$2 = add(this_0, fromInt(1));
|
|
1259
|
-
tmp_0 = _this__u8e3s4.
|
|
1259
|
+
tmp_0 = _this__u8e3s4.ap(tmp$ret$2);
|
|
1260
1260
|
} else {
|
|
1261
1261
|
tmp_0 = false;
|
|
1262
1262
|
}
|
|
1263
1263
|
if (!tmp_0) {
|
|
1264
1264
|
break $l$loop;
|
|
1265
1265
|
}
|
|
1266
|
-
var tmp_1 = _this__u8e3s4.
|
|
1266
|
+
var tmp_1 = _this__u8e3s4.xo();
|
|
1267
1267
|
var tmp_2 = offset;
|
|
1268
1268
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1269
|
-
var b = _this__u8e3s4.
|
|
1269
|
+
var b = _this__u8e3s4.xo().u();
|
|
1270
1270
|
var tmp$ret$3 = compare(endIndex, b) <= 0 ? endIndex : b;
|
|
1271
1271
|
var idx = indexOf(tmp_1, byte, tmp_2, tmp$ret$3);
|
|
1272
1272
|
if (!equalsLong(idx, new Long(-1, -1))) {
|
|
1273
1273
|
return idx;
|
|
1274
1274
|
}
|
|
1275
|
-
offset = _this__u8e3s4.
|
|
1275
|
+
offset = _this__u8e3s4.xo().u();
|
|
1276
1276
|
}
|
|
1277
1277
|
return new Long(-1, -1);
|
|
1278
1278
|
}
|
|
@@ -1280,22 +1280,22 @@
|
|
|
1280
1280
|
var arraySize = size;
|
|
1281
1281
|
if (size === -1) {
|
|
1282
1282
|
var fetchSize = new Long(2147483647, 0);
|
|
1283
|
-
while (compare(_this__u8e3s4.
|
|
1283
|
+
while (compare(_this__u8e3s4.xo().u(), new Long(2147483647, 0)) < 0 && _this__u8e3s4.ap(fetchSize)) {
|
|
1284
1284
|
// Inline function 'kotlin.Long.times' call
|
|
1285
1285
|
var this_0 = fetchSize;
|
|
1286
1286
|
fetchSize = multiply(this_0, fromInt(2));
|
|
1287
1287
|
}
|
|
1288
1288
|
// Inline function 'kotlin.check' call
|
|
1289
|
-
if (!(compare(_this__u8e3s4.
|
|
1290
|
-
var message = "Can't create an array of size " + _this__u8e3s4.
|
|
1289
|
+
if (!(compare(_this__u8e3s4.xo().u(), new Long(2147483647, 0)) < 0)) {
|
|
1290
|
+
var message = "Can't create an array of size " + _this__u8e3s4.xo().u().toString();
|
|
1291
1291
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1292
1292
|
}
|
|
1293
|
-
arraySize = convertToInt(_this__u8e3s4.
|
|
1293
|
+
arraySize = convertToInt(_this__u8e3s4.xo().u());
|
|
1294
1294
|
} else {
|
|
1295
|
-
_this__u8e3s4.
|
|
1295
|
+
_this__u8e3s4.zo(fromInt(size));
|
|
1296
1296
|
}
|
|
1297
1297
|
var array = new Int8Array(arraySize);
|
|
1298
|
-
readTo(_this__u8e3s4.
|
|
1298
|
+
readTo(_this__u8e3s4.xo(), array);
|
|
1299
1299
|
return array;
|
|
1300
1300
|
}
|
|
1301
1301
|
function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
@@ -1306,7 +1306,7 @@
|
|
|
1306
1306
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1307
1307
|
var offset = startIndex;
|
|
1308
1308
|
while (offset < endIndex) {
|
|
1309
|
-
var bytesRead = _this__u8e3s4.
|
|
1309
|
+
var bytesRead = _this__u8e3s4.wp(sink, offset, endIndex);
|
|
1310
1310
|
if (bytesRead === -1) {
|
|
1311
1311
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + (endIndex - startIndex | 0) + ' bytes. ' + ('Only ' + bytesRead + ' bytes were read.'));
|
|
1312
1312
|
}
|
|
@@ -1317,12 +1317,12 @@
|
|
|
1317
1317
|
return commonReadUtf8(_this__u8e3s4, _this__u8e3s4.u());
|
|
1318
1318
|
}
|
|
1319
1319
|
function readString_0(_this__u8e3s4) {
|
|
1320
|
-
_this__u8e3s4.
|
|
1321
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
1320
|
+
_this__u8e3s4.ap(new Long(-1, 2147483647));
|
|
1321
|
+
return commonReadUtf8(_this__u8e3s4.xo(), _this__u8e3s4.xo().u());
|
|
1322
1322
|
}
|
|
1323
1323
|
function readString_1(_this__u8e3s4, byteCount) {
|
|
1324
|
-
_this__u8e3s4.
|
|
1325
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
1324
|
+
_this__u8e3s4.zo(byteCount);
|
|
1325
|
+
return commonReadUtf8(_this__u8e3s4.xo(), byteCount);
|
|
1326
1326
|
}
|
|
1327
1327
|
function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
1328
1328
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
@@ -1332,7 +1332,7 @@
|
|
|
1332
1332
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1333
1333
|
// Inline function 'kotlinx.io.writeToInternalBuffer' call
|
|
1334
1334
|
// Inline function 'kotlinx.io.commonWriteUtf8' call
|
|
1335
|
-
var this_0 = _this__u8e3s4.
|
|
1335
|
+
var this_0 = _this__u8e3s4.xo();
|
|
1336
1336
|
var i = startIndex;
|
|
1337
1337
|
while (i < endIndex) {
|
|
1338
1338
|
var p0 = i;
|
|
@@ -1342,15 +1342,15 @@
|
|
|
1342
1342
|
if (c < 128) {
|
|
1343
1343
|
$l$block_0: {
|
|
1344
1344
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1345
|
-
var tail = this_0.
|
|
1345
|
+
var tail = this_0.dq(1);
|
|
1346
1346
|
var ctx = get_SegmentWriteContextImpl();
|
|
1347
1347
|
var segmentOffset = -i | 0;
|
|
1348
1348
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1349
|
-
var b = i + tail.
|
|
1349
|
+
var b = i + tail.iq() | 0;
|
|
1350
1350
|
var runLimit = Math.min(endIndex, b);
|
|
1351
1351
|
var _unary__edvuaz = i;
|
|
1352
1352
|
i = _unary__edvuaz + 1 | 0;
|
|
1353
|
-
ctx.
|
|
1353
|
+
ctx.vr(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
|
|
1354
1354
|
$l$loop: while (i < runLimit) {
|
|
1355
1355
|
var p0_0 = i;
|
|
1356
1356
|
// Inline function 'kotlin.code' call
|
|
@@ -1360,95 +1360,95 @@
|
|
|
1360
1360
|
break $l$loop;
|
|
1361
1361
|
var _unary__edvuaz_0 = i;
|
|
1362
1362
|
i = _unary__edvuaz_0 + 1 | 0;
|
|
1363
|
-
ctx.
|
|
1363
|
+
ctx.vr(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
|
|
1364
1364
|
}
|
|
1365
1365
|
var bytesWritten = i + segmentOffset | 0;
|
|
1366
1366
|
if (bytesWritten === 1) {
|
|
1367
|
-
tail.
|
|
1367
|
+
tail.ep_1 = tail.ep_1 + bytesWritten | 0;
|
|
1368
1368
|
var tmp = this_0;
|
|
1369
1369
|
// Inline function 'kotlin.Long.plus' call
|
|
1370
|
-
var this_3 = this_0.
|
|
1371
|
-
tmp.
|
|
1370
|
+
var this_3 = this_0.wo_1;
|
|
1371
|
+
tmp.wo_1 = add(this_3, fromInt(bytesWritten));
|
|
1372
1372
|
break $l$block_0;
|
|
1373
1373
|
}
|
|
1374
1374
|
// Inline function 'kotlin.check' call
|
|
1375
|
-
if (!(0 <= bytesWritten ? bytesWritten <= tail.
|
|
1376
|
-
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.
|
|
1375
|
+
if (!(0 <= bytesWritten ? bytesWritten <= tail.iq() : false)) {
|
|
1376
|
+
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.iq();
|
|
1377
1377
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1378
1378
|
}
|
|
1379
1379
|
if (!(bytesWritten === 0)) {
|
|
1380
|
-
tail.
|
|
1380
|
+
tail.ep_1 = tail.ep_1 + bytesWritten | 0;
|
|
1381
1381
|
var tmp_0 = this_0;
|
|
1382
1382
|
// Inline function 'kotlin.Long.plus' call
|
|
1383
|
-
var this_4 = this_0.
|
|
1384
|
-
tmp_0.
|
|
1383
|
+
var this_4 = this_0.wo_1;
|
|
1384
|
+
tmp_0.wo_1 = add(this_4, fromInt(bytesWritten));
|
|
1385
1385
|
break $l$block_0;
|
|
1386
1386
|
}
|
|
1387
1387
|
if (isEmpty(tail)) {
|
|
1388
|
-
this_0.
|
|
1388
|
+
this_0.xq();
|
|
1389
1389
|
}
|
|
1390
1390
|
}
|
|
1391
1391
|
} else if (c < 2048) {
|
|
1392
1392
|
$l$block_2: {
|
|
1393
1393
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1394
|
-
var tail_0 = this_0.
|
|
1395
|
-
get_SegmentWriteContextImpl().
|
|
1394
|
+
var tail_0 = this_0.dq(2);
|
|
1395
|
+
get_SegmentWriteContextImpl().ur(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
1396
1396
|
var bytesWritten_0 = 2;
|
|
1397
1397
|
if (bytesWritten_0 === 2) {
|
|
1398
|
-
tail_0.
|
|
1398
|
+
tail_0.ep_1 = tail_0.ep_1 + bytesWritten_0 | 0;
|
|
1399
1399
|
var tmp_1 = this_0;
|
|
1400
1400
|
// Inline function 'kotlin.Long.plus' call
|
|
1401
|
-
var this_5 = this_0.
|
|
1402
|
-
tmp_1.
|
|
1401
|
+
var this_5 = this_0.wo_1;
|
|
1402
|
+
tmp_1.wo_1 = add(this_5, fromInt(bytesWritten_0));
|
|
1403
1403
|
break $l$block_2;
|
|
1404
1404
|
}
|
|
1405
1405
|
// Inline function 'kotlin.check' call
|
|
1406
|
-
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.
|
|
1407
|
-
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.
|
|
1406
|
+
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.iq() : false)) {
|
|
1407
|
+
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.iq();
|
|
1408
1408
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
1409
1409
|
}
|
|
1410
1410
|
if (!(bytesWritten_0 === 0)) {
|
|
1411
|
-
tail_0.
|
|
1411
|
+
tail_0.ep_1 = tail_0.ep_1 + bytesWritten_0 | 0;
|
|
1412
1412
|
var tmp_2 = this_0;
|
|
1413
1413
|
// Inline function 'kotlin.Long.plus' call
|
|
1414
|
-
var this_6 = this_0.
|
|
1415
|
-
tmp_2.
|
|
1414
|
+
var this_6 = this_0.wo_1;
|
|
1415
|
+
tmp_2.wo_1 = add(this_6, fromInt(bytesWritten_0));
|
|
1416
1416
|
break $l$block_2;
|
|
1417
1417
|
}
|
|
1418
1418
|
if (isEmpty(tail_0)) {
|
|
1419
|
-
this_0.
|
|
1419
|
+
this_0.xq();
|
|
1420
1420
|
}
|
|
1421
1421
|
}
|
|
1422
1422
|
i = i + 1 | 0;
|
|
1423
1423
|
} else if (c < 55296 || c > 57343) {
|
|
1424
1424
|
$l$block_4: {
|
|
1425
1425
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1426
|
-
var tail_1 = this_0.
|
|
1427
|
-
get_SegmentWriteContextImpl().
|
|
1426
|
+
var tail_1 = this_0.dq(3);
|
|
1427
|
+
get_SegmentWriteContextImpl().tr(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
1428
1428
|
var bytesWritten_1 = 3;
|
|
1429
1429
|
if (bytesWritten_1 === 3) {
|
|
1430
|
-
tail_1.
|
|
1430
|
+
tail_1.ep_1 = tail_1.ep_1 + bytesWritten_1 | 0;
|
|
1431
1431
|
var tmp_3 = this_0;
|
|
1432
1432
|
// Inline function 'kotlin.Long.plus' call
|
|
1433
|
-
var this_7 = this_0.
|
|
1434
|
-
tmp_3.
|
|
1433
|
+
var this_7 = this_0.wo_1;
|
|
1434
|
+
tmp_3.wo_1 = add(this_7, fromInt(bytesWritten_1));
|
|
1435
1435
|
break $l$block_4;
|
|
1436
1436
|
}
|
|
1437
1437
|
// Inline function 'kotlin.check' call
|
|
1438
|
-
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.
|
|
1439
|
-
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.
|
|
1438
|
+
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.iq() : false)) {
|
|
1439
|
+
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.iq();
|
|
1440
1440
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
1441
1441
|
}
|
|
1442
1442
|
if (!(bytesWritten_1 === 0)) {
|
|
1443
|
-
tail_1.
|
|
1443
|
+
tail_1.ep_1 = tail_1.ep_1 + bytesWritten_1 | 0;
|
|
1444
1444
|
var tmp_4 = this_0;
|
|
1445
1445
|
// Inline function 'kotlin.Long.plus' call
|
|
1446
|
-
var this_8 = this_0.
|
|
1447
|
-
tmp_4.
|
|
1446
|
+
var this_8 = this_0.wo_1;
|
|
1447
|
+
tmp_4.wo_1 = add(this_8, fromInt(bytesWritten_1));
|
|
1448
1448
|
break $l$block_4;
|
|
1449
1449
|
}
|
|
1450
1450
|
if (isEmpty(tail_1)) {
|
|
1451
|
-
this_0.
|
|
1451
|
+
this_0.xq();
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
1454
|
i = i + 1 | 0;
|
|
@@ -1467,64 +1467,64 @@
|
|
|
1467
1467
|
// Inline function 'kotlin.code' call
|
|
1468
1468
|
var this_10 = _Char___init__impl__6a9atx(63);
|
|
1469
1469
|
var tmp$ret$26 = Char__toInt_impl_vasixd(this_10);
|
|
1470
|
-
this_0.
|
|
1470
|
+
this_0.rq(toByte(tmp$ret$26));
|
|
1471
1471
|
i = i + 1 | 0;
|
|
1472
1472
|
} else {
|
|
1473
1473
|
var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
|
|
1474
1474
|
$l$block_6: {
|
|
1475
1475
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1476
|
-
var tail_2 = this_0.
|
|
1477
|
-
get_SegmentWriteContextImpl().
|
|
1476
|
+
var tail_2 = this_0.dq(4);
|
|
1477
|
+
get_SegmentWriteContextImpl().sr(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
1478
1478
|
var bytesWritten_2 = 4;
|
|
1479
1479
|
if (bytesWritten_2 === 4) {
|
|
1480
|
-
tail_2.
|
|
1480
|
+
tail_2.ep_1 = tail_2.ep_1 + bytesWritten_2 | 0;
|
|
1481
1481
|
var tmp_6 = this_0;
|
|
1482
1482
|
// Inline function 'kotlin.Long.plus' call
|
|
1483
|
-
var this_11 = this_0.
|
|
1484
|
-
tmp_6.
|
|
1483
|
+
var this_11 = this_0.wo_1;
|
|
1484
|
+
tmp_6.wo_1 = add(this_11, fromInt(bytesWritten_2));
|
|
1485
1485
|
break $l$block_6;
|
|
1486
1486
|
}
|
|
1487
1487
|
// Inline function 'kotlin.check' call
|
|
1488
|
-
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.
|
|
1489
|
-
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.
|
|
1488
|
+
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.iq() : false)) {
|
|
1489
|
+
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.iq();
|
|
1490
1490
|
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
1491
1491
|
}
|
|
1492
1492
|
if (!(bytesWritten_2 === 0)) {
|
|
1493
|
-
tail_2.
|
|
1493
|
+
tail_2.ep_1 = tail_2.ep_1 + bytesWritten_2 | 0;
|
|
1494
1494
|
var tmp_7 = this_0;
|
|
1495
1495
|
// Inline function 'kotlin.Long.plus' call
|
|
1496
|
-
var this_12 = this_0.
|
|
1497
|
-
tmp_7.
|
|
1496
|
+
var this_12 = this_0.wo_1;
|
|
1497
|
+
tmp_7.wo_1 = add(this_12, fromInt(bytesWritten_2));
|
|
1498
1498
|
break $l$block_6;
|
|
1499
1499
|
}
|
|
1500
1500
|
if (isEmpty(tail_2)) {
|
|
1501
|
-
this_0.
|
|
1501
|
+
this_0.xq();
|
|
1502
1502
|
}
|
|
1503
1503
|
}
|
|
1504
1504
|
i = i + 2 | 0;
|
|
1505
1505
|
}
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
|
-
_this__u8e3s4.
|
|
1508
|
+
_this__u8e3s4.np();
|
|
1509
1509
|
}
|
|
1510
1510
|
function commonReadUtf8(_this__u8e3s4, byteCount) {
|
|
1511
1511
|
if (equalsLong(byteCount, new Long(0, 0)))
|
|
1512
1512
|
return '';
|
|
1513
1513
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
1514
|
-
var curr = _this__u8e3s4.
|
|
1514
|
+
var curr = _this__u8e3s4.uo_1;
|
|
1515
1515
|
while (!(curr == null)) {
|
|
1516
1516
|
get_SegmentReadContextImpl();
|
|
1517
1517
|
if (compare(fromInt(curr.u()), byteCount) >= 0) {
|
|
1518
1518
|
var result = '';
|
|
1519
1519
|
// Inline function 'kotlinx.io.unsafe.withData' call
|
|
1520
|
-
var tmp0 = curr.
|
|
1521
|
-
var tmp2 = curr.
|
|
1522
|
-
var tmp0_0 = curr.
|
|
1520
|
+
var tmp0 = curr.nr(true);
|
|
1521
|
+
var tmp2 = curr.dp_1;
|
|
1522
|
+
var tmp0_0 = curr.ep_1;
|
|
1523
1523
|
// Inline function 'kotlin.math.min' call
|
|
1524
1524
|
var b = tmp2 + convertToInt(byteCount) | 0;
|
|
1525
1525
|
var tmp$ret$0 = Math.min(tmp0_0, b);
|
|
1526
1526
|
result = commonToUtf8String(tmp0, tmp2, tmp$ret$0);
|
|
1527
|
-
_this__u8e3s4.
|
|
1527
|
+
_this__u8e3s4.vp(byteCount);
|
|
1528
1528
|
return result;
|
|
1529
1529
|
}
|
|
1530
1530
|
return commonToUtf8String(readByteArray_0(_this__u8e3s4, convertToInt(byteCount)));
|
|
@@ -1895,27 +1895,27 @@
|
|
|
1895
1895
|
}
|
|
1896
1896
|
function SegmentReadContextImpl$1() {
|
|
1897
1897
|
}
|
|
1898
|
-
protoOf(SegmentReadContextImpl$1).
|
|
1899
|
-
return segment.
|
|
1898
|
+
protoOf(SegmentReadContextImpl$1).vq = function (segment, offset) {
|
|
1899
|
+
return segment.up(offset);
|
|
1900
1900
|
};
|
|
1901
1901
|
function SegmentWriteContextImpl$1() {
|
|
1902
1902
|
}
|
|
1903
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1904
|
-
segment.
|
|
1903
|
+
protoOf(SegmentWriteContextImpl$1).vr = function (segment, offset, value) {
|
|
1904
|
+
segment.or(offset, value);
|
|
1905
1905
|
};
|
|
1906
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1907
|
-
segment.
|
|
1906
|
+
protoOf(SegmentWriteContextImpl$1).ur = function (segment, offset, b0, b1) {
|
|
1907
|
+
segment.pr(offset, b0, b1);
|
|
1908
1908
|
};
|
|
1909
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1910
|
-
segment.
|
|
1909
|
+
protoOf(SegmentWriteContextImpl$1).tr = function (segment, offset, b0, b1, b2) {
|
|
1910
|
+
segment.qr(offset, b0, b1, b2);
|
|
1911
1911
|
};
|
|
1912
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1913
|
-
segment.
|
|
1912
|
+
protoOf(SegmentWriteContextImpl$1).sr = function (segment, offset, b0, b1, b2, b3) {
|
|
1913
|
+
segment.rr(offset, b0, b1, b2, b3);
|
|
1914
1914
|
};
|
|
1915
1915
|
function BufferIterationContextImpl$1() {
|
|
1916
1916
|
}
|
|
1917
|
-
protoOf(BufferIterationContextImpl$1).
|
|
1918
|
-
return get_SegmentReadContextImpl().
|
|
1917
|
+
protoOf(BufferIterationContextImpl$1).vq = function (segment, offset) {
|
|
1918
|
+
return get_SegmentReadContextImpl().vq(segment, offset);
|
|
1919
1919
|
};
|
|
1920
1920
|
var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
|
|
1921
1921
|
function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
@@ -1983,15 +1983,15 @@
|
|
|
1983
1983
|
captureStack(this, EOFException);
|
|
1984
1984
|
}
|
|
1985
1985
|
function SegmentPool() {
|
|
1986
|
-
this.
|
|
1987
|
-
this.
|
|
1986
|
+
this.eq_1 = 0;
|
|
1987
|
+
this.fq_1 = 0;
|
|
1988
1988
|
}
|
|
1989
|
-
protoOf(SegmentPool).
|
|
1990
|
-
return Companion_instance.
|
|
1989
|
+
protoOf(SegmentPool).gq = function () {
|
|
1990
|
+
return Companion_instance.jr();
|
|
1991
1991
|
};
|
|
1992
|
-
protoOf(SegmentPool).
|
|
1992
|
+
protoOf(SegmentPool).wq = function (segment) {
|
|
1993
1993
|
};
|
|
1994
|
-
protoOf(SegmentPool).
|
|
1994
|
+
protoOf(SegmentPool).lr = function () {
|
|
1995
1995
|
return AlwaysSharedCopyTracker_getInstance();
|
|
1996
1996
|
};
|
|
1997
1997
|
var SegmentPool_instance;
|
|
@@ -1999,7 +1999,7 @@
|
|
|
1999
1999
|
return SegmentPool_instance;
|
|
2000
2000
|
}
|
|
2001
2001
|
//region block: post-declaration
|
|
2002
|
-
protoOf(Buffer).
|
|
2002
|
+
protoOf(Buffer).kq = write$default;
|
|
2003
2003
|
//endregion
|
|
2004
2004
|
//region block: init
|
|
2005
2005
|
Companion_instance = new Companion();
|