@flock/wirespec 0.15.11 → 0.15.13
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/clikt-clikt.mjs +1160 -1160
- package/colormath-root-colormath.mjs +425 -425
- package/kotlin-kotlin-stdlib.mjs +19 -19
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1767 -1767
- package/kotlinx-io-kotlinx-io-core.mjs +378 -378
- package/markdown.mjs +1871 -1871
- package/mordant-mordant.mjs +1637 -1637
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +2496 -1471
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +262 -262
- package/wirespec-src-converter-avro.mjs +264 -264
- package/wirespec-src-converter-openapi.mjs +179 -179
- package/wirespec-src-plugin-arguments.mjs +124 -124
- package/wirespec-src-plugin-cli.mjs +70 -70
- package/wirespec-src-plugin-npm.mjs +7 -7
- package/wirespec-src-tools-generator.mjs +3 -3
|
@@ -57,7 +57,7 @@ initMetadataForClass(SegmentCopyTracker, 'SegmentCopyTracker');
|
|
|
57
57
|
initMetadataForObject(AlwaysSharedCopyTracker, 'AlwaysSharedCopyTracker', VOID, SegmentCopyTracker);
|
|
58
58
|
function sink$default(path, append, $super) {
|
|
59
59
|
append = append === VOID ? false : append;
|
|
60
|
-
return $super === VOID ? this.
|
|
60
|
+
return $super === VOID ? this.i2i(path, append) : $super.i2i.call(this, path, append);
|
|
61
61
|
}
|
|
62
62
|
initMetadataForInterface(FileSystem, 'FileSystem');
|
|
63
63
|
initMetadataForClass(SystemFileSystemImpl, 'SystemFileSystemImpl', VOID, VOID, [FileSystem]);
|
|
@@ -104,20 +104,20 @@ function _init_properties__Util_kt__g8tcl9() {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
function Buffer() {
|
|
107
|
-
this.
|
|
108
|
-
this.
|
|
109
|
-
this.
|
|
107
|
+
this.x2f_1 = null;
|
|
108
|
+
this.y2f_1 = null;
|
|
109
|
+
this.z2f_1 = new Long(0, 0);
|
|
110
110
|
}
|
|
111
111
|
protoOf(Buffer).j = function () {
|
|
112
|
-
return this.
|
|
112
|
+
return this.z2f_1;
|
|
113
113
|
};
|
|
114
|
-
protoOf(Buffer).
|
|
114
|
+
protoOf(Buffer).a2g = function () {
|
|
115
115
|
return this;
|
|
116
116
|
};
|
|
117
|
-
protoOf(Buffer).
|
|
117
|
+
protoOf(Buffer).b2g = function () {
|
|
118
118
|
return this.j().equals(new Long(0, 0));
|
|
119
119
|
};
|
|
120
|
-
protoOf(Buffer).
|
|
120
|
+
protoOf(Buffer).c2g = function (byteCount) {
|
|
121
121
|
// Inline function 'kotlin.require' call
|
|
122
122
|
// Inline function 'kotlin.contracts.contract' call
|
|
123
123
|
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
@@ -129,7 +129,7 @@ protoOf(Buffer).u2f = function (byteCount) {
|
|
|
129
129
|
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + this.j().toString() + ', required: ' + byteCount.toString() + ')');
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
|
-
protoOf(Buffer).
|
|
132
|
+
protoOf(Buffer).d2g = function (byteCount) {
|
|
133
133
|
// Inline function 'kotlin.require' call
|
|
134
134
|
// Inline function 'kotlin.contracts.contract' call
|
|
135
135
|
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
@@ -139,23 +139,23 @@ protoOf(Buffer).v2f = function (byteCount) {
|
|
|
139
139
|
}
|
|
140
140
|
return this.j().j1(byteCount) >= 0;
|
|
141
141
|
};
|
|
142
|
-
protoOf(Buffer).
|
|
142
|
+
protoOf(Buffer).e2g = function () {
|
|
143
143
|
return Unit_instance;
|
|
144
144
|
};
|
|
145
145
|
protoOf(Buffer).q8 = function () {
|
|
146
146
|
return Unit_instance;
|
|
147
147
|
};
|
|
148
|
-
protoOf(Buffer).
|
|
148
|
+
protoOf(Buffer).f2g = function () {
|
|
149
149
|
var result = this.j();
|
|
150
150
|
if (result.equals(new Long(0, 0)))
|
|
151
151
|
return new Long(0, 0);
|
|
152
|
-
var tail = ensureNotNull(this.
|
|
153
|
-
if (tail.
|
|
154
|
-
result = result.a3(toLong(tail.
|
|
152
|
+
var tail = ensureNotNull(this.y2f_1);
|
|
153
|
+
if (tail.i2g_1 < 8192 && tail.k2g_1) {
|
|
154
|
+
result = result.a3(toLong(tail.i2g_1 - tail.h2g_1 | 0));
|
|
155
155
|
}
|
|
156
156
|
return result;
|
|
157
157
|
};
|
|
158
|
-
protoOf(Buffer).
|
|
158
|
+
protoOf(Buffer).n2g = function (byteCount) {
|
|
159
159
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
160
160
|
// Inline function 'kotlin.require' call
|
|
161
161
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -166,7 +166,7 @@ protoOf(Buffer).f2g = function (byteCount) {
|
|
|
166
166
|
}
|
|
167
167
|
var remainingByteCount = byteCount;
|
|
168
168
|
while (remainingByteCount.j1(new Long(0, 0)) > 0) {
|
|
169
|
-
var tmp0_elvis_lhs = this.
|
|
169
|
+
var tmp0_elvis_lhs = this.x2f_1;
|
|
170
170
|
var tmp;
|
|
171
171
|
if (tmp0_elvis_lhs == null) {
|
|
172
172
|
throw EOFException_init_$Create$_0('Buffer exhausted before skipping ' + byteCount.toString() + ' bytes.');
|
|
@@ -176,23 +176,23 @@ protoOf(Buffer).f2g = function (byteCount) {
|
|
|
176
176
|
var head = tmp;
|
|
177
177
|
// Inline function 'kotlinx.io.minOf' call
|
|
178
178
|
var a = remainingByteCount;
|
|
179
|
-
var b = head.
|
|
179
|
+
var b = head.i2g_1 - head.h2g_1 | 0;
|
|
180
180
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
181
181
|
var b_0 = toLong(b);
|
|
182
182
|
var toSkip = (a.j1(b_0) <= 0 ? a : b_0).l1();
|
|
183
|
-
this.
|
|
183
|
+
this.z2f_1 = this.z2f_1.a3(toLong(toSkip));
|
|
184
184
|
remainingByteCount = remainingByteCount.a3(toLong(toSkip));
|
|
185
|
-
head.
|
|
186
|
-
if (head.
|
|
187
|
-
this.
|
|
185
|
+
head.h2g_1 = head.h2g_1 + toSkip | 0;
|
|
186
|
+
if (head.h2g_1 === head.i2g_1) {
|
|
187
|
+
this.o2g();
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
|
-
protoOf(Buffer).
|
|
191
|
+
protoOf(Buffer).p2g = function (sink, startIndex, endIndex) {
|
|
192
192
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
193
193
|
var size = sink.length;
|
|
194
194
|
checkBounds(toLong(size), toLong(startIndex), toLong(endIndex));
|
|
195
|
-
var tmp0_elvis_lhs = this.
|
|
195
|
+
var tmp0_elvis_lhs = this.x2f_1;
|
|
196
196
|
var tmp;
|
|
197
197
|
if (tmp0_elvis_lhs == null) {
|
|
198
198
|
return -1;
|
|
@@ -204,14 +204,14 @@ protoOf(Buffer).h2g = function (sink, startIndex, endIndex) {
|
|
|
204
204
|
var a = endIndex - startIndex | 0;
|
|
205
205
|
var b = s.j();
|
|
206
206
|
var toCopy = Math.min(a, b);
|
|
207
|
-
s.
|
|
208
|
-
this.
|
|
207
|
+
s.q2g(sink, startIndex, startIndex + toCopy | 0);
|
|
208
|
+
this.z2f_1 = this.z2f_1.a3(toLong(toCopy));
|
|
209
209
|
if (isEmpty(s)) {
|
|
210
|
-
this.
|
|
210
|
+
this.o2g();
|
|
211
211
|
}
|
|
212
212
|
return toCopy;
|
|
213
213
|
};
|
|
214
|
-
protoOf(Buffer).
|
|
214
|
+
protoOf(Buffer).r2g = function (sink, byteCount) {
|
|
215
215
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
216
216
|
// Inline function 'kotlin.require' call
|
|
217
217
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -223,10 +223,10 @@ protoOf(Buffer).j2g = function (sink, byteCount) {
|
|
|
223
223
|
if (this.j().equals(new Long(0, 0)))
|
|
224
224
|
return new Long(-1, -1);
|
|
225
225
|
var bytesWritten = byteCount.j1(this.j()) > 0 ? this.j() : byteCount;
|
|
226
|
-
sink.
|
|
226
|
+
sink.s2g(this, bytesWritten);
|
|
227
227
|
return bytesWritten;
|
|
228
228
|
};
|
|
229
|
-
protoOf(Buffer).
|
|
229
|
+
protoOf(Buffer).t2g = function (minimumCapacity) {
|
|
230
230
|
// Inline function 'kotlin.require' call
|
|
231
231
|
// Inline function 'kotlin.contracts.contract' call
|
|
232
232
|
if (!(minimumCapacity >= 1 && minimumCapacity <= 8192)) {
|
|
@@ -234,21 +234,21 @@ protoOf(Buffer).l2g = function (minimumCapacity) {
|
|
|
234
234
|
var message = 'unexpected capacity (' + minimumCapacity + '), should be in range [1, 8192]';
|
|
235
235
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
236
236
|
}
|
|
237
|
-
if (this.
|
|
238
|
-
var result = SegmentPool_instance.
|
|
239
|
-
this.
|
|
240
|
-
this.
|
|
237
|
+
if (this.y2f_1 == null) {
|
|
238
|
+
var result = SegmentPool_instance.w2g();
|
|
239
|
+
this.x2f_1 = result;
|
|
240
|
+
this.y2f_1 = result;
|
|
241
241
|
return result;
|
|
242
242
|
}
|
|
243
|
-
var t = ensureNotNull(this.
|
|
244
|
-
if ((t.
|
|
245
|
-
var newTail = t.
|
|
246
|
-
this.
|
|
243
|
+
var t = ensureNotNull(this.y2f_1);
|
|
244
|
+
if ((t.i2g_1 + minimumCapacity | 0) > 8192 || !t.k2g_1) {
|
|
245
|
+
var newTail = t.x2g(SegmentPool_instance.w2g());
|
|
246
|
+
this.y2f_1 = newTail;
|
|
247
247
|
return newTail;
|
|
248
248
|
}
|
|
249
249
|
return t;
|
|
250
250
|
};
|
|
251
|
-
protoOf(Buffer).
|
|
251
|
+
protoOf(Buffer).s2g = function (source, byteCount) {
|
|
252
252
|
// Inline function 'kotlin.require' call
|
|
253
253
|
// Inline function 'kotlin.contracts.contract' call
|
|
254
254
|
if (!!(source === this)) {
|
|
@@ -256,58 +256,58 @@ protoOf(Buffer).k2g = function (source, byteCount) {
|
|
|
256
256
|
var message = 'source == this';
|
|
257
257
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
258
258
|
}
|
|
259
|
-
checkOffsetAndCount(source.
|
|
259
|
+
checkOffsetAndCount(source.z2f_1, new Long(0, 0), byteCount);
|
|
260
260
|
var remainingByteCount = byteCount;
|
|
261
261
|
while (remainingByteCount.j1(new Long(0, 0)) > 0) {
|
|
262
|
-
if (remainingByteCount.j1(toLong(ensureNotNull(source.
|
|
263
|
-
var tail = this.
|
|
262
|
+
if (remainingByteCount.j1(toLong(ensureNotNull(source.x2f_1).j())) < 0) {
|
|
263
|
+
var tail = this.y2f_1;
|
|
264
264
|
var tmp;
|
|
265
|
-
if (!(tail == null) && tail.
|
|
265
|
+
if (!(tail == null) && tail.k2g_1) {
|
|
266
266
|
// Inline function 'kotlin.Long.minus' call
|
|
267
267
|
// Inline function 'kotlin.Long.plus' call
|
|
268
268
|
var this_0 = remainingByteCount;
|
|
269
|
-
var other = tail.
|
|
269
|
+
var other = tail.i2g_1;
|
|
270
270
|
var this_1 = this_0.z2(toLong(other));
|
|
271
|
-
var other_0 = tail.
|
|
271
|
+
var other_0 = tail.y2g() ? 0 : tail.h2g_1;
|
|
272
272
|
tmp = this_1.a3(toLong(other_0)).j1(new Long(8192, 0)) <= 0;
|
|
273
273
|
} else {
|
|
274
274
|
tmp = false;
|
|
275
275
|
}
|
|
276
276
|
if (tmp) {
|
|
277
|
-
ensureNotNull(source.
|
|
278
|
-
source.
|
|
279
|
-
this.
|
|
277
|
+
ensureNotNull(source.x2f_1).a2h(tail, remainingByteCount.l1());
|
|
278
|
+
source.z2f_1 = source.z2f_1.a3(remainingByteCount);
|
|
279
|
+
this.z2f_1 = this.z2f_1.z2(remainingByteCount);
|
|
280
280
|
return Unit_instance;
|
|
281
281
|
} else {
|
|
282
|
-
source.
|
|
282
|
+
source.x2f_1 = ensureNotNull(source.x2f_1).z2g(remainingByteCount.l1());
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
var segmentToMove = ensureNotNull(source.
|
|
285
|
+
var segmentToMove = ensureNotNull(source.x2f_1);
|
|
286
286
|
var movedByteCount = toLong(segmentToMove.j());
|
|
287
|
-
source.
|
|
288
|
-
if (source.
|
|
289
|
-
source.
|
|
287
|
+
source.x2f_1 = segmentToMove.b2h();
|
|
288
|
+
if (source.x2f_1 == null) {
|
|
289
|
+
source.y2f_1 = null;
|
|
290
290
|
}
|
|
291
291
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
292
|
-
if (this.
|
|
293
|
-
this.
|
|
294
|
-
this.
|
|
292
|
+
if (this.x2f_1 == null) {
|
|
293
|
+
this.x2f_1 = segmentToMove;
|
|
294
|
+
this.y2f_1 = segmentToMove;
|
|
295
295
|
} else if (true) {
|
|
296
|
-
this.
|
|
297
|
-
if (ensureNotNull(this.
|
|
298
|
-
this.
|
|
296
|
+
this.y2f_1 = ensureNotNull(this.y2f_1).x2g(segmentToMove).c2h();
|
|
297
|
+
if (ensureNotNull(this.y2f_1).m2g_1 == null) {
|
|
298
|
+
this.x2f_1 = this.y2f_1;
|
|
299
299
|
}
|
|
300
300
|
} else {
|
|
301
|
-
this.
|
|
301
|
+
this.y2f_1 = ensureNotNull(this.y2f_1).x2g(segmentToMove);
|
|
302
302
|
}
|
|
303
|
-
source.
|
|
304
|
-
this.
|
|
303
|
+
source.z2f_1 = source.z2f_1.a3(movedByteCount);
|
|
304
|
+
this.z2f_1 = this.z2f_1.z2(movedByteCount);
|
|
305
305
|
remainingByteCount = remainingByteCount.a3(movedByteCount);
|
|
306
306
|
}
|
|
307
307
|
};
|
|
308
|
-
protoOf(Buffer).
|
|
309
|
-
this.
|
|
310
|
-
this.
|
|
308
|
+
protoOf(Buffer).d2h = function (byte) {
|
|
309
|
+
this.t2g(1).e2h(byte);
|
|
310
|
+
this.z2f_1 = this.z2f_1.z2(new Long(1, 0));
|
|
311
311
|
};
|
|
312
312
|
protoOf(Buffer).toString = function () {
|
|
313
313
|
if (this.j().equals(new Long(0, 0)))
|
|
@@ -321,7 +321,7 @@ protoOf(Buffer).toString = function () {
|
|
|
321
321
|
var builder = StringBuilder_init_$Create$(imul(len, 2) + (this.j().j1(toLong(maxPrintableBytes)) > 0 ? 1 : 0) | 0);
|
|
322
322
|
var bytesWritten = 0;
|
|
323
323
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
324
|
-
var curr = this.
|
|
324
|
+
var curr = this.x2f_1;
|
|
325
325
|
while (!(curr == null)) {
|
|
326
326
|
// Inline function 'kotlinx.io.Buffer.toString.<anonymous>' call
|
|
327
327
|
var ctx = get_SegmentReadContextImpl();
|
|
@@ -330,7 +330,7 @@ protoOf(Buffer).toString = function () {
|
|
|
330
330
|
while (bytesWritten < len && idx < segment.j()) {
|
|
331
331
|
var _unary__edvuaz = idx;
|
|
332
332
|
idx = _unary__edvuaz + 1 | 0;
|
|
333
|
-
var b_0 = ctx.
|
|
333
|
+
var b_0 = ctx.f2h(segment, _unary__edvuaz);
|
|
334
334
|
bytesWritten = bytesWritten + 1 | 0;
|
|
335
335
|
var tmp = get_HEX_DIGIT_CHARS();
|
|
336
336
|
// Inline function 'kotlinx.io.shr' call
|
|
@@ -341,36 +341,36 @@ protoOf(Buffer).toString = function () {
|
|
|
341
341
|
var tmp$ret$3 = b_0 & 15;
|
|
342
342
|
tmp_0.z7(tmp_1[tmp$ret$3]);
|
|
343
343
|
}
|
|
344
|
-
curr = curr.
|
|
344
|
+
curr = curr.l2g_1;
|
|
345
345
|
}
|
|
346
346
|
if (this.j().j1(toLong(maxPrintableBytes)) > 0) {
|
|
347
347
|
builder.z7(_Char___init__impl__6a9atx(8230));
|
|
348
348
|
}
|
|
349
349
|
return 'Buffer(size=' + this.j().toString() + ' hex=' + builder.toString() + ')';
|
|
350
350
|
};
|
|
351
|
-
protoOf(Buffer).
|
|
352
|
-
var oldHead = ensureNotNull(this.
|
|
353
|
-
var nextHead = oldHead.
|
|
354
|
-
this.
|
|
351
|
+
protoOf(Buffer).o2g = function () {
|
|
352
|
+
var oldHead = ensureNotNull(this.x2f_1);
|
|
353
|
+
var nextHead = oldHead.l2g_1;
|
|
354
|
+
this.x2f_1 = nextHead;
|
|
355
355
|
if (nextHead == null) {
|
|
356
|
-
this.
|
|
356
|
+
this.y2f_1 = null;
|
|
357
357
|
} else {
|
|
358
|
-
nextHead.
|
|
358
|
+
nextHead.m2g_1 = null;
|
|
359
359
|
}
|
|
360
|
-
oldHead.
|
|
361
|
-
SegmentPool_instance.
|
|
360
|
+
oldHead.l2g_1 = null;
|
|
361
|
+
SegmentPool_instance.g2h(oldHead);
|
|
362
362
|
};
|
|
363
|
-
protoOf(Buffer).
|
|
364
|
-
var oldTail = ensureNotNull(this.
|
|
365
|
-
var newTail = oldTail.
|
|
366
|
-
this.
|
|
363
|
+
protoOf(Buffer).h2h = function () {
|
|
364
|
+
var oldTail = ensureNotNull(this.y2f_1);
|
|
365
|
+
var newTail = oldTail.m2g_1;
|
|
366
|
+
this.y2f_1 = newTail;
|
|
367
367
|
if (newTail == null) {
|
|
368
|
-
this.
|
|
368
|
+
this.x2f_1 = null;
|
|
369
369
|
} else {
|
|
370
|
-
newTail.
|
|
370
|
+
newTail.l2g_1 = null;
|
|
371
371
|
}
|
|
372
|
-
oldTail.
|
|
373
|
-
SegmentPool_instance.
|
|
372
|
+
oldTail.m2g_1 = null;
|
|
373
|
+
SegmentPool_instance.g2h(oldTail);
|
|
374
374
|
};
|
|
375
375
|
function buffered(_this__u8e3s4) {
|
|
376
376
|
return new RealSource(_this__u8e3s4);
|
|
@@ -379,18 +379,18 @@ function buffered_0(_this__u8e3s4) {
|
|
|
379
379
|
return new RealSink(_this__u8e3s4);
|
|
380
380
|
}
|
|
381
381
|
function RealSink(sink) {
|
|
382
|
-
this.
|
|
383
|
-
this.
|
|
384
|
-
this.
|
|
382
|
+
this.i2h_1 = sink;
|
|
383
|
+
this.j2h_1 = false;
|
|
384
|
+
this.k2h_1 = new Buffer();
|
|
385
385
|
}
|
|
386
|
-
protoOf(RealSink).
|
|
387
|
-
return this.
|
|
386
|
+
protoOf(RealSink).a2g = function () {
|
|
387
|
+
return this.k2h_1;
|
|
388
388
|
};
|
|
389
|
-
protoOf(RealSink).
|
|
389
|
+
protoOf(RealSink).s2g = function (source, byteCount) {
|
|
390
390
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
391
391
|
// Inline function 'kotlin.check' call
|
|
392
392
|
// Inline function 'kotlin.contracts.contract' call
|
|
393
|
-
if (!!this.
|
|
393
|
+
if (!!this.j2h_1) {
|
|
394
394
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed.<anonymous>' call
|
|
395
395
|
var message = 'Sink is closed.';
|
|
396
396
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
@@ -402,53 +402,53 @@ protoOf(RealSink).k2g = function (source, byteCount) {
|
|
|
402
402
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
403
403
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
404
404
|
}
|
|
405
|
-
this.
|
|
406
|
-
this.
|
|
405
|
+
this.k2h_1.s2g(source, byteCount);
|
|
406
|
+
this.e2g();
|
|
407
407
|
};
|
|
408
|
-
protoOf(RealSink).
|
|
408
|
+
protoOf(RealSink).e2g = function () {
|
|
409
409
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
410
410
|
// Inline function 'kotlin.check' call
|
|
411
411
|
// Inline function 'kotlin.contracts.contract' call
|
|
412
|
-
if (!!this.
|
|
412
|
+
if (!!this.j2h_1) {
|
|
413
413
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed.<anonymous>' call
|
|
414
414
|
var message = 'Sink is closed.';
|
|
415
415
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
416
416
|
}
|
|
417
|
-
var byteCount = this.
|
|
417
|
+
var byteCount = this.k2h_1.f2g();
|
|
418
418
|
if (byteCount.j1(new Long(0, 0)) > 0) {
|
|
419
|
-
this.
|
|
419
|
+
this.i2h_1.s2g(this.k2h_1, byteCount);
|
|
420
420
|
}
|
|
421
421
|
};
|
|
422
422
|
protoOf(RealSink).q8 = function () {
|
|
423
423
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
424
424
|
// Inline function 'kotlin.check' call
|
|
425
425
|
// Inline function 'kotlin.contracts.contract' call
|
|
426
|
-
if (!!this.
|
|
426
|
+
if (!!this.j2h_1) {
|
|
427
427
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed.<anonymous>' call
|
|
428
428
|
var message = 'Sink is closed.';
|
|
429
429
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
430
430
|
}
|
|
431
|
-
if (this.
|
|
432
|
-
this.
|
|
431
|
+
if (this.k2h_1.j().j1(new Long(0, 0)) > 0) {
|
|
432
|
+
this.i2h_1.s2g(this.k2h_1, this.k2h_1.j());
|
|
433
433
|
}
|
|
434
|
-
this.
|
|
434
|
+
this.i2h_1.q8();
|
|
435
435
|
};
|
|
436
436
|
protoOf(RealSink).toString = function () {
|
|
437
|
-
return 'buffered(' + toString(this.
|
|
437
|
+
return 'buffered(' + toString(this.i2h_1) + ')';
|
|
438
438
|
};
|
|
439
439
|
function RealSource(source) {
|
|
440
|
-
this.
|
|
441
|
-
this.
|
|
442
|
-
this.
|
|
440
|
+
this.l2h_1 = source;
|
|
441
|
+
this.m2h_1 = false;
|
|
442
|
+
this.n2h_1 = new Buffer();
|
|
443
443
|
}
|
|
444
|
-
protoOf(RealSource).
|
|
445
|
-
return this.
|
|
444
|
+
protoOf(RealSource).a2g = function () {
|
|
445
|
+
return this.n2h_1;
|
|
446
446
|
};
|
|
447
|
-
protoOf(RealSource).
|
|
447
|
+
protoOf(RealSource).r2g = function (sink, byteCount) {
|
|
448
448
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
449
449
|
// Inline function 'kotlin.check' call
|
|
450
450
|
// Inline function 'kotlin.contracts.contract' call
|
|
451
|
-
if (!!this.
|
|
451
|
+
if (!!this.m2h_1) {
|
|
452
452
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed.<anonymous>' call
|
|
453
453
|
var message = 'Source is closed.';
|
|
454
454
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
@@ -460,25 +460,25 @@ protoOf(RealSource).j2g = function (sink, byteCount) {
|
|
|
460
460
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
461
461
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
462
462
|
}
|
|
463
|
-
if (this.
|
|
464
|
-
var read = this.
|
|
463
|
+
if (this.n2h_1.j().equals(new Long(0, 0))) {
|
|
464
|
+
var read = this.l2h_1.r2g(this.n2h_1, new Long(8192, 0));
|
|
465
465
|
if (read.equals(new Long(-1, -1)))
|
|
466
466
|
return new Long(-1, -1);
|
|
467
467
|
}
|
|
468
468
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
469
|
-
var b = this.
|
|
469
|
+
var b = this.n2h_1.j();
|
|
470
470
|
var toRead = byteCount.j1(b) <= 0 ? byteCount : b;
|
|
471
|
-
return this.
|
|
471
|
+
return this.n2h_1.r2g(sink, toRead);
|
|
472
472
|
};
|
|
473
|
-
protoOf(RealSource).
|
|
474
|
-
if (!this.
|
|
473
|
+
protoOf(RealSource).c2g = function (byteCount) {
|
|
474
|
+
if (!this.d2g(byteCount))
|
|
475
475
|
throw EOFException_init_$Create$_0("Source doesn't contain required number of bytes (" + byteCount.toString() + ').');
|
|
476
476
|
};
|
|
477
|
-
protoOf(RealSource).
|
|
477
|
+
protoOf(RealSource).d2g = function (byteCount) {
|
|
478
478
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
479
479
|
// Inline function 'kotlin.check' call
|
|
480
480
|
// Inline function 'kotlin.contracts.contract' call
|
|
481
|
-
if (!!this.
|
|
481
|
+
if (!!this.m2h_1) {
|
|
482
482
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed.<anonymous>' call
|
|
483
483
|
var message = 'Source is closed.';
|
|
484
484
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
@@ -490,37 +490,37 @@ protoOf(RealSource).v2f = function (byteCount) {
|
|
|
490
490
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
491
491
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
492
492
|
}
|
|
493
|
-
while (this.
|
|
494
|
-
if (this.
|
|
493
|
+
while (this.n2h_1.j().j1(byteCount) < 0) {
|
|
494
|
+
if (this.l2h_1.r2g(this.n2h_1, new Long(8192, 0)).equals(new Long(-1, -1)))
|
|
495
495
|
return false;
|
|
496
496
|
}
|
|
497
497
|
return true;
|
|
498
498
|
};
|
|
499
|
-
protoOf(RealSource).
|
|
499
|
+
protoOf(RealSource).p2g = function (sink, startIndex, endIndex) {
|
|
500
500
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
501
501
|
var size = sink.length;
|
|
502
502
|
checkBounds(toLong(size), toLong(startIndex), toLong(endIndex));
|
|
503
|
-
if (this.
|
|
504
|
-
var read = this.
|
|
503
|
+
if (this.n2h_1.j().equals(new Long(0, 0))) {
|
|
504
|
+
var read = this.l2h_1.r2g(this.n2h_1, new Long(8192, 0));
|
|
505
505
|
if (read.equals(new Long(-1, -1)))
|
|
506
506
|
return -1;
|
|
507
507
|
}
|
|
508
508
|
// Inline function 'kotlinx.io.minOf' call
|
|
509
509
|
var a = endIndex - startIndex | 0;
|
|
510
|
-
var b = this.
|
|
510
|
+
var b = this.n2h_1.j();
|
|
511
511
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
512
512
|
var a_0 = toLong(a);
|
|
513
513
|
var toRead = (a_0.j1(b) <= 0 ? a_0 : b).l1();
|
|
514
|
-
return this.
|
|
514
|
+
return this.n2h_1.p2g(sink, startIndex, startIndex + toRead | 0);
|
|
515
515
|
};
|
|
516
516
|
protoOf(RealSource).toString = function () {
|
|
517
|
-
return 'buffered(' + toString(this.
|
|
517
|
+
return 'buffered(' + toString(this.l2h_1) + ')';
|
|
518
518
|
};
|
|
519
519
|
function Segment_init_$Init$($this) {
|
|
520
520
|
Segment.call($this);
|
|
521
|
-
$this.
|
|
522
|
-
$this.
|
|
523
|
-
$this.
|
|
521
|
+
$this.g2g_1 = new Int8Array(8192);
|
|
522
|
+
$this.k2g_1 = true;
|
|
523
|
+
$this.j2g_1 = null;
|
|
524
524
|
return $this;
|
|
525
525
|
}
|
|
526
526
|
function Segment_init_$Create$() {
|
|
@@ -528,93 +528,93 @@ function Segment_init_$Create$() {
|
|
|
528
528
|
}
|
|
529
529
|
function Segment_init_$Init$_0(data, pos, limit, shareToken, owner, $this) {
|
|
530
530
|
Segment.call($this);
|
|
531
|
-
$this.
|
|
532
|
-
$this.
|
|
533
|
-
$this.
|
|
534
|
-
$this.
|
|
535
|
-
$this.
|
|
531
|
+
$this.g2g_1 = data;
|
|
532
|
+
$this.h2g_1 = pos;
|
|
533
|
+
$this.i2g_1 = limit;
|
|
534
|
+
$this.j2g_1 = shareToken;
|
|
535
|
+
$this.k2g_1 = owner;
|
|
536
536
|
return $this;
|
|
537
537
|
}
|
|
538
538
|
function Segment_init_$Create$_0(data, pos, limit, shareToken, owner) {
|
|
539
539
|
return Segment_init_$Init$_0(data, pos, limit, shareToken, owner, objectCreate(protoOf(Segment)));
|
|
540
540
|
}
|
|
541
541
|
function Companion() {
|
|
542
|
-
this.
|
|
543
|
-
this.
|
|
542
|
+
this.o2h_1 = 8192;
|
|
543
|
+
this.p2h_1 = 1024;
|
|
544
544
|
}
|
|
545
|
-
protoOf(Companion).
|
|
545
|
+
protoOf(Companion).q2h = function () {
|
|
546
546
|
return Segment_init_$Create$();
|
|
547
547
|
};
|
|
548
548
|
var Companion_instance;
|
|
549
549
|
function Companion_getInstance() {
|
|
550
550
|
return Companion_instance;
|
|
551
551
|
}
|
|
552
|
-
protoOf(Segment).
|
|
553
|
-
var tmp1_safe_receiver = this.
|
|
552
|
+
protoOf(Segment).y2g = function () {
|
|
553
|
+
var tmp1_safe_receiver = this.j2g_1;
|
|
554
554
|
var tmp0_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.z25();
|
|
555
555
|
return tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs;
|
|
556
556
|
};
|
|
557
|
-
protoOf(Segment).
|
|
558
|
-
var tmp0_elvis_lhs = this.
|
|
557
|
+
protoOf(Segment).r2h = function () {
|
|
558
|
+
var tmp0_elvis_lhs = this.j2g_1;
|
|
559
559
|
var tmp;
|
|
560
560
|
if (tmp0_elvis_lhs == null) {
|
|
561
561
|
// Inline function 'kotlin.also' call
|
|
562
|
-
var this_0 = SegmentPool_instance.
|
|
562
|
+
var this_0 = SegmentPool_instance.s2h();
|
|
563
563
|
// Inline function 'kotlin.contracts.contract' call
|
|
564
564
|
// Inline function 'kotlinx.io.Segment.sharedCopy.<anonymous>' call
|
|
565
|
-
this.
|
|
565
|
+
this.j2g_1 = this_0;
|
|
566
566
|
tmp = this_0;
|
|
567
567
|
} else {
|
|
568
568
|
tmp = tmp0_elvis_lhs;
|
|
569
569
|
}
|
|
570
570
|
var t = tmp;
|
|
571
|
-
var tmp_0 = this.
|
|
572
|
-
var tmp_1 = this.
|
|
571
|
+
var tmp_0 = this.h2g_1;
|
|
572
|
+
var tmp_1 = this.i2g_1;
|
|
573
573
|
// Inline function 'kotlin.also' call
|
|
574
574
|
// Inline function 'kotlin.contracts.contract' call
|
|
575
575
|
// Inline function 'kotlinx.io.Segment.sharedCopy.<anonymous>' call
|
|
576
|
-
t.
|
|
577
|
-
return Segment_init_$Create$_0(this.
|
|
576
|
+
t.t2h();
|
|
577
|
+
return Segment_init_$Create$_0(this.g2g_1, tmp_0, tmp_1, t, false);
|
|
578
578
|
};
|
|
579
|
-
protoOf(Segment).
|
|
580
|
-
var result = this.
|
|
581
|
-
if (!(this.
|
|
582
|
-
ensureNotNull(this.
|
|
579
|
+
protoOf(Segment).b2h = function () {
|
|
580
|
+
var result = this.l2g_1;
|
|
581
|
+
if (!(this.m2g_1 == null)) {
|
|
582
|
+
ensureNotNull(this.m2g_1).l2g_1 = this.l2g_1;
|
|
583
583
|
}
|
|
584
|
-
if (!(this.
|
|
585
|
-
ensureNotNull(this.
|
|
584
|
+
if (!(this.l2g_1 == null)) {
|
|
585
|
+
ensureNotNull(this.l2g_1).m2g_1 = this.m2g_1;
|
|
586
586
|
}
|
|
587
|
-
this.
|
|
588
|
-
this.
|
|
587
|
+
this.l2g_1 = null;
|
|
588
|
+
this.m2g_1 = null;
|
|
589
589
|
return result;
|
|
590
590
|
};
|
|
591
|
-
protoOf(Segment).
|
|
592
|
-
segment.
|
|
593
|
-
segment.
|
|
594
|
-
if (!(this.
|
|
595
|
-
ensureNotNull(this.
|
|
591
|
+
protoOf(Segment).x2g = function (segment) {
|
|
592
|
+
segment.m2g_1 = this;
|
|
593
|
+
segment.l2g_1 = this.l2g_1;
|
|
594
|
+
if (!(this.l2g_1 == null)) {
|
|
595
|
+
ensureNotNull(this.l2g_1).m2g_1 = segment;
|
|
596
596
|
}
|
|
597
|
-
this.
|
|
597
|
+
this.l2g_1 = segment;
|
|
598
598
|
return segment;
|
|
599
599
|
};
|
|
600
|
-
protoOf(Segment).
|
|
600
|
+
protoOf(Segment).z2g = function (byteCount) {
|
|
601
601
|
// Inline function 'kotlin.require' call
|
|
602
602
|
// Inline function 'kotlin.contracts.contract' call
|
|
603
|
-
if (!(byteCount > 0 && byteCount <= (this.
|
|
603
|
+
if (!(byteCount > 0 && byteCount <= (this.i2g_1 - this.h2g_1 | 0))) {
|
|
604
604
|
// Inline function 'kotlinx.io.Segment.split.<anonymous>' call
|
|
605
605
|
var message = 'byteCount out of range';
|
|
606
606
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
607
607
|
}
|
|
608
608
|
var prefix;
|
|
609
609
|
if (byteCount >= 1024) {
|
|
610
|
-
prefix = this.
|
|
610
|
+
prefix = this.r2h();
|
|
611
611
|
} else {
|
|
612
|
-
prefix = SegmentPool_instance.
|
|
612
|
+
prefix = SegmentPool_instance.w2g();
|
|
613
613
|
// Inline function 'kotlin.collections.copyInto' call
|
|
614
|
-
var this_0 = this.
|
|
615
|
-
var destination = prefix.
|
|
616
|
-
var startIndex = this.
|
|
617
|
-
var endIndex = this.
|
|
614
|
+
var this_0 = this.g2g_1;
|
|
615
|
+
var destination = prefix.g2g_1;
|
|
616
|
+
var startIndex = this.h2g_1;
|
|
617
|
+
var endIndex = this.h2g_1 + byteCount | 0;
|
|
618
618
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
619
619
|
// Inline function 'kotlin.js.asDynamic' call
|
|
620
620
|
var tmp = this_0;
|
|
@@ -622,33 +622,33 @@ protoOf(Segment).r2g = function (byteCount) {
|
|
|
622
622
|
// Inline function 'kotlin.js.asDynamic' call
|
|
623
623
|
arrayCopy(tmp, destination, 0, startIndex, endIndex);
|
|
624
624
|
}
|
|
625
|
-
prefix.
|
|
626
|
-
this.
|
|
627
|
-
if (!(this.
|
|
628
|
-
ensureNotNull(this.
|
|
625
|
+
prefix.i2g_1 = prefix.h2g_1 + byteCount | 0;
|
|
626
|
+
this.h2g_1 = this.h2g_1 + byteCount | 0;
|
|
627
|
+
if (!(this.m2g_1 == null)) {
|
|
628
|
+
ensureNotNull(this.m2g_1).x2g(prefix);
|
|
629
629
|
} else {
|
|
630
|
-
prefix.
|
|
631
|
-
this.
|
|
630
|
+
prefix.l2g_1 = this;
|
|
631
|
+
this.m2g_1 = prefix;
|
|
632
632
|
}
|
|
633
633
|
return prefix;
|
|
634
634
|
};
|
|
635
|
-
protoOf(Segment).
|
|
635
|
+
protoOf(Segment).c2h = function () {
|
|
636
636
|
// Inline function 'kotlin.check' call
|
|
637
637
|
// Inline function 'kotlin.contracts.contract' call
|
|
638
|
-
if (!!(this.
|
|
638
|
+
if (!!(this.m2g_1 == null)) {
|
|
639
639
|
// Inline function 'kotlinx.io.Segment.compact.<anonymous>' call
|
|
640
640
|
var message = 'cannot compact';
|
|
641
641
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
642
642
|
}
|
|
643
|
-
if (!ensureNotNull(this.
|
|
643
|
+
if (!ensureNotNull(this.m2g_1).k2g_1)
|
|
644
644
|
return this;
|
|
645
|
-
var byteCount = this.
|
|
646
|
-
var availableByteCount = (8192 - ensureNotNull(this.
|
|
645
|
+
var byteCount = this.i2g_1 - this.h2g_1 | 0;
|
|
646
|
+
var availableByteCount = (8192 - ensureNotNull(this.m2g_1).i2g_1 | 0) + (ensureNotNull(this.m2g_1).y2g() ? 0 : ensureNotNull(this.m2g_1).h2g_1) | 0;
|
|
647
647
|
if (byteCount > availableByteCount)
|
|
648
648
|
return this;
|
|
649
|
-
var predecessor = this.
|
|
650
|
-
this.
|
|
651
|
-
var successor = this.
|
|
649
|
+
var predecessor = this.m2g_1;
|
|
650
|
+
this.a2h(ensureNotNull(predecessor), byteCount);
|
|
651
|
+
var successor = this.b2h();
|
|
652
652
|
// Inline function 'kotlin.check' call
|
|
653
653
|
// Inline function 'kotlin.contracts.contract' call
|
|
654
654
|
// Inline function 'kotlin.check' call
|
|
@@ -658,113 +658,113 @@ protoOf(Segment).u2g = function () {
|
|
|
658
658
|
var message_0 = 'Check failed.';
|
|
659
659
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
660
660
|
}
|
|
661
|
-
SegmentPool_instance.
|
|
661
|
+
SegmentPool_instance.g2h(this);
|
|
662
662
|
return predecessor;
|
|
663
663
|
};
|
|
664
|
-
protoOf(Segment).
|
|
665
|
-
var _unary__edvuaz = this.
|
|
666
|
-
this.
|
|
667
|
-
this.
|
|
664
|
+
protoOf(Segment).e2h = function (byte) {
|
|
665
|
+
var _unary__edvuaz = this.i2g_1;
|
|
666
|
+
this.i2g_1 = _unary__edvuaz + 1 | 0;
|
|
667
|
+
this.g2g_1[_unary__edvuaz] = byte;
|
|
668
668
|
};
|
|
669
|
-
protoOf(Segment).
|
|
669
|
+
protoOf(Segment).a2h = function (sink, byteCount) {
|
|
670
670
|
// Inline function 'kotlin.check' call
|
|
671
671
|
// Inline function 'kotlin.contracts.contract' call
|
|
672
|
-
if (!sink.
|
|
672
|
+
if (!sink.k2g_1) {
|
|
673
673
|
// Inline function 'kotlinx.io.Segment.writeTo.<anonymous>' call
|
|
674
674
|
var message = 'only owner can write';
|
|
675
675
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
676
676
|
}
|
|
677
|
-
if ((sink.
|
|
678
|
-
if (sink.
|
|
677
|
+
if ((sink.i2g_1 + byteCount | 0) > 8192) {
|
|
678
|
+
if (sink.y2g())
|
|
679
679
|
throw IllegalArgumentException_init_$Create$_0();
|
|
680
|
-
if (((sink.
|
|
680
|
+
if (((sink.i2g_1 + byteCount | 0) - sink.h2g_1 | 0) > 8192)
|
|
681
681
|
throw IllegalArgumentException_init_$Create$_0();
|
|
682
682
|
// Inline function 'kotlin.collections.copyInto' call
|
|
683
|
-
var this_0 = sink.
|
|
684
|
-
var destination = sink.
|
|
685
|
-
var startIndex = sink.
|
|
686
|
-
var endIndex = sink.
|
|
683
|
+
var this_0 = sink.g2g_1;
|
|
684
|
+
var destination = sink.g2g_1;
|
|
685
|
+
var startIndex = sink.h2g_1;
|
|
686
|
+
var endIndex = sink.i2g_1;
|
|
687
687
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
688
688
|
// Inline function 'kotlin.js.asDynamic' call
|
|
689
689
|
var tmp = this_0;
|
|
690
690
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
691
691
|
// Inline function 'kotlin.js.asDynamic' call
|
|
692
692
|
arrayCopy(tmp, destination, 0, startIndex, endIndex);
|
|
693
|
-
sink.
|
|
694
|
-
sink.
|
|
693
|
+
sink.i2g_1 = sink.i2g_1 - sink.h2g_1 | 0;
|
|
694
|
+
sink.h2g_1 = 0;
|
|
695
695
|
}
|
|
696
696
|
// Inline function 'kotlin.collections.copyInto' call
|
|
697
|
-
var this_1 = this.
|
|
698
|
-
var destination_0 = sink.
|
|
699
|
-
var destinationOffset = sink.
|
|
700
|
-
var startIndex_0 = this.
|
|
701
|
-
var endIndex_0 = this.
|
|
697
|
+
var this_1 = this.g2g_1;
|
|
698
|
+
var destination_0 = sink.g2g_1;
|
|
699
|
+
var destinationOffset = sink.i2g_1;
|
|
700
|
+
var startIndex_0 = this.h2g_1;
|
|
701
|
+
var endIndex_0 = this.h2g_1 + byteCount | 0;
|
|
702
702
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
703
703
|
// Inline function 'kotlin.js.asDynamic' call
|
|
704
704
|
var tmp_0 = this_1;
|
|
705
705
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
706
706
|
// Inline function 'kotlin.js.asDynamic' call
|
|
707
707
|
arrayCopy(tmp_0, destination_0, destinationOffset, startIndex_0, endIndex_0);
|
|
708
|
-
sink.
|
|
709
|
-
this.
|
|
708
|
+
sink.i2g_1 = sink.i2g_1 + byteCount | 0;
|
|
709
|
+
this.h2g_1 = this.h2g_1 + byteCount | 0;
|
|
710
710
|
};
|
|
711
|
-
protoOf(Segment).
|
|
711
|
+
protoOf(Segment).q2g = function (dst, dstStartOffset, dstEndOffset) {
|
|
712
712
|
var len = dstEndOffset - dstStartOffset | 0;
|
|
713
713
|
// Inline function 'kotlin.collections.copyInto' call
|
|
714
|
-
var this_0 = this.
|
|
715
|
-
var startIndex = this.
|
|
716
|
-
var endIndex = this.
|
|
714
|
+
var this_0 = this.g2g_1;
|
|
715
|
+
var startIndex = this.h2g_1;
|
|
716
|
+
var endIndex = this.h2g_1 + len | 0;
|
|
717
717
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
718
718
|
// Inline function 'kotlin.js.asDynamic' call
|
|
719
719
|
var tmp = this_0;
|
|
720
720
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
721
721
|
// Inline function 'kotlin.js.asDynamic' call
|
|
722
722
|
arrayCopy(tmp, dst, dstStartOffset, startIndex, endIndex);
|
|
723
|
-
this.
|
|
723
|
+
this.h2g_1 = this.h2g_1 + len | 0;
|
|
724
724
|
};
|
|
725
725
|
protoOf(Segment).j = function () {
|
|
726
|
-
return this.
|
|
726
|
+
return this.i2g_1 - this.h2g_1 | 0;
|
|
727
727
|
};
|
|
728
|
-
protoOf(Segment).
|
|
729
|
-
return this.
|
|
728
|
+
protoOf(Segment).u2h = function () {
|
|
729
|
+
return this.g2g_1.length - this.i2g_1 | 0;
|
|
730
730
|
};
|
|
731
|
-
protoOf(Segment).
|
|
732
|
-
return this.
|
|
731
|
+
protoOf(Segment).v2h = function (readOnly) {
|
|
732
|
+
return this.g2g_1;
|
|
733
733
|
};
|
|
734
|
-
protoOf(Segment).
|
|
735
|
-
return this.
|
|
734
|
+
protoOf(Segment).w2h = function (index) {
|
|
735
|
+
return this.g2g_1[this.h2g_1 + index | 0];
|
|
736
736
|
};
|
|
737
|
-
protoOf(Segment).
|
|
738
|
-
this.
|
|
737
|
+
protoOf(Segment).x2h = function (index, value) {
|
|
738
|
+
this.g2g_1[this.i2g_1 + index | 0] = value;
|
|
739
739
|
};
|
|
740
|
-
protoOf(Segment).
|
|
741
|
-
var d = this.
|
|
742
|
-
var l = this.
|
|
740
|
+
protoOf(Segment).y2h = function (index, b0, b1) {
|
|
741
|
+
var d = this.g2g_1;
|
|
742
|
+
var l = this.i2g_1;
|
|
743
743
|
d[l + index | 0] = b0;
|
|
744
744
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
745
745
|
};
|
|
746
|
-
protoOf(Segment).
|
|
747
|
-
var d = this.
|
|
748
|
-
var l = this.
|
|
746
|
+
protoOf(Segment).z2h = function (index, b0, b1, b2) {
|
|
747
|
+
var d = this.g2g_1;
|
|
748
|
+
var l = this.i2g_1;
|
|
749
749
|
d[l + index | 0] = b0;
|
|
750
750
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
751
751
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
752
752
|
};
|
|
753
|
-
protoOf(Segment).
|
|
754
|
-
var d = this.
|
|
755
|
-
var l = this.
|
|
753
|
+
protoOf(Segment).a2i = function (index, b0, b1, b2, b3) {
|
|
754
|
+
var d = this.g2g_1;
|
|
755
|
+
var l = this.i2g_1;
|
|
756
756
|
d[l + index | 0] = b0;
|
|
757
757
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
758
758
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
759
759
|
d[(l + index | 0) + 3 | 0] = b3;
|
|
760
760
|
};
|
|
761
761
|
function Segment() {
|
|
762
|
-
this.
|
|
763
|
-
this.
|
|
764
|
-
this.
|
|
765
|
-
this.
|
|
766
|
-
this.
|
|
767
|
-
this.
|
|
762
|
+
this.h2g_1 = 0;
|
|
763
|
+
this.i2g_1 = 0;
|
|
764
|
+
this.j2g_1 = null;
|
|
765
|
+
this.k2g_1 = false;
|
|
766
|
+
this.l2g_1 = null;
|
|
767
|
+
this.m2g_1 = null;
|
|
768
768
|
}
|
|
769
769
|
function SegmentCopyTracker() {
|
|
770
770
|
}
|
|
@@ -778,7 +778,7 @@ function AlwaysSharedCopyTracker() {
|
|
|
778
778
|
protoOf(AlwaysSharedCopyTracker).z25 = function () {
|
|
779
779
|
return true;
|
|
780
780
|
};
|
|
781
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
781
|
+
protoOf(AlwaysSharedCopyTracker).t2h = function () {
|
|
782
782
|
return Unit_instance;
|
|
783
783
|
};
|
|
784
784
|
var AlwaysSharedCopyTracker_instance;
|
|
@@ -803,23 +803,23 @@ function readByteArrayImpl(_this__u8e3s4, size) {
|
|
|
803
803
|
var arraySize = size;
|
|
804
804
|
if (size === -1) {
|
|
805
805
|
var fetchSize = new Long(2147483647, 0);
|
|
806
|
-
while (_this__u8e3s4.
|
|
806
|
+
while (_this__u8e3s4.a2g().j().j1(new Long(2147483647, 0)) < 0 && _this__u8e3s4.d2g(fetchSize)) {
|
|
807
807
|
// Inline function 'kotlin.Long.times' call
|
|
808
808
|
fetchSize = fetchSize.b3(toLong(2));
|
|
809
809
|
}
|
|
810
810
|
// Inline function 'kotlin.check' call
|
|
811
811
|
// Inline function 'kotlin.contracts.contract' call
|
|
812
|
-
if (!(_this__u8e3s4.
|
|
812
|
+
if (!(_this__u8e3s4.a2g().j().j1(new Long(2147483647, 0)) < 0)) {
|
|
813
813
|
// Inline function 'kotlinx.io.readByteArrayImpl.<anonymous>' call
|
|
814
|
-
var message = "Can't create an array of size " + _this__u8e3s4.
|
|
814
|
+
var message = "Can't create an array of size " + _this__u8e3s4.a2g().j().toString();
|
|
815
815
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
816
816
|
}
|
|
817
|
-
arraySize = _this__u8e3s4.
|
|
817
|
+
arraySize = _this__u8e3s4.a2g().j().l1();
|
|
818
818
|
} else {
|
|
819
|
-
_this__u8e3s4.
|
|
819
|
+
_this__u8e3s4.c2g(toLong(size));
|
|
820
820
|
}
|
|
821
821
|
var array = new Int8Array(arraySize);
|
|
822
|
-
readTo(_this__u8e3s4.
|
|
822
|
+
readTo(_this__u8e3s4.a2g(), array);
|
|
823
823
|
return array;
|
|
824
824
|
}
|
|
825
825
|
function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
@@ -830,7 +830,7 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
830
830
|
checkBounds(toLong(size), toLong(startIndex), toLong(endIndex));
|
|
831
831
|
var offset = startIndex;
|
|
832
832
|
while (offset < endIndex) {
|
|
833
|
-
var bytesRead = _this__u8e3s4.
|
|
833
|
+
var bytesRead = _this__u8e3s4.p2g(sink, offset, endIndex);
|
|
834
834
|
if (bytesRead === -1) {
|
|
835
835
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + (endIndex - startIndex | 0) + ' bytes. ' + ('Only ' + bytesRead + ' bytes were read.'));
|
|
836
836
|
}
|
|
@@ -838,8 +838,8 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
840
|
function readString(_this__u8e3s4) {
|
|
841
|
-
_this__u8e3s4.
|
|
842
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
841
|
+
_this__u8e3s4.d2g(new Long(-1, 2147483647));
|
|
842
|
+
return commonReadUtf8(_this__u8e3s4.a2g(), _this__u8e3s4.a2g().j());
|
|
843
843
|
}
|
|
844
844
|
function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
845
845
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
@@ -850,7 +850,7 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
850
850
|
// Inline function 'kotlinx.io.writeToInternalBuffer' call
|
|
851
851
|
// Inline function 'kotlinx.io.writeString.<anonymous>' call
|
|
852
852
|
// Inline function 'kotlinx.io.commonWriteUtf8' call
|
|
853
|
-
var this_0 = _this__u8e3s4.
|
|
853
|
+
var this_0 = _this__u8e3s4.a2g();
|
|
854
854
|
var i = startIndex;
|
|
855
855
|
while (i < endIndex) {
|
|
856
856
|
// Inline function 'kotlin.code' call
|
|
@@ -860,16 +860,16 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
860
860
|
if (c < 128) {
|
|
861
861
|
$l$block_0: {
|
|
862
862
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
863
|
-
var tail = this_0.
|
|
863
|
+
var tail = this_0.t2g(1);
|
|
864
864
|
// Inline function 'kotlinx.io.commonWriteUtf8.<anonymous>' call
|
|
865
865
|
var ctx = get_SegmentWriteContextImpl();
|
|
866
866
|
var segmentOffset = -i | 0;
|
|
867
867
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
868
|
-
var b = i + tail.
|
|
868
|
+
var b = i + tail.u2h() | 0;
|
|
869
869
|
var runLimit = Math.min(endIndex, b);
|
|
870
870
|
var _unary__edvuaz = i;
|
|
871
871
|
i = _unary__edvuaz + 1 | 0;
|
|
872
|
-
ctx.
|
|
872
|
+
ctx.e2i(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
|
|
873
873
|
$l$loop: while (i < runLimit) {
|
|
874
874
|
// Inline function 'kotlin.code' call
|
|
875
875
|
var p0_0 = i;
|
|
@@ -879,97 +879,97 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
879
879
|
break $l$loop;
|
|
880
880
|
var _unary__edvuaz_0 = i;
|
|
881
881
|
i = _unary__edvuaz_0 + 1 | 0;
|
|
882
|
-
ctx.
|
|
882
|
+
ctx.e2i(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
|
|
883
883
|
}
|
|
884
884
|
var bytesWritten = i + segmentOffset | 0;
|
|
885
885
|
if (bytesWritten === 1) {
|
|
886
|
-
tail.
|
|
886
|
+
tail.i2g_1 = tail.i2g_1 + bytesWritten | 0;
|
|
887
887
|
var tmp = this_0;
|
|
888
888
|
// Inline function 'kotlin.Long.plus' call
|
|
889
|
-
tmp.
|
|
889
|
+
tmp.z2f_1 = this_0.z2f_1.z2(toLong(bytesWritten));
|
|
890
890
|
break $l$block_0;
|
|
891
891
|
}
|
|
892
892
|
// Inline function 'kotlin.check' call
|
|
893
893
|
// Inline function 'kotlin.contracts.contract' call
|
|
894
|
-
if (!(0 <= bytesWritten ? bytesWritten <= tail.
|
|
894
|
+
if (!(0 <= bytesWritten ? bytesWritten <= tail.u2h() : false)) {
|
|
895
895
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail.<anonymous>' call
|
|
896
|
-
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.
|
|
896
|
+
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.u2h();
|
|
897
897
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
898
898
|
}
|
|
899
899
|
if (!(bytesWritten === 0)) {
|
|
900
|
-
tail.
|
|
900
|
+
tail.i2g_1 = tail.i2g_1 + bytesWritten | 0;
|
|
901
901
|
var tmp_0 = this_0;
|
|
902
902
|
// Inline function 'kotlin.Long.plus' call
|
|
903
|
-
tmp_0.
|
|
903
|
+
tmp_0.z2f_1 = this_0.z2f_1.z2(toLong(bytesWritten));
|
|
904
904
|
break $l$block_0;
|
|
905
905
|
}
|
|
906
906
|
if (isEmpty(tail)) {
|
|
907
|
-
this_0.
|
|
907
|
+
this_0.h2h();
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
910
|
} else if (c < 2048) {
|
|
911
911
|
$l$block_2: {
|
|
912
912
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
913
|
-
var tail_0 = this_0.
|
|
913
|
+
var tail_0 = this_0.t2g(2);
|
|
914
914
|
// Inline function 'kotlinx.io.commonWriteUtf8.<anonymous>' call
|
|
915
|
-
get_SegmentWriteContextImpl().
|
|
915
|
+
get_SegmentWriteContextImpl().d2i(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
916
916
|
var bytesWritten_0 = 2;
|
|
917
917
|
if (bytesWritten_0 === 2) {
|
|
918
|
-
tail_0.
|
|
918
|
+
tail_0.i2g_1 = tail_0.i2g_1 + bytesWritten_0 | 0;
|
|
919
919
|
var tmp_1 = this_0;
|
|
920
920
|
// Inline function 'kotlin.Long.plus' call
|
|
921
|
-
tmp_1.
|
|
921
|
+
tmp_1.z2f_1 = this_0.z2f_1.z2(toLong(bytesWritten_0));
|
|
922
922
|
break $l$block_2;
|
|
923
923
|
}
|
|
924
924
|
// Inline function 'kotlin.check' call
|
|
925
925
|
// Inline function 'kotlin.contracts.contract' call
|
|
926
|
-
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.
|
|
926
|
+
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.u2h() : false)) {
|
|
927
927
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail.<anonymous>' call
|
|
928
|
-
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.
|
|
928
|
+
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.u2h();
|
|
929
929
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
930
930
|
}
|
|
931
931
|
if (!(bytesWritten_0 === 0)) {
|
|
932
|
-
tail_0.
|
|
932
|
+
tail_0.i2g_1 = tail_0.i2g_1 + bytesWritten_0 | 0;
|
|
933
933
|
var tmp_2 = this_0;
|
|
934
934
|
// Inline function 'kotlin.Long.plus' call
|
|
935
|
-
tmp_2.
|
|
935
|
+
tmp_2.z2f_1 = this_0.z2f_1.z2(toLong(bytesWritten_0));
|
|
936
936
|
break $l$block_2;
|
|
937
937
|
}
|
|
938
938
|
if (isEmpty(tail_0)) {
|
|
939
|
-
this_0.
|
|
939
|
+
this_0.h2h();
|
|
940
940
|
}
|
|
941
941
|
}
|
|
942
942
|
i = i + 1 | 0;
|
|
943
943
|
} else if (c < 55296 || c > 57343) {
|
|
944
944
|
$l$block_4: {
|
|
945
945
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
946
|
-
var tail_1 = this_0.
|
|
946
|
+
var tail_1 = this_0.t2g(3);
|
|
947
947
|
// Inline function 'kotlinx.io.commonWriteUtf8.<anonymous>' call
|
|
948
|
-
get_SegmentWriteContextImpl().
|
|
948
|
+
get_SegmentWriteContextImpl().c2i(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
949
949
|
var bytesWritten_1 = 3;
|
|
950
950
|
if (bytesWritten_1 === 3) {
|
|
951
|
-
tail_1.
|
|
951
|
+
tail_1.i2g_1 = tail_1.i2g_1 + bytesWritten_1 | 0;
|
|
952
952
|
var tmp_3 = this_0;
|
|
953
953
|
// Inline function 'kotlin.Long.plus' call
|
|
954
|
-
tmp_3.
|
|
954
|
+
tmp_3.z2f_1 = this_0.z2f_1.z2(toLong(bytesWritten_1));
|
|
955
955
|
break $l$block_4;
|
|
956
956
|
}
|
|
957
957
|
// Inline function 'kotlin.check' call
|
|
958
958
|
// Inline function 'kotlin.contracts.contract' call
|
|
959
|
-
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.
|
|
959
|
+
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.u2h() : false)) {
|
|
960
960
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail.<anonymous>' call
|
|
961
|
-
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.
|
|
961
|
+
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.u2h();
|
|
962
962
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
963
963
|
}
|
|
964
964
|
if (!(bytesWritten_1 === 0)) {
|
|
965
|
-
tail_1.
|
|
965
|
+
tail_1.i2g_1 = tail_1.i2g_1 + bytesWritten_1 | 0;
|
|
966
966
|
var tmp_4 = this_0;
|
|
967
967
|
// Inline function 'kotlin.Long.plus' call
|
|
968
|
-
tmp_4.
|
|
968
|
+
tmp_4.z2f_1 = this_0.z2f_1.z2(toLong(bytesWritten_1));
|
|
969
969
|
break $l$block_4;
|
|
970
970
|
}
|
|
971
971
|
if (isEmpty(tail_1)) {
|
|
972
|
-
this_0.
|
|
972
|
+
this_0.h2h();
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
975
|
i = i + 1 | 0;
|
|
@@ -985,52 +985,52 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
985
985
|
}
|
|
986
986
|
var low = tmp_5;
|
|
987
987
|
if (c > 56319 || !(56320 <= low ? low <= 57343 : false)) {
|
|
988
|
-
this_0.
|
|
988
|
+
this_0.d2h(63);
|
|
989
989
|
i = i + 1 | 0;
|
|
990
990
|
} else {
|
|
991
991
|
var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
|
|
992
992
|
$l$block_6: {
|
|
993
993
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
994
|
-
var tail_2 = this_0.
|
|
994
|
+
var tail_2 = this_0.t2g(4);
|
|
995
995
|
// Inline function 'kotlinx.io.commonWriteUtf8.<anonymous>' call
|
|
996
|
-
get_SegmentWriteContextImpl().
|
|
996
|
+
get_SegmentWriteContextImpl().b2i(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
997
997
|
var bytesWritten_2 = 4;
|
|
998
998
|
if (bytesWritten_2 === 4) {
|
|
999
|
-
tail_2.
|
|
999
|
+
tail_2.i2g_1 = tail_2.i2g_1 + bytesWritten_2 | 0;
|
|
1000
1000
|
var tmp_6 = this_0;
|
|
1001
1001
|
// Inline function 'kotlin.Long.plus' call
|
|
1002
|
-
tmp_6.
|
|
1002
|
+
tmp_6.z2f_1 = this_0.z2f_1.z2(toLong(bytesWritten_2));
|
|
1003
1003
|
break $l$block_6;
|
|
1004
1004
|
}
|
|
1005
1005
|
// Inline function 'kotlin.check' call
|
|
1006
1006
|
// Inline function 'kotlin.contracts.contract' call
|
|
1007
|
-
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.
|
|
1007
|
+
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.u2h() : false)) {
|
|
1008
1008
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail.<anonymous>' call
|
|
1009
|
-
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.
|
|
1009
|
+
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.u2h();
|
|
1010
1010
|
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
1011
1011
|
}
|
|
1012
1012
|
if (!(bytesWritten_2 === 0)) {
|
|
1013
|
-
tail_2.
|
|
1013
|
+
tail_2.i2g_1 = tail_2.i2g_1 + bytesWritten_2 | 0;
|
|
1014
1014
|
var tmp_7 = this_0;
|
|
1015
1015
|
// Inline function 'kotlin.Long.plus' call
|
|
1016
|
-
tmp_7.
|
|
1016
|
+
tmp_7.z2f_1 = this_0.z2f_1.z2(toLong(bytesWritten_2));
|
|
1017
1017
|
break $l$block_6;
|
|
1018
1018
|
}
|
|
1019
1019
|
if (isEmpty(tail_2)) {
|
|
1020
|
-
this_0.
|
|
1020
|
+
this_0.h2h();
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
1023
|
i = i + 2 | 0;
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
|
-
_this__u8e3s4.
|
|
1027
|
+
_this__u8e3s4.e2g();
|
|
1028
1028
|
}
|
|
1029
1029
|
function commonReadUtf8(_this__u8e3s4, byteCount) {
|
|
1030
1030
|
if (byteCount.equals(new Long(0, 0)))
|
|
1031
1031
|
return '';
|
|
1032
1032
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
1033
|
-
var curr = _this__u8e3s4.
|
|
1033
|
+
var curr = _this__u8e3s4.x2f_1;
|
|
1034
1034
|
while (!(curr == null)) {
|
|
1035
1035
|
// Inline function 'kotlinx.io.commonReadUtf8.<anonymous>' call
|
|
1036
1036
|
get_SegmentReadContextImpl();
|
|
@@ -1038,14 +1038,14 @@ function commonReadUtf8(_this__u8e3s4, byteCount) {
|
|
|
1038
1038
|
var result = '';
|
|
1039
1039
|
// Inline function 'kotlinx.io.unsafe.withData' call
|
|
1040
1040
|
// Inline function 'kotlinx.io.commonReadUtf8.<anonymous>.<anonymous>' call
|
|
1041
|
-
var data = curr.
|
|
1042
|
-
var pos = curr.
|
|
1041
|
+
var data = curr.v2h(true);
|
|
1042
|
+
var pos = curr.h2g_1;
|
|
1043
1043
|
// Inline function 'kotlin.math.min' call
|
|
1044
|
-
var a = curr.
|
|
1044
|
+
var a = curr.i2g_1;
|
|
1045
1045
|
var b = pos + byteCount.l1() | 0;
|
|
1046
1046
|
var tmp$ret$0 = Math.min(a, b);
|
|
1047
1047
|
result = commonToUtf8String(data, pos, tmp$ret$0);
|
|
1048
|
-
_this__u8e3s4.
|
|
1048
|
+
_this__u8e3s4.n2g(byteCount);
|
|
1049
1049
|
return result;
|
|
1050
1050
|
}
|
|
1051
1051
|
return commonToUtf8String(readByteArray(_this__u8e3s4, byteCount.l1()));
|
|
@@ -1062,9 +1062,9 @@ function FileMetadata(isRegularFile, isDirectory, size) {
|
|
|
1062
1062
|
isRegularFile = isRegularFile === VOID ? false : isRegularFile;
|
|
1063
1063
|
isDirectory = isDirectory === VOID ? false : isDirectory;
|
|
1064
1064
|
size = size === VOID ? new Long(0, 0) : size;
|
|
1065
|
-
this.
|
|
1066
|
-
this.
|
|
1067
|
-
this.
|
|
1065
|
+
this.m2i_1 = isRegularFile;
|
|
1066
|
+
this.n2i_1 = isDirectory;
|
|
1067
|
+
this.o2i_1 = size;
|
|
1068
1068
|
}
|
|
1069
1069
|
function Path(base, parts) {
|
|
1070
1070
|
return Path_0(base.toString(), parts.slice());
|
|
@@ -1542,27 +1542,27 @@ function UnsafeBufferOperations_getInstance() {
|
|
|
1542
1542
|
}
|
|
1543
1543
|
function SegmentReadContextImpl$1() {
|
|
1544
1544
|
}
|
|
1545
|
-
protoOf(SegmentReadContextImpl$1).
|
|
1546
|
-
return segment.
|
|
1545
|
+
protoOf(SegmentReadContextImpl$1).f2h = function (segment, offset) {
|
|
1546
|
+
return segment.w2h(offset);
|
|
1547
1547
|
};
|
|
1548
1548
|
function SegmentWriteContextImpl$1() {
|
|
1549
1549
|
}
|
|
1550
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1551
|
-
segment.
|
|
1550
|
+
protoOf(SegmentWriteContextImpl$1).e2i = function (segment, offset, value) {
|
|
1551
|
+
segment.x2h(offset, value);
|
|
1552
1552
|
};
|
|
1553
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1554
|
-
segment.
|
|
1553
|
+
protoOf(SegmentWriteContextImpl$1).d2i = function (segment, offset, b0, b1) {
|
|
1554
|
+
segment.y2h(offset, b0, b1);
|
|
1555
1555
|
};
|
|
1556
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1557
|
-
segment.
|
|
1556
|
+
protoOf(SegmentWriteContextImpl$1).c2i = function (segment, offset, b0, b1, b2) {
|
|
1557
|
+
segment.z2h(offset, b0, b1, b2);
|
|
1558
1558
|
};
|
|
1559
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1560
|
-
segment.
|
|
1559
|
+
protoOf(SegmentWriteContextImpl$1).b2i = function (segment, offset, b0, b1, b2, b3) {
|
|
1560
|
+
segment.a2i(offset, b0, b1, b2, b3);
|
|
1561
1561
|
};
|
|
1562
1562
|
function BufferIterationContextImpl$1() {
|
|
1563
1563
|
}
|
|
1564
|
-
protoOf(BufferIterationContextImpl$1).
|
|
1565
|
-
return get_SegmentReadContextImpl().
|
|
1564
|
+
protoOf(BufferIterationContextImpl$1).f2h = function (segment, offset) {
|
|
1565
|
+
return get_SegmentReadContextImpl().f2h(segment, offset);
|
|
1566
1566
|
};
|
|
1567
1567
|
var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
|
|
1568
1568
|
function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
@@ -1643,15 +1643,15 @@ function EOFException() {
|
|
|
1643
1643
|
captureStack(this, EOFException);
|
|
1644
1644
|
}
|
|
1645
1645
|
function SegmentPool() {
|
|
1646
|
-
this.
|
|
1647
|
-
this.
|
|
1646
|
+
this.u2g_1 = 0;
|
|
1647
|
+
this.v2g_1 = 0;
|
|
1648
1648
|
}
|
|
1649
|
-
protoOf(SegmentPool).
|
|
1650
|
-
return Companion_instance.
|
|
1649
|
+
protoOf(SegmentPool).w2g = function () {
|
|
1650
|
+
return Companion_instance.q2h();
|
|
1651
1651
|
};
|
|
1652
|
-
protoOf(SegmentPool).
|
|
1652
|
+
protoOf(SegmentPool).g2h = function (segment) {
|
|
1653
1653
|
};
|
|
1654
|
-
protoOf(SegmentPool).
|
|
1654
|
+
protoOf(SegmentPool).s2h = function () {
|
|
1655
1655
|
return AlwaysSharedCopyTracker_getInstance();
|
|
1656
1656
|
};
|
|
1657
1657
|
var SegmentPool_instance;
|
|
@@ -1800,7 +1800,7 @@ function FileNotFoundException(message) {
|
|
|
1800
1800
|
}
|
|
1801
1801
|
function SystemFileSystem$o$metadataOrNull$lambda($path, $metadata) {
|
|
1802
1802
|
return function () {
|
|
1803
|
-
var tmp0_elvis_lhs = get_fs().statSync($path.
|
|
1803
|
+
var tmp0_elvis_lhs = get_fs().statSync($path.p2i_1);
|
|
1804
1804
|
var tmp;
|
|
1805
1805
|
if (tmp0_elvis_lhs == null) {
|
|
1806
1806
|
return Unit_instance;
|
|
@@ -1817,16 +1817,16 @@ function SystemFileSystem$o$metadataOrNull$lambda($path, $metadata) {
|
|
|
1817
1817
|
function SystemFileSystem$1() {
|
|
1818
1818
|
SystemFileSystemImpl.call(this);
|
|
1819
1819
|
}
|
|
1820
|
-
protoOf(SystemFileSystem$1).
|
|
1821
|
-
return get_fs().existsSync(path.
|
|
1820
|
+
protoOf(SystemFileSystem$1).f2i = function (path) {
|
|
1821
|
+
return get_fs().existsSync(path.p2i_1);
|
|
1822
1822
|
};
|
|
1823
|
-
protoOf(SystemFileSystem$1).
|
|
1824
|
-
var metadata = this.
|
|
1823
|
+
protoOf(SystemFileSystem$1).g2i = function (path, mustCreate) {
|
|
1824
|
+
var metadata = this.k2i(path);
|
|
1825
1825
|
if (!(metadata == null)) {
|
|
1826
1826
|
if (mustCreate) {
|
|
1827
1827
|
throw IOException_init_$Create$_0('Path already exists: ' + path.toString());
|
|
1828
1828
|
}
|
|
1829
|
-
if (metadata.
|
|
1829
|
+
if (metadata.m2i_1) {
|
|
1830
1830
|
throw IOException_init_$Create$_0("Path already exists and it's a file: " + path.toString());
|
|
1831
1831
|
}
|
|
1832
1832
|
return Unit_instance;
|
|
@@ -1834,9 +1834,9 @@ protoOf(SystemFileSystem$1).y2h = function (path, mustCreate) {
|
|
|
1834
1834
|
// Inline function 'kotlin.collections.arrayListOf' call
|
|
1835
1835
|
var parts = ArrayList_init_$Create$();
|
|
1836
1836
|
var p = path;
|
|
1837
|
-
while (!(p == null) && !this.
|
|
1837
|
+
while (!(p == null) && !this.f2i(p)) {
|
|
1838
1838
|
parts.e(p.toString());
|
|
1839
|
-
p = p.
|
|
1839
|
+
p = p.q2i();
|
|
1840
1840
|
}
|
|
1841
1841
|
// Inline function 'kotlin.collections.forEach' call
|
|
1842
1842
|
var tmp0_iterator = asReversed(parts).g();
|
|
@@ -1846,8 +1846,8 @@ protoOf(SystemFileSystem$1).y2h = function (path, mustCreate) {
|
|
|
1846
1846
|
get_fs().mkdirSync(element);
|
|
1847
1847
|
}
|
|
1848
1848
|
};
|
|
1849
|
-
protoOf(SystemFileSystem$1).
|
|
1850
|
-
if (!this.
|
|
1849
|
+
protoOf(SystemFileSystem$1).k2i = function (path) {
|
|
1850
|
+
if (!this.f2i(path))
|
|
1851
1851
|
return null;
|
|
1852
1852
|
var metadata = {_v: null};
|
|
1853
1853
|
var tmp2_safe_receiver = withCaughtException(SystemFileSystem$o$metadataOrNull$lambda(path, metadata));
|
|
@@ -1861,27 +1861,27 @@ protoOf(SystemFileSystem$1).c2i = function (path) {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
return metadata._v;
|
|
1863
1863
|
};
|
|
1864
|
-
protoOf(SystemFileSystem$1).
|
|
1864
|
+
protoOf(SystemFileSystem$1).h2i = function (path) {
|
|
1865
1865
|
return new FileSource(path);
|
|
1866
1866
|
};
|
|
1867
|
-
protoOf(SystemFileSystem$1).
|
|
1867
|
+
protoOf(SystemFileSystem$1).i2i = function (path, append) {
|
|
1868
1868
|
return new FileSink(path, append);
|
|
1869
1869
|
};
|
|
1870
|
-
protoOf(SystemFileSystem$1).
|
|
1871
|
-
var tmp0_elvis_lhs = this.
|
|
1870
|
+
protoOf(SystemFileSystem$1).l2i = function (directory) {
|
|
1871
|
+
var tmp0_elvis_lhs = this.k2i(directory);
|
|
1872
1872
|
var tmp;
|
|
1873
1873
|
if (tmp0_elvis_lhs == null) {
|
|
1874
|
-
throw new FileNotFoundException(directory.
|
|
1874
|
+
throw new FileNotFoundException(directory.p2i_1);
|
|
1875
1875
|
} else {
|
|
1876
1876
|
tmp = tmp0_elvis_lhs;
|
|
1877
1877
|
}
|
|
1878
1878
|
var metadata = tmp;
|
|
1879
|
-
if (!metadata.
|
|
1880
|
-
throw IOException_init_$Create$_0('Not a directory: ' + directory.
|
|
1881
|
-
var tmp1_elvis_lhs = get_fs().opendirSync(directory.
|
|
1879
|
+
if (!metadata.n2i_1)
|
|
1880
|
+
throw IOException_init_$Create$_0('Not a directory: ' + directory.p2i_1);
|
|
1881
|
+
var tmp1_elvis_lhs = get_fs().opendirSync(directory.p2i_1);
|
|
1882
1882
|
var tmp_0;
|
|
1883
1883
|
if (tmp1_elvis_lhs == null) {
|
|
1884
|
-
throw IOException_init_$Create$_0('Unable to read directory: ' + directory.
|
|
1884
|
+
throw IOException_init_$Create$_0('Unable to read directory: ' + directory.p2i_1);
|
|
1885
1885
|
} else {
|
|
1886
1886
|
tmp_0 = tmp1_elvis_lhs;
|
|
1887
1887
|
}
|
|
@@ -1921,27 +1921,27 @@ function get_SystemPathSeparator() {
|
|
|
1921
1921
|
}
|
|
1922
1922
|
var SystemPathSeparator$delegate;
|
|
1923
1923
|
function Path_1(rawPath, any) {
|
|
1924
|
-
this.
|
|
1924
|
+
this.p2i_1 = removeTrailingSeparators(rawPath);
|
|
1925
1925
|
}
|
|
1926
|
-
protoOf(Path_1).
|
|
1926
|
+
protoOf(Path_1).q2i = function () {
|
|
1927
1927
|
// Inline function 'kotlin.text.isEmpty' call
|
|
1928
|
-
var this_0 = this.
|
|
1928
|
+
var this_0 = this.p2i_1;
|
|
1929
1929
|
if (charSequenceLength(this_0) === 0)
|
|
1930
1930
|
return null;
|
|
1931
1931
|
if (get_isWindows()) {
|
|
1932
|
-
if (!contains(this.
|
|
1932
|
+
if (!contains(this.p2i_1, _Char___init__impl__6a9atx(47)) && !contains(this.p2i_1, _Char___init__impl__6a9atx(92))) {
|
|
1933
1933
|
return null;
|
|
1934
1934
|
}
|
|
1935
|
-
} else if (!contains(this.
|
|
1935
|
+
} else if (!contains(this.p2i_1, get_SystemPathSeparator())) {
|
|
1936
1936
|
return null;
|
|
1937
1937
|
}
|
|
1938
|
-
var p = get_path().dirname(this.
|
|
1938
|
+
var p = get_path().dirname(this.p2i_1);
|
|
1939
1939
|
var tmp;
|
|
1940
1940
|
// Inline function 'kotlin.text.isEmpty' call
|
|
1941
1941
|
if (charSequenceLength(p) === 0) {
|
|
1942
1942
|
tmp = null;
|
|
1943
1943
|
} else {
|
|
1944
|
-
if (p === this.
|
|
1944
|
+
if (p === this.p2i_1) {
|
|
1945
1945
|
tmp = null;
|
|
1946
1946
|
} else {
|
|
1947
1947
|
tmp = Path_2(p);
|
|
@@ -1951,10 +1951,10 @@ protoOf(Path_1).i2i = function () {
|
|
|
1951
1951
|
};
|
|
1952
1952
|
protoOf(Path_1).s2 = function () {
|
|
1953
1953
|
// Inline function 'kotlin.text.isEmpty' call
|
|
1954
|
-
var this_0 = this.
|
|
1954
|
+
var this_0 = this.p2i_1;
|
|
1955
1955
|
if (charSequenceLength(this_0) === 0)
|
|
1956
1956
|
return '';
|
|
1957
|
-
var p = get_path().basename(this.
|
|
1957
|
+
var p = get_path().basename(this.p2i_1);
|
|
1958
1958
|
var tmp;
|
|
1959
1959
|
// Inline function 'kotlin.text.isEmpty' call
|
|
1960
1960
|
if (charSequenceLength(p) === 0) {
|
|
@@ -1965,21 +1965,21 @@ protoOf(Path_1).s2 = function () {
|
|
|
1965
1965
|
return tmp;
|
|
1966
1966
|
};
|
|
1967
1967
|
protoOf(Path_1).toString = function () {
|
|
1968
|
-
return this.
|
|
1968
|
+
return this.p2i_1;
|
|
1969
1969
|
};
|
|
1970
1970
|
protoOf(Path_1).equals = function (other) {
|
|
1971
1971
|
if (this === other)
|
|
1972
1972
|
return true;
|
|
1973
1973
|
if (!(other instanceof Path_1))
|
|
1974
1974
|
return false;
|
|
1975
|
-
return this.
|
|
1975
|
+
return this.p2i_1 === other.p2i_1;
|
|
1976
1976
|
};
|
|
1977
1977
|
protoOf(Path_1).hashCode = function () {
|
|
1978
|
-
return getStringHashCode(this.
|
|
1978
|
+
return getStringHashCode(this.p2i_1);
|
|
1979
1979
|
};
|
|
1980
1980
|
function open($this, path) {
|
|
1981
|
-
if (!get_fs().existsSync(path.
|
|
1982
|
-
throw new FileNotFoundException('File does not exist: ' + path.
|
|
1981
|
+
if (!get_fs().existsSync(path.p2i_1)) {
|
|
1982
|
+
throw new FileNotFoundException('File does not exist: ' + path.p2i_1);
|
|
1983
1983
|
}
|
|
1984
1984
|
var fd = {_v: -1};
|
|
1985
1985
|
var tmp3_safe_receiver = withCaughtException(FileSource$open$lambda(fd, path));
|
|
@@ -1989,35 +1989,35 @@ function open($this, path) {
|
|
|
1989
1989
|
// Inline function 'kotlin.also' call
|
|
1990
1990
|
// Inline function 'kotlin.contracts.contract' call
|
|
1991
1991
|
// Inline function 'kotlinx.io.files.FileSource.open.<anonymous>' call
|
|
1992
|
-
throw IOException_init_$Create$_1('Failed to open a file ' + path.
|
|
1992
|
+
throw IOException_init_$Create$_1('Failed to open a file ' + path.p2i_1 + '.', tmp3_safe_receiver);
|
|
1993
1993
|
}
|
|
1994
1994
|
if (fd._v < 0)
|
|
1995
|
-
throw IOException_init_$Create$_0('Failed to open a file ' + path.
|
|
1995
|
+
throw IOException_init_$Create$_0('Failed to open a file ' + path.p2i_1 + '.');
|
|
1996
1996
|
return fd._v;
|
|
1997
1997
|
}
|
|
1998
1998
|
function FileSource$open$lambda($fd, $path) {
|
|
1999
1999
|
return function () {
|
|
2000
|
-
$fd._v = get_fs().openSync($path.
|
|
2000
|
+
$fd._v = get_fs().openSync($path.p2i_1, 'r');
|
|
2001
2001
|
return Unit_instance;
|
|
2002
2002
|
};
|
|
2003
2003
|
}
|
|
2004
2004
|
function FileSource$readAtMostTo$lambda(this$0) {
|
|
2005
2005
|
return function () {
|
|
2006
|
-
this$0.
|
|
2006
|
+
this$0.s2i_1 = get_fs().readFileSync(this$0.v2i_1, null);
|
|
2007
2007
|
return Unit_instance;
|
|
2008
2008
|
};
|
|
2009
2009
|
}
|
|
2010
2010
|
function FileSource(path) {
|
|
2011
|
-
this.
|
|
2012
|
-
this.
|
|
2013
|
-
this.
|
|
2014
|
-
this.
|
|
2015
|
-
this.
|
|
2011
|
+
this.r2i_1 = path;
|
|
2012
|
+
this.s2i_1 = null;
|
|
2013
|
+
this.t2i_1 = false;
|
|
2014
|
+
this.u2i_1 = 0;
|
|
2015
|
+
this.v2i_1 = open(this, this.r2i_1);
|
|
2016
2016
|
}
|
|
2017
|
-
protoOf(FileSource).
|
|
2017
|
+
protoOf(FileSource).r2g = function (sink, byteCount) {
|
|
2018
2018
|
// Inline function 'kotlin.check' call
|
|
2019
2019
|
// Inline function 'kotlin.contracts.contract' call
|
|
2020
|
-
if (!!this.
|
|
2020
|
+
if (!!this.t2i_1) {
|
|
2021
2021
|
// Inline function 'kotlinx.io.files.FileSource.readAtMostTo.<anonymous>' call
|
|
2022
2022
|
var message = 'Source is closed.';
|
|
2023
2023
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
@@ -2025,7 +2025,7 @@ protoOf(FileSource).j2g = function (sink, byteCount) {
|
|
|
2025
2025
|
if (byteCount.equals(new Long(0, 0))) {
|
|
2026
2026
|
return new Long(0, 0);
|
|
2027
2027
|
}
|
|
2028
|
-
if (this.
|
|
2028
|
+
if (this.s2i_1 === null) {
|
|
2029
2029
|
var tmp4_safe_receiver = withCaughtException(FileSource$readAtMostTo$lambda(this));
|
|
2030
2030
|
if (tmp4_safe_receiver == null)
|
|
2031
2031
|
null;
|
|
@@ -2033,15 +2033,15 @@ protoOf(FileSource).j2g = function (sink, byteCount) {
|
|
|
2033
2033
|
// Inline function 'kotlin.also' call
|
|
2034
2034
|
// Inline function 'kotlin.contracts.contract' call
|
|
2035
2035
|
// Inline function 'kotlinx.io.files.FileSource.readAtMostTo.<anonymous>' call
|
|
2036
|
-
throw IOException_init_$Create$_1('Failed to read data from ' + this.
|
|
2036
|
+
throw IOException_init_$Create$_1('Failed to read data from ' + this.r2i_1.p2i_1, tmp4_safe_receiver);
|
|
2037
2037
|
}
|
|
2038
2038
|
}
|
|
2039
|
-
var len = ensureNotNull(this.
|
|
2040
|
-
if (this.
|
|
2039
|
+
var len = ensureNotNull(this.s2i_1).length;
|
|
2040
|
+
if (this.u2i_1 >= len) {
|
|
2041
2041
|
return new Long(-1, -1);
|
|
2042
2042
|
}
|
|
2043
2043
|
// Inline function 'kotlinx.io.minOf' call
|
|
2044
|
-
var b = len - this.
|
|
2044
|
+
var b = len - this.u2i_1 | 0;
|
|
2045
2045
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
2046
2046
|
var b_0 = toLong(b);
|
|
2047
2047
|
var bytesToRead = byteCount.j1(b_0) <= 0 ? byteCount : b_0;
|
|
@@ -2050,10 +2050,10 @@ protoOf(FileSource).j2g = function (sink, byteCount) {
|
|
|
2050
2050
|
do {
|
|
2051
2051
|
var i = inductionVariable;
|
|
2052
2052
|
inductionVariable = inductionVariable.z2(new Long(1, 0));
|
|
2053
|
-
var tmp = ensureNotNull(this.
|
|
2054
|
-
var _unary__edvuaz = this.
|
|
2055
|
-
this.
|
|
2056
|
-
sink.
|
|
2053
|
+
var tmp = ensureNotNull(this.s2i_1);
|
|
2054
|
+
var _unary__edvuaz = this.u2i_1;
|
|
2055
|
+
this.u2i_1 = _unary__edvuaz + 1 | 0;
|
|
2056
|
+
sink.d2h(tmp.readInt8(_unary__edvuaz));
|
|
2057
2057
|
}
|
|
2058
2058
|
while (inductionVariable.j1(bytesToRead) < 0);
|
|
2059
2059
|
return bytesToRead;
|
|
@@ -2068,32 +2068,32 @@ function open_0($this, path, append) {
|
|
|
2068
2068
|
// Inline function 'kotlin.also' call
|
|
2069
2069
|
// Inline function 'kotlin.contracts.contract' call
|
|
2070
2070
|
// Inline function 'kotlinx.io.files.FileSink.open.<anonymous>' call
|
|
2071
|
-
throw IOException_init_$Create$_1('Failed to open a file ' + path.
|
|
2071
|
+
throw IOException_init_$Create$_1('Failed to open a file ' + path.p2i_1 + '.', tmp5_safe_receiver);
|
|
2072
2072
|
}
|
|
2073
2073
|
if (fd._v < 0)
|
|
2074
|
-
throw IOException_init_$Create$_0('Failed to open a file ' + path.
|
|
2074
|
+
throw IOException_init_$Create$_0('Failed to open a file ' + path.p2i_1 + '.');
|
|
2075
2075
|
return fd._v;
|
|
2076
2076
|
}
|
|
2077
2077
|
function FileSink$open$lambda($fd, $path, $flags) {
|
|
2078
2078
|
return function () {
|
|
2079
|
-
$fd._v = get_fs().openSync($path.
|
|
2079
|
+
$fd._v = get_fs().openSync($path.p2i_1, $flags);
|
|
2080
2080
|
return Unit_instance;
|
|
2081
2081
|
};
|
|
2082
2082
|
}
|
|
2083
2083
|
function FileSink$write$lambda(this$0, $buf) {
|
|
2084
2084
|
return function () {
|
|
2085
|
-
get_fs().writeFileSync(this$0.
|
|
2085
|
+
get_fs().writeFileSync(this$0.x2i_1, $buf);
|
|
2086
2086
|
return Unit_instance;
|
|
2087
2087
|
};
|
|
2088
2088
|
}
|
|
2089
2089
|
function FileSink(path, append) {
|
|
2090
|
-
this.
|
|
2091
|
-
this.
|
|
2090
|
+
this.w2i_1 = false;
|
|
2091
|
+
this.x2i_1 = open_0(this, path, append);
|
|
2092
2092
|
}
|
|
2093
|
-
protoOf(FileSink).
|
|
2093
|
+
protoOf(FileSink).s2g = function (source, byteCount) {
|
|
2094
2094
|
// Inline function 'kotlin.check' call
|
|
2095
2095
|
// Inline function 'kotlin.contracts.contract' call
|
|
2096
|
-
if (!!this.
|
|
2096
|
+
if (!!this.w2i_1) {
|
|
2097
2097
|
// Inline function 'kotlinx.io.files.FileSink.write.<anonymous>' call
|
|
2098
2098
|
var message = 'Sink is closed.';
|
|
2099
2099
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
@@ -2109,16 +2109,16 @@ protoOf(FileSink).k2g = function (source, byteCount) {
|
|
|
2109
2109
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.readFromHead' call
|
|
2110
2110
|
// Inline function 'kotlin.require' call
|
|
2111
2111
|
// Inline function 'kotlin.contracts.contract' call
|
|
2112
|
-
if (!!source.
|
|
2112
|
+
if (!!source.b2g()) {
|
|
2113
2113
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.readFromHead.<anonymous>' call
|
|
2114
2114
|
var message_0 = 'Buffer is empty';
|
|
2115
2115
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
2116
2116
|
}
|
|
2117
|
-
var head = ensureNotNull(source.
|
|
2117
|
+
var head = ensureNotNull(source.x2f_1);
|
|
2118
2118
|
// Inline function 'kotlinx.io.files.FileSink.write.<anonymous>' call
|
|
2119
|
-
var headData = head.
|
|
2120
|
-
var headPos = head.
|
|
2121
|
-
segmentBytes = head.
|
|
2119
|
+
var headData = head.v2h(true);
|
|
2120
|
+
var headPos = head.h2g_1;
|
|
2121
|
+
segmentBytes = head.i2g_1 - headPos | 0;
|
|
2122
2122
|
var buf = get_buffer().Buffer.allocUnsafe(segmentBytes);
|
|
2123
2123
|
var inductionVariable = 0;
|
|
2124
2124
|
var last = segmentBytes;
|
|
@@ -2144,7 +2144,7 @@ protoOf(FileSink).k2g = function (source, byteCount) {
|
|
|
2144
2144
|
throw IllegalStateException_init_$Create$('Returned negative read bytes count');
|
|
2145
2145
|
if (bytesRead > head.j())
|
|
2146
2146
|
throw IllegalStateException_init_$Create$('Returned too many bytes');
|
|
2147
|
-
source.
|
|
2147
|
+
source.n2g(toLong(bytesRead));
|
|
2148
2148
|
}
|
|
2149
2149
|
// Inline function 'kotlin.Long.minus' call
|
|
2150
2150
|
var this_0 = remainingBytes;
|
|
@@ -2186,7 +2186,7 @@ function _init_properties_PathsNodeJs_kt__bvvvsp() {
|
|
|
2186
2186
|
}
|
|
2187
2187
|
}
|
|
2188
2188
|
//region block: post-declaration
|
|
2189
|
-
protoOf(SystemFileSystemImpl).
|
|
2189
|
+
protoOf(SystemFileSystemImpl).j2i = sink$default;
|
|
2190
2190
|
//endregion
|
|
2191
2191
|
//region block: init
|
|
2192
2192
|
Companion_instance = new Companion();
|