@solibo/home-api 1.16.17 → 1.16.18
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-DateTime-library-kotlinx-datetime.mjs +964 -960
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -1
- package/MultiplatformSettings-multiplatform-settings-no-arg.mjs.map +1 -1
- package/MultiplatformSettings-multiplatform-settings.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +3712 -3533
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -1
- package/kotlinx-atomicfu.mjs +13 -13
- package/kotlinx-atomicfu.mjs.map +1 -1
- package/kotlinx-browser.mjs.map +1 -1
- package/kotlinx-coroutines-core.mjs +2054 -2054
- package/kotlinx-coroutines-core.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.mjs +57 -57
- package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-core.mjs +519 -519
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2285 -2286
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1713 -1711
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/ktor-ktor-client-auth.mjs.map +1 -1
- package/ktor-ktor-client-content-negotiation.mjs +452 -292
- package/ktor-ktor-client-content-negotiation.mjs.map +1 -1
- package/ktor-ktor-client-core.mjs +3486 -3378
- package/ktor-ktor-client-core.mjs.map +1 -1
- package/ktor-ktor-client-encoding.mjs.map +1 -1
- package/ktor-ktor-client-logging.mjs.map +1 -1
- package/ktor-ktor-client-websockets.mjs.map +1 -1
- package/ktor-ktor-events.mjs +7 -7
- package/ktor-ktor-events.mjs.map +1 -1
- package/ktor-ktor-http-cio.mjs +581 -581
- package/ktor-ktor-http-cio.mjs.map +1 -1
- package/ktor-ktor-http.mjs +1231 -1174
- package/ktor-ktor-http.mjs.map +1 -1
- package/ktor-ktor-io.mjs +1172 -1223
- package/ktor-ktor-io.mjs.map +1 -1
- package/ktor-ktor-openapi-schema.mjs +84 -0
- package/ktor-ktor-openapi-schema.mjs.map +1 -0
- package/ktor-ktor-serialization-kotlinx-json.mjs +9 -9
- package/ktor-ktor-serialization-kotlinx-json.mjs.map +1 -1
- package/ktor-ktor-serialization-kotlinx.mjs +216 -226
- package/ktor-ktor-serialization-kotlinx.mjs.map +1 -1
- package/ktor-ktor-serialization.mjs +111 -116
- package/ktor-ktor-serialization.mjs.map +1 -1
- package/ktor-ktor-sse.mjs.map +1 -1
- package/ktor-ktor-utils.mjs +1037 -983
- package/ktor-ktor-utils.mjs.map +1 -1
- package/ktor-ktor-websocket-serialization.mjs.map +1 -1
- package/ktor-ktor-websockets.mjs +925 -911
- package/ktor-ktor-websockets.mjs.map +1 -1
- package/package.json +1 -1
- package/solibo-sdk-sdk-home-api.d.mts +46 -46
- package/solibo-sdk-sdk-home-api.mjs +98430 -97370
- package/solibo-sdk-sdk-home-api.mjs.map +1 -1
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import {
|
|
2
|
-
IndexOutOfBoundsException_init_$Create$
|
|
3
|
-
IllegalArgumentException_init_$Create$
|
|
2
|
+
IndexOutOfBoundsException_init_$Create$k95f9vzk11af as IndexOutOfBoundsException_init_$Create$,
|
|
3
|
+
IllegalArgumentException_init_$Create$1gox8sdqs91jy as IllegalArgumentException_init_$Create$,
|
|
4
4
|
subtract2orl8z9upxd9l as subtract,
|
|
5
|
-
|
|
5
|
+
_Char___init__impl__6a9atxrzocepzq3zgi as _Char___init__impl__6a9atx,
|
|
6
6
|
charArrayOf27f4r3dozbrk1 as charArrayOf,
|
|
7
7
|
protoOf180f3jzyo7rfj as protoOf,
|
|
8
8
|
toString1pkumu07cwy4m as toString,
|
|
9
|
-
|
|
9
|
+
Unit_instance3kz1zqli6gr1r as Unit_instance,
|
|
10
10
|
toShort36kaw0zjdq3ex as toShort,
|
|
11
11
|
add2suhfggl4zvkk as add,
|
|
12
12
|
ensureNotNull1e947j3ixpazm as ensureNotNull,
|
|
13
13
|
fromInt2ii0rejb1w62w as fromInt,
|
|
14
14
|
convertToInty04h231mmjoh as convertToInt,
|
|
15
|
-
StringBuilder_init_$Create$
|
|
15
|
+
StringBuilder_init_$Create$yggnhbmai7wr as StringBuilder_init_$Create$,
|
|
16
16
|
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
17
17
|
VOID3gxj6tk5isa35 as VOID,
|
|
18
|
-
IllegalStateException_init_$Create$
|
|
18
|
+
IllegalStateException_init_$Create$38ax6c90susjc as IllegalStateException_init_$Create$,
|
|
19
19
|
AutoCloseable1l5p57f9lp7kv as AutoCloseable,
|
|
20
20
|
objectCreate1ve4bgxiu4x98 as objectCreate,
|
|
21
21
|
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
22
22
|
arrayCopytctsywo3h7gj as arrayCopy,
|
|
23
23
|
toByte4i43936u611k as toByte,
|
|
24
|
-
IllegalArgumentException_init_$Create$
|
|
24
|
+
IllegalArgumentException_init_$Create$5aln3pu9f76h as IllegalArgumentException_init_$Create$_0,
|
|
25
25
|
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
26
26
|
initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
|
|
27
27
|
multiply2k9eolhnz1bjv as multiply,
|
|
28
28
|
charCodeAt1yspne1d8erbm as charCodeAt,
|
|
29
|
-
|
|
29
|
+
Char__toInt_impl_vasixd28v1p2u6jau5g as Char__toInt_impl_vasixd,
|
|
30
30
|
charArray2ujmm1qusno00 as charArray,
|
|
31
31
|
numberToChar93r9buh19yek as numberToChar,
|
|
32
32
|
concatToString3cxf0c1gqonpo as concatToString,
|
|
33
|
-
Exception_init_$Init$
|
|
33
|
+
Exception_init_$Init$3sm71o0ka3exb as Exception_init_$Init$,
|
|
34
34
|
captureStack1fzi4aczwc4hg as captureStack,
|
|
35
|
-
Exception_init_$Init$
|
|
36
|
-
Exception_init_$Init$
|
|
35
|
+
Exception_init_$Init$aq0gqtvnezdz as Exception_init_$Init$_0,
|
|
36
|
+
Exception_init_$Init$102hlnwd7omfr as Exception_init_$Init$_1,
|
|
37
37
|
Exceptiondt2hlxn7j7vw as Exception,
|
|
38
38
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
39
|
-
import {
|
|
39
|
+
import { UnsafeByteStringOperations_instance2qzwn5iz9dqfo as UnsafeByteStringOperations_instance } from './kotlinx-io-kotlinx-io-bytestring.mjs';
|
|
40
40
|
//region block: imports
|
|
41
41
|
var imul = Math.imul;
|
|
42
42
|
//endregion
|
|
@@ -47,10 +47,10 @@ function write$default(source, startIndex, endIndex, $super) {
|
|
|
47
47
|
endIndex = endIndex === VOID ? source.length : endIndex;
|
|
48
48
|
var tmp;
|
|
49
49
|
if ($super === VOID) {
|
|
50
|
-
this.
|
|
50
|
+
this.write_ti570x_k$(source, startIndex, endIndex);
|
|
51
51
|
tmp = Unit_instance;
|
|
52
52
|
} else {
|
|
53
|
-
tmp = $super.
|
|
53
|
+
tmp = $super.write_ti570x_k$.call(this, source, startIndex, endIndex);
|
|
54
54
|
}
|
|
55
55
|
return tmp;
|
|
56
56
|
}
|
|
@@ -99,42 +99,42 @@ function _init_properties__Util_kt__g8tcl9() {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
function throwEof($this, byteCount) {
|
|
102
|
-
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + $this.
|
|
102
|
+
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + $this.get_size_woubt6_k$().toString() + ', required: ' + byteCount.toString() + ')');
|
|
103
103
|
}
|
|
104
104
|
function Buffer() {
|
|
105
|
-
this.
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
105
|
+
this.head_1 = null;
|
|
106
|
+
this.tail_1 = null;
|
|
107
|
+
this.sizeMut_1 = 0n;
|
|
108
108
|
}
|
|
109
|
-
protoOf(Buffer).
|
|
110
|
-
return this.
|
|
109
|
+
protoOf(Buffer).get_size_woubt6_k$ = function () {
|
|
110
|
+
return this.sizeMut_1;
|
|
111
111
|
};
|
|
112
|
-
protoOf(Buffer).
|
|
112
|
+
protoOf(Buffer).get_buffer_bmaafd_k$ = function () {
|
|
113
113
|
return this;
|
|
114
114
|
};
|
|
115
|
-
protoOf(Buffer).
|
|
116
|
-
return this.
|
|
115
|
+
protoOf(Buffer).exhausted_p1jt55_k$ = function () {
|
|
116
|
+
return this.get_size_woubt6_k$() === 0n;
|
|
117
117
|
};
|
|
118
|
-
protoOf(Buffer).
|
|
118
|
+
protoOf(Buffer).require_37jki9_k$ = function (byteCount) {
|
|
119
119
|
// Inline function 'kotlin.require' call
|
|
120
120
|
if (!(byteCount >= 0n)) {
|
|
121
121
|
var message = 'byteCount: ' + byteCount.toString();
|
|
122
122
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
123
123
|
}
|
|
124
|
-
if (this.
|
|
125
|
-
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + this.
|
|
124
|
+
if (this.get_size_woubt6_k$() < byteCount) {
|
|
125
|
+
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + this.get_size_woubt6_k$().toString() + ', required: ' + byteCount.toString() + ')');
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
|
-
protoOf(Buffer).
|
|
128
|
+
protoOf(Buffer).request_hj5jqj_k$ = function (byteCount) {
|
|
129
129
|
// Inline function 'kotlin.require' call
|
|
130
130
|
if (!(byteCount >= 0n)) {
|
|
131
131
|
var message = 'byteCount: ' + byteCount.toString() + ' < 0';
|
|
132
132
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
133
133
|
}
|
|
134
|
-
return this.
|
|
134
|
+
return this.get_size_woubt6_k$() >= byteCount;
|
|
135
135
|
};
|
|
136
|
-
protoOf(Buffer).
|
|
137
|
-
var tmp0_elvis_lhs = this.
|
|
136
|
+
protoOf(Buffer).readByte_ectjk2_k$ = function () {
|
|
137
|
+
var tmp0_elvis_lhs = this.head_1;
|
|
138
138
|
var tmp;
|
|
139
139
|
if (tmp0_elvis_lhs == null) {
|
|
140
140
|
throwEof(this, 1n);
|
|
@@ -142,20 +142,20 @@ protoOf(Buffer).ap = function () {
|
|
|
142
142
|
tmp = tmp0_elvis_lhs;
|
|
143
143
|
}
|
|
144
144
|
var segment = tmp;
|
|
145
|
-
var segmentSize = segment.
|
|
145
|
+
var segmentSize = segment.get_size_woubt6_k$();
|
|
146
146
|
if (segmentSize === 0) {
|
|
147
|
-
this.
|
|
148
|
-
return this.
|
|
147
|
+
this.recycleHead_e8xkbv_k$();
|
|
148
|
+
return this.readByte_ectjk2_k$();
|
|
149
149
|
}
|
|
150
|
-
var v = segment.
|
|
151
|
-
this.
|
|
150
|
+
var v = segment.readByte_newmca_k$();
|
|
151
|
+
this.sizeMut_1 = subtract(this.sizeMut_1, 1n);
|
|
152
152
|
if (segmentSize === 1) {
|
|
153
|
-
this.
|
|
153
|
+
this.recycleHead_e8xkbv_k$();
|
|
154
154
|
}
|
|
155
155
|
return v;
|
|
156
156
|
};
|
|
157
|
-
protoOf(Buffer).
|
|
158
|
-
var tmp0_elvis_lhs = this.
|
|
157
|
+
protoOf(Buffer).readShort_ilpyey_k$ = function () {
|
|
158
|
+
var tmp0_elvis_lhs = this.head_1;
|
|
159
159
|
var tmp;
|
|
160
160
|
if (tmp0_elvis_lhs == null) {
|
|
161
161
|
throwEof(this, 2n);
|
|
@@ -163,123 +163,123 @@ protoOf(Buffer).kp = function () {
|
|
|
163
163
|
tmp = tmp0_elvis_lhs;
|
|
164
164
|
}
|
|
165
165
|
var segment = tmp;
|
|
166
|
-
var segmentSize = segment.
|
|
166
|
+
var segmentSize = segment.get_size_woubt6_k$();
|
|
167
167
|
if (segmentSize < 2) {
|
|
168
|
-
this.
|
|
168
|
+
this.require_37jki9_k$(2n);
|
|
169
169
|
if (segmentSize === 0) {
|
|
170
|
-
this.
|
|
171
|
-
return this.
|
|
170
|
+
this.recycleHead_e8xkbv_k$();
|
|
171
|
+
return this.readShort_ilpyey_k$();
|
|
172
172
|
}
|
|
173
173
|
// Inline function 'kotlinx.io.and' call
|
|
174
|
-
var tmp_0 = (this.
|
|
174
|
+
var tmp_0 = (this.readByte_ectjk2_k$() & 255) << 8;
|
|
175
175
|
// Inline function 'kotlinx.io.and' call
|
|
176
|
-
var tmp$ret$1 = this.
|
|
176
|
+
var tmp$ret$1 = this.readByte_ectjk2_k$() & 255;
|
|
177
177
|
return toShort(tmp_0 | tmp$ret$1);
|
|
178
178
|
}
|
|
179
|
-
var v = segment.
|
|
180
|
-
this.
|
|
179
|
+
var v = segment.readShort_7b409e_k$();
|
|
180
|
+
this.sizeMut_1 = subtract(this.sizeMut_1, 2n);
|
|
181
181
|
if (segmentSize === 2) {
|
|
182
|
-
this.
|
|
182
|
+
this.recycleHead_e8xkbv_k$();
|
|
183
183
|
}
|
|
184
184
|
return v;
|
|
185
185
|
};
|
|
186
|
-
protoOf(Buffer).
|
|
186
|
+
protoOf(Buffer).hintEmit_6b2e5m_k$ = function () {
|
|
187
187
|
return Unit_instance;
|
|
188
188
|
};
|
|
189
|
-
protoOf(Buffer).
|
|
190
|
-
checkBounds(this.
|
|
189
|
+
protoOf(Buffer).copyTo_xutsee_k$ = function (out, startIndex, endIndex) {
|
|
190
|
+
checkBounds(this.get_size_woubt6_k$(), startIndex, endIndex);
|
|
191
191
|
if (startIndex === endIndex)
|
|
192
192
|
return Unit_instance;
|
|
193
193
|
var currentOffset = startIndex;
|
|
194
194
|
var remainingByteCount = subtract(endIndex, startIndex);
|
|
195
|
-
out.
|
|
196
|
-
var s = this.
|
|
197
|
-
while (currentOffset >= fromInt(ensureNotNull(s).
|
|
198
|
-
currentOffset = subtract(currentOffset, fromInt(s.
|
|
199
|
-
s = s.
|
|
195
|
+
out.sizeMut_1 = add(out.sizeMut_1, remainingByteCount);
|
|
196
|
+
var s = this.head_1;
|
|
197
|
+
while (currentOffset >= fromInt(ensureNotNull(s).limit_1 - s.pos_1 | 0)) {
|
|
198
|
+
currentOffset = subtract(currentOffset, fromInt(s.limit_1 - s.pos_1 | 0));
|
|
199
|
+
s = s.next_1;
|
|
200
200
|
}
|
|
201
201
|
while (remainingByteCount > 0n) {
|
|
202
|
-
var copy = ensureNotNull(s).
|
|
203
|
-
copy.
|
|
202
|
+
var copy = ensureNotNull(s).sharedCopy_efss0u_k$();
|
|
203
|
+
copy.pos_1 = copy.pos_1 + convertToInt(currentOffset) | 0;
|
|
204
204
|
var tmp = copy;
|
|
205
|
-
var tmp0 = copy.
|
|
205
|
+
var tmp0 = copy.pos_1 + convertToInt(remainingByteCount) | 0;
|
|
206
206
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
207
|
-
var b = copy.
|
|
208
|
-
tmp.
|
|
207
|
+
var b = copy.limit_1;
|
|
208
|
+
tmp.limit_1 = Math.min(tmp0, b);
|
|
209
209
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
210
|
-
if (out.
|
|
211
|
-
out.
|
|
212
|
-
out.
|
|
210
|
+
if (out.head_1 == null) {
|
|
211
|
+
out.head_1 = copy;
|
|
212
|
+
out.tail_1 = copy;
|
|
213
213
|
} else if (false) {
|
|
214
|
-
out.
|
|
215
|
-
if (ensureNotNull(out.
|
|
216
|
-
out.
|
|
214
|
+
out.tail_1 = ensureNotNull(out.tail_1).push_h69db4_k$(copy).compact_he236d_k$();
|
|
215
|
+
if (ensureNotNull(out.tail_1).prev_1 == null) {
|
|
216
|
+
out.head_1 = out.tail_1;
|
|
217
217
|
}
|
|
218
218
|
} else {
|
|
219
|
-
out.
|
|
219
|
+
out.tail_1 = ensureNotNull(out.tail_1).push_h69db4_k$(copy);
|
|
220
220
|
}
|
|
221
|
-
remainingByteCount = subtract(remainingByteCount, fromInt(copy.
|
|
221
|
+
remainingByteCount = subtract(remainingByteCount, fromInt(copy.limit_1 - copy.pos_1 | 0));
|
|
222
222
|
currentOffset = 0n;
|
|
223
|
-
s = s.
|
|
223
|
+
s = s.next_1;
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
|
-
protoOf(Buffer).
|
|
227
|
-
var result = this.
|
|
226
|
+
protoOf(Buffer).completeSegmentByteCount_46ltjp_k$ = function () {
|
|
227
|
+
var result = this.get_size_woubt6_k$();
|
|
228
228
|
if (result === 0n)
|
|
229
229
|
return 0n;
|
|
230
|
-
var tail = ensureNotNull(this.
|
|
231
|
-
if (tail.
|
|
232
|
-
result = subtract(result, fromInt(tail.
|
|
230
|
+
var tail = ensureNotNull(this.tail_1);
|
|
231
|
+
if (tail.limit_1 < 8192 && tail.owner_1) {
|
|
232
|
+
result = subtract(result, fromInt(tail.limit_1 - tail.pos_1 | 0));
|
|
233
233
|
}
|
|
234
234
|
return result;
|
|
235
235
|
};
|
|
236
|
-
protoOf(Buffer).
|
|
237
|
-
if (position < 0n || position >= this.
|
|
238
|
-
throw IndexOutOfBoundsException_init_$Create$('position (' + position.toString() + ') is not within the range [0..size(' + this.
|
|
236
|
+
protoOf(Buffer).get_f9lzxq_k$ = function (position) {
|
|
237
|
+
if (position < 0n || position >= this.get_size_woubt6_k$()) {
|
|
238
|
+
throw IndexOutOfBoundsException_init_$Create$('position (' + position.toString() + ') is not within the range [0..size(' + this.get_size_woubt6_k$().toString() + '))');
|
|
239
239
|
}
|
|
240
240
|
if (position === 0n) {
|
|
241
|
-
return ensureNotNull(this.
|
|
241
|
+
return ensureNotNull(this.head_1).getUnchecked_g7gmig_k$(0);
|
|
242
242
|
}
|
|
243
243
|
$l$block_1: {
|
|
244
244
|
// Inline function 'kotlinx.io.seek' call
|
|
245
|
-
if (this.
|
|
246
|
-
return ensureNotNull(null).
|
|
245
|
+
if (this.head_1 == null) {
|
|
246
|
+
return ensureNotNull(null).getUnchecked_g7gmig_k$(convertToInt(subtract(position, -1n)));
|
|
247
247
|
}
|
|
248
|
-
if (subtract(this.
|
|
249
|
-
var s = this.
|
|
250
|
-
var offset = this.
|
|
248
|
+
if (subtract(this.get_size_woubt6_k$(), position) < position) {
|
|
249
|
+
var s = this.tail_1;
|
|
250
|
+
var offset = this.get_size_woubt6_k$();
|
|
251
251
|
$l$loop: while (!(s == null) && offset > position) {
|
|
252
|
-
offset = subtract(offset, fromInt(s.
|
|
252
|
+
offset = subtract(offset, fromInt(s.limit_1 - s.pos_1 | 0));
|
|
253
253
|
if (offset <= position)
|
|
254
254
|
break $l$loop;
|
|
255
|
-
s = s.
|
|
255
|
+
s = s.prev_1;
|
|
256
256
|
}
|
|
257
257
|
var tmp0 = s;
|
|
258
258
|
var offset_0 = offset;
|
|
259
|
-
return ensureNotNull(tmp0).
|
|
259
|
+
return ensureNotNull(tmp0).getUnchecked_g7gmig_k$(convertToInt(subtract(position, offset_0)));
|
|
260
260
|
} else {
|
|
261
|
-
var s_0 = this.
|
|
261
|
+
var s_0 = this.head_1;
|
|
262
262
|
var offset_1 = 0n;
|
|
263
263
|
$l$loop_0: while (!(s_0 == null)) {
|
|
264
264
|
var tmp0_0 = offset_1;
|
|
265
265
|
// Inline function 'kotlin.Long.plus' call
|
|
266
|
-
var other = s_0.
|
|
266
|
+
var other = s_0.limit_1 - s_0.pos_1 | 0;
|
|
267
267
|
var nextOffset = add(tmp0_0, fromInt(other));
|
|
268
268
|
if (nextOffset > position)
|
|
269
269
|
break $l$loop_0;
|
|
270
|
-
s_0 = s_0.
|
|
270
|
+
s_0 = s_0.next_1;
|
|
271
271
|
offset_1 = nextOffset;
|
|
272
272
|
}
|
|
273
273
|
var tmp0_1 = s_0;
|
|
274
274
|
var offset_2 = offset_1;
|
|
275
|
-
return ensureNotNull(tmp0_1).
|
|
275
|
+
return ensureNotNull(tmp0_1).getUnchecked_g7gmig_k$(convertToInt(subtract(position, offset_2)));
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
|
-
protoOf(Buffer).
|
|
280
|
-
return this.
|
|
279
|
+
protoOf(Buffer).clear_j9egeb_k$ = function () {
|
|
280
|
+
return this.skip_csbv9x_k$(this.get_size_woubt6_k$());
|
|
281
281
|
};
|
|
282
|
-
protoOf(Buffer).
|
|
282
|
+
protoOf(Buffer).skip_csbv9x_k$ = function (byteCount) {
|
|
283
283
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
284
284
|
// Inline function 'kotlin.require' call
|
|
285
285
|
if (!(byteCount >= 0n)) {
|
|
@@ -288,7 +288,7 @@ protoOf(Buffer).up = function (byteCount) {
|
|
|
288
288
|
}
|
|
289
289
|
var remainingByteCount = byteCount;
|
|
290
290
|
while (remainingByteCount > 0n) {
|
|
291
|
-
var tmp0_elvis_lhs = this.
|
|
291
|
+
var tmp0_elvis_lhs = this.head_1;
|
|
292
292
|
var tmp;
|
|
293
293
|
if (tmp0_elvis_lhs == null) {
|
|
294
294
|
throw EOFException_init_$Create$_0('Buffer exhausted before skipping ' + byteCount.toString() + ' bytes.');
|
|
@@ -298,24 +298,24 @@ protoOf(Buffer).up = function (byteCount) {
|
|
|
298
298
|
var head = tmp;
|
|
299
299
|
var tmp0 = remainingByteCount;
|
|
300
300
|
// Inline function 'kotlinx.io.minOf' call
|
|
301
|
-
var b = head.
|
|
301
|
+
var b = head.limit_1 - head.pos_1 | 0;
|
|
302
302
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
303
303
|
var b_0 = fromInt(b);
|
|
304
304
|
var tmp$ret$3 = tmp0 <= b_0 ? tmp0 : b_0;
|
|
305
305
|
var toSkip = convertToInt(tmp$ret$3);
|
|
306
|
-
this.
|
|
306
|
+
this.sizeMut_1 = subtract(this.sizeMut_1, fromInt(toSkip));
|
|
307
307
|
remainingByteCount = subtract(remainingByteCount, fromInt(toSkip));
|
|
308
|
-
head.
|
|
309
|
-
if (head.
|
|
310
|
-
this.
|
|
308
|
+
head.pos_1 = head.pos_1 + toSkip | 0;
|
|
309
|
+
if (head.pos_1 === head.limit_1) {
|
|
310
|
+
this.recycleHead_e8xkbv_k$();
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
};
|
|
314
|
-
protoOf(Buffer).
|
|
314
|
+
protoOf(Buffer).readAtMostTo_kub29z_k$ = function (sink, startIndex, endIndex) {
|
|
315
315
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
316
316
|
var size = sink.length;
|
|
317
317
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
318
|
-
var tmp0_elvis_lhs = this.
|
|
318
|
+
var tmp0_elvis_lhs = this.head_1;
|
|
319
319
|
var tmp;
|
|
320
320
|
if (tmp0_elvis_lhs == null) {
|
|
321
321
|
return -1;
|
|
@@ -325,92 +325,92 @@ protoOf(Buffer).vp = function (sink, startIndex, endIndex) {
|
|
|
325
325
|
var s = tmp;
|
|
326
326
|
var tmp0 = endIndex - startIndex | 0;
|
|
327
327
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
328
|
-
var b = s.
|
|
328
|
+
var b = s.get_size_woubt6_k$();
|
|
329
329
|
var toCopy = Math.min(tmp0, b);
|
|
330
|
-
s.
|
|
331
|
-
this.
|
|
330
|
+
s.readTo_7avxxz_k$(sink, startIndex, startIndex + toCopy | 0);
|
|
331
|
+
this.sizeMut_1 = subtract(this.sizeMut_1, fromInt(toCopy));
|
|
332
332
|
if (isEmpty(s)) {
|
|
333
|
-
this.
|
|
333
|
+
this.recycleHead_e8xkbv_k$();
|
|
334
334
|
}
|
|
335
335
|
return toCopy;
|
|
336
336
|
};
|
|
337
|
-
protoOf(Buffer).
|
|
337
|
+
protoOf(Buffer).readAtMostTo_4oop6l_k$ = function (sink, byteCount) {
|
|
338
338
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
339
339
|
// Inline function 'kotlin.require' call
|
|
340
340
|
if (!(byteCount >= 0n)) {
|
|
341
341
|
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
342
342
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
343
343
|
}
|
|
344
|
-
if (this.
|
|
344
|
+
if (this.get_size_woubt6_k$() === 0n)
|
|
345
345
|
return -1n;
|
|
346
|
-
var bytesWritten = byteCount > this.
|
|
347
|
-
sink.
|
|
346
|
+
var bytesWritten = byteCount > this.get_size_woubt6_k$() ? this.get_size_woubt6_k$() : byteCount;
|
|
347
|
+
sink.write_ob3ym3_k$(this, bytesWritten);
|
|
348
348
|
return bytesWritten;
|
|
349
349
|
};
|
|
350
|
-
protoOf(Buffer).
|
|
350
|
+
protoOf(Buffer).readTo_3vtbf7_k$ = function (sink, byteCount) {
|
|
351
351
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
352
352
|
// Inline function 'kotlin.require' call
|
|
353
353
|
if (!(byteCount >= 0n)) {
|
|
354
354
|
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
355
355
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
356
356
|
}
|
|
357
|
-
if (this.
|
|
358
|
-
sink.
|
|
359
|
-
throw EOFException_init_$Create$_0('Buffer exhausted before writing ' + byteCount.toString() + ' bytes. Only ' + this.
|
|
357
|
+
if (this.get_size_woubt6_k$() < byteCount) {
|
|
358
|
+
sink.write_ob3ym3_k$(this, this.get_size_woubt6_k$());
|
|
359
|
+
throw EOFException_init_$Create$_0('Buffer exhausted before writing ' + byteCount.toString() + ' bytes. Only ' + this.get_size_woubt6_k$().toString() + ' bytes were written.');
|
|
360
360
|
}
|
|
361
|
-
sink.
|
|
361
|
+
sink.write_ob3ym3_k$(this, byteCount);
|
|
362
362
|
};
|
|
363
|
-
protoOf(Buffer).
|
|
364
|
-
var byteCount = this.
|
|
363
|
+
protoOf(Buffer).transferTo_lu4ka2_k$ = function (sink) {
|
|
364
|
+
var byteCount = this.get_size_woubt6_k$();
|
|
365
365
|
if (byteCount > 0n) {
|
|
366
|
-
sink.
|
|
366
|
+
sink.write_ob3ym3_k$(this, byteCount);
|
|
367
367
|
}
|
|
368
368
|
return byteCount;
|
|
369
369
|
};
|
|
370
|
-
protoOf(Buffer).
|
|
370
|
+
protoOf(Buffer).peek_21nx7_k$ = function () {
|
|
371
371
|
return buffered(new PeekSource(this));
|
|
372
372
|
};
|
|
373
|
-
protoOf(Buffer).
|
|
373
|
+
protoOf(Buffer).writableSegment_voqx71_k$ = function (minimumCapacity) {
|
|
374
374
|
// Inline function 'kotlin.require' call
|
|
375
375
|
if (!(minimumCapacity >= 1 && minimumCapacity <= 8192)) {
|
|
376
376
|
var message = 'unexpected capacity (' + minimumCapacity + '), should be in range [1, 8192]';
|
|
377
377
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
378
378
|
}
|
|
379
|
-
if (this.
|
|
380
|
-
var result = SegmentPool_instance.
|
|
381
|
-
this.
|
|
382
|
-
this.
|
|
379
|
+
if (this.tail_1 == null) {
|
|
380
|
+
var result = SegmentPool_instance.take_2451j_k$();
|
|
381
|
+
this.head_1 = result;
|
|
382
|
+
this.tail_1 = result;
|
|
383
383
|
return result;
|
|
384
384
|
}
|
|
385
|
-
var t = ensureNotNull(this.
|
|
386
|
-
if ((t.
|
|
387
|
-
var newTail = t.
|
|
388
|
-
this.
|
|
385
|
+
var t = ensureNotNull(this.tail_1);
|
|
386
|
+
if ((t.limit_1 + minimumCapacity | 0) > 8192 || !t.owner_1) {
|
|
387
|
+
var newTail = t.push_h69db4_k$(SegmentPool_instance.take_2451j_k$());
|
|
388
|
+
this.tail_1 = newTail;
|
|
389
389
|
return newTail;
|
|
390
390
|
}
|
|
391
391
|
return t;
|
|
392
392
|
};
|
|
393
|
-
protoOf(Buffer).
|
|
393
|
+
protoOf(Buffer).write_ti570x_k$ = function (source, startIndex, endIndex) {
|
|
394
394
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
395
395
|
var size = source.length;
|
|
396
396
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
397
397
|
var currentOffset = startIndex;
|
|
398
398
|
while (currentOffset < endIndex) {
|
|
399
|
-
var tail = this.
|
|
399
|
+
var tail = this.writableSegment_voqx71_k$(1);
|
|
400
400
|
var tmp0 = endIndex - currentOffset | 0;
|
|
401
401
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
402
|
-
var b = tail.
|
|
402
|
+
var b = tail.get_remainingCapacity_c94947_k$();
|
|
403
403
|
var toCopy = Math.min(tmp0, b);
|
|
404
|
-
tail.
|
|
404
|
+
tail.write_j6nfmf_k$(source, currentOffset, currentOffset + toCopy | 0);
|
|
405
405
|
currentOffset = currentOffset + toCopy | 0;
|
|
406
406
|
}
|
|
407
407
|
var tmp = this;
|
|
408
|
-
var tmp0_0 = this.
|
|
408
|
+
var tmp0_0 = this.sizeMut_1;
|
|
409
409
|
// Inline function 'kotlin.Long.plus' call
|
|
410
410
|
var other = endIndex - startIndex | 0;
|
|
411
|
-
tmp.
|
|
411
|
+
tmp.sizeMut_1 = add(tmp0_0, fromInt(other));
|
|
412
412
|
};
|
|
413
|
-
protoOf(Buffer).
|
|
413
|
+
protoOf(Buffer).write_9ocf0z_k$ = function (source, byteCount) {
|
|
414
414
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
415
415
|
// Inline function 'kotlin.require' call
|
|
416
416
|
if (!(byteCount >= 0n)) {
|
|
@@ -419,164 +419,164 @@ protoOf(Buffer).kq = function (source, byteCount) {
|
|
|
419
419
|
}
|
|
420
420
|
var remainingByteCount = byteCount;
|
|
421
421
|
while (remainingByteCount > 0n) {
|
|
422
|
-
var read = source.
|
|
422
|
+
var read = source.readAtMostTo_4oop6l_k$(this, remainingByteCount);
|
|
423
423
|
if (read === -1n) {
|
|
424
424
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + byteCount.toString() + ' bytes. ' + ('Only ' + subtract(byteCount, remainingByteCount).toString() + ' were read.'));
|
|
425
425
|
}
|
|
426
426
|
remainingByteCount = subtract(remainingByteCount, read);
|
|
427
427
|
}
|
|
428
428
|
};
|
|
429
|
-
protoOf(Buffer).
|
|
429
|
+
protoOf(Buffer).write_ob3ym3_k$ = function (source, byteCount) {
|
|
430
430
|
// Inline function 'kotlin.require' call
|
|
431
431
|
if (!!(source === this)) {
|
|
432
432
|
var message = 'source == this';
|
|
433
433
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
434
434
|
}
|
|
435
|
-
checkOffsetAndCount(source.
|
|
435
|
+
checkOffsetAndCount(source.sizeMut_1, 0n, byteCount);
|
|
436
436
|
var remainingByteCount = byteCount;
|
|
437
437
|
while (remainingByteCount > 0n) {
|
|
438
|
-
if (remainingByteCount < fromInt(ensureNotNull(source.
|
|
439
|
-
var tail = this.
|
|
438
|
+
if (remainingByteCount < fromInt(ensureNotNull(source.head_1).get_size_woubt6_k$())) {
|
|
439
|
+
var tail = this.tail_1;
|
|
440
440
|
var tmp;
|
|
441
|
-
if (!(tail == null) && tail.
|
|
441
|
+
if (!(tail == null) && tail.owner_1) {
|
|
442
442
|
var tmp0 = remainingByteCount;
|
|
443
443
|
// Inline function 'kotlin.Long.plus' call
|
|
444
|
-
var other = tail.
|
|
444
|
+
var other = tail.limit_1;
|
|
445
445
|
var tmp0_0 = add(tmp0, fromInt(other));
|
|
446
446
|
// Inline function 'kotlin.Long.minus' call
|
|
447
|
-
var other_0 = tail.
|
|
447
|
+
var other_0 = tail.get_shared_lt0222_k$() ? 0 : tail.pos_1;
|
|
448
448
|
tmp = subtract(tmp0_0, fromInt(other_0)) <= 8192n;
|
|
449
449
|
} else {
|
|
450
450
|
tmp = false;
|
|
451
451
|
}
|
|
452
452
|
if (tmp) {
|
|
453
|
-
ensureNotNull(source.
|
|
454
|
-
source.
|
|
455
|
-
this.
|
|
453
|
+
ensureNotNull(source.head_1).writeTo_vgyea0_k$(tail, convertToInt(remainingByteCount));
|
|
454
|
+
source.sizeMut_1 = subtract(source.sizeMut_1, remainingByteCount);
|
|
455
|
+
this.sizeMut_1 = add(this.sizeMut_1, remainingByteCount);
|
|
456
456
|
return Unit_instance;
|
|
457
457
|
} else {
|
|
458
|
-
source.
|
|
458
|
+
source.head_1 = ensureNotNull(source.head_1).split_p6jwdi_k$(convertToInt(remainingByteCount));
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var segmentToMove = ensureNotNull(source.
|
|
462
|
-
var movedByteCount = fromInt(segmentToMove.
|
|
463
|
-
source.
|
|
464
|
-
if (source.
|
|
465
|
-
source.
|
|
461
|
+
var segmentToMove = ensureNotNull(source.head_1);
|
|
462
|
+
var movedByteCount = fromInt(segmentToMove.get_size_woubt6_k$());
|
|
463
|
+
source.head_1 = segmentToMove.pop_417547_k$();
|
|
464
|
+
if (source.head_1 == null) {
|
|
465
|
+
source.tail_1 = null;
|
|
466
466
|
}
|
|
467
467
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
468
|
-
if (this.
|
|
469
|
-
this.
|
|
470
|
-
this.
|
|
468
|
+
if (this.head_1 == null) {
|
|
469
|
+
this.head_1 = segmentToMove;
|
|
470
|
+
this.tail_1 = segmentToMove;
|
|
471
471
|
} else if (true) {
|
|
472
|
-
this.
|
|
473
|
-
if (ensureNotNull(this.
|
|
474
|
-
this.
|
|
472
|
+
this.tail_1 = ensureNotNull(this.tail_1).push_h69db4_k$(segmentToMove).compact_he236d_k$();
|
|
473
|
+
if (ensureNotNull(this.tail_1).prev_1 == null) {
|
|
474
|
+
this.head_1 = this.tail_1;
|
|
475
475
|
}
|
|
476
476
|
} else {
|
|
477
|
-
this.
|
|
477
|
+
this.tail_1 = ensureNotNull(this.tail_1).push_h69db4_k$(segmentToMove);
|
|
478
478
|
}
|
|
479
|
-
source.
|
|
480
|
-
this.
|
|
479
|
+
source.sizeMut_1 = subtract(source.sizeMut_1, movedByteCount);
|
|
480
|
+
this.sizeMut_1 = add(this.sizeMut_1, movedByteCount);
|
|
481
481
|
remainingByteCount = subtract(remainingByteCount, movedByteCount);
|
|
482
482
|
}
|
|
483
483
|
};
|
|
484
|
-
protoOf(Buffer).
|
|
484
|
+
protoOf(Buffer).transferFrom_v29myr_k$ = function (source) {
|
|
485
485
|
var totalBytesRead = 0n;
|
|
486
486
|
$l$loop: while (true) {
|
|
487
|
-
var readCount = source.
|
|
487
|
+
var readCount = source.readAtMostTo_4oop6l_k$(this, 8192n);
|
|
488
488
|
if (readCount === -1n)
|
|
489
489
|
break $l$loop;
|
|
490
490
|
totalBytesRead = add(totalBytesRead, readCount);
|
|
491
491
|
}
|
|
492
492
|
return totalBytesRead;
|
|
493
493
|
};
|
|
494
|
-
protoOf(Buffer).
|
|
495
|
-
this.
|
|
496
|
-
this.
|
|
494
|
+
protoOf(Buffer).writeByte_9ih3z3_k$ = function (byte) {
|
|
495
|
+
this.writableSegment_voqx71_k$(1).writeByte_naaedl_k$(byte);
|
|
496
|
+
this.sizeMut_1 = add(this.sizeMut_1, 1n);
|
|
497
497
|
};
|
|
498
|
-
protoOf(Buffer).
|
|
499
|
-
this.
|
|
500
|
-
this.
|
|
498
|
+
protoOf(Buffer).writeShort_vn2jsb_k$ = function (short) {
|
|
499
|
+
this.writableSegment_voqx71_k$(2).writeShort_n1l1d9_k$(short);
|
|
500
|
+
this.sizeMut_1 = add(this.sizeMut_1, 2n);
|
|
501
501
|
};
|
|
502
|
-
protoOf(Buffer).
|
|
502
|
+
protoOf(Buffer).close_yn9xrc_k$ = function () {
|
|
503
503
|
return Unit_instance;
|
|
504
504
|
};
|
|
505
505
|
protoOf(Buffer).toString = function () {
|
|
506
|
-
if (this.
|
|
506
|
+
if (this.get_size_woubt6_k$() === 0n)
|
|
507
507
|
return 'Buffer(size=0)';
|
|
508
508
|
var maxPrintableBytes = 64;
|
|
509
509
|
// Inline function 'kotlinx.io.minOf' call
|
|
510
|
-
var b = this.
|
|
510
|
+
var b = this.get_size_woubt6_k$();
|
|
511
511
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
512
512
|
var a = fromInt(maxPrintableBytes);
|
|
513
513
|
var tmp$ret$0 = a <= b ? a : b;
|
|
514
514
|
var len = convertToInt(tmp$ret$0);
|
|
515
|
-
var builder = StringBuilder_init_$Create$(imul(len, 2) + (this.
|
|
515
|
+
var builder = StringBuilder_init_$Create$(imul(len, 2) + (this.get_size_woubt6_k$() > fromInt(maxPrintableBytes) ? 1 : 0) | 0);
|
|
516
516
|
var bytesWritten = 0;
|
|
517
517
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
518
|
-
var curr = this.
|
|
518
|
+
var curr = this.head_1;
|
|
519
519
|
while (!(curr == null)) {
|
|
520
520
|
var tmp0 = get_SegmentReadContextImpl();
|
|
521
521
|
var segment = curr;
|
|
522
522
|
var idx = 0;
|
|
523
|
-
while (bytesWritten < len && idx < segment.
|
|
523
|
+
while (bytesWritten < len && idx < segment.get_size_woubt6_k$()) {
|
|
524
524
|
var _unary__edvuaz = idx;
|
|
525
525
|
idx = _unary__edvuaz + 1 | 0;
|
|
526
|
-
var b_0 = tmp0.
|
|
526
|
+
var b_0 = tmp0.getUnchecked_akrbjy_k$(segment, _unary__edvuaz);
|
|
527
527
|
bytesWritten = bytesWritten + 1 | 0;
|
|
528
528
|
var tmp = get_HEX_DIGIT_CHARS();
|
|
529
529
|
// Inline function 'kotlinx.io.shr' call
|
|
530
530
|
var tmp$ret$4 = b_0 >> 4;
|
|
531
|
-
var tmp_0 = builder.
|
|
531
|
+
var tmp_0 = builder.append_58al37_k$(tmp[tmp$ret$4 & 15]);
|
|
532
532
|
var tmp_1 = get_HEX_DIGIT_CHARS();
|
|
533
533
|
// Inline function 'kotlinx.io.and' call
|
|
534
534
|
var tmp$ret$5 = b_0 & 15;
|
|
535
|
-
tmp_0.
|
|
535
|
+
tmp_0.append_58al37_k$(tmp_1[tmp$ret$5]);
|
|
536
536
|
}
|
|
537
|
-
curr = curr.
|
|
537
|
+
curr = curr.next_1;
|
|
538
538
|
}
|
|
539
|
-
if (this.
|
|
540
|
-
builder.
|
|
539
|
+
if (this.get_size_woubt6_k$() > fromInt(maxPrintableBytes)) {
|
|
540
|
+
builder.append_58al37_k$(_Char___init__impl__6a9atx(8230));
|
|
541
541
|
}
|
|
542
|
-
return 'Buffer(size=' + this.
|
|
542
|
+
return 'Buffer(size=' + this.get_size_woubt6_k$().toString() + ' hex=' + builder.toString() + ')';
|
|
543
543
|
};
|
|
544
|
-
protoOf(Buffer).
|
|
545
|
-
var oldHead = ensureNotNull(this.
|
|
546
|
-
var nextHead = oldHead.
|
|
547
|
-
this.
|
|
544
|
+
protoOf(Buffer).recycleHead_e8xkbv_k$ = function () {
|
|
545
|
+
var oldHead = ensureNotNull(this.head_1);
|
|
546
|
+
var nextHead = oldHead.next_1;
|
|
547
|
+
this.head_1 = nextHead;
|
|
548
548
|
if (nextHead == null) {
|
|
549
|
-
this.
|
|
549
|
+
this.tail_1 = null;
|
|
550
550
|
} else {
|
|
551
|
-
nextHead.
|
|
551
|
+
nextHead.prev_1 = null;
|
|
552
552
|
}
|
|
553
|
-
oldHead.
|
|
554
|
-
SegmentPool_instance.
|
|
553
|
+
oldHead.next_1 = null;
|
|
554
|
+
SegmentPool_instance.recycle_3mobff_k$(oldHead);
|
|
555
555
|
};
|
|
556
|
-
protoOf(Buffer).
|
|
557
|
-
var oldTail = ensureNotNull(this.
|
|
558
|
-
var newTail = oldTail.
|
|
559
|
-
this.
|
|
556
|
+
protoOf(Buffer).recycleTail_61sxi3_k$ = function () {
|
|
557
|
+
var oldTail = ensureNotNull(this.tail_1);
|
|
558
|
+
var newTail = oldTail.prev_1;
|
|
559
|
+
this.tail_1 = newTail;
|
|
560
560
|
if (newTail == null) {
|
|
561
|
-
this.
|
|
561
|
+
this.head_1 = null;
|
|
562
562
|
} else {
|
|
563
|
-
newTail.
|
|
563
|
+
newTail.next_1 = null;
|
|
564
564
|
}
|
|
565
|
-
oldTail.
|
|
566
|
-
SegmentPool_instance.
|
|
565
|
+
oldTail.prev_1 = null;
|
|
566
|
+
SegmentPool_instance.recycle_3mobff_k$(oldTail);
|
|
567
567
|
};
|
|
568
568
|
function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
569
569
|
startIndex = startIndex === VOID ? 0n : startIndex;
|
|
570
|
-
endIndex = endIndex === VOID ? _this__u8e3s4.
|
|
570
|
+
endIndex = endIndex === VOID ? _this__u8e3s4.get_size_woubt6_k$() : endIndex;
|
|
571
571
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
572
|
-
var b = _this__u8e3s4.
|
|
572
|
+
var b = _this__u8e3s4.get_size_woubt6_k$();
|
|
573
573
|
var endOffset = endIndex <= b ? endIndex : b;
|
|
574
|
-
checkBounds(_this__u8e3s4.
|
|
574
|
+
checkBounds(_this__u8e3s4.get_size_woubt6_k$(), startIndex, endOffset);
|
|
575
575
|
if (startIndex === endOffset)
|
|
576
576
|
return -1n;
|
|
577
577
|
$l$block_1: {
|
|
578
578
|
// Inline function 'kotlinx.io.seek' call
|
|
579
|
-
if (_this__u8e3s4.
|
|
579
|
+
if (_this__u8e3s4.head_1 == null) {
|
|
580
580
|
if (-1n === -1n) {
|
|
581
581
|
return -1n;
|
|
582
582
|
}
|
|
@@ -592,7 +592,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
592
592
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
593
593
|
var a = convertToInt(subtract(startIndex, offset));
|
|
594
594
|
var tmp_0 = Math.max(a, 0);
|
|
595
|
-
var tmp0 = segment.
|
|
595
|
+
var tmp0 = segment.get_size_woubt6_k$();
|
|
596
596
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
597
597
|
var b_0 = convertToInt(subtract(endOffset, offset));
|
|
598
598
|
var tmp$ret$5 = Math.min(tmp0, b_0);
|
|
@@ -602,21 +602,21 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
602
602
|
}
|
|
603
603
|
var tmp0_0 = offset;
|
|
604
604
|
// Inline function 'kotlin.Long.plus' call
|
|
605
|
-
var other = segment.
|
|
605
|
+
var other = segment.get_size_woubt6_k$();
|
|
606
606
|
offset = add(tmp0_0, fromInt(other));
|
|
607
|
-
segment = segment.
|
|
607
|
+
segment = segment.next_1;
|
|
608
608
|
}
|
|
609
609
|
while (!(segment == null) && offset < endOffset);
|
|
610
610
|
return -1n;
|
|
611
611
|
}
|
|
612
|
-
if (subtract(_this__u8e3s4.
|
|
613
|
-
var s = _this__u8e3s4.
|
|
614
|
-
var offset_0 = _this__u8e3s4.
|
|
612
|
+
if (subtract(_this__u8e3s4.get_size_woubt6_k$(), startIndex) < startIndex) {
|
|
613
|
+
var s = _this__u8e3s4.tail_1;
|
|
614
|
+
var offset_0 = _this__u8e3s4.get_size_woubt6_k$();
|
|
615
615
|
$l$loop: while (!(s == null) && offset_0 > startIndex) {
|
|
616
|
-
offset_0 = subtract(offset_0, fromInt(s.
|
|
616
|
+
offset_0 = subtract(offset_0, fromInt(s.limit_1 - s.pos_1 | 0));
|
|
617
617
|
if (offset_0 <= startIndex)
|
|
618
618
|
break $l$loop;
|
|
619
|
-
s = s.
|
|
619
|
+
s = s.prev_1;
|
|
620
620
|
}
|
|
621
621
|
var tmp0_1 = s;
|
|
622
622
|
var o = offset_0;
|
|
@@ -635,7 +635,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
635
635
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
636
636
|
var a_0 = convertToInt(subtract(startIndex, offset_1));
|
|
637
637
|
var tmp_2 = Math.max(a_0, 0);
|
|
638
|
-
var tmp0_2 = segment_0.
|
|
638
|
+
var tmp0_2 = segment_0.get_size_woubt6_k$();
|
|
639
639
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
640
640
|
var b_1 = convertToInt(subtract(endOffset, offset_1));
|
|
641
641
|
var tmp$ret$10 = Math.min(tmp0_2, b_1);
|
|
@@ -645,23 +645,23 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
645
645
|
}
|
|
646
646
|
var tmp0_3 = offset_1;
|
|
647
647
|
// Inline function 'kotlin.Long.plus' call
|
|
648
|
-
var other_0 = segment_0.
|
|
648
|
+
var other_0 = segment_0.get_size_woubt6_k$();
|
|
649
649
|
offset_1 = add(tmp0_3, fromInt(other_0));
|
|
650
|
-
segment_0 = segment_0.
|
|
650
|
+
segment_0 = segment_0.next_1;
|
|
651
651
|
}
|
|
652
652
|
while (!(segment_0 == null) && offset_1 < endOffset);
|
|
653
653
|
return -1n;
|
|
654
654
|
} else {
|
|
655
|
-
var s_0 = _this__u8e3s4.
|
|
655
|
+
var s_0 = _this__u8e3s4.head_1;
|
|
656
656
|
var offset_2 = 0n;
|
|
657
657
|
$l$loop_0: while (!(s_0 == null)) {
|
|
658
658
|
var tmp0_4 = offset_2;
|
|
659
659
|
// Inline function 'kotlin.Long.plus' call
|
|
660
|
-
var other_1 = s_0.
|
|
660
|
+
var other_1 = s_0.limit_1 - s_0.pos_1 | 0;
|
|
661
661
|
var nextOffset = add(tmp0_4, fromInt(other_1));
|
|
662
662
|
if (nextOffset > startIndex)
|
|
663
663
|
break $l$loop_0;
|
|
664
|
-
s_0 = s_0.
|
|
664
|
+
s_0 = s_0.next_1;
|
|
665
665
|
offset_2 = nextOffset;
|
|
666
666
|
}
|
|
667
667
|
var tmp0_5 = s_0;
|
|
@@ -681,7 +681,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
681
681
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
682
682
|
var a_1 = convertToInt(subtract(startIndex, offset_3));
|
|
683
683
|
var tmp_4 = Math.max(a_1, 0);
|
|
684
|
-
var tmp0_6 = segment_1.
|
|
684
|
+
var tmp0_6 = segment_1.get_size_woubt6_k$();
|
|
685
685
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
686
686
|
var b_2 = convertToInt(subtract(endOffset, offset_3));
|
|
687
687
|
var tmp$ret$16 = Math.min(tmp0_6, b_2);
|
|
@@ -691,9 +691,9 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
691
691
|
}
|
|
692
692
|
var tmp0_7 = offset_3;
|
|
693
693
|
// Inline function 'kotlin.Long.plus' call
|
|
694
|
-
var other_2 = segment_1.
|
|
694
|
+
var other_2 = segment_1.get_size_woubt6_k$();
|
|
695
695
|
offset_3 = add(tmp0_7, fromInt(other_2));
|
|
696
|
-
segment_1 = segment_1.
|
|
696
|
+
segment_1 = segment_1.next_1;
|
|
697
697
|
}
|
|
698
698
|
while (!(segment_1 == null) && offset_3 < endOffset);
|
|
699
699
|
return -1n;
|
|
@@ -701,25 +701,25 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
703
|
function readByteString(_this__u8e3s4, byteCount) {
|
|
704
|
-
return UnsafeByteStringOperations_instance.
|
|
704
|
+
return UnsafeByteStringOperations_instance.wrapUnsafe_3fobxs_k$(readByteArray_0(_this__u8e3s4, byteCount));
|
|
705
705
|
}
|
|
706
706
|
function buffered(_this__u8e3s4) {
|
|
707
707
|
return new RealSource(_this__u8e3s4);
|
|
708
708
|
}
|
|
709
709
|
function PeekSource(upstream) {
|
|
710
|
-
this.
|
|
711
|
-
this.
|
|
712
|
-
this.
|
|
710
|
+
this.upstream_1 = upstream;
|
|
711
|
+
this.buffer_1 = this.upstream_1.get_buffer_bmaafd_k$();
|
|
712
|
+
this.expectedSegment_1 = this.buffer_1.head_1;
|
|
713
713
|
var tmp = this;
|
|
714
|
-
var tmp0_safe_receiver = this.
|
|
715
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
716
|
-
tmp.
|
|
717
|
-
this.
|
|
718
|
-
this.
|
|
714
|
+
var tmp0_safe_receiver = this.buffer_1.head_1;
|
|
715
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pos_1;
|
|
716
|
+
tmp.expectedPos_1 = tmp1_elvis_lhs == null ? -1 : tmp1_elvis_lhs;
|
|
717
|
+
this.closed_1 = false;
|
|
718
|
+
this.pos_1 = 0n;
|
|
719
719
|
}
|
|
720
|
-
protoOf(PeekSource).
|
|
720
|
+
protoOf(PeekSource).readAtMostTo_4oop6l_k$ = function (sink, byteCount) {
|
|
721
721
|
// Inline function 'kotlin.check' call
|
|
722
|
-
if (!!this.
|
|
722
|
+
if (!!this.closed_1) {
|
|
723
723
|
var message = 'Source is closed.';
|
|
724
724
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
725
725
|
}
|
|
@@ -730,43 +730,43 @@ protoOf(PeekSource).xp = function (sink, byteCount) {
|
|
|
730
730
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
731
731
|
}
|
|
732
732
|
// Inline function 'kotlin.check' call
|
|
733
|
-
if (!(this.
|
|
733
|
+
if (!(this.expectedSegment_1 == null || (this.expectedSegment_1 === this.buffer_1.head_1 && this.expectedPos_1 === ensureNotNull(this.buffer_1.head_1).pos_1))) {
|
|
734
734
|
var message_1 = 'Peek source is invalid because upstream source was used';
|
|
735
735
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
736
736
|
}
|
|
737
737
|
if (byteCount === 0n)
|
|
738
738
|
return 0n;
|
|
739
739
|
// Inline function 'kotlin.Long.plus' call
|
|
740
|
-
var this_0 = this.
|
|
740
|
+
var this_0 = this.pos_1;
|
|
741
741
|
var tmp$ret$7 = add(this_0, fromInt(1));
|
|
742
|
-
if (!this.
|
|
742
|
+
if (!this.upstream_1.request_hj5jqj_k$(tmp$ret$7))
|
|
743
743
|
return -1n;
|
|
744
|
-
if (this.
|
|
745
|
-
this.
|
|
746
|
-
this.
|
|
744
|
+
if (this.expectedSegment_1 == null && !(this.buffer_1.head_1 == null)) {
|
|
745
|
+
this.expectedSegment_1 = this.buffer_1.head_1;
|
|
746
|
+
this.expectedPos_1 = ensureNotNull(this.buffer_1.head_1).pos_1;
|
|
747
747
|
}
|
|
748
748
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
749
|
-
var b = subtract(this.
|
|
749
|
+
var b = subtract(this.buffer_1.get_size_woubt6_k$(), this.pos_1);
|
|
750
750
|
var toCopy = byteCount <= b ? byteCount : b;
|
|
751
|
-
this.
|
|
752
|
-
this.
|
|
751
|
+
this.buffer_1.copyTo_xutsee_k$(sink, this.pos_1, add(this.pos_1, toCopy));
|
|
752
|
+
this.pos_1 = add(this.pos_1, toCopy);
|
|
753
753
|
return toCopy;
|
|
754
754
|
};
|
|
755
|
-
protoOf(PeekSource).
|
|
756
|
-
this.
|
|
755
|
+
protoOf(PeekSource).close_yn9xrc_k$ = function () {
|
|
756
|
+
this.closed_1 = true;
|
|
757
757
|
};
|
|
758
758
|
function RealSource(source) {
|
|
759
|
-
this.
|
|
760
|
-
this.
|
|
761
|
-
this.
|
|
759
|
+
this.source_1 = source;
|
|
760
|
+
this.closed_1 = false;
|
|
761
|
+
this.bufferField_1 = new Buffer();
|
|
762
762
|
}
|
|
763
|
-
protoOf(RealSource).
|
|
764
|
-
return this.
|
|
763
|
+
protoOf(RealSource).get_buffer_bmaafd_k$ = function () {
|
|
764
|
+
return this.bufferField_1;
|
|
765
765
|
};
|
|
766
|
-
protoOf(RealSource).
|
|
766
|
+
protoOf(RealSource).readAtMostTo_4oop6l_k$ = function (sink, byteCount) {
|
|
767
767
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
768
768
|
// Inline function 'kotlin.check' call
|
|
769
|
-
if (!!this.
|
|
769
|
+
if (!!this.closed_1) {
|
|
770
770
|
var message = 'Source is closed.';
|
|
771
771
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
772
772
|
}
|
|
@@ -775,33 +775,33 @@ protoOf(RealSource).xp = function (sink, byteCount) {
|
|
|
775
775
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
776
776
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
777
777
|
}
|
|
778
|
-
if (this.
|
|
779
|
-
var read = this.
|
|
778
|
+
if (this.bufferField_1.get_size_woubt6_k$() === 0n) {
|
|
779
|
+
var read = this.source_1.readAtMostTo_4oop6l_k$(this.bufferField_1, 8192n);
|
|
780
780
|
if (read === -1n)
|
|
781
781
|
return -1n;
|
|
782
782
|
}
|
|
783
783
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
784
|
-
var b = this.
|
|
784
|
+
var b = this.bufferField_1.get_size_woubt6_k$();
|
|
785
785
|
var toRead = byteCount <= b ? byteCount : b;
|
|
786
|
-
return this.
|
|
786
|
+
return this.bufferField_1.readAtMostTo_4oop6l_k$(sink, toRead);
|
|
787
787
|
};
|
|
788
|
-
protoOf(RealSource).
|
|
788
|
+
protoOf(RealSource).exhausted_p1jt55_k$ = function () {
|
|
789
789
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
790
790
|
// Inline function 'kotlin.check' call
|
|
791
|
-
if (!!this.
|
|
791
|
+
if (!!this.closed_1) {
|
|
792
792
|
var message = 'Source is closed.';
|
|
793
793
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
794
794
|
}
|
|
795
|
-
return this.
|
|
795
|
+
return this.bufferField_1.exhausted_p1jt55_k$() && this.source_1.readAtMostTo_4oop6l_k$(this.bufferField_1, 8192n) === -1n;
|
|
796
796
|
};
|
|
797
|
-
protoOf(RealSource).
|
|
798
|
-
if (!this.
|
|
797
|
+
protoOf(RealSource).require_37jki9_k$ = function (byteCount) {
|
|
798
|
+
if (!this.request_hj5jqj_k$(byteCount))
|
|
799
799
|
throw EOFException_init_$Create$_0("Source doesn't contain required number of bytes (" + byteCount.toString() + ').');
|
|
800
800
|
};
|
|
801
|
-
protoOf(RealSource).
|
|
801
|
+
protoOf(RealSource).request_hj5jqj_k$ = function (byteCount) {
|
|
802
802
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
803
803
|
// Inline function 'kotlin.check' call
|
|
804
|
-
if (!!this.
|
|
804
|
+
if (!!this.closed_1) {
|
|
805
805
|
var message = 'Source is closed.';
|
|
806
806
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
807
807
|
}
|
|
@@ -810,91 +810,91 @@ protoOf(RealSource).zo = function (byteCount) {
|
|
|
810
810
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
811
811
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
812
812
|
}
|
|
813
|
-
while (this.
|
|
814
|
-
if (this.
|
|
813
|
+
while (this.bufferField_1.get_size_woubt6_k$() < byteCount) {
|
|
814
|
+
if (this.source_1.readAtMostTo_4oop6l_k$(this.bufferField_1, 8192n) === -1n)
|
|
815
815
|
return false;
|
|
816
816
|
}
|
|
817
817
|
return true;
|
|
818
818
|
};
|
|
819
|
-
protoOf(RealSource).
|
|
820
|
-
this.
|
|
821
|
-
return this.
|
|
819
|
+
protoOf(RealSource).readByte_ectjk2_k$ = function () {
|
|
820
|
+
this.require_37jki9_k$(1n);
|
|
821
|
+
return this.bufferField_1.readByte_ectjk2_k$();
|
|
822
822
|
};
|
|
823
|
-
protoOf(RealSource).
|
|
823
|
+
protoOf(RealSource).readAtMostTo_kub29z_k$ = function (sink, startIndex, endIndex) {
|
|
824
824
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
825
825
|
var size = sink.length;
|
|
826
826
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
827
|
-
if (this.
|
|
828
|
-
var read = this.
|
|
827
|
+
if (this.bufferField_1.get_size_woubt6_k$() === 0n) {
|
|
828
|
+
var read = this.source_1.readAtMostTo_4oop6l_k$(this.bufferField_1, 8192n);
|
|
829
829
|
if (read === -1n)
|
|
830
830
|
return -1;
|
|
831
831
|
}
|
|
832
832
|
var tmp0 = endIndex - startIndex | 0;
|
|
833
833
|
// Inline function 'kotlinx.io.minOf' call
|
|
834
|
-
var b = this.
|
|
834
|
+
var b = this.bufferField_1.get_size_woubt6_k$();
|
|
835
835
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
836
836
|
var a = fromInt(tmp0);
|
|
837
837
|
var tmp$ret$1 = a <= b ? a : b;
|
|
838
838
|
var toRead = convertToInt(tmp$ret$1);
|
|
839
|
-
return this.
|
|
839
|
+
return this.bufferField_1.readAtMostTo_kub29z_k$(sink, startIndex, startIndex + toRead | 0);
|
|
840
840
|
};
|
|
841
|
-
protoOf(RealSource).
|
|
841
|
+
protoOf(RealSource).readTo_3vtbf7_k$ = function (sink, byteCount) {
|
|
842
842
|
try {
|
|
843
|
-
this.
|
|
843
|
+
this.require_37jki9_k$(byteCount);
|
|
844
844
|
} catch ($p) {
|
|
845
845
|
if ($p instanceof EOFException) {
|
|
846
846
|
var e = $p;
|
|
847
|
-
sink.
|
|
847
|
+
sink.write_ob3ym3_k$(this.bufferField_1, this.bufferField_1.get_size_woubt6_k$());
|
|
848
848
|
throw e;
|
|
849
849
|
} else {
|
|
850
850
|
throw $p;
|
|
851
851
|
}
|
|
852
852
|
}
|
|
853
|
-
this.
|
|
853
|
+
this.bufferField_1.readTo_3vtbf7_k$(sink, byteCount);
|
|
854
854
|
};
|
|
855
|
-
protoOf(RealSource).
|
|
855
|
+
protoOf(RealSource).transferTo_lu4ka2_k$ = function (sink) {
|
|
856
856
|
var totalBytesWritten = 0n;
|
|
857
|
-
while (!(this.
|
|
858
|
-
var emitByteCount = this.
|
|
857
|
+
while (!(this.source_1.readAtMostTo_4oop6l_k$(this.bufferField_1, 8192n) === -1n)) {
|
|
858
|
+
var emitByteCount = this.bufferField_1.completeSegmentByteCount_46ltjp_k$();
|
|
859
859
|
if (emitByteCount > 0n) {
|
|
860
860
|
totalBytesWritten = add(totalBytesWritten, emitByteCount);
|
|
861
|
-
sink.
|
|
861
|
+
sink.write_ob3ym3_k$(this.bufferField_1, emitByteCount);
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
|
-
if (this.
|
|
865
|
-
totalBytesWritten = add(totalBytesWritten, this.
|
|
866
|
-
sink.
|
|
864
|
+
if (this.bufferField_1.get_size_woubt6_k$() > 0n) {
|
|
865
|
+
totalBytesWritten = add(totalBytesWritten, this.bufferField_1.get_size_woubt6_k$());
|
|
866
|
+
sink.write_ob3ym3_k$(this.bufferField_1, this.bufferField_1.get_size_woubt6_k$());
|
|
867
867
|
}
|
|
868
868
|
return totalBytesWritten;
|
|
869
869
|
};
|
|
870
|
-
protoOf(RealSource).
|
|
871
|
-
this.
|
|
872
|
-
return this.
|
|
870
|
+
protoOf(RealSource).readShort_ilpyey_k$ = function () {
|
|
871
|
+
this.require_37jki9_k$(2n);
|
|
872
|
+
return this.bufferField_1.readShort_ilpyey_k$();
|
|
873
873
|
};
|
|
874
|
-
protoOf(RealSource).
|
|
874
|
+
protoOf(RealSource).peek_21nx7_k$ = function () {
|
|
875
875
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
876
876
|
// Inline function 'kotlin.check' call
|
|
877
|
-
if (!!this.
|
|
877
|
+
if (!!this.closed_1) {
|
|
878
878
|
var message = 'Source is closed.';
|
|
879
879
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
880
880
|
}
|
|
881
881
|
return buffered(new PeekSource(this));
|
|
882
882
|
};
|
|
883
|
-
protoOf(RealSource).
|
|
884
|
-
if (this.
|
|
883
|
+
protoOf(RealSource).close_yn9xrc_k$ = function () {
|
|
884
|
+
if (this.closed_1)
|
|
885
885
|
return Unit_instance;
|
|
886
|
-
this.
|
|
887
|
-
this.
|
|
888
|
-
this.
|
|
886
|
+
this.closed_1 = true;
|
|
887
|
+
this.source_1.close_yn9xrc_k$();
|
|
888
|
+
this.bufferField_1.clear_j9egeb_k$();
|
|
889
889
|
};
|
|
890
890
|
protoOf(RealSource).toString = function () {
|
|
891
|
-
return 'buffered(' + toString(this.
|
|
891
|
+
return 'buffered(' + toString(this.source_1) + ')';
|
|
892
892
|
};
|
|
893
893
|
function Segment_init_$Init$($this) {
|
|
894
894
|
Segment.call($this);
|
|
895
|
-
$this.
|
|
896
|
-
$this.
|
|
897
|
-
$this.
|
|
895
|
+
$this.data_1 = new Int8Array(8192);
|
|
896
|
+
$this.owner_1 = true;
|
|
897
|
+
$this.copyTracker_1 = null;
|
|
898
898
|
return $this;
|
|
899
899
|
}
|
|
900
900
|
function Segment_init_$Create$() {
|
|
@@ -902,87 +902,87 @@ function Segment_init_$Create$() {
|
|
|
902
902
|
}
|
|
903
903
|
function Segment_init_$Init$_0(data, pos, limit, shareToken, owner, $this) {
|
|
904
904
|
Segment.call($this);
|
|
905
|
-
$this.
|
|
906
|
-
$this.
|
|
907
|
-
$this.
|
|
908
|
-
$this.
|
|
909
|
-
$this.
|
|
905
|
+
$this.data_1 = data;
|
|
906
|
+
$this.pos_1 = pos;
|
|
907
|
+
$this.limit_1 = limit;
|
|
908
|
+
$this.copyTracker_1 = shareToken;
|
|
909
|
+
$this.owner_1 = owner;
|
|
910
910
|
return $this;
|
|
911
911
|
}
|
|
912
912
|
function Segment_init_$Create$_0(data, pos, limit, shareToken, owner) {
|
|
913
913
|
return Segment_init_$Init$_0(data, pos, limit, shareToken, owner, objectCreate(protoOf(Segment)));
|
|
914
914
|
}
|
|
915
915
|
function Companion() {
|
|
916
|
-
this.
|
|
917
|
-
this.
|
|
916
|
+
this.SIZE_1 = 8192;
|
|
917
|
+
this.SHARE_MINIMUM_1 = 1024;
|
|
918
918
|
}
|
|
919
|
-
protoOf(Companion).
|
|
919
|
+
protoOf(Companion).new_79u2a0_k$ = function () {
|
|
920
920
|
return Segment_init_$Create$();
|
|
921
921
|
};
|
|
922
922
|
var Companion_instance;
|
|
923
923
|
function Companion_getInstance() {
|
|
924
924
|
return Companion_instance;
|
|
925
925
|
}
|
|
926
|
-
protoOf(Segment).
|
|
927
|
-
var tmp0_safe_receiver = this.
|
|
928
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
926
|
+
protoOf(Segment).get_shared_lt0222_k$ = function () {
|
|
927
|
+
var tmp0_safe_receiver = this.copyTracker_1;
|
|
928
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_shared_jgtlda_k$();
|
|
929
929
|
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
|
|
930
930
|
};
|
|
931
|
-
protoOf(Segment).
|
|
932
|
-
var tmp0_elvis_lhs = this.
|
|
931
|
+
protoOf(Segment).sharedCopy_efss0u_k$ = function () {
|
|
932
|
+
var tmp0_elvis_lhs = this.copyTracker_1;
|
|
933
933
|
var tmp;
|
|
934
934
|
if (tmp0_elvis_lhs == null) {
|
|
935
935
|
// Inline function 'kotlin.also' call
|
|
936
|
-
var this_0 = SegmentPool_instance.
|
|
937
|
-
this.
|
|
936
|
+
var this_0 = SegmentPool_instance.tracker_hnhzgo_k$();
|
|
937
|
+
this.copyTracker_1 = this_0;
|
|
938
938
|
tmp = this_0;
|
|
939
939
|
} else {
|
|
940
940
|
tmp = tmp0_elvis_lhs;
|
|
941
941
|
}
|
|
942
942
|
var t = tmp;
|
|
943
|
-
var tmp_0 = this.
|
|
944
|
-
var tmp_1 = this.
|
|
943
|
+
var tmp_0 = this.pos_1;
|
|
944
|
+
var tmp_1 = this.limit_1;
|
|
945
945
|
// Inline function 'kotlin.also' call
|
|
946
|
-
t.
|
|
947
|
-
return Segment_init_$Create$_0(this.
|
|
946
|
+
t.addCopy_6z3v8m_k$();
|
|
947
|
+
return Segment_init_$Create$_0(this.data_1, tmp_0, tmp_1, t, false);
|
|
948
948
|
};
|
|
949
|
-
protoOf(Segment).
|
|
950
|
-
var result = this.
|
|
951
|
-
if (!(this.
|
|
952
|
-
ensureNotNull(this.
|
|
949
|
+
protoOf(Segment).pop_417547_k$ = function () {
|
|
950
|
+
var result = this.next_1;
|
|
951
|
+
if (!(this.prev_1 == null)) {
|
|
952
|
+
ensureNotNull(this.prev_1).next_1 = this.next_1;
|
|
953
953
|
}
|
|
954
|
-
if (!(this.
|
|
955
|
-
ensureNotNull(this.
|
|
954
|
+
if (!(this.next_1 == null)) {
|
|
955
|
+
ensureNotNull(this.next_1).prev_1 = this.prev_1;
|
|
956
956
|
}
|
|
957
|
-
this.
|
|
958
|
-
this.
|
|
957
|
+
this.next_1 = null;
|
|
958
|
+
this.prev_1 = null;
|
|
959
959
|
return result;
|
|
960
960
|
};
|
|
961
|
-
protoOf(Segment).
|
|
962
|
-
segment.
|
|
963
|
-
segment.
|
|
964
|
-
if (!(this.
|
|
965
|
-
ensureNotNull(this.
|
|
961
|
+
protoOf(Segment).push_h69db4_k$ = function (segment) {
|
|
962
|
+
segment.prev_1 = this;
|
|
963
|
+
segment.next_1 = this.next_1;
|
|
964
|
+
if (!(this.next_1 == null)) {
|
|
965
|
+
ensureNotNull(this.next_1).prev_1 = segment;
|
|
966
966
|
}
|
|
967
|
-
this.
|
|
967
|
+
this.next_1 = segment;
|
|
968
968
|
return segment;
|
|
969
969
|
};
|
|
970
|
-
protoOf(Segment).
|
|
970
|
+
protoOf(Segment).split_p6jwdi_k$ = function (byteCount) {
|
|
971
971
|
// Inline function 'kotlin.require' call
|
|
972
|
-
if (!(byteCount > 0 && byteCount <= (this.
|
|
972
|
+
if (!(byteCount > 0 && byteCount <= (this.limit_1 - this.pos_1 | 0))) {
|
|
973
973
|
var message = 'byteCount out of range';
|
|
974
974
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
975
975
|
}
|
|
976
976
|
var prefix;
|
|
977
977
|
if (byteCount >= 1024) {
|
|
978
|
-
prefix = this.
|
|
978
|
+
prefix = this.sharedCopy_efss0u_k$();
|
|
979
979
|
} else {
|
|
980
|
-
prefix = SegmentPool_instance.
|
|
981
|
-
var tmp0 = this.
|
|
982
|
-
var tmp2 = prefix.
|
|
983
|
-
var tmp5 = this.
|
|
980
|
+
prefix = SegmentPool_instance.take_2451j_k$();
|
|
981
|
+
var tmp0 = this.data_1;
|
|
982
|
+
var tmp2 = prefix.data_1;
|
|
983
|
+
var tmp5 = this.pos_1;
|
|
984
984
|
// Inline function 'kotlin.collections.copyInto' call
|
|
985
|
-
var endIndex = this.
|
|
985
|
+
var endIndex = this.pos_1 + byteCount | 0;
|
|
986
986
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
987
987
|
// Inline function 'kotlin.js.asDynamic' call
|
|
988
988
|
var tmp = tmp0;
|
|
@@ -990,62 +990,62 @@ protoOf(Segment).mq = function (byteCount) {
|
|
|
990
990
|
// Inline function 'kotlin.js.asDynamic' call
|
|
991
991
|
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
992
992
|
}
|
|
993
|
-
prefix.
|
|
994
|
-
this.
|
|
995
|
-
if (!(this.
|
|
996
|
-
ensureNotNull(this.
|
|
993
|
+
prefix.limit_1 = prefix.pos_1 + byteCount | 0;
|
|
994
|
+
this.pos_1 = this.pos_1 + byteCount | 0;
|
|
995
|
+
if (!(this.prev_1 == null)) {
|
|
996
|
+
ensureNotNull(this.prev_1).push_h69db4_k$(prefix);
|
|
997
997
|
} else {
|
|
998
|
-
prefix.
|
|
999
|
-
this.
|
|
998
|
+
prefix.next_1 = this;
|
|
999
|
+
this.prev_1 = prefix;
|
|
1000
1000
|
}
|
|
1001
1001
|
return prefix;
|
|
1002
1002
|
};
|
|
1003
|
-
protoOf(Segment).
|
|
1003
|
+
protoOf(Segment).compact_he236d_k$ = function () {
|
|
1004
1004
|
// Inline function 'kotlin.check' call
|
|
1005
|
-
if (!!(this.
|
|
1005
|
+
if (!!(this.prev_1 == null)) {
|
|
1006
1006
|
var message = 'cannot compact';
|
|
1007
1007
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1008
1008
|
}
|
|
1009
|
-
if (!ensureNotNull(this.
|
|
1009
|
+
if (!ensureNotNull(this.prev_1).owner_1)
|
|
1010
1010
|
return this;
|
|
1011
|
-
var byteCount = this.
|
|
1012
|
-
var availableByteCount = (8192 - ensureNotNull(this.
|
|
1011
|
+
var byteCount = this.limit_1 - this.pos_1 | 0;
|
|
1012
|
+
var availableByteCount = (8192 - ensureNotNull(this.prev_1).limit_1 | 0) + (ensureNotNull(this.prev_1).get_shared_lt0222_k$() ? 0 : ensureNotNull(this.prev_1).pos_1) | 0;
|
|
1013
1013
|
if (byteCount > availableByteCount)
|
|
1014
1014
|
return this;
|
|
1015
|
-
var predecessor = this.
|
|
1016
|
-
this.
|
|
1017
|
-
var successor = this.
|
|
1015
|
+
var predecessor = this.prev_1;
|
|
1016
|
+
this.writeTo_vgyea0_k$(ensureNotNull(predecessor), byteCount);
|
|
1017
|
+
var successor = this.pop_417547_k$();
|
|
1018
1018
|
// Inline function 'kotlin.check' call
|
|
1019
1019
|
if (!(successor == null)) {
|
|
1020
1020
|
throw IllegalStateException_init_$Create$('Check failed.');
|
|
1021
1021
|
}
|
|
1022
|
-
SegmentPool_instance.
|
|
1022
|
+
SegmentPool_instance.recycle_3mobff_k$(this);
|
|
1023
1023
|
return predecessor;
|
|
1024
1024
|
};
|
|
1025
|
-
protoOf(Segment).
|
|
1026
|
-
var _unary__edvuaz = this.
|
|
1027
|
-
this.
|
|
1028
|
-
this.
|
|
1025
|
+
protoOf(Segment).writeByte_naaedl_k$ = function (byte) {
|
|
1026
|
+
var _unary__edvuaz = this.limit_1;
|
|
1027
|
+
this.limit_1 = _unary__edvuaz + 1 | 0;
|
|
1028
|
+
this.data_1[_unary__edvuaz] = byte;
|
|
1029
1029
|
};
|
|
1030
|
-
protoOf(Segment).
|
|
1031
|
-
var data = this.
|
|
1032
|
-
var limit = this.
|
|
1030
|
+
protoOf(Segment).writeShort_n1l1d9_k$ = function (short) {
|
|
1031
|
+
var data = this.data_1;
|
|
1032
|
+
var limit = this.limit_1;
|
|
1033
1033
|
var _unary__edvuaz = limit;
|
|
1034
1034
|
limit = _unary__edvuaz + 1 | 0;
|
|
1035
1035
|
data[_unary__edvuaz] = toByte((short >>> 8 | 0) & 255);
|
|
1036
1036
|
var _unary__edvuaz_0 = limit;
|
|
1037
1037
|
limit = _unary__edvuaz_0 + 1 | 0;
|
|
1038
1038
|
data[_unary__edvuaz_0] = toByte(short & 255);
|
|
1039
|
-
this.
|
|
1039
|
+
this.limit_1 = limit;
|
|
1040
1040
|
};
|
|
1041
|
-
protoOf(Segment).
|
|
1042
|
-
var _unary__edvuaz = this.
|
|
1043
|
-
this.
|
|
1044
|
-
return this.
|
|
1041
|
+
protoOf(Segment).readByte_newmca_k$ = function () {
|
|
1042
|
+
var _unary__edvuaz = this.pos_1;
|
|
1043
|
+
this.pos_1 = _unary__edvuaz + 1 | 0;
|
|
1044
|
+
return this.data_1[_unary__edvuaz];
|
|
1045
1045
|
};
|
|
1046
|
-
protoOf(Segment).
|
|
1047
|
-
var data = this.
|
|
1048
|
-
var pos = this.
|
|
1046
|
+
protoOf(Segment).readShort_7b409e_k$ = function () {
|
|
1047
|
+
var data = this.data_1;
|
|
1048
|
+
var pos = this.pos_1;
|
|
1049
1049
|
var _unary__edvuaz = pos;
|
|
1050
1050
|
pos = _unary__edvuaz + 1 | 0;
|
|
1051
1051
|
// Inline function 'kotlinx.io.and' call
|
|
@@ -1055,121 +1055,121 @@ protoOf(Segment).lp = function () {
|
|
|
1055
1055
|
// Inline function 'kotlinx.io.and' call
|
|
1056
1056
|
var tmp$ret$1 = data[_unary__edvuaz_0] & 255;
|
|
1057
1057
|
var s = toShort(tmp | tmp$ret$1);
|
|
1058
|
-
this.
|
|
1058
|
+
this.pos_1 = pos;
|
|
1059
1059
|
return s;
|
|
1060
1060
|
};
|
|
1061
|
-
protoOf(Segment).
|
|
1061
|
+
protoOf(Segment).writeTo_vgyea0_k$ = function (sink, byteCount) {
|
|
1062
1062
|
// Inline function 'kotlin.check' call
|
|
1063
|
-
if (!sink.
|
|
1063
|
+
if (!sink.owner_1) {
|
|
1064
1064
|
var message = 'only owner can write';
|
|
1065
1065
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1066
1066
|
}
|
|
1067
|
-
if ((sink.
|
|
1068
|
-
if (sink.
|
|
1067
|
+
if ((sink.limit_1 + byteCount | 0) > 8192) {
|
|
1068
|
+
if (sink.get_shared_lt0222_k$())
|
|
1069
1069
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1070
|
-
if (((sink.
|
|
1070
|
+
if (((sink.limit_1 + byteCount | 0) - sink.pos_1 | 0) > 8192)
|
|
1071
1071
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1072
|
-
var tmp0 = sink.
|
|
1073
|
-
var tmp2 = sink.
|
|
1074
|
-
var tmp5 = sink.
|
|
1072
|
+
var tmp0 = sink.data_1;
|
|
1073
|
+
var tmp2 = sink.data_1;
|
|
1074
|
+
var tmp5 = sink.pos_1;
|
|
1075
1075
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1076
|
-
var endIndex = sink.
|
|
1076
|
+
var endIndex = sink.limit_1;
|
|
1077
1077
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1078
1078
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1079
1079
|
var tmp = tmp0;
|
|
1080
1080
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1081
1081
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1082
1082
|
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
1083
|
-
sink.
|
|
1084
|
-
sink.
|
|
1083
|
+
sink.limit_1 = sink.limit_1 - sink.pos_1 | 0;
|
|
1084
|
+
sink.pos_1 = 0;
|
|
1085
1085
|
}
|
|
1086
|
-
var tmp0_0 = this.
|
|
1087
|
-
var tmp2_0 = sink.
|
|
1088
|
-
var tmp4 = sink.
|
|
1089
|
-
var tmp6 = this.
|
|
1086
|
+
var tmp0_0 = this.data_1;
|
|
1087
|
+
var tmp2_0 = sink.data_1;
|
|
1088
|
+
var tmp4 = sink.limit_1;
|
|
1089
|
+
var tmp6 = this.pos_1;
|
|
1090
1090
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1091
|
-
var endIndex_0 = this.
|
|
1091
|
+
var endIndex_0 = this.pos_1 + byteCount | 0;
|
|
1092
1092
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1093
1093
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1094
1094
|
var tmp_0 = tmp0_0;
|
|
1095
1095
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1096
1096
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1097
1097
|
arrayCopy(tmp_0, tmp2_0, tmp4, tmp6, endIndex_0);
|
|
1098
|
-
sink.
|
|
1099
|
-
this.
|
|
1098
|
+
sink.limit_1 = sink.limit_1 + byteCount | 0;
|
|
1099
|
+
this.pos_1 = this.pos_1 + byteCount | 0;
|
|
1100
1100
|
};
|
|
1101
|
-
protoOf(Segment).
|
|
1101
|
+
protoOf(Segment).readTo_7avxxz_k$ = function (dst, dstStartOffset, dstEndOffset) {
|
|
1102
1102
|
var len = dstEndOffset - dstStartOffset | 0;
|
|
1103
|
-
var tmp0 = this.
|
|
1104
|
-
var tmp6 = this.
|
|
1103
|
+
var tmp0 = this.data_1;
|
|
1104
|
+
var tmp6 = this.pos_1;
|
|
1105
1105
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1106
|
-
var endIndex = this.
|
|
1106
|
+
var endIndex = this.pos_1 + len | 0;
|
|
1107
1107
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1108
1108
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1109
1109
|
var tmp = tmp0;
|
|
1110
1110
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1111
1111
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1112
1112
|
arrayCopy(tmp, dst, dstStartOffset, tmp6, endIndex);
|
|
1113
|
-
this.
|
|
1113
|
+
this.pos_1 = this.pos_1 + len | 0;
|
|
1114
1114
|
};
|
|
1115
|
-
protoOf(Segment).
|
|
1116
|
-
var tmp2 = this.
|
|
1115
|
+
protoOf(Segment).write_j6nfmf_k$ = function (src, srcStartOffset, srcEndOffset) {
|
|
1116
|
+
var tmp2 = this.data_1;
|
|
1117
1117
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1118
|
-
var destinationOffset = this.
|
|
1118
|
+
var destinationOffset = this.limit_1;
|
|
1119
1119
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1120
1120
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1121
1121
|
var tmp = src;
|
|
1122
1122
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1123
1123
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1124
1124
|
arrayCopy(tmp, tmp2, destinationOffset, srcStartOffset, srcEndOffset);
|
|
1125
|
-
this.
|
|
1125
|
+
this.limit_1 = this.limit_1 + (srcEndOffset - srcStartOffset | 0) | 0;
|
|
1126
1126
|
};
|
|
1127
|
-
protoOf(Segment).
|
|
1128
|
-
return this.
|
|
1127
|
+
protoOf(Segment).get_size_woubt6_k$ = function () {
|
|
1128
|
+
return this.limit_1 - this.pos_1 | 0;
|
|
1129
1129
|
};
|
|
1130
|
-
protoOf(Segment).
|
|
1131
|
-
return this.
|
|
1130
|
+
protoOf(Segment).get_remainingCapacity_c94947_k$ = function () {
|
|
1131
|
+
return this.data_1.length - this.limit_1 | 0;
|
|
1132
1132
|
};
|
|
1133
|
-
protoOf(Segment).
|
|
1134
|
-
return this.
|
|
1133
|
+
protoOf(Segment).dataAsByteArray_g1m4im_k$ = function (readOnly) {
|
|
1134
|
+
return this.data_1;
|
|
1135
1135
|
};
|
|
1136
|
-
protoOf(Segment).
|
|
1137
|
-
return this.
|
|
1136
|
+
protoOf(Segment).getUnchecked_g7gmig_k$ = function (index) {
|
|
1137
|
+
return this.data_1[this.pos_1 + index | 0];
|
|
1138
1138
|
};
|
|
1139
|
-
protoOf(Segment).
|
|
1140
|
-
this.
|
|
1139
|
+
protoOf(Segment).setUnchecked_5zbo2s_k$ = function (index, value) {
|
|
1140
|
+
this.data_1[this.limit_1 + index | 0] = value;
|
|
1141
1141
|
};
|
|
1142
|
-
protoOf(Segment).
|
|
1143
|
-
var d = this.
|
|
1144
|
-
var l = this.
|
|
1142
|
+
protoOf(Segment).setUnchecked_fqg8f0_k$ = function (index, b0, b1) {
|
|
1143
|
+
var d = this.data_1;
|
|
1144
|
+
var l = this.limit_1;
|
|
1145
1145
|
d[l + index | 0] = b0;
|
|
1146
1146
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1147
1147
|
};
|
|
1148
|
-
protoOf(Segment).
|
|
1149
|
-
var d = this.
|
|
1150
|
-
var l = this.
|
|
1148
|
+
protoOf(Segment).setUnchecked_lebl98_k$ = function (index, b0, b1, b2) {
|
|
1149
|
+
var d = this.data_1;
|
|
1150
|
+
var l = this.limit_1;
|
|
1151
1151
|
d[l + index | 0] = b0;
|
|
1152
1152
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1153
1153
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1154
1154
|
};
|
|
1155
|
-
protoOf(Segment).
|
|
1156
|
-
var d = this.
|
|
1157
|
-
var l = this.
|
|
1155
|
+
protoOf(Segment).setUnchecked_8pgckc_k$ = function (index, b0, b1, b2, b3) {
|
|
1156
|
+
var d = this.data_1;
|
|
1157
|
+
var l = this.limit_1;
|
|
1158
1158
|
d[l + index | 0] = b0;
|
|
1159
1159
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1160
1160
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1161
1161
|
d[(l + index | 0) + 3 | 0] = b3;
|
|
1162
1162
|
};
|
|
1163
1163
|
function Segment() {
|
|
1164
|
-
this.
|
|
1165
|
-
this.
|
|
1166
|
-
this.
|
|
1167
|
-
this.
|
|
1168
|
-
this.
|
|
1169
|
-
this.
|
|
1164
|
+
this.pos_1 = 0;
|
|
1165
|
+
this.limit_1 = 0;
|
|
1166
|
+
this.copyTracker_1 = null;
|
|
1167
|
+
this.owner_1 = false;
|
|
1168
|
+
this.next_1 = null;
|
|
1169
|
+
this.prev_1 = null;
|
|
1170
1170
|
}
|
|
1171
1171
|
function isEmpty(_this__u8e3s4) {
|
|
1172
|
-
return _this__u8e3s4.
|
|
1172
|
+
return _this__u8e3s4.get_size_woubt6_k$() === 0;
|
|
1173
1173
|
}
|
|
1174
1174
|
function SegmentCopyTracker() {
|
|
1175
1175
|
}
|
|
@@ -1177,10 +1177,10 @@ function AlwaysSharedCopyTracker() {
|
|
|
1177
1177
|
AlwaysSharedCopyTracker_instance = this;
|
|
1178
1178
|
SegmentCopyTracker.call(this);
|
|
1179
1179
|
}
|
|
1180
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1180
|
+
protoOf(AlwaysSharedCopyTracker).get_shared_jgtlda_k$ = function () {
|
|
1181
1181
|
return true;
|
|
1182
1182
|
};
|
|
1183
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1183
|
+
protoOf(AlwaysSharedCopyTracker).addCopy_6z3v8m_k$ = function () {
|
|
1184
1184
|
return Unit_instance;
|
|
1185
1185
|
};
|
|
1186
1186
|
var AlwaysSharedCopyTracker_instance;
|
|
@@ -1191,17 +1191,17 @@ function AlwaysSharedCopyTracker_getInstance() {
|
|
|
1191
1191
|
}
|
|
1192
1192
|
function indexOf_0(_this__u8e3s4, byte, startOffset, endOffset) {
|
|
1193
1193
|
// Inline function 'kotlin.require' call
|
|
1194
|
-
if (!(0 <= startOffset ? startOffset < _this__u8e3s4.
|
|
1194
|
+
if (!(0 <= startOffset ? startOffset < _this__u8e3s4.get_size_woubt6_k$() : false)) {
|
|
1195
1195
|
var message = '' + startOffset;
|
|
1196
1196
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1197
1197
|
}
|
|
1198
1198
|
// Inline function 'kotlin.require' call
|
|
1199
|
-
if (!(startOffset <= endOffset ? endOffset <= _this__u8e3s4.
|
|
1199
|
+
if (!(startOffset <= endOffset ? endOffset <= _this__u8e3s4.get_size_woubt6_k$() : false)) {
|
|
1200
1200
|
var message_0 = '' + endOffset;
|
|
1201
1201
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1202
1202
|
}
|
|
1203
|
-
var p = _this__u8e3s4.
|
|
1204
|
-
var data = _this__u8e3s4.
|
|
1203
|
+
var p = _this__u8e3s4.pos_1;
|
|
1204
|
+
var data = _this__u8e3s4.dataAsByteArray_g1m4im_k$(true);
|
|
1205
1205
|
var inductionVariable = startOffset;
|
|
1206
1206
|
if (inductionVariable < endOffset)
|
|
1207
1207
|
do {
|
|
@@ -1254,23 +1254,23 @@ function indexOf_1(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
1254
1254
|
// Inline function 'kotlin.Long.plus' call
|
|
1255
1255
|
var this_0 = offset;
|
|
1256
1256
|
var tmp$ret$2 = add(this_0, fromInt(1));
|
|
1257
|
-
tmp_0 = _this__u8e3s4.
|
|
1257
|
+
tmp_0 = _this__u8e3s4.request_hj5jqj_k$(tmp$ret$2);
|
|
1258
1258
|
} else {
|
|
1259
1259
|
tmp_0 = false;
|
|
1260
1260
|
}
|
|
1261
1261
|
if (!tmp_0) {
|
|
1262
1262
|
break $l$loop;
|
|
1263
1263
|
}
|
|
1264
|
-
var tmp_1 = _this__u8e3s4.
|
|
1264
|
+
var tmp_1 = _this__u8e3s4.get_buffer_bmaafd_k$();
|
|
1265
1265
|
var tmp_2 = offset;
|
|
1266
1266
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1267
|
-
var b = _this__u8e3s4.
|
|
1267
|
+
var b = _this__u8e3s4.get_buffer_bmaafd_k$().get_size_woubt6_k$();
|
|
1268
1268
|
var tmp$ret$3 = endIndex <= b ? endIndex : b;
|
|
1269
1269
|
var idx = indexOf(tmp_1, byte, tmp_2, tmp$ret$3);
|
|
1270
1270
|
if (!(idx === -1n)) {
|
|
1271
1271
|
return idx;
|
|
1272
1272
|
}
|
|
1273
|
-
offset = _this__u8e3s4.
|
|
1273
|
+
offset = _this__u8e3s4.get_buffer_bmaafd_k$().get_size_woubt6_k$();
|
|
1274
1274
|
}
|
|
1275
1275
|
return -1n;
|
|
1276
1276
|
}
|
|
@@ -1278,22 +1278,22 @@ function readByteArrayImpl(_this__u8e3s4, size) {
|
|
|
1278
1278
|
var arraySize = size;
|
|
1279
1279
|
if (size === -1) {
|
|
1280
1280
|
var fetchSize = 2147483647n;
|
|
1281
|
-
while (_this__u8e3s4.
|
|
1281
|
+
while (_this__u8e3s4.get_buffer_bmaafd_k$().get_size_woubt6_k$() < 2147483647n && _this__u8e3s4.request_hj5jqj_k$(fetchSize)) {
|
|
1282
1282
|
// Inline function 'kotlin.Long.times' call
|
|
1283
1283
|
var this_0 = fetchSize;
|
|
1284
1284
|
fetchSize = multiply(this_0, fromInt(2));
|
|
1285
1285
|
}
|
|
1286
1286
|
// Inline function 'kotlin.check' call
|
|
1287
|
-
if (!(_this__u8e3s4.
|
|
1288
|
-
var message = "Can't create an array of size " + _this__u8e3s4.
|
|
1287
|
+
if (!(_this__u8e3s4.get_buffer_bmaafd_k$().get_size_woubt6_k$() < 2147483647n)) {
|
|
1288
|
+
var message = "Can't create an array of size " + _this__u8e3s4.get_buffer_bmaafd_k$().get_size_woubt6_k$().toString();
|
|
1289
1289
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1290
1290
|
}
|
|
1291
|
-
arraySize = convertToInt(_this__u8e3s4.
|
|
1291
|
+
arraySize = convertToInt(_this__u8e3s4.get_buffer_bmaafd_k$().get_size_woubt6_k$());
|
|
1292
1292
|
} else {
|
|
1293
|
-
_this__u8e3s4.
|
|
1293
|
+
_this__u8e3s4.require_37jki9_k$(fromInt(size));
|
|
1294
1294
|
}
|
|
1295
1295
|
var array = new Int8Array(arraySize);
|
|
1296
|
-
readTo(_this__u8e3s4.
|
|
1296
|
+
readTo(_this__u8e3s4.get_buffer_bmaafd_k$(), array);
|
|
1297
1297
|
return array;
|
|
1298
1298
|
}
|
|
1299
1299
|
function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
@@ -1304,7 +1304,7 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
1304
1304
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1305
1305
|
var offset = startIndex;
|
|
1306
1306
|
while (offset < endIndex) {
|
|
1307
|
-
var bytesRead = _this__u8e3s4.
|
|
1307
|
+
var bytesRead = _this__u8e3s4.readAtMostTo_kub29z_k$(sink, offset, endIndex);
|
|
1308
1308
|
if (bytesRead === -1) {
|
|
1309
1309
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + (endIndex - startIndex | 0) + ' bytes. ' + ('Only ' + bytesRead + ' bytes were read.'));
|
|
1310
1310
|
}
|
|
@@ -1312,15 +1312,15 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
1314
|
function readString(_this__u8e3s4, byteCount) {
|
|
1315
|
-
_this__u8e3s4.
|
|
1316
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
1315
|
+
_this__u8e3s4.require_37jki9_k$(byteCount);
|
|
1316
|
+
return commonReadUtf8(_this__u8e3s4.get_buffer_bmaafd_k$(), byteCount);
|
|
1317
1317
|
}
|
|
1318
1318
|
function readString_0(_this__u8e3s4) {
|
|
1319
|
-
return commonReadUtf8(_this__u8e3s4, _this__u8e3s4.
|
|
1319
|
+
return commonReadUtf8(_this__u8e3s4, _this__u8e3s4.get_size_woubt6_k$());
|
|
1320
1320
|
}
|
|
1321
1321
|
function readString_1(_this__u8e3s4) {
|
|
1322
|
-
_this__u8e3s4.
|
|
1323
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
1322
|
+
_this__u8e3s4.request_hj5jqj_k$(9223372036854775807n);
|
|
1323
|
+
return commonReadUtf8(_this__u8e3s4.get_buffer_bmaafd_k$(), _this__u8e3s4.get_buffer_bmaafd_k$().get_size_woubt6_k$());
|
|
1324
1324
|
}
|
|
1325
1325
|
function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
1326
1326
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
@@ -1330,7 +1330,7 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1330
1330
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1331
1331
|
// Inline function 'kotlinx.io.writeToInternalBuffer' call
|
|
1332
1332
|
// Inline function 'kotlinx.io.commonWriteUtf8' call
|
|
1333
|
-
var this_0 = _this__u8e3s4.
|
|
1333
|
+
var this_0 = _this__u8e3s4.get_buffer_bmaafd_k$();
|
|
1334
1334
|
var i = startIndex;
|
|
1335
1335
|
while (i < endIndex) {
|
|
1336
1336
|
var p0 = i;
|
|
@@ -1340,15 +1340,15 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1340
1340
|
if (c < 128) {
|
|
1341
1341
|
$l$block_0: {
|
|
1342
1342
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1343
|
-
var tail = this_0.
|
|
1343
|
+
var tail = this_0.writableSegment_voqx71_k$(1);
|
|
1344
1344
|
var ctx = get_SegmentWriteContextImpl();
|
|
1345
1345
|
var segmentOffset = -i | 0;
|
|
1346
1346
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1347
|
-
var b = i + tail.
|
|
1347
|
+
var b = i + tail.get_remainingCapacity_c94947_k$() | 0;
|
|
1348
1348
|
var runLimit = Math.min(endIndex, b);
|
|
1349
1349
|
var _unary__edvuaz = i;
|
|
1350
1350
|
i = _unary__edvuaz + 1 | 0;
|
|
1351
|
-
ctx.
|
|
1351
|
+
ctx.setUnchecked_b2f64i_k$(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
|
|
1352
1352
|
$l$loop: while (i < runLimit) {
|
|
1353
1353
|
var p0_0 = i;
|
|
1354
1354
|
// Inline function 'kotlin.code' call
|
|
@@ -1358,95 +1358,95 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1358
1358
|
break $l$loop;
|
|
1359
1359
|
var _unary__edvuaz_0 = i;
|
|
1360
1360
|
i = _unary__edvuaz_0 + 1 | 0;
|
|
1361
|
-
ctx.
|
|
1361
|
+
ctx.setUnchecked_b2f64i_k$(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
|
|
1362
1362
|
}
|
|
1363
1363
|
var bytesWritten = i + segmentOffset | 0;
|
|
1364
1364
|
if (bytesWritten === 1) {
|
|
1365
|
-
tail.
|
|
1365
|
+
tail.limit_1 = tail.limit_1 + bytesWritten | 0;
|
|
1366
1366
|
var tmp = this_0;
|
|
1367
1367
|
// Inline function 'kotlin.Long.plus' call
|
|
1368
|
-
var this_3 = this_0.
|
|
1369
|
-
tmp.
|
|
1368
|
+
var this_3 = this_0.sizeMut_1;
|
|
1369
|
+
tmp.sizeMut_1 = add(this_3, fromInt(bytesWritten));
|
|
1370
1370
|
break $l$block_0;
|
|
1371
1371
|
}
|
|
1372
1372
|
// Inline function 'kotlin.check' call
|
|
1373
|
-
if (!(0 <= bytesWritten ? bytesWritten <= tail.
|
|
1374
|
-
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.
|
|
1373
|
+
if (!(0 <= bytesWritten ? bytesWritten <= tail.get_remainingCapacity_c94947_k$() : false)) {
|
|
1374
|
+
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.get_remainingCapacity_c94947_k$();
|
|
1375
1375
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1376
1376
|
}
|
|
1377
1377
|
if (!(bytesWritten === 0)) {
|
|
1378
|
-
tail.
|
|
1378
|
+
tail.limit_1 = tail.limit_1 + bytesWritten | 0;
|
|
1379
1379
|
var tmp_0 = this_0;
|
|
1380
1380
|
// Inline function 'kotlin.Long.plus' call
|
|
1381
|
-
var this_4 = this_0.
|
|
1382
|
-
tmp_0.
|
|
1381
|
+
var this_4 = this_0.sizeMut_1;
|
|
1382
|
+
tmp_0.sizeMut_1 = add(this_4, fromInt(bytesWritten));
|
|
1383
1383
|
break $l$block_0;
|
|
1384
1384
|
}
|
|
1385
1385
|
if (isEmpty(tail)) {
|
|
1386
|
-
this_0.
|
|
1386
|
+
this_0.recycleTail_61sxi3_k$();
|
|
1387
1387
|
}
|
|
1388
1388
|
}
|
|
1389
1389
|
} else if (c < 2048) {
|
|
1390
1390
|
$l$block_2: {
|
|
1391
1391
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1392
|
-
var tail_0 = this_0.
|
|
1393
|
-
get_SegmentWriteContextImpl().
|
|
1392
|
+
var tail_0 = this_0.writableSegment_voqx71_k$(2);
|
|
1393
|
+
get_SegmentWriteContextImpl().setUnchecked_3svw1y_k$(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
1394
1394
|
var bytesWritten_0 = 2;
|
|
1395
1395
|
if (bytesWritten_0 === 2) {
|
|
1396
|
-
tail_0.
|
|
1396
|
+
tail_0.limit_1 = tail_0.limit_1 + bytesWritten_0 | 0;
|
|
1397
1397
|
var tmp_1 = this_0;
|
|
1398
1398
|
// Inline function 'kotlin.Long.plus' call
|
|
1399
|
-
var this_5 = this_0.
|
|
1400
|
-
tmp_1.
|
|
1399
|
+
var this_5 = this_0.sizeMut_1;
|
|
1400
|
+
tmp_1.sizeMut_1 = add(this_5, fromInt(bytesWritten_0));
|
|
1401
1401
|
break $l$block_2;
|
|
1402
1402
|
}
|
|
1403
1403
|
// Inline function 'kotlin.check' call
|
|
1404
|
-
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.
|
|
1405
|
-
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.
|
|
1404
|
+
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.get_remainingCapacity_c94947_k$() : false)) {
|
|
1405
|
+
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.get_remainingCapacity_c94947_k$();
|
|
1406
1406
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
1407
1407
|
}
|
|
1408
1408
|
if (!(bytesWritten_0 === 0)) {
|
|
1409
|
-
tail_0.
|
|
1409
|
+
tail_0.limit_1 = tail_0.limit_1 + bytesWritten_0 | 0;
|
|
1410
1410
|
var tmp_2 = this_0;
|
|
1411
1411
|
// Inline function 'kotlin.Long.plus' call
|
|
1412
|
-
var this_6 = this_0.
|
|
1413
|
-
tmp_2.
|
|
1412
|
+
var this_6 = this_0.sizeMut_1;
|
|
1413
|
+
tmp_2.sizeMut_1 = add(this_6, fromInt(bytesWritten_0));
|
|
1414
1414
|
break $l$block_2;
|
|
1415
1415
|
}
|
|
1416
1416
|
if (isEmpty(tail_0)) {
|
|
1417
|
-
this_0.
|
|
1417
|
+
this_0.recycleTail_61sxi3_k$();
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
1420
|
i = i + 1 | 0;
|
|
1421
1421
|
} else if (c < 55296 || c > 57343) {
|
|
1422
1422
|
$l$block_4: {
|
|
1423
1423
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1424
|
-
var tail_1 = this_0.
|
|
1425
|
-
get_SegmentWriteContextImpl().
|
|
1424
|
+
var tail_1 = this_0.writableSegment_voqx71_k$(3);
|
|
1425
|
+
get_SegmentWriteContextImpl().setUnchecked_ofazem_k$(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
1426
1426
|
var bytesWritten_1 = 3;
|
|
1427
1427
|
if (bytesWritten_1 === 3) {
|
|
1428
|
-
tail_1.
|
|
1428
|
+
tail_1.limit_1 = tail_1.limit_1 + bytesWritten_1 | 0;
|
|
1429
1429
|
var tmp_3 = this_0;
|
|
1430
1430
|
// Inline function 'kotlin.Long.plus' call
|
|
1431
|
-
var this_7 = this_0.
|
|
1432
|
-
tmp_3.
|
|
1431
|
+
var this_7 = this_0.sizeMut_1;
|
|
1432
|
+
tmp_3.sizeMut_1 = add(this_7, fromInt(bytesWritten_1));
|
|
1433
1433
|
break $l$block_4;
|
|
1434
1434
|
}
|
|
1435
1435
|
// Inline function 'kotlin.check' call
|
|
1436
|
-
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.
|
|
1437
|
-
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.
|
|
1436
|
+
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.get_remainingCapacity_c94947_k$() : false)) {
|
|
1437
|
+
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.get_remainingCapacity_c94947_k$();
|
|
1438
1438
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
1439
1439
|
}
|
|
1440
1440
|
if (!(bytesWritten_1 === 0)) {
|
|
1441
|
-
tail_1.
|
|
1441
|
+
tail_1.limit_1 = tail_1.limit_1 + bytesWritten_1 | 0;
|
|
1442
1442
|
var tmp_4 = this_0;
|
|
1443
1443
|
// Inline function 'kotlin.Long.plus' call
|
|
1444
|
-
var this_8 = this_0.
|
|
1445
|
-
tmp_4.
|
|
1444
|
+
var this_8 = this_0.sizeMut_1;
|
|
1445
|
+
tmp_4.sizeMut_1 = add(this_8, fromInt(bytesWritten_1));
|
|
1446
1446
|
break $l$block_4;
|
|
1447
1447
|
}
|
|
1448
1448
|
if (isEmpty(tail_1)) {
|
|
1449
|
-
this_0.
|
|
1449
|
+
this_0.recycleTail_61sxi3_k$();
|
|
1450
1450
|
}
|
|
1451
1451
|
}
|
|
1452
1452
|
i = i + 1 | 0;
|
|
@@ -1465,64 +1465,64 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1465
1465
|
// Inline function 'kotlin.code' call
|
|
1466
1466
|
var this_10 = _Char___init__impl__6a9atx(63);
|
|
1467
1467
|
var tmp$ret$29 = Char__toInt_impl_vasixd(this_10);
|
|
1468
|
-
this_0.
|
|
1468
|
+
this_0.writeByte_9ih3z3_k$(toByte(tmp$ret$29));
|
|
1469
1469
|
i = i + 1 | 0;
|
|
1470
1470
|
} else {
|
|
1471
1471
|
var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
|
|
1472
1472
|
$l$block_6: {
|
|
1473
1473
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1474
|
-
var tail_2 = this_0.
|
|
1475
|
-
get_SegmentWriteContextImpl().
|
|
1474
|
+
var tail_2 = this_0.writableSegment_voqx71_k$(4);
|
|
1475
|
+
get_SegmentWriteContextImpl().setUnchecked_7scgvu_k$(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
1476
1476
|
var bytesWritten_2 = 4;
|
|
1477
1477
|
if (bytesWritten_2 === 4) {
|
|
1478
|
-
tail_2.
|
|
1478
|
+
tail_2.limit_1 = tail_2.limit_1 + bytesWritten_2 | 0;
|
|
1479
1479
|
var tmp_6 = this_0;
|
|
1480
1480
|
// Inline function 'kotlin.Long.plus' call
|
|
1481
|
-
var this_11 = this_0.
|
|
1482
|
-
tmp_6.
|
|
1481
|
+
var this_11 = this_0.sizeMut_1;
|
|
1482
|
+
tmp_6.sizeMut_1 = add(this_11, fromInt(bytesWritten_2));
|
|
1483
1483
|
break $l$block_6;
|
|
1484
1484
|
}
|
|
1485
1485
|
// Inline function 'kotlin.check' call
|
|
1486
|
-
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.
|
|
1487
|
-
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.
|
|
1486
|
+
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.get_remainingCapacity_c94947_k$() : false)) {
|
|
1487
|
+
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.get_remainingCapacity_c94947_k$();
|
|
1488
1488
|
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
1489
1489
|
}
|
|
1490
1490
|
if (!(bytesWritten_2 === 0)) {
|
|
1491
|
-
tail_2.
|
|
1491
|
+
tail_2.limit_1 = tail_2.limit_1 + bytesWritten_2 | 0;
|
|
1492
1492
|
var tmp_7 = this_0;
|
|
1493
1493
|
// Inline function 'kotlin.Long.plus' call
|
|
1494
|
-
var this_12 = this_0.
|
|
1495
|
-
tmp_7.
|
|
1494
|
+
var this_12 = this_0.sizeMut_1;
|
|
1495
|
+
tmp_7.sizeMut_1 = add(this_12, fromInt(bytesWritten_2));
|
|
1496
1496
|
break $l$block_6;
|
|
1497
1497
|
}
|
|
1498
1498
|
if (isEmpty(tail_2)) {
|
|
1499
|
-
this_0.
|
|
1499
|
+
this_0.recycleTail_61sxi3_k$();
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
1502
|
i = i + 2 | 0;
|
|
1503
1503
|
}
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
1506
|
-
_this__u8e3s4.
|
|
1506
|
+
_this__u8e3s4.hintEmit_6b2e5m_k$();
|
|
1507
1507
|
}
|
|
1508
1508
|
function commonReadUtf8(_this__u8e3s4, byteCount) {
|
|
1509
1509
|
if (byteCount === 0n)
|
|
1510
1510
|
return '';
|
|
1511
1511
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
1512
|
-
var curr = _this__u8e3s4.
|
|
1512
|
+
var curr = _this__u8e3s4.head_1;
|
|
1513
1513
|
while (!(curr == null)) {
|
|
1514
1514
|
get_SegmentReadContextImpl();
|
|
1515
|
-
if (fromInt(curr.
|
|
1515
|
+
if (fromInt(curr.get_size_woubt6_k$()) >= byteCount) {
|
|
1516
1516
|
var result = '';
|
|
1517
1517
|
// Inline function 'kotlinx.io.unsafe.withData' call
|
|
1518
|
-
var tmp0 = curr.
|
|
1519
|
-
var tmp2 = curr.
|
|
1520
|
-
var tmp0_0 = curr.
|
|
1518
|
+
var tmp0 = curr.dataAsByteArray_g1m4im_k$(true);
|
|
1519
|
+
var tmp2 = curr.pos_1;
|
|
1520
|
+
var tmp0_0 = curr.limit_1;
|
|
1521
1521
|
// Inline function 'kotlin.math.min' call
|
|
1522
1522
|
var b = tmp2 + convertToInt(byteCount) | 0;
|
|
1523
1523
|
var tmp$ret$4 = Math.min(tmp0_0, b);
|
|
1524
1524
|
result = commonToUtf8String(tmp0, tmp2, tmp$ret$4);
|
|
1525
|
-
_this__u8e3s4.
|
|
1525
|
+
_this__u8e3s4.skip_csbv9x_k$(byteCount);
|
|
1526
1526
|
return result;
|
|
1527
1527
|
}
|
|
1528
1528
|
return commonToUtf8String(readByteArray_0(_this__u8e3s4, convertToInt(byteCount)));
|
|
@@ -1893,27 +1893,27 @@ function UnsafeBufferOperations_getInstance() {
|
|
|
1893
1893
|
}
|
|
1894
1894
|
function SegmentReadContextImpl$1() {
|
|
1895
1895
|
}
|
|
1896
|
-
protoOf(SegmentReadContextImpl$1).
|
|
1897
|
-
return segment.
|
|
1896
|
+
protoOf(SegmentReadContextImpl$1).getUnchecked_akrbjy_k$ = function (segment, offset) {
|
|
1897
|
+
return segment.getUnchecked_g7gmig_k$(offset);
|
|
1898
1898
|
};
|
|
1899
1899
|
function SegmentWriteContextImpl$1() {
|
|
1900
1900
|
}
|
|
1901
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1902
|
-
segment.
|
|
1901
|
+
protoOf(SegmentWriteContextImpl$1).setUnchecked_b2f64i_k$ = function (segment, offset, value) {
|
|
1902
|
+
segment.setUnchecked_5zbo2s_k$(offset, value);
|
|
1903
1903
|
};
|
|
1904
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1905
|
-
segment.
|
|
1904
|
+
protoOf(SegmentWriteContextImpl$1).setUnchecked_3svw1y_k$ = function (segment, offset, b0, b1) {
|
|
1905
|
+
segment.setUnchecked_fqg8f0_k$(offset, b0, b1);
|
|
1906
1906
|
};
|
|
1907
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1908
|
-
segment.
|
|
1907
|
+
protoOf(SegmentWriteContextImpl$1).setUnchecked_ofazem_k$ = function (segment, offset, b0, b1, b2) {
|
|
1908
|
+
segment.setUnchecked_lebl98_k$(offset, b0, b1, b2);
|
|
1909
1909
|
};
|
|
1910
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1911
|
-
segment.
|
|
1910
|
+
protoOf(SegmentWriteContextImpl$1).setUnchecked_7scgvu_k$ = function (segment, offset, b0, b1, b2, b3) {
|
|
1911
|
+
segment.setUnchecked_8pgckc_k$(offset, b0, b1, b2, b3);
|
|
1912
1912
|
};
|
|
1913
1913
|
function BufferIterationContextImpl$1() {
|
|
1914
1914
|
}
|
|
1915
|
-
protoOf(BufferIterationContextImpl$1).
|
|
1916
|
-
return get_SegmentReadContextImpl().
|
|
1915
|
+
protoOf(BufferIterationContextImpl$1).getUnchecked_akrbjy_k$ = function (segment, offset) {
|
|
1916
|
+
return get_SegmentReadContextImpl().getUnchecked_akrbjy_k$(segment, offset);
|
|
1917
1917
|
};
|
|
1918
1918
|
var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
|
|
1919
1919
|
function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
@@ -1981,15 +1981,15 @@ function EOFException() {
|
|
|
1981
1981
|
captureStack(this, EOFException);
|
|
1982
1982
|
}
|
|
1983
1983
|
function SegmentPool() {
|
|
1984
|
-
this.
|
|
1985
|
-
this.
|
|
1984
|
+
this.MAX_SIZE_1 = 0;
|
|
1985
|
+
this.byteCount_1 = 0;
|
|
1986
1986
|
}
|
|
1987
|
-
protoOf(SegmentPool).
|
|
1988
|
-
return Companion_instance.
|
|
1987
|
+
protoOf(SegmentPool).take_2451j_k$ = function () {
|
|
1988
|
+
return Companion_instance.new_79u2a0_k$();
|
|
1989
1989
|
};
|
|
1990
|
-
protoOf(SegmentPool).
|
|
1990
|
+
protoOf(SegmentPool).recycle_3mobff_k$ = function (segment) {
|
|
1991
1991
|
};
|
|
1992
|
-
protoOf(SegmentPool).
|
|
1992
|
+
protoOf(SegmentPool).tracker_hnhzgo_k$ = function () {
|
|
1993
1993
|
return AlwaysSharedCopyTracker_getInstance();
|
|
1994
1994
|
};
|
|
1995
1995
|
var SegmentPool_instance;
|
|
@@ -1997,7 +1997,7 @@ function SegmentPool_getInstance() {
|
|
|
1997
1997
|
return SegmentPool_instance;
|
|
1998
1998
|
}
|
|
1999
1999
|
//region block: post-declaration
|
|
2000
|
-
protoOf(Buffer).
|
|
2000
|
+
protoOf(Buffer).write$default_fa5nq1_k$ = write$default;
|
|
2001
2001
|
//endregion
|
|
2002
2002
|
//region block: init
|
|
2003
2003
|
Companion_instance = new Companion();
|
|
@@ -2006,11 +2006,11 @@ SegmentPool_instance = new SegmentPool();
|
|
|
2006
2006
|
//endregion
|
|
2007
2007
|
//region block: exports
|
|
2008
2008
|
export {
|
|
2009
|
-
EOFException_init_$Create$_0 as EOFException_init_$Create$
|
|
2010
|
-
IOException_init_$Init$_0 as IOException_init_$Init$
|
|
2011
|
-
IOException_init_$Create$_0 as IOException_init_$Create$
|
|
2012
|
-
IOException_init_$Init$_1 as IOException_init_$Init$
|
|
2013
|
-
IOException_init_$Create$_1 as IOException_init_$Create$
|
|
2009
|
+
EOFException_init_$Create$_0 as EOFException_init_$Create$1dnh68zpaekzl,
|
|
2010
|
+
IOException_init_$Init$_0 as IOException_init_$Init$25x2y9dednbo9,
|
|
2011
|
+
IOException_init_$Create$_0 as IOException_init_$Create$1kq3iqv4goy5s,
|
|
2012
|
+
IOException_init_$Init$_1 as IOException_init_$Init$dftcwzvixao1,
|
|
2013
|
+
IOException_init_$Create$_1 as IOException_init_$Create$gel36gqrokz0,
|
|
2014
2014
|
Buffer as Buffergs925ekssbch,
|
|
2015
2015
|
IOException as IOException1wyutdmfe71nu,
|
|
2016
2016
|
Source as Source1shr0ps16u4p4,
|