@flock/wirespec 0.17.20 → 0.18.1-RC.2
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/arrow-arrow-annotations.mjs.map +1 -1
- package/arrow-arrow-atomic.mjs +13 -13
- package/arrow-arrow-atomic.mjs.map +1 -1
- package/arrow-arrow-core.mjs +588 -431
- package/arrow-arrow-core.mjs.map +1 -1
- package/arrow-arrow-exception-utils.mjs +30 -0
- package/arrow-arrow-exception-utils.mjs.map +1 -0
- package/clikt-clikt-mordant.mjs +318 -0
- package/clikt-clikt-mordant.mjs.map +1 -0
- package/clikt-clikt.mjs +3834 -3696
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +619 -682
- package/colormath-root-colormath.mjs.map +1 -1
- package/kotlin-js-core.mjs +4 -0
- package/kotlin-js-core.mjs.map +1 -0
- package/kotlin-js.mjs +4 -0
- package/kotlin-js.mjs.map +1 -0
- package/kotlin-kotlin-stdlib.mjs +6284 -5825
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +8163 -8198
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-plugins-js-plain-objects-runtime.mjs +4 -0
- package/kotlin-plugins-js-plain-objects-runtime.mjs.map +1 -0
- package/kotlin-rgxgen.mjs +2007 -2062
- package/kotlin-rgxgen.mjs.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -1
- package/kotlinx-atomicfu.mjs +4 -0
- package/kotlinx-atomicfu.mjs.map +1 -0
- package/kotlinx-coroutines-core.mjs +4 -0
- package/kotlinx-coroutines-core.mjs.map +1 -0
- package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-core.mjs +803 -839
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2483 -2553
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1861 -1928
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant-omnibus.mjs +4 -0
- package/mordant-mordant-omnibus.mjs.map +1 -0
- package/mordant-mordant.mjs +2525 -4426
- package/mordant-mordant.mjs.map +1 -1
- package/package.json +4 -7
- package/seskar-core.mjs +4 -0
- package/seskar-core.mjs.map +1 -0
- package/wirespec-bin.mjs +13 -1
- package/wirespec-fetch.d.ts +4 -1
- package/wirespec-fetch.mjs +34 -0
- package/wirespec-serialization.d.ts +13 -2
- package/wirespec-serialization.mjs +22 -1
- package/wirespec-src-compiler-core.mjs +2857 -3909
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +1370 -413
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +1015 -337
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +1465 -387
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +2461 -0
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -0
- package/wirespec-src-compiler-emitters-scala.mjs +1010 -0
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -0
- package/wirespec-src-compiler-emitters-typescript.mjs +1533 -450
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +122 -144
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +17369 -0
- package/wirespec-src-compiler-ir.mjs.map +1 -0
- package/wirespec-src-compiler-lib.mjs +662 -728
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +630 -656
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-common.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +1705 -2024
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +418 -459
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +367 -331
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/{wirespec-src-plugin-npm.d.ts → wirespec-src-plugin-npm.d.mts} +247 -0
- package/wirespec-src-plugin-npm.mjs +166 -359
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +79 -106
- package/wirespec-src-tools-generator.mjs.map +1 -1
- package/arrow-arrow-continuations.mjs +0 -18
- package/arrow-arrow-continuations.mjs.map +0 -1
- package/markdown.mjs +0 -6756
- package/markdown.mjs.map +0 -1
|
@@ -1,44 +1,51 @@
|
|
|
1
1
|
import {
|
|
2
|
-
IndexOutOfBoundsException_init_$Create$
|
|
2
|
+
IndexOutOfBoundsException_init_$Create$1rd2xj3xtaoo6 as IndexOutOfBoundsException_init_$Create$,
|
|
3
3
|
Long2qws0ah9gnpki as Long,
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
compare2uud5j30pw5xc as compare,
|
|
5
|
+
IllegalArgumentException_init_$Create$1j1aj36nbo0wg as IllegalArgumentException_init_$Create$,
|
|
6
|
+
subtract16cg4lfi29fq9 as subtract,
|
|
7
|
+
_Char___init__impl__6a9atx1csff5kwtduxl as _Char___init__impl__6a9atx,
|
|
6
8
|
charArrayOf27f4r3dozbrk1 as charArrayOf,
|
|
7
9
|
protoOf180f3jzyo7rfj as protoOf,
|
|
10
|
+
equalsLong28bsrfhwvd686 as equalsLong,
|
|
8
11
|
toString1pkumu07cwy4m as toString,
|
|
9
|
-
|
|
12
|
+
Unit_instance28fytmsmm6r23 as Unit_instance,
|
|
10
13
|
ensureNotNull1e947j3ixpazm as ensureNotNull,
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
fromInt1lka3ktyu79a4 as fromInt,
|
|
15
|
+
convertToIntofdoxh9bstof as convertToInt,
|
|
16
|
+
add85si75olwt6n as add,
|
|
17
|
+
StringBuilder_init_$Create$39ouzl6b47q8d as StringBuilder_init_$Create$,
|
|
13
18
|
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
14
|
-
IllegalStateException_init_$Create$
|
|
19
|
+
IllegalStateException_init_$Create$2429fvs1h56dm as IllegalStateException_init_$Create$,
|
|
15
20
|
objectCreate1ve4bgxiu4x98 as objectCreate,
|
|
16
21
|
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
17
22
|
arrayCopytctsywo3h7gj as arrayCopy,
|
|
18
|
-
IllegalArgumentException_init_$Create$
|
|
23
|
+
IllegalArgumentException_init_$Create$nai51bbwz5t9 as IllegalArgumentException_init_$Create$_0,
|
|
19
24
|
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
VOID3gxj6tk5isa35 as VOID,
|
|
26
|
+
multiply18i3gv3wlmcjg as multiply,
|
|
27
|
+
charCodeAt1yspne1d8erbm as charCodeAt,
|
|
28
|
+
Char__toInt_impl_vasixd3jl92hthlhyn7 as Char__toInt_impl_vasixd,
|
|
23
29
|
toByte4i43936u611k as toByte,
|
|
24
30
|
initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
|
|
25
|
-
StringBuilder_init_$Create$
|
|
31
|
+
StringBuilder_init_$Create$322n630qt3r8c as StringBuilder_init_$Create$_0,
|
|
26
32
|
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
27
33
|
endsWith278181ii8uuo as endsWith,
|
|
28
34
|
startsWith26w8qjqapeeq6 as startsWith,
|
|
35
|
+
substringiqarkczpya5m as substring,
|
|
29
36
|
charArray2ujmm1qusno00 as charArray,
|
|
30
37
|
numberToChar93r9buh19yek as numberToChar,
|
|
31
38
|
concatToString3cxf0c1gqonpo as concatToString,
|
|
32
|
-
Exception_init_$Init$25rnrjp6anyxk as Exception_init_$Init$,
|
|
33
39
|
captureStack1fzi4aczwc4hg as captureStack,
|
|
34
|
-
Exception_init_$Init$
|
|
35
|
-
Exception_init_$Init$
|
|
40
|
+
Exception_init_$Init$22vtgic9oqkxe as Exception_init_$Init$,
|
|
41
|
+
Exception_init_$Init$2jymvyiuv5u42 as Exception_init_$Init$_0,
|
|
42
|
+
Exception_init_$Init$gwg5c35cbjjd as Exception_init_$Init$_1,
|
|
36
43
|
Exceptiondt2hlxn7j7vw as Exception,
|
|
37
|
-
UnsupportedOperationException_init_$Create$37v56tu0muot2 as UnsupportedOperationException_init_$Create$,
|
|
38
44
|
KProperty02ce7r476m8633 as KProperty0,
|
|
39
|
-
|
|
45
|
+
getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
|
|
46
|
+
UnsupportedOperationException_init_$Create$1z7a4o340d6e4 as UnsupportedOperationException_init_$Create$,
|
|
40
47
|
lazy2hsh8ze7j6ikd as lazy,
|
|
41
|
-
ArrayList_init_$Create$
|
|
48
|
+
ArrayList_init_$Create$1jemgvhi5v0js as ArrayList_init_$Create$,
|
|
42
49
|
asReversed2y2qzr7vrqd5 as asReversed,
|
|
43
50
|
contains2el4s70rdq4ld as contains,
|
|
44
51
|
getStringHashCode26igk1bx568vk as getStringHashCode,
|
|
@@ -55,13 +62,13 @@ initMetadataForCompanion(Companion);
|
|
|
55
62
|
initMetadataForClass(Segment, 'Segment');
|
|
56
63
|
initMetadataForClass(SegmentCopyTracker, 'SegmentCopyTracker');
|
|
57
64
|
initMetadataForObject(AlwaysSharedCopyTracker, 'AlwaysSharedCopyTracker', VOID, SegmentCopyTracker);
|
|
65
|
+
initMetadataForClass(FileMetadata, 'FileMetadata', FileMetadata);
|
|
58
66
|
function sink$default(path, append, $super) {
|
|
59
67
|
append = append === VOID ? false : append;
|
|
60
|
-
return $super === VOID ? this.
|
|
68
|
+
return $super === VOID ? this.f3n(path, append) : $super.f3n.call(this, path, append);
|
|
61
69
|
}
|
|
62
70
|
initMetadataForInterface(FileSystem, 'FileSystem');
|
|
63
71
|
initMetadataForClass(SystemFileSystemImpl, 'SystemFileSystemImpl', VOID, VOID, [FileSystem]);
|
|
64
|
-
initMetadataForClass(FileMetadata, 'FileMetadata', FileMetadata);
|
|
65
72
|
initMetadataForObject(UnsafeBufferOperations, 'UnsafeBufferOperations');
|
|
66
73
|
initMetadataForClass(SegmentReadContextImpl$1);
|
|
67
74
|
initMetadataForClass(SegmentWriteContextImpl$1);
|
|
@@ -82,16 +89,16 @@ function get_HEX_DIGIT_CHARS() {
|
|
|
82
89
|
var HEX_DIGIT_CHARS;
|
|
83
90
|
function checkBounds(size, startIndex, endIndex) {
|
|
84
91
|
_init_properties__Util_kt__g8tcl9();
|
|
85
|
-
if (startIndex
|
|
92
|
+
if (compare(startIndex, new Long(0, 0)) < 0 || compare(endIndex, size) > 0) {
|
|
86
93
|
throw IndexOutOfBoundsException_init_$Create$('startIndex (' + startIndex.toString() + ') and endIndex (' + endIndex.toString() + ') are not within the range [0..size(' + size.toString() + '))');
|
|
87
94
|
}
|
|
88
|
-
if (startIndex
|
|
95
|
+
if (compare(startIndex, endIndex) > 0) {
|
|
89
96
|
throw IllegalArgumentException_init_$Create$('startIndex (' + startIndex.toString() + ') > endIndex (' + endIndex.toString() + ')');
|
|
90
97
|
}
|
|
91
98
|
}
|
|
92
99
|
function checkOffsetAndCount(size, offset, byteCount) {
|
|
93
100
|
_init_properties__Util_kt__g8tcl9();
|
|
94
|
-
if (offset
|
|
101
|
+
if (compare(offset, new Long(0, 0)) < 0 || compare(offset, size) > 0 || compare(subtract(size, offset), byteCount) < 0 || compare(byteCount, new Long(0, 0)) < 0) {
|
|
95
102
|
throw IllegalArgumentException_init_$Create$('offset (' + offset.toString() + ') and byteCount (' + byteCount.toString() + ') are not within the range [0..size(' + size.toString() + '))');
|
|
96
103
|
}
|
|
97
104
|
}
|
|
@@ -104,69 +111,66 @@ function _init_properties__Util_kt__g8tcl9() {
|
|
|
104
111
|
}
|
|
105
112
|
}
|
|
106
113
|
function Buffer() {
|
|
107
|
-
this.
|
|
108
|
-
this.
|
|
109
|
-
this.
|
|
114
|
+
this.r3k_1 = null;
|
|
115
|
+
this.s3k_1 = null;
|
|
116
|
+
this.t3k_1 = new Long(0, 0);
|
|
110
117
|
}
|
|
111
|
-
protoOf(Buffer).
|
|
112
|
-
return this.
|
|
118
|
+
protoOf(Buffer).a1 = function () {
|
|
119
|
+
return this.t3k_1;
|
|
113
120
|
};
|
|
114
|
-
protoOf(Buffer).
|
|
121
|
+
protoOf(Buffer).u3k = function () {
|
|
115
122
|
return this;
|
|
116
123
|
};
|
|
117
|
-
protoOf(Buffer).
|
|
118
|
-
return this.
|
|
124
|
+
protoOf(Buffer).v3k = function () {
|
|
125
|
+
return equalsLong(this.a1(), new Long(0, 0));
|
|
119
126
|
};
|
|
120
|
-
protoOf(Buffer).
|
|
127
|
+
protoOf(Buffer).w3k = function (byteCount) {
|
|
121
128
|
// Inline function 'kotlin.require' call
|
|
122
|
-
|
|
123
|
-
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
124
|
-
// Inline function 'kotlinx.io.Buffer.require.<anonymous>' call
|
|
129
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
125
130
|
var message = 'byteCount: ' + byteCount.toString();
|
|
126
131
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
127
132
|
}
|
|
128
|
-
if (this.
|
|
129
|
-
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + this.
|
|
133
|
+
if (compare(this.a1(), byteCount) < 0) {
|
|
134
|
+
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + this.a1().toString() + ', required: ' + byteCount.toString() + ')');
|
|
130
135
|
}
|
|
131
136
|
};
|
|
132
|
-
protoOf(Buffer).
|
|
137
|
+
protoOf(Buffer).x3k = function (byteCount) {
|
|
133
138
|
// Inline function 'kotlin.require' call
|
|
134
|
-
|
|
135
|
-
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
136
|
-
// Inline function 'kotlinx.io.Buffer.request.<anonymous>' call
|
|
139
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
137
140
|
var message = 'byteCount: ' + byteCount.toString() + ' < 0';
|
|
138
141
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
139
142
|
}
|
|
140
|
-
return this.
|
|
143
|
+
return compare(this.a1(), byteCount) >= 0;
|
|
141
144
|
};
|
|
142
|
-
protoOf(Buffer).
|
|
145
|
+
protoOf(Buffer).y3k = function () {
|
|
143
146
|
return Unit_instance;
|
|
144
147
|
};
|
|
145
|
-
protoOf(Buffer).
|
|
148
|
+
protoOf(Buffer).z8 = function () {
|
|
146
149
|
return Unit_instance;
|
|
147
150
|
};
|
|
148
|
-
protoOf(Buffer).
|
|
149
|
-
var result = this.
|
|
150
|
-
if (result
|
|
151
|
+
protoOf(Buffer).z3k = function () {
|
|
152
|
+
var result = this.a1();
|
|
153
|
+
if (equalsLong(result, new Long(0, 0)))
|
|
151
154
|
return new Long(0, 0);
|
|
152
|
-
var tail = ensureNotNull(this.
|
|
153
|
-
if (tail.
|
|
154
|
-
result = result
|
|
155
|
+
var tail = ensureNotNull(this.s3k_1);
|
|
156
|
+
if (tail.c3l_1 < 8192 && tail.e3l_1) {
|
|
157
|
+
result = subtract(result, fromInt(tail.c3l_1 - tail.b3l_1 | 0));
|
|
155
158
|
}
|
|
156
159
|
return result;
|
|
157
160
|
};
|
|
158
|
-
protoOf(Buffer).
|
|
161
|
+
protoOf(Buffer).s2 = function () {
|
|
162
|
+
return this.h3l(this.a1());
|
|
163
|
+
};
|
|
164
|
+
protoOf(Buffer).h3l = function (byteCount) {
|
|
159
165
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
160
166
|
// Inline function 'kotlin.require' call
|
|
161
|
-
|
|
162
|
-
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
163
|
-
// Inline function 'kotlinx.io.checkByteCount.<anonymous>' call
|
|
167
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
164
168
|
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
165
169
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
166
170
|
}
|
|
167
171
|
var remainingByteCount = byteCount;
|
|
168
|
-
while (remainingByteCount
|
|
169
|
-
var tmp0_elvis_lhs = this.
|
|
172
|
+
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
173
|
+
var tmp0_elvis_lhs = this.r3k_1;
|
|
170
174
|
var tmp;
|
|
171
175
|
if (tmp0_elvis_lhs == null) {
|
|
172
176
|
throw EOFException_init_$Create$_0('Buffer exhausted before skipping ' + byteCount.toString() + ' bytes.');
|
|
@@ -174,25 +178,26 @@ protoOf(Buffer).f2g = function (byteCount) {
|
|
|
174
178
|
tmp = tmp0_elvis_lhs;
|
|
175
179
|
}
|
|
176
180
|
var head = tmp;
|
|
181
|
+
var tmp0 = remainingByteCount;
|
|
177
182
|
// Inline function 'kotlinx.io.minOf' call
|
|
178
|
-
var
|
|
179
|
-
var b = head.a2g_1 - head.z2f_1 | 0;
|
|
183
|
+
var b = head.c3l_1 - head.b3l_1 | 0;
|
|
180
184
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
181
|
-
var b_0 =
|
|
182
|
-
var
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
var b_0 = fromInt(b);
|
|
186
|
+
var tmp$ret$4 = compare(tmp0, b_0) <= 0 ? tmp0 : b_0;
|
|
187
|
+
var toSkip = convertToInt(tmp$ret$4);
|
|
188
|
+
this.t3k_1 = subtract(this.t3k_1, fromInt(toSkip));
|
|
189
|
+
remainingByteCount = subtract(remainingByteCount, fromInt(toSkip));
|
|
190
|
+
head.b3l_1 = head.b3l_1 + toSkip | 0;
|
|
191
|
+
if (head.b3l_1 === head.c3l_1) {
|
|
192
|
+
this.i3l();
|
|
188
193
|
}
|
|
189
194
|
}
|
|
190
195
|
};
|
|
191
|
-
protoOf(Buffer).
|
|
196
|
+
protoOf(Buffer).j3l = function (sink, startIndex, endIndex) {
|
|
192
197
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
193
198
|
var size = sink.length;
|
|
194
|
-
checkBounds(
|
|
195
|
-
var tmp0_elvis_lhs = this.
|
|
199
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
200
|
+
var tmp0_elvis_lhs = this.r3k_1;
|
|
196
201
|
var tmp;
|
|
197
202
|
if (tmp0_elvis_lhs == null) {
|
|
198
203
|
return -1;
|
|
@@ -200,177 +205,175 @@ protoOf(Buffer).h2g = function (sink, startIndex, endIndex) {
|
|
|
200
205
|
tmp = tmp0_elvis_lhs;
|
|
201
206
|
}
|
|
202
207
|
var s = tmp;
|
|
208
|
+
var tmp0 = endIndex - startIndex | 0;
|
|
203
209
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
204
|
-
var
|
|
205
|
-
var
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
this.r2f_1 = this.r2f_1.a3(toLong(toCopy));
|
|
210
|
+
var b = s.a1();
|
|
211
|
+
var toCopy = Math.min(tmp0, b);
|
|
212
|
+
s.k3l(sink, startIndex, startIndex + toCopy | 0);
|
|
213
|
+
this.t3k_1 = subtract(this.t3k_1, fromInt(toCopy));
|
|
209
214
|
if (isEmpty(s)) {
|
|
210
|
-
this.
|
|
215
|
+
this.i3l();
|
|
211
216
|
}
|
|
212
217
|
return toCopy;
|
|
213
218
|
};
|
|
214
|
-
protoOf(Buffer).
|
|
219
|
+
protoOf(Buffer).l3l = function (sink, byteCount) {
|
|
215
220
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
216
221
|
// Inline function 'kotlin.require' call
|
|
217
|
-
|
|
218
|
-
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
219
|
-
// Inline function 'kotlinx.io.checkByteCount.<anonymous>' call
|
|
222
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
220
223
|
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
221
224
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
222
225
|
}
|
|
223
|
-
if (this.
|
|
226
|
+
if (equalsLong(this.a1(), new Long(0, 0)))
|
|
224
227
|
return new Long(-1, -1);
|
|
225
|
-
var bytesWritten = byteCount
|
|
226
|
-
sink.
|
|
228
|
+
var bytesWritten = compare(byteCount, this.a1()) > 0 ? this.a1() : byteCount;
|
|
229
|
+
sink.m3l(this, bytesWritten);
|
|
227
230
|
return bytesWritten;
|
|
228
231
|
};
|
|
229
|
-
protoOf(Buffer).
|
|
232
|
+
protoOf(Buffer).n3l = function (minimumCapacity) {
|
|
230
233
|
// Inline function 'kotlin.require' call
|
|
231
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
232
234
|
if (!(minimumCapacity >= 1 && minimumCapacity <= 8192)) {
|
|
233
|
-
// Inline function 'kotlinx.io.Buffer.writableSegment.<anonymous>' call
|
|
234
235
|
var message = 'unexpected capacity (' + minimumCapacity + '), should be in range [1, 8192]';
|
|
235
236
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
236
237
|
}
|
|
237
|
-
if (this.
|
|
238
|
-
var result = SegmentPool_instance.
|
|
239
|
-
this.
|
|
240
|
-
this.
|
|
238
|
+
if (this.s3k_1 == null) {
|
|
239
|
+
var result = SegmentPool_instance.q3l();
|
|
240
|
+
this.r3k_1 = result;
|
|
241
|
+
this.s3k_1 = result;
|
|
241
242
|
return result;
|
|
242
243
|
}
|
|
243
|
-
var t = ensureNotNull(this.
|
|
244
|
-
if ((t.
|
|
245
|
-
var newTail = t.
|
|
246
|
-
this.
|
|
244
|
+
var t = ensureNotNull(this.s3k_1);
|
|
245
|
+
if ((t.c3l_1 + minimumCapacity | 0) > 8192 || !t.e3l_1) {
|
|
246
|
+
var newTail = t.r3l(SegmentPool_instance.q3l());
|
|
247
|
+
this.s3k_1 = newTail;
|
|
247
248
|
return newTail;
|
|
248
249
|
}
|
|
249
250
|
return t;
|
|
250
251
|
};
|
|
251
|
-
protoOf(Buffer).
|
|
252
|
+
protoOf(Buffer).m3l = function (source, byteCount) {
|
|
252
253
|
// Inline function 'kotlin.require' call
|
|
253
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
254
254
|
if (!!(source === this)) {
|
|
255
|
-
// Inline function 'kotlinx.io.Buffer.write.<anonymous>' call
|
|
256
255
|
var message = 'source == this';
|
|
257
256
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
258
257
|
}
|
|
259
|
-
checkOffsetAndCount(source.
|
|
258
|
+
checkOffsetAndCount(source.t3k_1, new Long(0, 0), byteCount);
|
|
260
259
|
var remainingByteCount = byteCount;
|
|
261
|
-
while (remainingByteCount
|
|
262
|
-
if (remainingByteCount
|
|
263
|
-
var tail = this.
|
|
260
|
+
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
261
|
+
if (compare(remainingByteCount, fromInt(ensureNotNull(source.r3k_1).a1())) < 0) {
|
|
262
|
+
var tail = this.s3k_1;
|
|
264
263
|
var tmp;
|
|
265
|
-
if (!(tail == null) && tail.
|
|
266
|
-
|
|
264
|
+
if (!(tail == null) && tail.e3l_1) {
|
|
265
|
+
var tmp0 = remainingByteCount;
|
|
267
266
|
// Inline function 'kotlin.Long.plus' call
|
|
268
|
-
var
|
|
269
|
-
var
|
|
270
|
-
|
|
271
|
-
var other_0 = tail.
|
|
272
|
-
tmp =
|
|
267
|
+
var other = tail.c3l_1;
|
|
268
|
+
var tmp0_0 = add(tmp0, fromInt(other));
|
|
269
|
+
// Inline function 'kotlin.Long.minus' call
|
|
270
|
+
var other_0 = tail.s3l() ? 0 : tail.b3l_1;
|
|
271
|
+
var tmp$ret$3 = subtract(tmp0_0, fromInt(other_0));
|
|
272
|
+
tmp = compare(tmp$ret$3, 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.r3k_1).u3l(tail, convertToInt(remainingByteCount));
|
|
278
|
+
source.t3k_1 = subtract(source.t3k_1, remainingByteCount);
|
|
279
|
+
this.t3k_1 = add(this.t3k_1, remainingByteCount);
|
|
280
280
|
return Unit_instance;
|
|
281
281
|
} else {
|
|
282
|
-
source.
|
|
282
|
+
source.r3k_1 = ensureNotNull(source.r3k_1).t3l(convertToInt(remainingByteCount));
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
var segmentToMove = ensureNotNull(source.
|
|
286
|
-
var movedByteCount =
|
|
287
|
-
source.
|
|
288
|
-
if (source.
|
|
289
|
-
source.
|
|
285
|
+
var segmentToMove = ensureNotNull(source.r3k_1);
|
|
286
|
+
var movedByteCount = fromInt(segmentToMove.a1());
|
|
287
|
+
source.r3k_1 = segmentToMove.v3l();
|
|
288
|
+
if (source.r3k_1 == null) {
|
|
289
|
+
source.s3k_1 = null;
|
|
290
290
|
}
|
|
291
291
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
292
|
-
if (this.
|
|
293
|
-
this.
|
|
294
|
-
this.
|
|
292
|
+
if (this.r3k_1 == null) {
|
|
293
|
+
this.r3k_1 = segmentToMove;
|
|
294
|
+
this.s3k_1 = segmentToMove;
|
|
295
295
|
} else if (true) {
|
|
296
|
-
this.
|
|
297
|
-
if (ensureNotNull(this.
|
|
298
|
-
this.
|
|
296
|
+
this.s3k_1 = ensureNotNull(this.s3k_1).r3l(segmentToMove).w3l();
|
|
297
|
+
if (ensureNotNull(this.s3k_1).g3l_1 == null) {
|
|
298
|
+
this.r3k_1 = this.s3k_1;
|
|
299
299
|
}
|
|
300
300
|
} else {
|
|
301
|
-
this.
|
|
301
|
+
this.s3k_1 = ensureNotNull(this.s3k_1).r3l(segmentToMove);
|
|
302
302
|
}
|
|
303
|
-
source.
|
|
304
|
-
this.
|
|
305
|
-
remainingByteCount = remainingByteCount
|
|
303
|
+
source.t3k_1 = subtract(source.t3k_1, movedByteCount);
|
|
304
|
+
this.t3k_1 = add(this.t3k_1, movedByteCount);
|
|
305
|
+
remainingByteCount = subtract(remainingByteCount, movedByteCount);
|
|
306
306
|
}
|
|
307
307
|
};
|
|
308
|
-
protoOf(Buffer).
|
|
309
|
-
this.
|
|
310
|
-
this.
|
|
308
|
+
protoOf(Buffer).x3l = function (byte) {
|
|
309
|
+
this.n3l(1).y3l(byte);
|
|
310
|
+
this.t3k_1 = add(this.t3k_1, new Long(1, 0));
|
|
311
|
+
};
|
|
312
|
+
protoOf(Buffer).d4 = function () {
|
|
313
|
+
return Unit_instance;
|
|
311
314
|
};
|
|
312
315
|
protoOf(Buffer).toString = function () {
|
|
313
|
-
if (this.
|
|
316
|
+
if (equalsLong(this.a1(), new Long(0, 0)))
|
|
314
317
|
return 'Buffer(size=0)';
|
|
315
318
|
var maxPrintableBytes = 64;
|
|
316
319
|
// Inline function 'kotlinx.io.minOf' call
|
|
317
|
-
var b = this.
|
|
320
|
+
var b = this.a1();
|
|
318
321
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
319
|
-
var a =
|
|
320
|
-
var
|
|
321
|
-
var
|
|
322
|
+
var a = fromInt(maxPrintableBytes);
|
|
323
|
+
var tmp$ret$1 = compare(a, b) <= 0 ? a : b;
|
|
324
|
+
var len = convertToInt(tmp$ret$1);
|
|
325
|
+
var builder = StringBuilder_init_$Create$(imul(len, 2) + (compare(this.a1(), fromInt(maxPrintableBytes)) > 0 ? 1 : 0) | 0);
|
|
322
326
|
var bytesWritten = 0;
|
|
323
327
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
324
|
-
var curr = this.
|
|
328
|
+
var curr = this.r3k_1;
|
|
325
329
|
while (!(curr == null)) {
|
|
326
|
-
|
|
327
|
-
var ctx = get_SegmentReadContextImpl();
|
|
330
|
+
var tmp0 = get_SegmentReadContextImpl();
|
|
328
331
|
var segment = curr;
|
|
329
332
|
var idx = 0;
|
|
330
|
-
while (bytesWritten < len && idx < segment.
|
|
333
|
+
while (bytesWritten < len && idx < segment.a1()) {
|
|
331
334
|
var _unary__edvuaz = idx;
|
|
332
335
|
idx = _unary__edvuaz + 1 | 0;
|
|
333
|
-
var b_0 =
|
|
336
|
+
var b_0 = tmp0.z3l(segment, _unary__edvuaz);
|
|
334
337
|
bytesWritten = bytesWritten + 1 | 0;
|
|
335
338
|
var tmp = get_HEX_DIGIT_CHARS();
|
|
336
339
|
// Inline function 'kotlinx.io.shr' call
|
|
337
340
|
var tmp$ret$2 = b_0 >> 4;
|
|
338
|
-
var tmp_0 = builder.
|
|
341
|
+
var tmp_0 = builder.s(tmp[tmp$ret$2 & 15]);
|
|
339
342
|
var tmp_1 = get_HEX_DIGIT_CHARS();
|
|
340
343
|
// Inline function 'kotlinx.io.and' call
|
|
341
344
|
var tmp$ret$3 = b_0 & 15;
|
|
342
|
-
tmp_0.
|
|
345
|
+
tmp_0.s(tmp_1[tmp$ret$3]);
|
|
343
346
|
}
|
|
344
|
-
curr = curr.
|
|
347
|
+
curr = curr.f3l_1;
|
|
345
348
|
}
|
|
346
|
-
if (this.
|
|
347
|
-
builder.
|
|
349
|
+
if (compare(this.a1(), fromInt(maxPrintableBytes)) > 0) {
|
|
350
|
+
builder.s(_Char___init__impl__6a9atx(8230));
|
|
348
351
|
}
|
|
349
|
-
return 'Buffer(size=' + this.
|
|
352
|
+
return 'Buffer(size=' + this.a1().toString() + ' hex=' + builder.toString() + ')';
|
|
350
353
|
};
|
|
351
|
-
protoOf(Buffer).
|
|
352
|
-
var oldHead = ensureNotNull(this.
|
|
353
|
-
var nextHead = oldHead.
|
|
354
|
-
this.
|
|
354
|
+
protoOf(Buffer).i3l = function () {
|
|
355
|
+
var oldHead = ensureNotNull(this.r3k_1);
|
|
356
|
+
var nextHead = oldHead.f3l_1;
|
|
357
|
+
this.r3k_1 = nextHead;
|
|
355
358
|
if (nextHead == null) {
|
|
356
|
-
this.
|
|
359
|
+
this.s3k_1 = null;
|
|
357
360
|
} else {
|
|
358
|
-
nextHead.
|
|
361
|
+
nextHead.g3l_1 = null;
|
|
359
362
|
}
|
|
360
|
-
oldHead.
|
|
361
|
-
SegmentPool_instance.
|
|
363
|
+
oldHead.f3l_1 = null;
|
|
364
|
+
SegmentPool_instance.a3m(oldHead);
|
|
362
365
|
};
|
|
363
|
-
protoOf(Buffer).
|
|
364
|
-
var oldTail = ensureNotNull(this.
|
|
365
|
-
var newTail = oldTail.
|
|
366
|
-
this.
|
|
366
|
+
protoOf(Buffer).b3m = function () {
|
|
367
|
+
var oldTail = ensureNotNull(this.s3k_1);
|
|
368
|
+
var newTail = oldTail.g3l_1;
|
|
369
|
+
this.s3k_1 = newTail;
|
|
367
370
|
if (newTail == null) {
|
|
368
|
-
this.
|
|
371
|
+
this.r3k_1 = null;
|
|
369
372
|
} else {
|
|
370
|
-
newTail.
|
|
373
|
+
newTail.f3l_1 = null;
|
|
371
374
|
}
|
|
372
|
-
oldTail.
|
|
373
|
-
SegmentPool_instance.
|
|
375
|
+
oldTail.g3l_1 = null;
|
|
376
|
+
SegmentPool_instance.a3m(oldTail);
|
|
374
377
|
};
|
|
375
378
|
function buffered(_this__u8e3s4) {
|
|
376
379
|
return new RealSource(_this__u8e3s4);
|
|
@@ -379,148 +382,171 @@ function buffered_0(_this__u8e3s4) {
|
|
|
379
382
|
return new RealSink(_this__u8e3s4);
|
|
380
383
|
}
|
|
381
384
|
function RealSink(sink) {
|
|
382
|
-
this.
|
|
383
|
-
this.
|
|
384
|
-
this.
|
|
385
|
+
this.c3m_1 = sink;
|
|
386
|
+
this.d3m_1 = false;
|
|
387
|
+
this.e3m_1 = new Buffer();
|
|
385
388
|
}
|
|
386
|
-
protoOf(RealSink).
|
|
387
|
-
return this.
|
|
389
|
+
protoOf(RealSink).u3k = function () {
|
|
390
|
+
return this.e3m_1;
|
|
388
391
|
};
|
|
389
|
-
protoOf(RealSink).
|
|
392
|
+
protoOf(RealSink).m3l = function (source, byteCount) {
|
|
390
393
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
391
394
|
// Inline function 'kotlin.check' call
|
|
392
|
-
|
|
393
|
-
if (!!this.b2h_1) {
|
|
394
|
-
// Inline function 'kotlinx.io.RealSink.checkNotClosed.<anonymous>' call
|
|
395
|
+
if (!!this.d3m_1) {
|
|
395
396
|
var message = 'Sink is closed.';
|
|
396
397
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
397
398
|
}
|
|
398
399
|
// Inline function 'kotlin.require' call
|
|
399
|
-
|
|
400
|
-
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
401
|
-
// Inline function 'kotlinx.io.RealSink.write.<anonymous>' call
|
|
400
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
402
401
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
403
402
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
404
403
|
}
|
|
405
|
-
this.
|
|
406
|
-
this.
|
|
404
|
+
this.e3m_1.m3l(source, byteCount);
|
|
405
|
+
this.y3k();
|
|
407
406
|
};
|
|
408
|
-
protoOf(RealSink).
|
|
407
|
+
protoOf(RealSink).y3k = function () {
|
|
409
408
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
410
409
|
// Inline function 'kotlin.check' call
|
|
411
|
-
|
|
412
|
-
if (!!this.b2h_1) {
|
|
413
|
-
// Inline function 'kotlinx.io.RealSink.checkNotClosed.<anonymous>' call
|
|
410
|
+
if (!!this.d3m_1) {
|
|
414
411
|
var message = 'Sink is closed.';
|
|
415
412
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
416
413
|
}
|
|
417
|
-
var byteCount = this.
|
|
418
|
-
if (byteCount
|
|
419
|
-
this.
|
|
414
|
+
var byteCount = this.e3m_1.z3k();
|
|
415
|
+
if (compare(byteCount, new Long(0, 0)) > 0) {
|
|
416
|
+
this.c3m_1.m3l(this.e3m_1, byteCount);
|
|
420
417
|
}
|
|
421
418
|
};
|
|
422
|
-
protoOf(RealSink).
|
|
419
|
+
protoOf(RealSink).z8 = function () {
|
|
423
420
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
424
421
|
// Inline function 'kotlin.check' call
|
|
425
|
-
|
|
426
|
-
if (!!this.b2h_1) {
|
|
427
|
-
// Inline function 'kotlinx.io.RealSink.checkNotClosed.<anonymous>' call
|
|
422
|
+
if (!!this.d3m_1) {
|
|
428
423
|
var message = 'Sink is closed.';
|
|
429
424
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
430
425
|
}
|
|
431
|
-
if (this.
|
|
432
|
-
this.
|
|
426
|
+
if (compare(this.e3m_1.a1(), new Long(0, 0)) > 0) {
|
|
427
|
+
this.c3m_1.m3l(this.e3m_1, this.e3m_1.a1());
|
|
428
|
+
}
|
|
429
|
+
this.c3m_1.z8();
|
|
430
|
+
};
|
|
431
|
+
protoOf(RealSink).d4 = function () {
|
|
432
|
+
if (this.d3m_1)
|
|
433
|
+
return Unit_instance;
|
|
434
|
+
var thrown = null;
|
|
435
|
+
try {
|
|
436
|
+
if (compare(this.e3m_1.a1(), new Long(0, 0)) > 0) {
|
|
437
|
+
this.c3m_1.m3l(this.e3m_1, this.e3m_1.a1());
|
|
438
|
+
}
|
|
439
|
+
} catch ($p) {
|
|
440
|
+
if ($p instanceof Error) {
|
|
441
|
+
var e = $p;
|
|
442
|
+
thrown = e;
|
|
443
|
+
} else {
|
|
444
|
+
throw $p;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
try {
|
|
448
|
+
this.c3m_1.d4();
|
|
449
|
+
} catch ($p) {
|
|
450
|
+
if ($p instanceof Error) {
|
|
451
|
+
var e_0 = $p;
|
|
452
|
+
if (thrown == null)
|
|
453
|
+
thrown = e_0;
|
|
454
|
+
} else {
|
|
455
|
+
throw $p;
|
|
456
|
+
}
|
|
433
457
|
}
|
|
434
|
-
this.
|
|
458
|
+
this.d3m_1 = true;
|
|
459
|
+
if (!(thrown == null))
|
|
460
|
+
throw thrown;
|
|
435
461
|
};
|
|
436
462
|
protoOf(RealSink).toString = function () {
|
|
437
|
-
return 'buffered(' + toString(this.
|
|
463
|
+
return 'buffered(' + toString(this.c3m_1) + ')';
|
|
438
464
|
};
|
|
439
465
|
function RealSource(source) {
|
|
440
|
-
this.
|
|
441
|
-
this.
|
|
442
|
-
this.
|
|
466
|
+
this.f3m_1 = source;
|
|
467
|
+
this.g3m_1 = false;
|
|
468
|
+
this.h3m_1 = new Buffer();
|
|
443
469
|
}
|
|
444
|
-
protoOf(RealSource).
|
|
445
|
-
return this.
|
|
470
|
+
protoOf(RealSource).u3k = function () {
|
|
471
|
+
return this.h3m_1;
|
|
446
472
|
};
|
|
447
|
-
protoOf(RealSource).
|
|
473
|
+
protoOf(RealSource).l3l = function (sink, byteCount) {
|
|
448
474
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
449
475
|
// Inline function 'kotlin.check' call
|
|
450
|
-
|
|
451
|
-
if (!!this.e2h_1) {
|
|
452
|
-
// Inline function 'kotlinx.io.RealSource.checkNotClosed.<anonymous>' call
|
|
476
|
+
if (!!this.g3m_1) {
|
|
453
477
|
var message = 'Source is closed.';
|
|
454
478
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
455
479
|
}
|
|
456
480
|
// Inline function 'kotlin.require' call
|
|
457
|
-
|
|
458
|
-
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
459
|
-
// Inline function 'kotlinx.io.RealSource.readAtMostTo.<anonymous>' call
|
|
481
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
460
482
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
461
483
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
462
484
|
}
|
|
463
|
-
if (this.
|
|
464
|
-
var read = this.
|
|
465
|
-
if (read
|
|
485
|
+
if (equalsLong(this.h3m_1.a1(), new Long(0, 0))) {
|
|
486
|
+
var read = this.f3m_1.l3l(this.h3m_1, new Long(8192, 0));
|
|
487
|
+
if (equalsLong(read, new Long(-1, -1)))
|
|
466
488
|
return new Long(-1, -1);
|
|
467
489
|
}
|
|
468
490
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
469
|
-
var b = this.
|
|
470
|
-
var toRead = byteCount
|
|
471
|
-
return this.
|
|
491
|
+
var b = this.h3m_1.a1();
|
|
492
|
+
var toRead = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
493
|
+
return this.h3m_1.l3l(sink, toRead);
|
|
472
494
|
};
|
|
473
|
-
protoOf(RealSource).
|
|
474
|
-
if (!this.
|
|
495
|
+
protoOf(RealSource).w3k = function (byteCount) {
|
|
496
|
+
if (!this.x3k(byteCount))
|
|
475
497
|
throw EOFException_init_$Create$_0("Source doesn't contain required number of bytes (" + byteCount.toString() + ').');
|
|
476
498
|
};
|
|
477
|
-
protoOf(RealSource).
|
|
499
|
+
protoOf(RealSource).x3k = function (byteCount) {
|
|
478
500
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
479
501
|
// Inline function 'kotlin.check' call
|
|
480
|
-
|
|
481
|
-
if (!!this.e2h_1) {
|
|
482
|
-
// Inline function 'kotlinx.io.RealSource.checkNotClosed.<anonymous>' call
|
|
502
|
+
if (!!this.g3m_1) {
|
|
483
503
|
var message = 'Source is closed.';
|
|
484
504
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
485
505
|
}
|
|
486
506
|
// Inline function 'kotlin.require' call
|
|
487
|
-
|
|
488
|
-
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
489
|
-
// Inline function 'kotlinx.io.RealSource.request.<anonymous>' call
|
|
507
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
490
508
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
491
509
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
492
510
|
}
|
|
493
|
-
while (this.
|
|
494
|
-
if (this.
|
|
511
|
+
while (compare(this.h3m_1.a1(), byteCount) < 0) {
|
|
512
|
+
if (equalsLong(this.f3m_1.l3l(this.h3m_1, new Long(8192, 0)), new Long(-1, -1)))
|
|
495
513
|
return false;
|
|
496
514
|
}
|
|
497
515
|
return true;
|
|
498
516
|
};
|
|
499
|
-
protoOf(RealSource).
|
|
517
|
+
protoOf(RealSource).j3l = function (sink, startIndex, endIndex) {
|
|
500
518
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
501
519
|
var size = sink.length;
|
|
502
|
-
checkBounds(
|
|
503
|
-
if (this.
|
|
504
|
-
var read = this.
|
|
505
|
-
if (read
|
|
520
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
521
|
+
if (equalsLong(this.h3m_1.a1(), new Long(0, 0))) {
|
|
522
|
+
var read = this.f3m_1.l3l(this.h3m_1, new Long(8192, 0));
|
|
523
|
+
if (equalsLong(read, new Long(-1, -1)))
|
|
506
524
|
return -1;
|
|
507
525
|
}
|
|
526
|
+
var tmp0 = endIndex - startIndex | 0;
|
|
508
527
|
// Inline function 'kotlinx.io.minOf' call
|
|
509
|
-
var
|
|
510
|
-
var b = this.f2h_1.j();
|
|
528
|
+
var b = this.h3m_1.a1();
|
|
511
529
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
512
|
-
var
|
|
513
|
-
var
|
|
514
|
-
|
|
530
|
+
var a = fromInt(tmp0);
|
|
531
|
+
var tmp$ret$2 = compare(a, b) <= 0 ? a : b;
|
|
532
|
+
var toRead = convertToInt(tmp$ret$2);
|
|
533
|
+
return this.h3m_1.j3l(sink, startIndex, startIndex + toRead | 0);
|
|
534
|
+
};
|
|
535
|
+
protoOf(RealSource).d4 = function () {
|
|
536
|
+
if (this.g3m_1)
|
|
537
|
+
return Unit_instance;
|
|
538
|
+
this.g3m_1 = true;
|
|
539
|
+
this.f3m_1.d4();
|
|
540
|
+
this.h3m_1.s2();
|
|
515
541
|
};
|
|
516
542
|
protoOf(RealSource).toString = function () {
|
|
517
|
-
return 'buffered(' + toString(this.
|
|
543
|
+
return 'buffered(' + toString(this.f3m_1) + ')';
|
|
518
544
|
};
|
|
519
545
|
function Segment_init_$Init$($this) {
|
|
520
546
|
Segment.call($this);
|
|
521
|
-
$this.
|
|
522
|
-
$this.
|
|
523
|
-
$this.
|
|
547
|
+
$this.a3l_1 = new Int8Array(8192);
|
|
548
|
+
$this.e3l_1 = true;
|
|
549
|
+
$this.d3l_1 = null;
|
|
524
550
|
return $this;
|
|
525
551
|
}
|
|
526
552
|
function Segment_init_$Create$() {
|
|
@@ -528,257 +554,237 @@ function Segment_init_$Create$() {
|
|
|
528
554
|
}
|
|
529
555
|
function Segment_init_$Init$_0(data, pos, limit, shareToken, owner, $this) {
|
|
530
556
|
Segment.call($this);
|
|
531
|
-
$this.
|
|
532
|
-
$this.
|
|
533
|
-
$this.
|
|
534
|
-
$this.
|
|
535
|
-
$this.
|
|
557
|
+
$this.a3l_1 = data;
|
|
558
|
+
$this.b3l_1 = pos;
|
|
559
|
+
$this.c3l_1 = limit;
|
|
560
|
+
$this.d3l_1 = shareToken;
|
|
561
|
+
$this.e3l_1 = owner;
|
|
536
562
|
return $this;
|
|
537
563
|
}
|
|
538
564
|
function Segment_init_$Create$_0(data, pos, limit, shareToken, owner) {
|
|
539
565
|
return Segment_init_$Init$_0(data, pos, limit, shareToken, owner, objectCreate(protoOf(Segment)));
|
|
540
566
|
}
|
|
541
567
|
function Companion() {
|
|
542
|
-
this.
|
|
543
|
-
this.
|
|
568
|
+
this.i3m_1 = 8192;
|
|
569
|
+
this.j3m_1 = 1024;
|
|
544
570
|
}
|
|
545
|
-
protoOf(Companion).
|
|
571
|
+
protoOf(Companion).k3m = function () {
|
|
546
572
|
return Segment_init_$Create$();
|
|
547
573
|
};
|
|
548
574
|
var Companion_instance;
|
|
549
575
|
function Companion_getInstance() {
|
|
550
576
|
return Companion_instance;
|
|
551
577
|
}
|
|
552
|
-
protoOf(Segment).
|
|
553
|
-
var tmp1_safe_receiver = this.
|
|
554
|
-
var tmp0_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
578
|
+
protoOf(Segment).s3l = function () {
|
|
579
|
+
var tmp1_safe_receiver = this.d3l_1;
|
|
580
|
+
var tmp0_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.t1v();
|
|
555
581
|
return tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs;
|
|
556
582
|
};
|
|
557
|
-
protoOf(Segment).
|
|
558
|
-
var tmp0_elvis_lhs = this.
|
|
583
|
+
protoOf(Segment).l3m = function () {
|
|
584
|
+
var tmp0_elvis_lhs = this.d3l_1;
|
|
559
585
|
var tmp;
|
|
560
586
|
if (tmp0_elvis_lhs == null) {
|
|
561
587
|
// Inline function 'kotlin.also' call
|
|
562
|
-
var this_0 = SegmentPool_instance.
|
|
563
|
-
|
|
564
|
-
// Inline function 'kotlinx.io.Segment.sharedCopy.<anonymous>' call
|
|
565
|
-
this.b2g_1 = this_0;
|
|
588
|
+
var this_0 = SegmentPool_instance.m3m();
|
|
589
|
+
this.d3l_1 = this_0;
|
|
566
590
|
tmp = this_0;
|
|
567
591
|
} else {
|
|
568
592
|
tmp = tmp0_elvis_lhs;
|
|
569
593
|
}
|
|
570
594
|
var t = tmp;
|
|
571
|
-
var tmp_0 = this.
|
|
572
|
-
var tmp_1 = this.
|
|
595
|
+
var tmp_0 = this.b3l_1;
|
|
596
|
+
var tmp_1 = this.c3l_1;
|
|
573
597
|
// Inline function 'kotlin.also' call
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
t.l2h();
|
|
577
|
-
return Segment_init_$Create$_0(this.y2f_1, tmp_0, tmp_1, t, false);
|
|
598
|
+
t.n3m();
|
|
599
|
+
return Segment_init_$Create$_0(this.a3l_1, tmp_0, tmp_1, t, false);
|
|
578
600
|
};
|
|
579
|
-
protoOf(Segment).
|
|
580
|
-
var result = this.
|
|
581
|
-
if (!(this.
|
|
582
|
-
ensureNotNull(this.
|
|
601
|
+
protoOf(Segment).v3l = function () {
|
|
602
|
+
var result = this.f3l_1;
|
|
603
|
+
if (!(this.g3l_1 == null)) {
|
|
604
|
+
ensureNotNull(this.g3l_1).f3l_1 = this.f3l_1;
|
|
583
605
|
}
|
|
584
|
-
if (!(this.
|
|
585
|
-
ensureNotNull(this.
|
|
606
|
+
if (!(this.f3l_1 == null)) {
|
|
607
|
+
ensureNotNull(this.f3l_1).g3l_1 = this.g3l_1;
|
|
586
608
|
}
|
|
587
|
-
this.
|
|
588
|
-
this.
|
|
609
|
+
this.f3l_1 = null;
|
|
610
|
+
this.g3l_1 = null;
|
|
589
611
|
return result;
|
|
590
612
|
};
|
|
591
|
-
protoOf(Segment).
|
|
592
|
-
segment.
|
|
593
|
-
segment.
|
|
594
|
-
if (!(this.
|
|
595
|
-
ensureNotNull(this.
|
|
613
|
+
protoOf(Segment).r3l = function (segment) {
|
|
614
|
+
segment.g3l_1 = this;
|
|
615
|
+
segment.f3l_1 = this.f3l_1;
|
|
616
|
+
if (!(this.f3l_1 == null)) {
|
|
617
|
+
ensureNotNull(this.f3l_1).g3l_1 = segment;
|
|
596
618
|
}
|
|
597
|
-
this.
|
|
619
|
+
this.f3l_1 = segment;
|
|
598
620
|
return segment;
|
|
599
621
|
};
|
|
600
|
-
protoOf(Segment).
|
|
622
|
+
protoOf(Segment).t3l = function (byteCount) {
|
|
601
623
|
// Inline function 'kotlin.require' call
|
|
602
|
-
|
|
603
|
-
if (!(byteCount > 0 && byteCount <= (this.a2g_1 - this.z2f_1 | 0))) {
|
|
604
|
-
// Inline function 'kotlinx.io.Segment.split.<anonymous>' call
|
|
624
|
+
if (!(byteCount > 0 && byteCount <= (this.c3l_1 - this.b3l_1 | 0))) {
|
|
605
625
|
var message = 'byteCount out of range';
|
|
606
626
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
607
627
|
}
|
|
608
628
|
var prefix;
|
|
609
629
|
if (byteCount >= 1024) {
|
|
610
|
-
prefix = this.
|
|
630
|
+
prefix = this.l3m();
|
|
611
631
|
} else {
|
|
612
|
-
prefix = SegmentPool_instance.
|
|
632
|
+
prefix = SegmentPool_instance.q3l();
|
|
633
|
+
var tmp0 = this.a3l_1;
|
|
634
|
+
var tmp2 = prefix.a3l_1;
|
|
635
|
+
var tmp5 = this.b3l_1;
|
|
613
636
|
// Inline function 'kotlin.collections.copyInto' call
|
|
614
|
-
var
|
|
615
|
-
var destination = prefix.y2f_1;
|
|
616
|
-
var startIndex = this.z2f_1;
|
|
617
|
-
var endIndex = this.z2f_1 + byteCount | 0;
|
|
637
|
+
var endIndex = this.b3l_1 + byteCount | 0;
|
|
618
638
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
619
639
|
// Inline function 'kotlin.js.asDynamic' call
|
|
620
|
-
var tmp =
|
|
640
|
+
var tmp = tmp0;
|
|
621
641
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
622
642
|
// Inline function 'kotlin.js.asDynamic' call
|
|
623
|
-
arrayCopy(tmp,
|
|
643
|
+
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
624
644
|
}
|
|
625
|
-
prefix.
|
|
626
|
-
this.
|
|
627
|
-
if (!(this.
|
|
628
|
-
ensureNotNull(this.
|
|
645
|
+
prefix.c3l_1 = prefix.b3l_1 + byteCount | 0;
|
|
646
|
+
this.b3l_1 = this.b3l_1 + byteCount | 0;
|
|
647
|
+
if (!(this.g3l_1 == null)) {
|
|
648
|
+
ensureNotNull(this.g3l_1).r3l(prefix);
|
|
629
649
|
} else {
|
|
630
|
-
prefix.
|
|
631
|
-
this.
|
|
650
|
+
prefix.f3l_1 = this;
|
|
651
|
+
this.g3l_1 = prefix;
|
|
632
652
|
}
|
|
633
653
|
return prefix;
|
|
634
654
|
};
|
|
635
|
-
protoOf(Segment).
|
|
655
|
+
protoOf(Segment).w3l = function () {
|
|
636
656
|
// Inline function 'kotlin.check' call
|
|
637
|
-
|
|
638
|
-
if (!!(this.e2g_1 == null)) {
|
|
639
|
-
// Inline function 'kotlinx.io.Segment.compact.<anonymous>' call
|
|
657
|
+
if (!!(this.g3l_1 == null)) {
|
|
640
658
|
var message = 'cannot compact';
|
|
641
659
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
642
660
|
}
|
|
643
|
-
if (!ensureNotNull(this.
|
|
661
|
+
if (!ensureNotNull(this.g3l_1).e3l_1)
|
|
644
662
|
return this;
|
|
645
|
-
var byteCount = this.
|
|
646
|
-
var availableByteCount = (8192 - ensureNotNull(this.
|
|
663
|
+
var byteCount = this.c3l_1 - this.b3l_1 | 0;
|
|
664
|
+
var availableByteCount = (8192 - ensureNotNull(this.g3l_1).c3l_1 | 0) + (ensureNotNull(this.g3l_1).s3l() ? 0 : ensureNotNull(this.g3l_1).b3l_1) | 0;
|
|
647
665
|
if (byteCount > availableByteCount)
|
|
648
666
|
return this;
|
|
649
|
-
var predecessor = this.
|
|
650
|
-
this.
|
|
651
|
-
var successor = this.
|
|
652
|
-
// Inline function 'kotlin.check' call
|
|
653
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
667
|
+
var predecessor = this.g3l_1;
|
|
668
|
+
this.u3l(ensureNotNull(predecessor), byteCount);
|
|
669
|
+
var successor = this.v3l();
|
|
654
670
|
// Inline function 'kotlin.check' call
|
|
655
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
656
671
|
if (!(successor == null)) {
|
|
657
|
-
|
|
658
|
-
var message_0 = 'Check failed.';
|
|
659
|
-
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
672
|
+
throw IllegalStateException_init_$Create$('Check failed.');
|
|
660
673
|
}
|
|
661
|
-
SegmentPool_instance.
|
|
674
|
+
SegmentPool_instance.a3m(this);
|
|
662
675
|
return predecessor;
|
|
663
676
|
};
|
|
664
|
-
protoOf(Segment).
|
|
665
|
-
var _unary__edvuaz = this.
|
|
666
|
-
this.
|
|
667
|
-
this.
|
|
677
|
+
protoOf(Segment).y3l = function (byte) {
|
|
678
|
+
var _unary__edvuaz = this.c3l_1;
|
|
679
|
+
this.c3l_1 = _unary__edvuaz + 1 | 0;
|
|
680
|
+
this.a3l_1[_unary__edvuaz] = byte;
|
|
668
681
|
};
|
|
669
|
-
protoOf(Segment).
|
|
682
|
+
protoOf(Segment).u3l = function (sink, byteCount) {
|
|
670
683
|
// Inline function 'kotlin.check' call
|
|
671
|
-
|
|
672
|
-
if (!sink.c2g_1) {
|
|
673
|
-
// Inline function 'kotlinx.io.Segment.writeTo.<anonymous>' call
|
|
684
|
+
if (!sink.e3l_1) {
|
|
674
685
|
var message = 'only owner can write';
|
|
675
686
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
676
687
|
}
|
|
677
|
-
if ((sink.
|
|
678
|
-
if (sink.
|
|
688
|
+
if ((sink.c3l_1 + byteCount | 0) > 8192) {
|
|
689
|
+
if (sink.s3l())
|
|
679
690
|
throw IllegalArgumentException_init_$Create$_0();
|
|
680
|
-
if (((sink.
|
|
691
|
+
if (((sink.c3l_1 + byteCount | 0) - sink.b3l_1 | 0) > 8192)
|
|
681
692
|
throw IllegalArgumentException_init_$Create$_0();
|
|
693
|
+
var tmp0 = sink.a3l_1;
|
|
694
|
+
var tmp2 = sink.a3l_1;
|
|
695
|
+
var tmp5 = sink.b3l_1;
|
|
682
696
|
// Inline function 'kotlin.collections.copyInto' call
|
|
683
|
-
var
|
|
684
|
-
var destination = sink.y2f_1;
|
|
685
|
-
var startIndex = sink.z2f_1;
|
|
686
|
-
var endIndex = sink.a2g_1;
|
|
697
|
+
var endIndex = sink.c3l_1;
|
|
687
698
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
688
699
|
// Inline function 'kotlin.js.asDynamic' call
|
|
689
|
-
var tmp =
|
|
700
|
+
var tmp = tmp0;
|
|
690
701
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
691
702
|
// Inline function 'kotlin.js.asDynamic' call
|
|
692
|
-
arrayCopy(tmp,
|
|
693
|
-
sink.
|
|
694
|
-
sink.
|
|
695
|
-
}
|
|
703
|
+
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
704
|
+
sink.c3l_1 = sink.c3l_1 - sink.b3l_1 | 0;
|
|
705
|
+
sink.b3l_1 = 0;
|
|
706
|
+
}
|
|
707
|
+
var tmp0_0 = this.a3l_1;
|
|
708
|
+
var tmp2_0 = sink.a3l_1;
|
|
709
|
+
var tmp4 = sink.c3l_1;
|
|
710
|
+
var tmp6 = this.b3l_1;
|
|
696
711
|
// Inline function 'kotlin.collections.copyInto' call
|
|
697
|
-
var
|
|
698
|
-
var destination_0 = sink.y2f_1;
|
|
699
|
-
var destinationOffset = sink.a2g_1;
|
|
700
|
-
var startIndex_0 = this.z2f_1;
|
|
701
|
-
var endIndex_0 = this.z2f_1 + byteCount | 0;
|
|
712
|
+
var endIndex_0 = this.b3l_1 + byteCount | 0;
|
|
702
713
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
703
714
|
// Inline function 'kotlin.js.asDynamic' call
|
|
704
|
-
var tmp_0 =
|
|
715
|
+
var tmp_0 = tmp0_0;
|
|
705
716
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
706
717
|
// Inline function 'kotlin.js.asDynamic' call
|
|
707
|
-
arrayCopy(tmp_0,
|
|
708
|
-
sink.
|
|
709
|
-
this.
|
|
718
|
+
arrayCopy(tmp_0, tmp2_0, tmp4, tmp6, endIndex_0);
|
|
719
|
+
sink.c3l_1 = sink.c3l_1 + byteCount | 0;
|
|
720
|
+
this.b3l_1 = this.b3l_1 + byteCount | 0;
|
|
710
721
|
};
|
|
711
|
-
protoOf(Segment).
|
|
722
|
+
protoOf(Segment).k3l = function (dst, dstStartOffset, dstEndOffset) {
|
|
712
723
|
var len = dstEndOffset - dstStartOffset | 0;
|
|
724
|
+
var tmp0 = this.a3l_1;
|
|
725
|
+
var tmp6 = this.b3l_1;
|
|
713
726
|
// Inline function 'kotlin.collections.copyInto' call
|
|
714
|
-
var
|
|
715
|
-
var startIndex = this.z2f_1;
|
|
716
|
-
var endIndex = this.z2f_1 + len | 0;
|
|
727
|
+
var endIndex = this.b3l_1 + len | 0;
|
|
717
728
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
718
729
|
// Inline function 'kotlin.js.asDynamic' call
|
|
719
|
-
var tmp =
|
|
730
|
+
var tmp = tmp0;
|
|
720
731
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
721
732
|
// Inline function 'kotlin.js.asDynamic' call
|
|
722
|
-
arrayCopy(tmp, dst, dstStartOffset,
|
|
723
|
-
this.
|
|
733
|
+
arrayCopy(tmp, dst, dstStartOffset, tmp6, endIndex);
|
|
734
|
+
this.b3l_1 = this.b3l_1 + len | 0;
|
|
724
735
|
};
|
|
725
|
-
protoOf(Segment).
|
|
726
|
-
return this.
|
|
736
|
+
protoOf(Segment).a1 = function () {
|
|
737
|
+
return this.c3l_1 - this.b3l_1 | 0;
|
|
727
738
|
};
|
|
728
|
-
protoOf(Segment).
|
|
729
|
-
return this.
|
|
739
|
+
protoOf(Segment).o3m = function () {
|
|
740
|
+
return this.a3l_1.length - this.c3l_1 | 0;
|
|
730
741
|
};
|
|
731
|
-
protoOf(Segment).
|
|
732
|
-
return this.
|
|
742
|
+
protoOf(Segment).p3m = function (readOnly) {
|
|
743
|
+
return this.a3l_1;
|
|
733
744
|
};
|
|
734
|
-
protoOf(Segment).
|
|
735
|
-
return this.
|
|
745
|
+
protoOf(Segment).q3m = function (index) {
|
|
746
|
+
return this.a3l_1[this.b3l_1 + index | 0];
|
|
736
747
|
};
|
|
737
|
-
protoOf(Segment).
|
|
738
|
-
this.
|
|
748
|
+
protoOf(Segment).r3m = function (index, value) {
|
|
749
|
+
this.a3l_1[this.c3l_1 + index | 0] = value;
|
|
739
750
|
};
|
|
740
|
-
protoOf(Segment).
|
|
741
|
-
var d = this.
|
|
742
|
-
var l = this.
|
|
751
|
+
protoOf(Segment).s3m = function (index, b0, b1) {
|
|
752
|
+
var d = this.a3l_1;
|
|
753
|
+
var l = this.c3l_1;
|
|
743
754
|
d[l + index | 0] = b0;
|
|
744
755
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
745
756
|
};
|
|
746
|
-
protoOf(Segment).
|
|
747
|
-
var d = this.
|
|
748
|
-
var l = this.
|
|
757
|
+
protoOf(Segment).t3m = function (index, b0, b1, b2) {
|
|
758
|
+
var d = this.a3l_1;
|
|
759
|
+
var l = this.c3l_1;
|
|
749
760
|
d[l + index | 0] = b0;
|
|
750
761
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
751
762
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
752
763
|
};
|
|
753
|
-
protoOf(Segment).
|
|
754
|
-
var d = this.
|
|
755
|
-
var l = this.
|
|
764
|
+
protoOf(Segment).u3m = function (index, b0, b1, b2, b3) {
|
|
765
|
+
var d = this.a3l_1;
|
|
766
|
+
var l = this.c3l_1;
|
|
756
767
|
d[l + index | 0] = b0;
|
|
757
768
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
758
769
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
759
770
|
d[(l + index | 0) + 3 | 0] = b3;
|
|
760
771
|
};
|
|
761
772
|
function Segment() {
|
|
762
|
-
this.
|
|
763
|
-
this.
|
|
764
|
-
this.
|
|
765
|
-
this.
|
|
766
|
-
this.
|
|
767
|
-
this.
|
|
768
|
-
}
|
|
769
|
-
function SegmentCopyTracker() {
|
|
770
|
-
}
|
|
771
|
-
function isEmpty(_this__u8e3s4) {
|
|
772
|
-
return _this__u8e3s4.j() === 0;
|
|
773
|
+
this.b3l_1 = 0;
|
|
774
|
+
this.c3l_1 = 0;
|
|
775
|
+
this.d3l_1 = null;
|
|
776
|
+
this.e3l_1 = false;
|
|
777
|
+
this.f3l_1 = null;
|
|
778
|
+
this.g3l_1 = null;
|
|
773
779
|
}
|
|
774
780
|
function AlwaysSharedCopyTracker() {
|
|
775
781
|
AlwaysSharedCopyTracker_instance = this;
|
|
776
782
|
SegmentCopyTracker.call(this);
|
|
777
783
|
}
|
|
778
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
784
|
+
protoOf(AlwaysSharedCopyTracker).t1v = function () {
|
|
779
785
|
return true;
|
|
780
786
|
};
|
|
781
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
787
|
+
protoOf(AlwaysSharedCopyTracker).n3m = function () {
|
|
782
788
|
return Unit_instance;
|
|
783
789
|
};
|
|
784
790
|
var AlwaysSharedCopyTracker_instance;
|
|
@@ -787,13 +793,16 @@ function AlwaysSharedCopyTracker_getInstance() {
|
|
|
787
793
|
new AlwaysSharedCopyTracker();
|
|
788
794
|
return AlwaysSharedCopyTracker_instance;
|
|
789
795
|
}
|
|
796
|
+
function isEmpty(_this__u8e3s4) {
|
|
797
|
+
return _this__u8e3s4.a1() === 0;
|
|
798
|
+
}
|
|
799
|
+
function SegmentCopyTracker() {
|
|
800
|
+
}
|
|
790
801
|
function readByteArray(_this__u8e3s4, byteCount) {
|
|
791
802
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
792
|
-
var byteCount_0 =
|
|
803
|
+
var byteCount_0 = fromInt(byteCount);
|
|
793
804
|
// Inline function 'kotlin.require' call
|
|
794
|
-
|
|
795
|
-
if (!(byteCount_0.j1(new Long(0, 0)) >= 0)) {
|
|
796
|
-
// Inline function 'kotlinx.io.checkByteCount.<anonymous>' call
|
|
805
|
+
if (!(compare(byteCount_0, new Long(0, 0)) >= 0)) {
|
|
797
806
|
var message = 'byteCount (' + byteCount_0.toString() + ') < 0';
|
|
798
807
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
799
808
|
}
|
|
@@ -803,23 +812,22 @@ function readByteArrayImpl(_this__u8e3s4, size) {
|
|
|
803
812
|
var arraySize = size;
|
|
804
813
|
if (size === -1) {
|
|
805
814
|
var fetchSize = new Long(2147483647, 0);
|
|
806
|
-
while (_this__u8e3s4.
|
|
815
|
+
while (compare(_this__u8e3s4.u3k().a1(), new Long(2147483647, 0)) < 0 && _this__u8e3s4.x3k(fetchSize)) {
|
|
807
816
|
// Inline function 'kotlin.Long.times' call
|
|
808
|
-
|
|
817
|
+
var this_0 = fetchSize;
|
|
818
|
+
fetchSize = multiply(this_0, fromInt(2));
|
|
809
819
|
}
|
|
810
820
|
// Inline function 'kotlin.check' call
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
// Inline function 'kotlinx.io.readByteArrayImpl.<anonymous>' call
|
|
814
|
-
var message = "Can't create an array of size " + _this__u8e3s4.s2f().j().toString();
|
|
821
|
+
if (!(compare(_this__u8e3s4.u3k().a1(), new Long(2147483647, 0)) < 0)) {
|
|
822
|
+
var message = "Can't create an array of size " + _this__u8e3s4.u3k().a1().toString();
|
|
815
823
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
816
824
|
}
|
|
817
|
-
arraySize = _this__u8e3s4.
|
|
825
|
+
arraySize = convertToInt(_this__u8e3s4.u3k().a1());
|
|
818
826
|
} else {
|
|
819
|
-
_this__u8e3s4.
|
|
827
|
+
_this__u8e3s4.w3k(fromInt(size));
|
|
820
828
|
}
|
|
821
829
|
var array = new Int8Array(arraySize);
|
|
822
|
-
readTo(_this__u8e3s4.
|
|
830
|
+
readTo(_this__u8e3s4.u3k(), array);
|
|
823
831
|
return array;
|
|
824
832
|
}
|
|
825
833
|
function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
@@ -827,10 +835,10 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
827
835
|
endIndex = endIndex === VOID ? sink.length : endIndex;
|
|
828
836
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
829
837
|
var size = sink.length;
|
|
830
|
-
checkBounds(
|
|
838
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
831
839
|
var offset = startIndex;
|
|
832
840
|
while (offset < endIndex) {
|
|
833
|
-
var bytesRead = _this__u8e3s4.
|
|
841
|
+
var bytesRead = _this__u8e3s4.j3l(sink, offset, endIndex);
|
|
834
842
|
if (bytesRead === -1) {
|
|
835
843
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + (endIndex - startIndex | 0) + ' bytes. ' + ('Only ' + bytesRead + ' bytes were read.'));
|
|
836
844
|
}
|
|
@@ -838,233 +846,229 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
838
846
|
}
|
|
839
847
|
}
|
|
840
848
|
function readString(_this__u8e3s4) {
|
|
841
|
-
_this__u8e3s4.
|
|
842
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
849
|
+
_this__u8e3s4.x3k(new Long(-1, 2147483647));
|
|
850
|
+
return commonReadUtf8(_this__u8e3s4.u3k(), _this__u8e3s4.u3k().a1());
|
|
843
851
|
}
|
|
844
852
|
function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
845
853
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
846
854
|
endIndex = endIndex === VOID ? string.length : endIndex;
|
|
847
855
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
848
856
|
var size = string.length;
|
|
849
|
-
checkBounds(
|
|
857
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
850
858
|
// Inline function 'kotlinx.io.writeToInternalBuffer' call
|
|
851
|
-
// Inline function 'kotlinx.io.writeString.<anonymous>' call
|
|
852
859
|
// Inline function 'kotlinx.io.commonWriteUtf8' call
|
|
853
|
-
var this_0 = _this__u8e3s4.
|
|
860
|
+
var this_0 = _this__u8e3s4.u3k();
|
|
854
861
|
var i = startIndex;
|
|
855
862
|
while (i < endIndex) {
|
|
856
|
-
// Inline function 'kotlin.code' call
|
|
857
863
|
var p0 = i;
|
|
858
|
-
|
|
864
|
+
// Inline function 'kotlin.code' call
|
|
865
|
+
var this_1 = charCodeAt(string, p0);
|
|
859
866
|
var c = Char__toInt_impl_vasixd(this_1);
|
|
860
867
|
if (c < 128) {
|
|
861
868
|
$l$block_0: {
|
|
862
869
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
863
|
-
var tail = this_0.
|
|
864
|
-
// Inline function 'kotlinx.io.commonWriteUtf8.<anonymous>' call
|
|
870
|
+
var tail = this_0.n3l(1);
|
|
865
871
|
var ctx = get_SegmentWriteContextImpl();
|
|
866
872
|
var segmentOffset = -i | 0;
|
|
867
873
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
868
|
-
var b = i + tail.
|
|
874
|
+
var b = i + tail.o3m() | 0;
|
|
869
875
|
var runLimit = Math.min(endIndex, b);
|
|
870
876
|
var _unary__edvuaz = i;
|
|
871
877
|
i = _unary__edvuaz + 1 | 0;
|
|
872
|
-
ctx.
|
|
878
|
+
ctx.y3m(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
|
|
873
879
|
$l$loop: while (i < runLimit) {
|
|
874
|
-
// Inline function 'kotlin.code' call
|
|
875
880
|
var p0_0 = i;
|
|
876
|
-
|
|
881
|
+
// Inline function 'kotlin.code' call
|
|
882
|
+
var this_2 = charCodeAt(string, p0_0);
|
|
877
883
|
c = Char__toInt_impl_vasixd(this_2);
|
|
878
884
|
if (c >= 128)
|
|
879
885
|
break $l$loop;
|
|
880
886
|
var _unary__edvuaz_0 = i;
|
|
881
887
|
i = _unary__edvuaz_0 + 1 | 0;
|
|
882
|
-
ctx.
|
|
888
|
+
ctx.y3m(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
|
|
883
889
|
}
|
|
884
890
|
var bytesWritten = i + segmentOffset | 0;
|
|
885
891
|
if (bytesWritten === 1) {
|
|
886
|
-
tail.
|
|
892
|
+
tail.c3l_1 = tail.c3l_1 + bytesWritten | 0;
|
|
887
893
|
var tmp = this_0;
|
|
888
894
|
// Inline function 'kotlin.Long.plus' call
|
|
889
|
-
|
|
895
|
+
var this_3 = this_0.t3k_1;
|
|
896
|
+
tmp.t3k_1 = add(this_3, fromInt(bytesWritten));
|
|
890
897
|
break $l$block_0;
|
|
891
898
|
}
|
|
892
899
|
// Inline function 'kotlin.check' call
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail.<anonymous>' call
|
|
896
|
-
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.m2h();
|
|
900
|
+
if (!(0 <= bytesWritten ? bytesWritten <= tail.o3m() : false)) {
|
|
901
|
+
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.o3m();
|
|
897
902
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
898
903
|
}
|
|
899
904
|
if (!(bytesWritten === 0)) {
|
|
900
|
-
tail.
|
|
905
|
+
tail.c3l_1 = tail.c3l_1 + bytesWritten | 0;
|
|
901
906
|
var tmp_0 = this_0;
|
|
902
907
|
// Inline function 'kotlin.Long.plus' call
|
|
903
|
-
|
|
908
|
+
var this_4 = this_0.t3k_1;
|
|
909
|
+
tmp_0.t3k_1 = add(this_4, fromInt(bytesWritten));
|
|
904
910
|
break $l$block_0;
|
|
905
911
|
}
|
|
906
912
|
if (isEmpty(tail)) {
|
|
907
|
-
this_0.
|
|
913
|
+
this_0.b3m();
|
|
908
914
|
}
|
|
909
915
|
}
|
|
910
916
|
} else if (c < 2048) {
|
|
911
917
|
$l$block_2: {
|
|
912
918
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
913
|
-
var tail_0 = this_0.
|
|
914
|
-
|
|
915
|
-
get_SegmentWriteContextImpl().v2h(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
919
|
+
var tail_0 = this_0.n3l(2);
|
|
920
|
+
get_SegmentWriteContextImpl().x3m(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
916
921
|
var bytesWritten_0 = 2;
|
|
917
922
|
if (bytesWritten_0 === 2) {
|
|
918
|
-
tail_0.
|
|
923
|
+
tail_0.c3l_1 = tail_0.c3l_1 + bytesWritten_0 | 0;
|
|
919
924
|
var tmp_1 = this_0;
|
|
920
925
|
// Inline function 'kotlin.Long.plus' call
|
|
921
|
-
|
|
926
|
+
var this_5 = this_0.t3k_1;
|
|
927
|
+
tmp_1.t3k_1 = add(this_5, fromInt(bytesWritten_0));
|
|
922
928
|
break $l$block_2;
|
|
923
929
|
}
|
|
924
930
|
// Inline function 'kotlin.check' call
|
|
925
|
-
|
|
926
|
-
|
|
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.m2h();
|
|
931
|
+
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.o3m() : false)) {
|
|
932
|
+
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.o3m();
|
|
929
933
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
930
934
|
}
|
|
931
935
|
if (!(bytesWritten_0 === 0)) {
|
|
932
|
-
tail_0.
|
|
936
|
+
tail_0.c3l_1 = tail_0.c3l_1 + bytesWritten_0 | 0;
|
|
933
937
|
var tmp_2 = this_0;
|
|
934
938
|
// Inline function 'kotlin.Long.plus' call
|
|
935
|
-
|
|
939
|
+
var this_6 = this_0.t3k_1;
|
|
940
|
+
tmp_2.t3k_1 = add(this_6, fromInt(bytesWritten_0));
|
|
936
941
|
break $l$block_2;
|
|
937
942
|
}
|
|
938
943
|
if (isEmpty(tail_0)) {
|
|
939
|
-
this_0.
|
|
944
|
+
this_0.b3m();
|
|
940
945
|
}
|
|
941
946
|
}
|
|
942
947
|
i = i + 1 | 0;
|
|
943
948
|
} else if (c < 55296 || c > 57343) {
|
|
944
949
|
$l$block_4: {
|
|
945
950
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
946
|
-
var tail_1 = this_0.
|
|
947
|
-
|
|
948
|
-
get_SegmentWriteContextImpl().u2h(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
951
|
+
var tail_1 = this_0.n3l(3);
|
|
952
|
+
get_SegmentWriteContextImpl().w3m(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
949
953
|
var bytesWritten_1 = 3;
|
|
950
954
|
if (bytesWritten_1 === 3) {
|
|
951
|
-
tail_1.
|
|
955
|
+
tail_1.c3l_1 = tail_1.c3l_1 + bytesWritten_1 | 0;
|
|
952
956
|
var tmp_3 = this_0;
|
|
953
957
|
// Inline function 'kotlin.Long.plus' call
|
|
954
|
-
|
|
958
|
+
var this_7 = this_0.t3k_1;
|
|
959
|
+
tmp_3.t3k_1 = add(this_7, fromInt(bytesWritten_1));
|
|
955
960
|
break $l$block_4;
|
|
956
961
|
}
|
|
957
962
|
// Inline function 'kotlin.check' call
|
|
958
|
-
|
|
959
|
-
|
|
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.m2h();
|
|
963
|
+
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.o3m() : false)) {
|
|
964
|
+
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.o3m();
|
|
962
965
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
963
966
|
}
|
|
964
967
|
if (!(bytesWritten_1 === 0)) {
|
|
965
|
-
tail_1.
|
|
968
|
+
tail_1.c3l_1 = tail_1.c3l_1 + bytesWritten_1 | 0;
|
|
966
969
|
var tmp_4 = this_0;
|
|
967
970
|
// Inline function 'kotlin.Long.plus' call
|
|
968
|
-
|
|
971
|
+
var this_8 = this_0.t3k_1;
|
|
972
|
+
tmp_4.t3k_1 = add(this_8, fromInt(bytesWritten_1));
|
|
969
973
|
break $l$block_4;
|
|
970
974
|
}
|
|
971
975
|
if (isEmpty(tail_1)) {
|
|
972
|
-
this_0.
|
|
976
|
+
this_0.b3m();
|
|
973
977
|
}
|
|
974
978
|
}
|
|
975
979
|
i = i + 1 | 0;
|
|
976
980
|
} else {
|
|
977
981
|
var tmp_5;
|
|
978
982
|
if ((i + 1 | 0) < endIndex) {
|
|
979
|
-
// Inline function 'kotlin.code' call
|
|
980
983
|
var p0_1 = i + 1 | 0;
|
|
981
|
-
|
|
982
|
-
|
|
984
|
+
// Inline function 'kotlin.code' call
|
|
985
|
+
var this_9 = charCodeAt(string, p0_1);
|
|
986
|
+
tmp_5 = Char__toInt_impl_vasixd(this_9);
|
|
983
987
|
} else {
|
|
984
988
|
tmp_5 = 0;
|
|
985
989
|
}
|
|
986
990
|
var low = tmp_5;
|
|
987
991
|
if (c > 56319 || !(56320 <= low ? low <= 57343 : false)) {
|
|
988
|
-
|
|
992
|
+
// Inline function 'kotlin.code' call
|
|
993
|
+
var this_10 = _Char___init__impl__6a9atx(63);
|
|
994
|
+
var tmp$ret$26 = Char__toInt_impl_vasixd(this_10);
|
|
995
|
+
this_0.x3l(toByte(tmp$ret$26));
|
|
989
996
|
i = i + 1 | 0;
|
|
990
997
|
} else {
|
|
991
998
|
var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
|
|
992
999
|
$l$block_6: {
|
|
993
1000
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
994
|
-
var tail_2 = this_0.
|
|
995
|
-
|
|
996
|
-
get_SegmentWriteContextImpl().t2h(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
1001
|
+
var tail_2 = this_0.n3l(4);
|
|
1002
|
+
get_SegmentWriteContextImpl().v3m(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
997
1003
|
var bytesWritten_2 = 4;
|
|
998
1004
|
if (bytesWritten_2 === 4) {
|
|
999
|
-
tail_2.
|
|
1005
|
+
tail_2.c3l_1 = tail_2.c3l_1 + bytesWritten_2 | 0;
|
|
1000
1006
|
var tmp_6 = this_0;
|
|
1001
1007
|
// Inline function 'kotlin.Long.plus' call
|
|
1002
|
-
|
|
1008
|
+
var this_11 = this_0.t3k_1;
|
|
1009
|
+
tmp_6.t3k_1 = add(this_11, fromInt(bytesWritten_2));
|
|
1003
1010
|
break $l$block_6;
|
|
1004
1011
|
}
|
|
1005
1012
|
// Inline function 'kotlin.check' call
|
|
1006
|
-
|
|
1007
|
-
|
|
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.m2h();
|
|
1013
|
+
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.o3m() : false)) {
|
|
1014
|
+
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.o3m();
|
|
1010
1015
|
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
1011
1016
|
}
|
|
1012
1017
|
if (!(bytesWritten_2 === 0)) {
|
|
1013
|
-
tail_2.
|
|
1018
|
+
tail_2.c3l_1 = tail_2.c3l_1 + bytesWritten_2 | 0;
|
|
1014
1019
|
var tmp_7 = this_0;
|
|
1015
1020
|
// Inline function 'kotlin.Long.plus' call
|
|
1016
|
-
|
|
1021
|
+
var this_12 = this_0.t3k_1;
|
|
1022
|
+
tmp_7.t3k_1 = add(this_12, fromInt(bytesWritten_2));
|
|
1017
1023
|
break $l$block_6;
|
|
1018
1024
|
}
|
|
1019
1025
|
if (isEmpty(tail_2)) {
|
|
1020
|
-
this_0.
|
|
1026
|
+
this_0.b3m();
|
|
1021
1027
|
}
|
|
1022
1028
|
}
|
|
1023
1029
|
i = i + 2 | 0;
|
|
1024
1030
|
}
|
|
1025
1031
|
}
|
|
1026
1032
|
}
|
|
1027
|
-
_this__u8e3s4.
|
|
1033
|
+
_this__u8e3s4.y3k();
|
|
1028
1034
|
}
|
|
1029
1035
|
function commonReadUtf8(_this__u8e3s4, byteCount) {
|
|
1030
|
-
if (byteCount
|
|
1036
|
+
if (equalsLong(byteCount, new Long(0, 0)))
|
|
1031
1037
|
return '';
|
|
1032
1038
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
1033
|
-
var curr = _this__u8e3s4.
|
|
1039
|
+
var curr = _this__u8e3s4.r3k_1;
|
|
1034
1040
|
while (!(curr == null)) {
|
|
1035
|
-
// Inline function 'kotlinx.io.commonReadUtf8.<anonymous>' call
|
|
1036
1041
|
get_SegmentReadContextImpl();
|
|
1037
|
-
if (
|
|
1042
|
+
if (compare(fromInt(curr.a1()), byteCount) >= 0) {
|
|
1038
1043
|
var result = '';
|
|
1039
1044
|
// Inline function 'kotlinx.io.unsafe.withData' call
|
|
1040
|
-
|
|
1041
|
-
var
|
|
1042
|
-
var
|
|
1045
|
+
var tmp0 = curr.p3m(true);
|
|
1046
|
+
var tmp2 = curr.b3l_1;
|
|
1047
|
+
var tmp0_0 = curr.c3l_1;
|
|
1043
1048
|
// Inline function 'kotlin.math.min' call
|
|
1044
|
-
var
|
|
1045
|
-
var
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
_this__u8e3s4.f2g(byteCount);
|
|
1049
|
+
var b = tmp2 + convertToInt(byteCount) | 0;
|
|
1050
|
+
var tmp$ret$0 = Math.min(tmp0_0, b);
|
|
1051
|
+
result = commonToUtf8String(tmp0, tmp2, tmp$ret$0);
|
|
1052
|
+
_this__u8e3s4.h3l(byteCount);
|
|
1049
1053
|
return result;
|
|
1050
1054
|
}
|
|
1051
|
-
return commonToUtf8String(readByteArray(_this__u8e3s4, byteCount
|
|
1055
|
+
return commonToUtf8String(readByteArray(_this__u8e3s4, convertToInt(byteCount)));
|
|
1052
1056
|
}
|
|
1053
1057
|
// Inline function 'kotlin.error' call
|
|
1054
1058
|
var message = 'Unreacheable';
|
|
1055
1059
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1056
1060
|
}
|
|
1057
|
-
function FileSystem() {
|
|
1058
|
-
}
|
|
1059
|
-
function SystemFileSystemImpl() {
|
|
1060
|
-
}
|
|
1061
1061
|
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.z3m_1 = isRegularFile;
|
|
1066
|
+
this.a3n_1 = isDirectory;
|
|
1067
|
+
this.b3n_1 = size;
|
|
1068
|
+
}
|
|
1069
|
+
function FileSystem() {
|
|
1070
|
+
}
|
|
1071
|
+
function SystemFileSystemImpl() {
|
|
1068
1072
|
}
|
|
1069
1073
|
function Path(base, parts) {
|
|
1070
1074
|
return Path_0(base.toString(), parts.slice());
|
|
@@ -1075,7 +1079,7 @@ function removeTrailingSeparators(path, isWindows_) {
|
|
|
1075
1079
|
var tmp;
|
|
1076
1080
|
if (path.length > 1) {
|
|
1077
1081
|
var tmp_0;
|
|
1078
|
-
if (
|
|
1082
|
+
if (charCodeAt(path, 1) === _Char___init__impl__6a9atx(58)) {
|
|
1079
1083
|
tmp_0 = 3;
|
|
1080
1084
|
} else if (isUnc(path)) {
|
|
1081
1085
|
tmp_0 = 2;
|
|
@@ -1093,19 +1097,15 @@ function removeTrailingSeparators(path, isWindows_) {
|
|
|
1093
1097
|
}
|
|
1094
1098
|
function Path_0(base, parts) {
|
|
1095
1099
|
// Inline function 'kotlin.text.buildString' call
|
|
1096
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
1097
1100
|
// Inline function 'kotlin.apply' call
|
|
1098
1101
|
var this_0 = StringBuilder_init_$Create$_0();
|
|
1099
|
-
|
|
1100
|
-
// Inline function 'kotlinx.io.files.Path.<anonymous>' call
|
|
1101
|
-
this_0.y7(base);
|
|
1102
|
+
this_0.q(base);
|
|
1102
1103
|
// Inline function 'kotlin.collections.forEach' call
|
|
1103
1104
|
var inductionVariable = 0;
|
|
1104
1105
|
var last = parts.length;
|
|
1105
1106
|
while (inductionVariable < last) {
|
|
1106
1107
|
var element = parts[inductionVariable];
|
|
1107
1108
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1108
|
-
// Inline function 'kotlinx.io.files.Path.<anonymous>.<anonymous>' call
|
|
1109
1109
|
var tmp;
|
|
1110
1110
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
1111
1111
|
if (charSequenceLength(this_0) > 0) {
|
|
@@ -1114,12 +1114,12 @@ function Path_0(base, parts) {
|
|
|
1114
1114
|
tmp = false;
|
|
1115
1115
|
}
|
|
1116
1116
|
if (tmp) {
|
|
1117
|
-
this_0.
|
|
1117
|
+
this_0.s(get_SystemPathSeparator());
|
|
1118
1118
|
}
|
|
1119
|
-
this_0.
|
|
1119
|
+
this_0.q(element);
|
|
1120
1120
|
}
|
|
1121
|
-
var tmp$ret$
|
|
1122
|
-
return Path_2(tmp$ret$
|
|
1121
|
+
var tmp$ret$5 = this_0.toString();
|
|
1122
|
+
return Path_2(tmp$ret$5);
|
|
1123
1123
|
}
|
|
1124
1124
|
function isUnc(path) {
|
|
1125
1125
|
if (path.length < 2)
|
|
@@ -1132,35 +1132,26 @@ function isUnc(path) {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
function removeTrailingSeparatorsWindows(suffixLength, path) {
|
|
1134
1134
|
// Inline function 'kotlin.require' call
|
|
1135
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
1136
1135
|
// Inline function 'kotlin.require' call
|
|
1137
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
1138
1136
|
if (!(suffixLength >= 1)) {
|
|
1139
|
-
// Inline function 'kotlin.require.<anonymous>' call
|
|
1140
1137
|
var message = 'Failed requirement.';
|
|
1141
1138
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1142
1139
|
}
|
|
1143
1140
|
var idx = path.length;
|
|
1144
1141
|
$l$loop: while (idx > suffixLength) {
|
|
1145
|
-
var c =
|
|
1142
|
+
var c = charCodeAt(path, idx - 1 | 0);
|
|
1146
1143
|
if (!(c === _Char___init__impl__6a9atx(92)) && !(c === _Char___init__impl__6a9atx(47)))
|
|
1147
1144
|
break $l$loop;
|
|
1148
1145
|
idx = idx - 1 | 0;
|
|
1149
1146
|
}
|
|
1150
|
-
|
|
1151
|
-
var endIndex = idx;
|
|
1152
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
1153
|
-
return path.substring(0, endIndex);
|
|
1147
|
+
return substring(path, 0, idx);
|
|
1154
1148
|
}
|
|
1155
1149
|
function removeTrailingSeparatorsUnix(path) {
|
|
1156
1150
|
var idx = path.length;
|
|
1157
|
-
while (idx > 1 &&
|
|
1151
|
+
while (idx > 1 && charCodeAt(path, idx - 1 | 0) === _Char___init__impl__6a9atx(47)) {
|
|
1158
1152
|
idx = idx - 1 | 0;
|
|
1159
1153
|
}
|
|
1160
|
-
|
|
1161
|
-
var endIndex = idx;
|
|
1162
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
1163
|
-
return path.substring(0, endIndex);
|
|
1154
|
+
return substring(path, 0, idx);
|
|
1164
1155
|
}
|
|
1165
1156
|
function commonToUtf8String(_this__u8e3s4, beginIndex, endIndex) {
|
|
1166
1157
|
beginIndex = beginIndex === VOID ? 0 : beginIndex;
|
|
@@ -1175,346 +1166,328 @@ function commonToUtf8String(_this__u8e3s4, beginIndex, endIndex) {
|
|
|
1175
1166
|
while (index < endIndex) {
|
|
1176
1167
|
var b0 = _this__u8e3s4[index];
|
|
1177
1168
|
if (b0 >= 0) {
|
|
1178
|
-
|
|
1169
|
+
var c = numberToChar(b0);
|
|
1179
1170
|
var _unary__edvuaz = length;
|
|
1180
1171
|
length = _unary__edvuaz + 1 | 0;
|
|
1181
|
-
chars[_unary__edvuaz] =
|
|
1172
|
+
chars[_unary__edvuaz] = c;
|
|
1182
1173
|
index = index + 1 | 0;
|
|
1183
1174
|
while (index < endIndex && _this__u8e3s4[index] >= 0) {
|
|
1184
|
-
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1185
1175
|
var _unary__edvuaz_0 = index;
|
|
1186
1176
|
index = _unary__edvuaz_0 + 1 | 0;
|
|
1177
|
+
var c_0 = numberToChar(_this__u8e3s4[_unary__edvuaz_0]);
|
|
1187
1178
|
var _unary__edvuaz_1 = length;
|
|
1188
1179
|
length = _unary__edvuaz_1 + 1 | 0;
|
|
1189
|
-
chars[_unary__edvuaz_1] =
|
|
1180
|
+
chars[_unary__edvuaz_1] = c_0;
|
|
1190
1181
|
}
|
|
1191
1182
|
} else {
|
|
1192
1183
|
// Inline function 'kotlinx.io.shr' call
|
|
1193
1184
|
if (b0 >> 5 === -2) {
|
|
1194
1185
|
var tmp = index;
|
|
1195
|
-
var
|
|
1186
|
+
var tmp2 = index;
|
|
1187
|
+
var tmp$ret$5;
|
|
1196
1188
|
$l$block_0: {
|
|
1197
1189
|
// Inline function 'kotlinx.io.internal.process2Utf8Bytes' call
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1201
|
-
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1190
|
+
if (endIndex <= (tmp2 + 1 | 0)) {
|
|
1191
|
+
var c_1 = numberToChar(65533);
|
|
1202
1192
|
var _unary__edvuaz_2 = length;
|
|
1203
1193
|
length = _unary__edvuaz_2 + 1 | 0;
|
|
1204
|
-
chars[_unary__edvuaz_2] =
|
|
1205
|
-
tmp$ret$
|
|
1194
|
+
chars[_unary__edvuaz_2] = c_1;
|
|
1195
|
+
tmp$ret$5 = 1;
|
|
1206
1196
|
break $l$block_0;
|
|
1207
1197
|
}
|
|
1208
|
-
var b0_0 = _this__u8e3s4[
|
|
1209
|
-
var b1 = _this__u8e3s4[
|
|
1198
|
+
var b0_0 = _this__u8e3s4[tmp2];
|
|
1199
|
+
var b1 = _this__u8e3s4[tmp2 + 1 | 0];
|
|
1210
1200
|
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1211
1201
|
// Inline function 'kotlinx.io.and' call
|
|
1212
1202
|
if (!((b1 & 192) === 128)) {
|
|
1213
|
-
|
|
1214
|
-
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1203
|
+
var c_2 = numberToChar(65533);
|
|
1215
1204
|
var _unary__edvuaz_3 = length;
|
|
1216
1205
|
length = _unary__edvuaz_3 + 1 | 0;
|
|
1217
|
-
chars[_unary__edvuaz_3] =
|
|
1218
|
-
tmp$ret$
|
|
1206
|
+
chars[_unary__edvuaz_3] = c_2;
|
|
1207
|
+
tmp$ret$5 = 1;
|
|
1219
1208
|
break $l$block_0;
|
|
1220
1209
|
}
|
|
1221
1210
|
var codePoint = 3968 ^ b1 ^ b0_0 << 6;
|
|
1222
1211
|
if (codePoint < 128) {
|
|
1223
|
-
|
|
1224
|
-
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1212
|
+
var c_3 = numberToChar(65533);
|
|
1225
1213
|
var _unary__edvuaz_4 = length;
|
|
1226
1214
|
length = _unary__edvuaz_4 + 1 | 0;
|
|
1227
|
-
chars[_unary__edvuaz_4] =
|
|
1215
|
+
chars[_unary__edvuaz_4] = c_3;
|
|
1228
1216
|
} else {
|
|
1229
|
-
|
|
1230
|
-
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1217
|
+
var c_4 = numberToChar(codePoint);
|
|
1231
1218
|
var _unary__edvuaz_5 = length;
|
|
1232
1219
|
length = _unary__edvuaz_5 + 1 | 0;
|
|
1233
|
-
chars[_unary__edvuaz_5] =
|
|
1220
|
+
chars[_unary__edvuaz_5] = c_4;
|
|
1234
1221
|
}
|
|
1235
|
-
tmp$ret$
|
|
1222
|
+
tmp$ret$5 = 2;
|
|
1236
1223
|
}
|
|
1237
|
-
index = tmp + tmp$ret$
|
|
1224
|
+
index = tmp + tmp$ret$5 | 0;
|
|
1238
1225
|
} else {
|
|
1239
1226
|
// Inline function 'kotlinx.io.shr' call
|
|
1240
1227
|
if (b0 >> 4 === -2) {
|
|
1241
1228
|
var tmp_0 = index;
|
|
1242
|
-
var
|
|
1229
|
+
var tmp2_0 = index;
|
|
1230
|
+
var tmp$ret$19;
|
|
1243
1231
|
$l$block_4: {
|
|
1244
1232
|
// Inline function 'kotlinx.io.internal.process3Utf8Bytes' call
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1248
|
-
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1233
|
+
if (endIndex <= (tmp2_0 + 2 | 0)) {
|
|
1234
|
+
var c_5 = numberToChar(65533);
|
|
1249
1235
|
var _unary__edvuaz_6 = length;
|
|
1250
1236
|
length = _unary__edvuaz_6 + 1 | 0;
|
|
1251
|
-
chars[_unary__edvuaz_6] =
|
|
1237
|
+
chars[_unary__edvuaz_6] = c_5;
|
|
1252
1238
|
var tmp_1;
|
|
1253
|
-
if (endIndex <= (
|
|
1239
|
+
if (endIndex <= (tmp2_0 + 1 | 0)) {
|
|
1254
1240
|
tmp_1 = true;
|
|
1255
1241
|
} else {
|
|
1256
1242
|
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1257
1243
|
// Inline function 'kotlinx.io.and' call
|
|
1258
|
-
tmp_1 = !((_this__u8e3s4[
|
|
1244
|
+
tmp_1 = !((_this__u8e3s4[tmp2_0 + 1 | 0] & 192) === 128);
|
|
1259
1245
|
}
|
|
1260
1246
|
if (tmp_1) {
|
|
1261
|
-
tmp$ret$
|
|
1247
|
+
tmp$ret$19 = 1;
|
|
1262
1248
|
break $l$block_4;
|
|
1263
1249
|
} else {
|
|
1264
|
-
tmp$ret$
|
|
1250
|
+
tmp$ret$19 = 2;
|
|
1265
1251
|
break $l$block_4;
|
|
1266
1252
|
}
|
|
1267
1253
|
}
|
|
1268
|
-
var b0_1 = _this__u8e3s4[
|
|
1269
|
-
var b1_0 = _this__u8e3s4[
|
|
1254
|
+
var b0_1 = _this__u8e3s4[tmp2_0];
|
|
1255
|
+
var b1_0 = _this__u8e3s4[tmp2_0 + 1 | 0];
|
|
1270
1256
|
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1271
1257
|
// Inline function 'kotlinx.io.and' call
|
|
1272
1258
|
if (!((b1_0 & 192) === 128)) {
|
|
1273
|
-
|
|
1274
|
-
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1259
|
+
var c_6 = numberToChar(65533);
|
|
1275
1260
|
var _unary__edvuaz_7 = length;
|
|
1276
1261
|
length = _unary__edvuaz_7 + 1 | 0;
|
|
1277
|
-
chars[_unary__edvuaz_7] =
|
|
1278
|
-
tmp$ret$
|
|
1262
|
+
chars[_unary__edvuaz_7] = c_6;
|
|
1263
|
+
tmp$ret$19 = 1;
|
|
1279
1264
|
break $l$block_4;
|
|
1280
1265
|
}
|
|
1281
|
-
var b2 = _this__u8e3s4[
|
|
1266
|
+
var b2 = _this__u8e3s4[tmp2_0 + 2 | 0];
|
|
1282
1267
|
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1283
1268
|
// Inline function 'kotlinx.io.and' call
|
|
1284
1269
|
if (!((b2 & 192) === 128)) {
|
|
1285
|
-
|
|
1286
|
-
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1270
|
+
var c_7 = numberToChar(65533);
|
|
1287
1271
|
var _unary__edvuaz_8 = length;
|
|
1288
1272
|
length = _unary__edvuaz_8 + 1 | 0;
|
|
1289
|
-
chars[_unary__edvuaz_8] =
|
|
1290
|
-
tmp$ret$
|
|
1273
|
+
chars[_unary__edvuaz_8] = c_7;
|
|
1274
|
+
tmp$ret$19 = 2;
|
|
1291
1275
|
break $l$block_4;
|
|
1292
1276
|
}
|
|
1293
1277
|
var codePoint_0 = -123008 ^ b2 ^ b1_0 << 6 ^ b0_1 << 12;
|
|
1294
1278
|
if (codePoint_0 < 2048) {
|
|
1295
|
-
|
|
1296
|
-
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1279
|
+
var c_8 = numberToChar(65533);
|
|
1297
1280
|
var _unary__edvuaz_9 = length;
|
|
1298
1281
|
length = _unary__edvuaz_9 + 1 | 0;
|
|
1299
|
-
chars[_unary__edvuaz_9] =
|
|
1282
|
+
chars[_unary__edvuaz_9] = c_8;
|
|
1300
1283
|
} else if (55296 <= codePoint_0 ? codePoint_0 <= 57343 : false) {
|
|
1301
|
-
|
|
1302
|
-
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1284
|
+
var c_9 = numberToChar(65533);
|
|
1303
1285
|
var _unary__edvuaz_10 = length;
|
|
1304
1286
|
length = _unary__edvuaz_10 + 1 | 0;
|
|
1305
|
-
chars[_unary__edvuaz_10] =
|
|
1287
|
+
chars[_unary__edvuaz_10] = c_9;
|
|
1306
1288
|
} else {
|
|
1307
|
-
|
|
1308
|
-
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1289
|
+
var c_10 = numberToChar(codePoint_0);
|
|
1309
1290
|
var _unary__edvuaz_11 = length;
|
|
1310
1291
|
length = _unary__edvuaz_11 + 1 | 0;
|
|
1311
|
-
chars[_unary__edvuaz_11] =
|
|
1292
|
+
chars[_unary__edvuaz_11] = c_10;
|
|
1312
1293
|
}
|
|
1313
|
-
tmp$ret$
|
|
1294
|
+
tmp$ret$19 = 3;
|
|
1314
1295
|
}
|
|
1315
|
-
index = tmp_0 + tmp$ret$
|
|
1296
|
+
index = tmp_0 + tmp$ret$19 | 0;
|
|
1316
1297
|
} else {
|
|
1317
1298
|
// Inline function 'kotlinx.io.shr' call
|
|
1318
1299
|
if (b0 >> 3 === -2) {
|
|
1319
1300
|
var tmp_2 = index;
|
|
1320
|
-
var
|
|
1301
|
+
var tmp2_1 = index;
|
|
1302
|
+
var tmp$ret$41;
|
|
1321
1303
|
$l$block_10: {
|
|
1322
1304
|
// Inline function 'kotlinx.io.internal.process4Utf8Bytes' call
|
|
1323
|
-
|
|
1324
|
-
if (endIndex <= (beginIndex_2 + 3 | 0)) {
|
|
1325
|
-
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1305
|
+
if (endIndex <= (tmp2_1 + 3 | 0)) {
|
|
1326
1306
|
if (!(65533 === 65533)) {
|
|
1327
|
-
|
|
1307
|
+
var c_11 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1328
1308
|
var _unary__edvuaz_12 = length;
|
|
1329
1309
|
length = _unary__edvuaz_12 + 1 | 0;
|
|
1330
|
-
chars[_unary__edvuaz_12] =
|
|
1331
|
-
|
|
1310
|
+
chars[_unary__edvuaz_12] = c_11;
|
|
1311
|
+
var c_12 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1332
1312
|
var _unary__edvuaz_13 = length;
|
|
1333
1313
|
length = _unary__edvuaz_13 + 1 | 0;
|
|
1334
|
-
chars[_unary__edvuaz_13] =
|
|
1314
|
+
chars[_unary__edvuaz_13] = c_12;
|
|
1335
1315
|
} else {
|
|
1336
|
-
|
|
1316
|
+
var c_13 = _Char___init__impl__6a9atx(65533);
|
|
1337
1317
|
var _unary__edvuaz_14 = length;
|
|
1338
1318
|
length = _unary__edvuaz_14 + 1 | 0;
|
|
1339
|
-
chars[_unary__edvuaz_14] =
|
|
1319
|
+
chars[_unary__edvuaz_14] = c_13;
|
|
1340
1320
|
}
|
|
1341
1321
|
var tmp_3;
|
|
1342
|
-
if (endIndex <= (
|
|
1322
|
+
if (endIndex <= (tmp2_1 + 1 | 0)) {
|
|
1343
1323
|
tmp_3 = true;
|
|
1344
1324
|
} else {
|
|
1345
1325
|
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1346
1326
|
// Inline function 'kotlinx.io.and' call
|
|
1347
|
-
tmp_3 = !((_this__u8e3s4[
|
|
1327
|
+
tmp_3 = !((_this__u8e3s4[tmp2_1 + 1 | 0] & 192) === 128);
|
|
1348
1328
|
}
|
|
1349
1329
|
if (tmp_3) {
|
|
1350
|
-
tmp$ret$
|
|
1330
|
+
tmp$ret$41 = 1;
|
|
1351
1331
|
break $l$block_10;
|
|
1352
1332
|
} else {
|
|
1353
1333
|
var tmp_4;
|
|
1354
|
-
if (endIndex <= (
|
|
1334
|
+
if (endIndex <= (tmp2_1 + 2 | 0)) {
|
|
1355
1335
|
tmp_4 = true;
|
|
1356
1336
|
} else {
|
|
1357
1337
|
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1358
1338
|
// Inline function 'kotlinx.io.and' call
|
|
1359
|
-
tmp_4 = !((_this__u8e3s4[
|
|
1339
|
+
tmp_4 = !((_this__u8e3s4[tmp2_1 + 2 | 0] & 192) === 128);
|
|
1360
1340
|
}
|
|
1361
1341
|
if (tmp_4) {
|
|
1362
|
-
tmp$ret$
|
|
1342
|
+
tmp$ret$41 = 2;
|
|
1363
1343
|
break $l$block_10;
|
|
1364
1344
|
} else {
|
|
1365
|
-
tmp$ret$
|
|
1345
|
+
tmp$ret$41 = 3;
|
|
1366
1346
|
break $l$block_10;
|
|
1367
1347
|
}
|
|
1368
1348
|
}
|
|
1369
1349
|
}
|
|
1370
|
-
var b0_2 = _this__u8e3s4[
|
|
1371
|
-
var b1_1 = _this__u8e3s4[
|
|
1350
|
+
var b0_2 = _this__u8e3s4[tmp2_1];
|
|
1351
|
+
var b1_1 = _this__u8e3s4[tmp2_1 + 1 | 0];
|
|
1372
1352
|
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1373
1353
|
// Inline function 'kotlinx.io.and' call
|
|
1374
1354
|
if (!((b1_1 & 192) === 128)) {
|
|
1375
|
-
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1376
1355
|
if (!(65533 === 65533)) {
|
|
1377
|
-
|
|
1356
|
+
var c_14 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1378
1357
|
var _unary__edvuaz_15 = length;
|
|
1379
1358
|
length = _unary__edvuaz_15 + 1 | 0;
|
|
1380
|
-
chars[_unary__edvuaz_15] =
|
|
1381
|
-
|
|
1359
|
+
chars[_unary__edvuaz_15] = c_14;
|
|
1360
|
+
var c_15 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1382
1361
|
var _unary__edvuaz_16 = length;
|
|
1383
1362
|
length = _unary__edvuaz_16 + 1 | 0;
|
|
1384
|
-
chars[_unary__edvuaz_16] =
|
|
1363
|
+
chars[_unary__edvuaz_16] = c_15;
|
|
1385
1364
|
} else {
|
|
1386
|
-
|
|
1365
|
+
var c_16 = _Char___init__impl__6a9atx(65533);
|
|
1387
1366
|
var _unary__edvuaz_17 = length;
|
|
1388
1367
|
length = _unary__edvuaz_17 + 1 | 0;
|
|
1389
|
-
chars[_unary__edvuaz_17] =
|
|
1368
|
+
chars[_unary__edvuaz_17] = c_16;
|
|
1390
1369
|
}
|
|
1391
|
-
tmp$ret$
|
|
1370
|
+
tmp$ret$41 = 1;
|
|
1392
1371
|
break $l$block_10;
|
|
1393
1372
|
}
|
|
1394
|
-
var b2_0 = _this__u8e3s4[
|
|
1373
|
+
var b2_0 = _this__u8e3s4[tmp2_1 + 2 | 0];
|
|
1395
1374
|
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1396
1375
|
// Inline function 'kotlinx.io.and' call
|
|
1397
1376
|
if (!((b2_0 & 192) === 128)) {
|
|
1398
|
-
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1399
1377
|
if (!(65533 === 65533)) {
|
|
1400
|
-
|
|
1378
|
+
var c_17 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1401
1379
|
var _unary__edvuaz_18 = length;
|
|
1402
1380
|
length = _unary__edvuaz_18 + 1 | 0;
|
|
1403
|
-
chars[_unary__edvuaz_18] =
|
|
1404
|
-
|
|
1381
|
+
chars[_unary__edvuaz_18] = c_17;
|
|
1382
|
+
var c_18 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1405
1383
|
var _unary__edvuaz_19 = length;
|
|
1406
1384
|
length = _unary__edvuaz_19 + 1 | 0;
|
|
1407
|
-
chars[_unary__edvuaz_19] =
|
|
1385
|
+
chars[_unary__edvuaz_19] = c_18;
|
|
1408
1386
|
} else {
|
|
1409
|
-
|
|
1387
|
+
var c_19 = _Char___init__impl__6a9atx(65533);
|
|
1410
1388
|
var _unary__edvuaz_20 = length;
|
|
1411
1389
|
length = _unary__edvuaz_20 + 1 | 0;
|
|
1412
|
-
chars[_unary__edvuaz_20] =
|
|
1390
|
+
chars[_unary__edvuaz_20] = c_19;
|
|
1413
1391
|
}
|
|
1414
|
-
tmp$ret$
|
|
1392
|
+
tmp$ret$41 = 2;
|
|
1415
1393
|
break $l$block_10;
|
|
1416
1394
|
}
|
|
1417
|
-
var b3 = _this__u8e3s4[
|
|
1395
|
+
var b3 = _this__u8e3s4[tmp2_1 + 3 | 0];
|
|
1418
1396
|
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1419
1397
|
// Inline function 'kotlinx.io.and' call
|
|
1420
1398
|
if (!((b3 & 192) === 128)) {
|
|
1421
|
-
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1422
1399
|
if (!(65533 === 65533)) {
|
|
1423
|
-
|
|
1400
|
+
var c_20 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1424
1401
|
var _unary__edvuaz_21 = length;
|
|
1425
1402
|
length = _unary__edvuaz_21 + 1 | 0;
|
|
1426
|
-
chars[_unary__edvuaz_21] =
|
|
1427
|
-
|
|
1403
|
+
chars[_unary__edvuaz_21] = c_20;
|
|
1404
|
+
var c_21 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1428
1405
|
var _unary__edvuaz_22 = length;
|
|
1429
1406
|
length = _unary__edvuaz_22 + 1 | 0;
|
|
1430
|
-
chars[_unary__edvuaz_22] =
|
|
1407
|
+
chars[_unary__edvuaz_22] = c_21;
|
|
1431
1408
|
} else {
|
|
1432
|
-
|
|
1409
|
+
var c_22 = _Char___init__impl__6a9atx(65533);
|
|
1433
1410
|
var _unary__edvuaz_23 = length;
|
|
1434
1411
|
length = _unary__edvuaz_23 + 1 | 0;
|
|
1435
|
-
chars[_unary__edvuaz_23] =
|
|
1412
|
+
chars[_unary__edvuaz_23] = c_22;
|
|
1436
1413
|
}
|
|
1437
|
-
tmp$ret$
|
|
1414
|
+
tmp$ret$41 = 3;
|
|
1438
1415
|
break $l$block_10;
|
|
1439
1416
|
}
|
|
1440
1417
|
var codePoint_1 = 3678080 ^ b3 ^ b2_0 << 6 ^ b1_1 << 12 ^ b0_2 << 18;
|
|
1441
1418
|
if (codePoint_1 > 1114111) {
|
|
1442
|
-
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1443
1419
|
if (!(65533 === 65533)) {
|
|
1444
|
-
|
|
1420
|
+
var c_23 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1445
1421
|
var _unary__edvuaz_24 = length;
|
|
1446
1422
|
length = _unary__edvuaz_24 + 1 | 0;
|
|
1447
|
-
chars[_unary__edvuaz_24] =
|
|
1448
|
-
|
|
1423
|
+
chars[_unary__edvuaz_24] = c_23;
|
|
1424
|
+
var c_24 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1449
1425
|
var _unary__edvuaz_25 = length;
|
|
1450
1426
|
length = _unary__edvuaz_25 + 1 | 0;
|
|
1451
|
-
chars[_unary__edvuaz_25] =
|
|
1427
|
+
chars[_unary__edvuaz_25] = c_24;
|
|
1452
1428
|
} else {
|
|
1453
|
-
|
|
1429
|
+
var c_25 = _Char___init__impl__6a9atx(65533);
|
|
1454
1430
|
var _unary__edvuaz_26 = length;
|
|
1455
1431
|
length = _unary__edvuaz_26 + 1 | 0;
|
|
1456
|
-
chars[_unary__edvuaz_26] =
|
|
1432
|
+
chars[_unary__edvuaz_26] = c_25;
|
|
1457
1433
|
}
|
|
1458
1434
|
} else if (55296 <= codePoint_1 ? codePoint_1 <= 57343 : false) {
|
|
1459
|
-
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1460
1435
|
if (!(65533 === 65533)) {
|
|
1461
|
-
|
|
1436
|
+
var c_26 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1462
1437
|
var _unary__edvuaz_27 = length;
|
|
1463
1438
|
length = _unary__edvuaz_27 + 1 | 0;
|
|
1464
|
-
chars[_unary__edvuaz_27] =
|
|
1465
|
-
|
|
1439
|
+
chars[_unary__edvuaz_27] = c_26;
|
|
1440
|
+
var c_27 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1466
1441
|
var _unary__edvuaz_28 = length;
|
|
1467
1442
|
length = _unary__edvuaz_28 + 1 | 0;
|
|
1468
|
-
chars[_unary__edvuaz_28] =
|
|
1443
|
+
chars[_unary__edvuaz_28] = c_27;
|
|
1469
1444
|
} else {
|
|
1470
|
-
|
|
1445
|
+
var c_28 = _Char___init__impl__6a9atx(65533);
|
|
1471
1446
|
var _unary__edvuaz_29 = length;
|
|
1472
1447
|
length = _unary__edvuaz_29 + 1 | 0;
|
|
1473
|
-
chars[_unary__edvuaz_29] =
|
|
1448
|
+
chars[_unary__edvuaz_29] = c_28;
|
|
1474
1449
|
}
|
|
1475
1450
|
} else if (codePoint_1 < 65536) {
|
|
1476
|
-
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1477
1451
|
if (!(65533 === 65533)) {
|
|
1478
|
-
|
|
1452
|
+
var c_29 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1479
1453
|
var _unary__edvuaz_30 = length;
|
|
1480
1454
|
length = _unary__edvuaz_30 + 1 | 0;
|
|
1481
|
-
chars[_unary__edvuaz_30] =
|
|
1482
|
-
|
|
1455
|
+
chars[_unary__edvuaz_30] = c_29;
|
|
1456
|
+
var c_30 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1483
1457
|
var _unary__edvuaz_31 = length;
|
|
1484
1458
|
length = _unary__edvuaz_31 + 1 | 0;
|
|
1485
|
-
chars[_unary__edvuaz_31] =
|
|
1459
|
+
chars[_unary__edvuaz_31] = c_30;
|
|
1486
1460
|
} else {
|
|
1487
|
-
|
|
1461
|
+
var c_31 = _Char___init__impl__6a9atx(65533);
|
|
1488
1462
|
var _unary__edvuaz_32 = length;
|
|
1489
1463
|
length = _unary__edvuaz_32 + 1 | 0;
|
|
1490
|
-
chars[_unary__edvuaz_32] =
|
|
1464
|
+
chars[_unary__edvuaz_32] = c_31;
|
|
1491
1465
|
}
|
|
1492
1466
|
} else {
|
|
1493
|
-
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1494
1467
|
if (!(codePoint_1 === 65533)) {
|
|
1495
|
-
|
|
1468
|
+
var c_32 = numberToChar((codePoint_1 >>> 10 | 0) + 55232 | 0);
|
|
1496
1469
|
var _unary__edvuaz_33 = length;
|
|
1497
1470
|
length = _unary__edvuaz_33 + 1 | 0;
|
|
1498
|
-
chars[_unary__edvuaz_33] =
|
|
1499
|
-
|
|
1471
|
+
chars[_unary__edvuaz_33] = c_32;
|
|
1472
|
+
var c_33 = numberToChar((codePoint_1 & 1023) + 56320 | 0);
|
|
1500
1473
|
var _unary__edvuaz_34 = length;
|
|
1501
1474
|
length = _unary__edvuaz_34 + 1 | 0;
|
|
1502
|
-
chars[_unary__edvuaz_34] =
|
|
1475
|
+
chars[_unary__edvuaz_34] = c_33;
|
|
1503
1476
|
} else {
|
|
1504
|
-
|
|
1477
|
+
var c_34 = _Char___init__impl__6a9atx(65533);
|
|
1505
1478
|
var _unary__edvuaz_35 = length;
|
|
1506
1479
|
length = _unary__edvuaz_35 + 1 | 0;
|
|
1507
|
-
chars[_unary__edvuaz_35] =
|
|
1480
|
+
chars[_unary__edvuaz_35] = c_34;
|
|
1508
1481
|
}
|
|
1509
1482
|
}
|
|
1510
|
-
tmp$ret$
|
|
1483
|
+
tmp$ret$41 = 4;
|
|
1511
1484
|
}
|
|
1512
|
-
index = tmp_2 + tmp$ret$
|
|
1485
|
+
index = tmp_2 + tmp$ret$41 | 0;
|
|
1513
1486
|
} else {
|
|
1514
|
-
|
|
1487
|
+
var c_35 = _Char___init__impl__6a9atx(65533);
|
|
1515
1488
|
var _unary__edvuaz_36 = length;
|
|
1516
1489
|
length = _unary__edvuaz_36 + 1 | 0;
|
|
1517
|
-
chars[_unary__edvuaz_36] =
|
|
1490
|
+
chars[_unary__edvuaz_36] = c_35;
|
|
1518
1491
|
index = index + 1 | 0;
|
|
1519
1492
|
}
|
|
1520
1493
|
}
|
|
@@ -1542,27 +1515,27 @@ function UnsafeBufferOperations_getInstance() {
|
|
|
1542
1515
|
}
|
|
1543
1516
|
function SegmentReadContextImpl$1() {
|
|
1544
1517
|
}
|
|
1545
|
-
protoOf(SegmentReadContextImpl$1).
|
|
1546
|
-
return segment.
|
|
1518
|
+
protoOf(SegmentReadContextImpl$1).z3l = function (segment, offset) {
|
|
1519
|
+
return segment.q3m(offset);
|
|
1547
1520
|
};
|
|
1548
1521
|
function SegmentWriteContextImpl$1() {
|
|
1549
1522
|
}
|
|
1550
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1551
|
-
segment.
|
|
1523
|
+
protoOf(SegmentWriteContextImpl$1).y3m = function (segment, offset, value) {
|
|
1524
|
+
segment.r3m(offset, value);
|
|
1552
1525
|
};
|
|
1553
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1554
|
-
segment.
|
|
1526
|
+
protoOf(SegmentWriteContextImpl$1).x3m = function (segment, offset, b0, b1) {
|
|
1527
|
+
segment.s3m(offset, b0, b1);
|
|
1555
1528
|
};
|
|
1556
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1557
|
-
segment.
|
|
1529
|
+
protoOf(SegmentWriteContextImpl$1).w3m = function (segment, offset, b0, b1, b2) {
|
|
1530
|
+
segment.t3m(offset, b0, b1, b2);
|
|
1558
1531
|
};
|
|
1559
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1560
|
-
segment.
|
|
1532
|
+
protoOf(SegmentWriteContextImpl$1).v3m = function (segment, offset, b0, b1, b2, b3) {
|
|
1533
|
+
segment.u3m(offset, b0, b1, b2, b3);
|
|
1561
1534
|
};
|
|
1562
1535
|
function BufferIterationContextImpl$1() {
|
|
1563
1536
|
}
|
|
1564
|
-
protoOf(BufferIterationContextImpl$1).
|
|
1565
|
-
return get_SegmentReadContextImpl().
|
|
1537
|
+
protoOf(BufferIterationContextImpl$1).z3l = function (segment, offset) {
|
|
1538
|
+
return get_SegmentReadContextImpl().z3l(segment, offset);
|
|
1566
1539
|
};
|
|
1567
1540
|
var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
|
|
1568
1541
|
function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
@@ -1573,18 +1546,28 @@ function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
|
1573
1546
|
BufferIterationContextImpl = new BufferIterationContextImpl$1();
|
|
1574
1547
|
}
|
|
1575
1548
|
}
|
|
1576
|
-
function
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1549
|
+
function EOFException_init_$Init$($this) {
|
|
1550
|
+
IOException_init_$Init$($this);
|
|
1551
|
+
EOFException.call($this);
|
|
1552
|
+
return $this;
|
|
1553
|
+
}
|
|
1554
|
+
function EOFException_init_$Create$() {
|
|
1555
|
+
var tmp = EOFException_init_$Init$(objectCreate(protoOf(EOFException)));
|
|
1556
|
+
captureStack(tmp, EOFException_init_$Create$);
|
|
1557
|
+
return tmp;
|
|
1558
|
+
}
|
|
1559
|
+
function EOFException_init_$Init$_0(message, $this) {
|
|
1560
|
+
IOException_init_$Init$_0(message, $this);
|
|
1561
|
+
EOFException.call($this);
|
|
1562
|
+
return $this;
|
|
1563
|
+
}
|
|
1564
|
+
function EOFException_init_$Create$_0(message) {
|
|
1565
|
+
var tmp = EOFException_init_$Init$_0(message, objectCreate(protoOf(EOFException)));
|
|
1566
|
+
captureStack(tmp, EOFException_init_$Create$_0);
|
|
1567
|
+
return tmp;
|
|
1568
|
+
}
|
|
1569
|
+
function EOFException() {
|
|
1570
|
+
captureStack(this, EOFException);
|
|
1588
1571
|
}
|
|
1589
1572
|
function IOException_init_$Init$($this) {
|
|
1590
1573
|
Exception_init_$Init$($this);
|
|
@@ -1619,39 +1602,29 @@ function IOException_init_$Create$_1(message, cause) {
|
|
|
1619
1602
|
function IOException() {
|
|
1620
1603
|
captureStack(this, IOException);
|
|
1621
1604
|
}
|
|
1622
|
-
function
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
EOFException.call($this);
|
|
1635
|
-
return $this;
|
|
1636
|
-
}
|
|
1637
|
-
function EOFException_init_$Create$_0(message) {
|
|
1638
|
-
var tmp = EOFException_init_$Init$_0(message, objectCreate(protoOf(EOFException)));
|
|
1639
|
-
captureStack(tmp, EOFException_init_$Create$_0);
|
|
1640
|
-
return tmp;
|
|
1641
|
-
}
|
|
1642
|
-
function EOFException() {
|
|
1643
|
-
captureStack(this, EOFException);
|
|
1605
|
+
function withCaughtException(block) {
|
|
1606
|
+
try {
|
|
1607
|
+
block();
|
|
1608
|
+
return null;
|
|
1609
|
+
} catch ($p) {
|
|
1610
|
+
if ($p instanceof Error) {
|
|
1611
|
+
var t = $p;
|
|
1612
|
+
return t;
|
|
1613
|
+
} else {
|
|
1614
|
+
throw $p;
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1644
1617
|
}
|
|
1645
1618
|
function SegmentPool() {
|
|
1646
|
-
this.
|
|
1647
|
-
this.
|
|
1619
|
+
this.o3l_1 = 0;
|
|
1620
|
+
this.p3l_1 = 0;
|
|
1648
1621
|
}
|
|
1649
|
-
protoOf(SegmentPool).
|
|
1650
|
-
return Companion_instance.
|
|
1622
|
+
protoOf(SegmentPool).q3l = function () {
|
|
1623
|
+
return Companion_instance.k3m();
|
|
1651
1624
|
};
|
|
1652
|
-
protoOf(SegmentPool).
|
|
1625
|
+
protoOf(SegmentPool).a3m = function (segment) {
|
|
1653
1626
|
};
|
|
1654
|
-
protoOf(SegmentPool).
|
|
1627
|
+
protoOf(SegmentPool).m3m = function () {
|
|
1655
1628
|
return AlwaysSharedCopyTracker_getInstance();
|
|
1656
1629
|
};
|
|
1657
1630
|
var SegmentPool_instance;
|
|
@@ -1660,34 +1633,38 @@ function SegmentPool_getInstance() {
|
|
|
1660
1633
|
}
|
|
1661
1634
|
function get_path() {
|
|
1662
1635
|
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1636
|
+
var tmp0 = path$delegate;
|
|
1637
|
+
var tmp = KProperty0;
|
|
1663
1638
|
// Inline function 'kotlin.getValue' call
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
return this_0.b1();
|
|
1639
|
+
getPropertyCallableRef('path', 0, tmp, _get_path_$ref_hpvpv9(), null);
|
|
1640
|
+
return tmp0.l1();
|
|
1667
1641
|
}
|
|
1668
1642
|
var path$delegate;
|
|
1669
1643
|
function get_fs() {
|
|
1670
1644
|
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1645
|
+
var tmp0 = fs$delegate;
|
|
1646
|
+
var tmp = KProperty0;
|
|
1671
1647
|
// Inline function 'kotlin.getValue' call
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
return this_0.b1();
|
|
1648
|
+
getPropertyCallableRef('fs', 0, tmp, _get_fs_$ref_rnlob1(), null);
|
|
1649
|
+
return tmp0.l1();
|
|
1675
1650
|
}
|
|
1676
1651
|
var fs$delegate;
|
|
1677
1652
|
function get_os() {
|
|
1678
1653
|
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1654
|
+
var tmp0 = os$delegate;
|
|
1655
|
+
var tmp = KProperty0;
|
|
1679
1656
|
// Inline function 'kotlin.getValue' call
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
return this_0.b1();
|
|
1657
|
+
getPropertyCallableRef('os', 0, tmp, _get_os_$ref_hoy4d2(), null);
|
|
1658
|
+
return tmp0.l1();
|
|
1683
1659
|
}
|
|
1684
1660
|
var os$delegate;
|
|
1685
1661
|
function get_buffer() {
|
|
1686
1662
|
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1663
|
+
var tmp0 = buffer$delegate;
|
|
1664
|
+
var tmp = KProperty0;
|
|
1687
1665
|
// Inline function 'kotlin.getValue' call
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
return this_0.b1();
|
|
1666
|
+
getPropertyCallableRef('buffer', 0, tmp, _get_buffer_$ref_mc964a(), null);
|
|
1667
|
+
return tmp0.l1();
|
|
1691
1668
|
}
|
|
1692
1669
|
var buffer$delegate;
|
|
1693
1670
|
function path$delegate$lambda() {
|
|
@@ -1706,6 +1683,11 @@ function path$delegate$lambda() {
|
|
|
1706
1683
|
}
|
|
1707
1684
|
return tmp;
|
|
1708
1685
|
}
|
|
1686
|
+
function _get_path_$ref_hpvpv9() {
|
|
1687
|
+
return function () {
|
|
1688
|
+
return get_path();
|
|
1689
|
+
};
|
|
1690
|
+
}
|
|
1709
1691
|
function fs$delegate$lambda() {
|
|
1710
1692
|
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1711
1693
|
var tmp;
|
|
@@ -1722,6 +1704,11 @@ function fs$delegate$lambda() {
|
|
|
1722
1704
|
}
|
|
1723
1705
|
return tmp;
|
|
1724
1706
|
}
|
|
1707
|
+
function _get_fs_$ref_rnlob1() {
|
|
1708
|
+
return function () {
|
|
1709
|
+
return get_fs();
|
|
1710
|
+
};
|
|
1711
|
+
}
|
|
1725
1712
|
function os$delegate$lambda() {
|
|
1726
1713
|
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1727
1714
|
var tmp;
|
|
@@ -1738,6 +1725,11 @@ function os$delegate$lambda() {
|
|
|
1738
1725
|
}
|
|
1739
1726
|
return tmp;
|
|
1740
1727
|
}
|
|
1728
|
+
function _get_os_$ref_hoy4d2() {
|
|
1729
|
+
return function () {
|
|
1730
|
+
return get_os();
|
|
1731
|
+
};
|
|
1732
|
+
}
|
|
1741
1733
|
function buffer$delegate$lambda() {
|
|
1742
1734
|
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1743
1735
|
var tmp;
|
|
@@ -1754,25 +1746,10 @@ function buffer$delegate$lambda() {
|
|
|
1754
1746
|
}
|
|
1755
1747
|
return tmp;
|
|
1756
1748
|
}
|
|
1757
|
-
function
|
|
1758
|
-
return
|
|
1759
|
-
return get_path();
|
|
1760
|
-
}, null);
|
|
1761
|
-
}
|
|
1762
|
-
function fs$factory() {
|
|
1763
|
-
return getPropertyCallableRef('fs', 0, KProperty0, function () {
|
|
1764
|
-
return get_fs();
|
|
1765
|
-
}, null);
|
|
1766
|
-
}
|
|
1767
|
-
function os$factory() {
|
|
1768
|
-
return getPropertyCallableRef('os', 0, KProperty0, function () {
|
|
1769
|
-
return get_os();
|
|
1770
|
-
}, null);
|
|
1771
|
-
}
|
|
1772
|
-
function buffer$factory() {
|
|
1773
|
-
return getPropertyCallableRef('buffer', 0, KProperty0, function () {
|
|
1749
|
+
function _get_buffer_$ref_mc964a() {
|
|
1750
|
+
return function () {
|
|
1774
1751
|
return get_buffer();
|
|
1775
|
-
}
|
|
1752
|
+
};
|
|
1776
1753
|
}
|
|
1777
1754
|
var properties_initialized_nodeModulesJs_kt_oooz8e;
|
|
1778
1755
|
function _init_properties_nodeModulesJs_kt__ngjjzw() {
|
|
@@ -1800,7 +1777,7 @@ function FileNotFoundException(message) {
|
|
|
1800
1777
|
}
|
|
1801
1778
|
function SystemFileSystem$o$metadataOrNull$lambda($path, $metadata) {
|
|
1802
1779
|
return function () {
|
|
1803
|
-
var tmp0_elvis_lhs = get_fs().statSync($path.
|
|
1780
|
+
var tmp0_elvis_lhs = get_fs().statSync($path.j3n_1);
|
|
1804
1781
|
var tmp;
|
|
1805
1782
|
if (tmp0_elvis_lhs == null) {
|
|
1806
1783
|
return Unit_instance;
|
|
@@ -1810,23 +1787,23 @@ function SystemFileSystem$o$metadataOrNull$lambda($path, $metadata) {
|
|
|
1810
1787
|
var stat = tmp;
|
|
1811
1788
|
var mode = stat.mode;
|
|
1812
1789
|
var isFile = (mode & get_fs().constants.S_IFMT) === get_fs().constants.S_IFREG;
|
|
1813
|
-
$metadata._v = new FileMetadata(isFile, (mode & get_fs().constants.S_IFMT) === get_fs().constants.S_IFDIR, isFile ?
|
|
1790
|
+
$metadata._v = new FileMetadata(isFile, (mode & get_fs().constants.S_IFMT) === get_fs().constants.S_IFDIR, isFile ? fromInt(stat.size) : new Long(-1, -1));
|
|
1814
1791
|
return Unit_instance;
|
|
1815
1792
|
};
|
|
1816
1793
|
}
|
|
1817
1794
|
function SystemFileSystem$1() {
|
|
1818
1795
|
SystemFileSystemImpl.call(this);
|
|
1819
1796
|
}
|
|
1820
|
-
protoOf(SystemFileSystem$1).
|
|
1821
|
-
return get_fs().existsSync(path.
|
|
1797
|
+
protoOf(SystemFileSystem$1).c3n = function (path) {
|
|
1798
|
+
return get_fs().existsSync(path.j3n_1);
|
|
1822
1799
|
};
|
|
1823
|
-
protoOf(SystemFileSystem$1).
|
|
1824
|
-
var metadata = this.
|
|
1800
|
+
protoOf(SystemFileSystem$1).d3n = function (path, mustCreate) {
|
|
1801
|
+
var metadata = this.h3n(path);
|
|
1825
1802
|
if (!(metadata == null)) {
|
|
1826
1803
|
if (mustCreate) {
|
|
1827
1804
|
throw IOException_init_$Create$_0('Path already exists: ' + path.toString());
|
|
1828
1805
|
}
|
|
1829
|
-
if (metadata.
|
|
1806
|
+
if (metadata.z3m_1) {
|
|
1830
1807
|
throw IOException_init_$Create$_0("Path already exists and it's a file: " + path.toString());
|
|
1831
1808
|
}
|
|
1832
1809
|
return Unit_instance;
|
|
@@ -1834,20 +1811,19 @@ protoOf(SystemFileSystem$1).y2h = function (path, mustCreate) {
|
|
|
1834
1811
|
// Inline function 'kotlin.collections.arrayListOf' call
|
|
1835
1812
|
var parts = ArrayList_init_$Create$();
|
|
1836
1813
|
var p = path;
|
|
1837
|
-
while (!(p == null) && !this.
|
|
1838
|
-
parts.
|
|
1839
|
-
p = p.
|
|
1814
|
+
while (!(p == null) && !this.c3n(p)) {
|
|
1815
|
+
parts.x(p.toString());
|
|
1816
|
+
p = p.k3n();
|
|
1840
1817
|
}
|
|
1841
1818
|
// Inline function 'kotlin.collections.forEach' call
|
|
1842
|
-
var
|
|
1843
|
-
while (
|
|
1844
|
-
var element =
|
|
1845
|
-
// Inline function 'kotlinx.io.files.<no name provided>.createDirectories.<anonymous>' call
|
|
1819
|
+
var _iterator__ex2g4s = asReversed(parts).t();
|
|
1820
|
+
while (_iterator__ex2g4s.u()) {
|
|
1821
|
+
var element = _iterator__ex2g4s.v();
|
|
1846
1822
|
get_fs().mkdirSync(element);
|
|
1847
1823
|
}
|
|
1848
1824
|
};
|
|
1849
|
-
protoOf(SystemFileSystem$1).
|
|
1850
|
-
if (!this.
|
|
1825
|
+
protoOf(SystemFileSystem$1).h3n = function (path) {
|
|
1826
|
+
if (!this.c3n(path))
|
|
1851
1827
|
return null;
|
|
1852
1828
|
var metadata = {_v: null};
|
|
1853
1829
|
var tmp2_safe_receiver = withCaughtException(SystemFileSystem$o$metadataOrNull$lambda(path, metadata));
|
|
@@ -1855,51 +1831,46 @@ protoOf(SystemFileSystem$1).c2i = function (path) {
|
|
|
1855
1831
|
null;
|
|
1856
1832
|
else {
|
|
1857
1833
|
// Inline function 'kotlin.also' call
|
|
1858
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
1859
|
-
// Inline function 'kotlinx.io.files.<no name provided>.metadataOrNull.<anonymous>' call
|
|
1860
1834
|
throw IOException_init_$Create$_1('Stat failed for ' + path.toString(), tmp2_safe_receiver);
|
|
1861
1835
|
}
|
|
1862
1836
|
return metadata._v;
|
|
1863
1837
|
};
|
|
1864
|
-
protoOf(SystemFileSystem$1).
|
|
1838
|
+
protoOf(SystemFileSystem$1).e3n = function (path) {
|
|
1865
1839
|
return new FileSource(path);
|
|
1866
1840
|
};
|
|
1867
|
-
protoOf(SystemFileSystem$1).
|
|
1841
|
+
protoOf(SystemFileSystem$1).f3n = function (path, append) {
|
|
1868
1842
|
return new FileSink(path, append);
|
|
1869
1843
|
};
|
|
1870
|
-
protoOf(SystemFileSystem$1).
|
|
1871
|
-
var tmp0_elvis_lhs = this.
|
|
1844
|
+
protoOf(SystemFileSystem$1).i3n = function (directory) {
|
|
1845
|
+
var tmp0_elvis_lhs = this.h3n(directory);
|
|
1872
1846
|
var tmp;
|
|
1873
1847
|
if (tmp0_elvis_lhs == null) {
|
|
1874
|
-
throw new FileNotFoundException(directory.
|
|
1848
|
+
throw new FileNotFoundException(directory.j3n_1);
|
|
1875
1849
|
} else {
|
|
1876
1850
|
tmp = tmp0_elvis_lhs;
|
|
1877
1851
|
}
|
|
1878
1852
|
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.
|
|
1853
|
+
if (!metadata.a3n_1)
|
|
1854
|
+
throw IOException_init_$Create$_0('Not a directory: ' + directory.j3n_1);
|
|
1855
|
+
var tmp1_elvis_lhs = get_fs().opendirSync(directory.j3n_1);
|
|
1882
1856
|
var tmp_0;
|
|
1883
1857
|
if (tmp1_elvis_lhs == null) {
|
|
1884
|
-
throw IOException_init_$Create$_0('Unable to read directory: ' + directory.
|
|
1858
|
+
throw IOException_init_$Create$_0('Unable to read directory: ' + directory.j3n_1);
|
|
1885
1859
|
} else {
|
|
1886
1860
|
tmp_0 = tmp1_elvis_lhs;
|
|
1887
1861
|
}
|
|
1888
1862
|
var dir = tmp_0;
|
|
1889
1863
|
try {
|
|
1890
1864
|
// Inline function 'kotlin.collections.buildList' call
|
|
1891
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
1892
1865
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1893
1866
|
// Inline function 'kotlin.apply' call
|
|
1894
1867
|
var this_0 = ArrayList_init_$Create$();
|
|
1895
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
1896
|
-
// Inline function 'kotlinx.io.files.<no name provided>.list.<anonymous>' call
|
|
1897
1868
|
var child = dir.readSync();
|
|
1898
1869
|
while (!(child == null)) {
|
|
1899
|
-
this_0.
|
|
1870
|
+
this_0.x(Path(directory, [child.name]));
|
|
1900
1871
|
child = dir.readSync();
|
|
1901
1872
|
}
|
|
1902
|
-
return this_0.
|
|
1873
|
+
return this_0.o5();
|
|
1903
1874
|
}finally {
|
|
1904
1875
|
dir.closeSync();
|
|
1905
1876
|
}
|
|
@@ -1914,34 +1885,35 @@ function _init_properties_FileSystemNodeJs_kt__m4c3u() {
|
|
|
1914
1885
|
}
|
|
1915
1886
|
function get_SystemPathSeparator() {
|
|
1916
1887
|
_init_properties_PathsNodeJs_kt__bvvvsp();
|
|
1888
|
+
var tmp0 = SystemPathSeparator$delegate;
|
|
1889
|
+
var tmp = KProperty0;
|
|
1917
1890
|
// Inline function 'kotlin.getValue' call
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
return this_0.b1().x_1;
|
|
1891
|
+
getPropertyCallableRef('SystemPathSeparator', 0, tmp, _get_SystemPathSeparator_$ref_lvdbpt(), null);
|
|
1892
|
+
return tmp0.l1().h1_1;
|
|
1921
1893
|
}
|
|
1922
1894
|
var SystemPathSeparator$delegate;
|
|
1923
1895
|
function Path_1(rawPath, any) {
|
|
1924
|
-
this.
|
|
1896
|
+
this.j3n_1 = removeTrailingSeparators(rawPath);
|
|
1925
1897
|
}
|
|
1926
|
-
protoOf(Path_1).
|
|
1898
|
+
protoOf(Path_1).k3n = function () {
|
|
1927
1899
|
// Inline function 'kotlin.text.isEmpty' call
|
|
1928
|
-
var this_0 = this.
|
|
1900
|
+
var this_0 = this.j3n_1;
|
|
1929
1901
|
if (charSequenceLength(this_0) === 0)
|
|
1930
1902
|
return null;
|
|
1931
1903
|
if (get_isWindows()) {
|
|
1932
|
-
if (!contains(this.
|
|
1904
|
+
if (!contains(this.j3n_1, _Char___init__impl__6a9atx(47)) && !contains(this.j3n_1, _Char___init__impl__6a9atx(92))) {
|
|
1933
1905
|
return null;
|
|
1934
1906
|
}
|
|
1935
|
-
} else if (!contains(this.
|
|
1907
|
+
} else if (!contains(this.j3n_1, get_SystemPathSeparator())) {
|
|
1936
1908
|
return null;
|
|
1937
1909
|
}
|
|
1938
|
-
var p = get_path().dirname(this.
|
|
1910
|
+
var p = get_path().dirname(this.j3n_1);
|
|
1939
1911
|
var tmp;
|
|
1940
1912
|
// Inline function 'kotlin.text.isEmpty' call
|
|
1941
1913
|
if (charSequenceLength(p) === 0) {
|
|
1942
1914
|
tmp = null;
|
|
1943
1915
|
} else {
|
|
1944
|
-
if (p === this.
|
|
1916
|
+
if (p === this.j3n_1) {
|
|
1945
1917
|
tmp = null;
|
|
1946
1918
|
} else {
|
|
1947
1919
|
tmp = Path_2(p);
|
|
@@ -1949,12 +1921,12 @@ protoOf(Path_1).i2i = function () {
|
|
|
1949
1921
|
}
|
|
1950
1922
|
return tmp;
|
|
1951
1923
|
};
|
|
1952
|
-
protoOf(Path_1).
|
|
1924
|
+
protoOf(Path_1).m = function () {
|
|
1953
1925
|
// Inline function 'kotlin.text.isEmpty' call
|
|
1954
|
-
var this_0 = this.
|
|
1926
|
+
var this_0 = this.j3n_1;
|
|
1955
1927
|
if (charSequenceLength(this_0) === 0)
|
|
1956
1928
|
return '';
|
|
1957
|
-
var p = get_path().basename(this.
|
|
1929
|
+
var p = get_path().basename(this.j3n_1);
|
|
1958
1930
|
var tmp;
|
|
1959
1931
|
// Inline function 'kotlin.text.isEmpty' call
|
|
1960
1932
|
if (charSequenceLength(p) === 0) {
|
|
@@ -1965,21 +1937,25 @@ protoOf(Path_1).s2 = function () {
|
|
|
1965
1937
|
return tmp;
|
|
1966
1938
|
};
|
|
1967
1939
|
protoOf(Path_1).toString = function () {
|
|
1968
|
-
return this.
|
|
1940
|
+
return this.j3n_1;
|
|
1969
1941
|
};
|
|
1970
1942
|
protoOf(Path_1).equals = function (other) {
|
|
1971
1943
|
if (this === other)
|
|
1972
1944
|
return true;
|
|
1973
1945
|
if (!(other instanceof Path_1))
|
|
1974
1946
|
return false;
|
|
1975
|
-
return this.
|
|
1947
|
+
return this.j3n_1 === other.j3n_1;
|
|
1976
1948
|
};
|
|
1977
1949
|
protoOf(Path_1).hashCode = function () {
|
|
1978
|
-
return getStringHashCode(this.
|
|
1950
|
+
return getStringHashCode(this.j3n_1);
|
|
1979
1951
|
};
|
|
1952
|
+
function Path_2(path) {
|
|
1953
|
+
_init_properties_PathsNodeJs_kt__bvvvsp();
|
|
1954
|
+
return new Path_1(path, null);
|
|
1955
|
+
}
|
|
1980
1956
|
function open($this, path) {
|
|
1981
|
-
if (!get_fs().existsSync(path.
|
|
1982
|
-
throw new FileNotFoundException('File does not exist: ' + path.
|
|
1957
|
+
if (!get_fs().existsSync(path.j3n_1)) {
|
|
1958
|
+
throw new FileNotFoundException('File does not exist: ' + path.j3n_1);
|
|
1983
1959
|
}
|
|
1984
1960
|
var fd = {_v: -1};
|
|
1985
1961
|
var tmp3_safe_receiver = withCaughtException(FileSource$open$lambda(fd, path));
|
|
@@ -1987,77 +1963,77 @@ function open($this, path) {
|
|
|
1987
1963
|
null;
|
|
1988
1964
|
else {
|
|
1989
1965
|
// Inline function 'kotlin.also' call
|
|
1990
|
-
|
|
1991
|
-
// Inline function 'kotlinx.io.files.FileSource.open.<anonymous>' call
|
|
1992
|
-
throw IOException_init_$Create$_1('Failed to open a file ' + path.h2i_1 + '.', tmp3_safe_receiver);
|
|
1966
|
+
throw IOException_init_$Create$_1('Failed to open a file ' + path.j3n_1 + '.', tmp3_safe_receiver);
|
|
1993
1967
|
}
|
|
1994
1968
|
if (fd._v < 0)
|
|
1995
|
-
throw IOException_init_$Create$_0('Failed to open a file ' + path.
|
|
1969
|
+
throw IOException_init_$Create$_0('Failed to open a file ' + path.j3n_1 + '.');
|
|
1996
1970
|
return fd._v;
|
|
1997
1971
|
}
|
|
1998
1972
|
function FileSource$open$lambda($fd, $path) {
|
|
1999
1973
|
return function () {
|
|
2000
|
-
$fd._v = get_fs().openSync($path.
|
|
1974
|
+
$fd._v = get_fs().openSync($path.j3n_1, 'r');
|
|
2001
1975
|
return Unit_instance;
|
|
2002
1976
|
};
|
|
2003
1977
|
}
|
|
2004
1978
|
function FileSource$readAtMostTo$lambda(this$0) {
|
|
2005
1979
|
return function () {
|
|
2006
|
-
this$0.
|
|
1980
|
+
this$0.m3n_1 = get_fs().readFileSync(this$0.p3n_1, null);
|
|
2007
1981
|
return Unit_instance;
|
|
2008
1982
|
};
|
|
2009
1983
|
}
|
|
2010
1984
|
function FileSource(path) {
|
|
2011
|
-
this.
|
|
2012
|
-
this.
|
|
2013
|
-
this.
|
|
2014
|
-
this.
|
|
2015
|
-
this.
|
|
1985
|
+
this.l3n_1 = path;
|
|
1986
|
+
this.m3n_1 = null;
|
|
1987
|
+
this.n3n_1 = false;
|
|
1988
|
+
this.o3n_1 = 0;
|
|
1989
|
+
this.p3n_1 = open(this, this.l3n_1);
|
|
2016
1990
|
}
|
|
2017
|
-
protoOf(FileSource).
|
|
1991
|
+
protoOf(FileSource).l3l = function (sink, byteCount) {
|
|
2018
1992
|
// Inline function 'kotlin.check' call
|
|
2019
|
-
|
|
2020
|
-
if (!!this.l2i_1) {
|
|
2021
|
-
// Inline function 'kotlinx.io.files.FileSource.readAtMostTo.<anonymous>' call
|
|
1993
|
+
if (!!this.n3n_1) {
|
|
2022
1994
|
var message = 'Source is closed.';
|
|
2023
1995
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
2024
1996
|
}
|
|
2025
|
-
if (byteCount
|
|
1997
|
+
if (equalsLong(byteCount, new Long(0, 0))) {
|
|
2026
1998
|
return new Long(0, 0);
|
|
2027
1999
|
}
|
|
2028
|
-
if (this.
|
|
2000
|
+
if (this.m3n_1 === null) {
|
|
2029
2001
|
var tmp4_safe_receiver = withCaughtException(FileSource$readAtMostTo$lambda(this));
|
|
2030
2002
|
if (tmp4_safe_receiver == null)
|
|
2031
2003
|
null;
|
|
2032
2004
|
else {
|
|
2033
2005
|
// Inline function 'kotlin.also' call
|
|
2034
|
-
|
|
2035
|
-
// Inline function 'kotlinx.io.files.FileSource.readAtMostTo.<anonymous>' call
|
|
2036
|
-
throw IOException_init_$Create$_1('Failed to read data from ' + this.j2i_1.h2i_1, tmp4_safe_receiver);
|
|
2006
|
+
throw IOException_init_$Create$_1('Failed to read data from ' + this.l3n_1.j3n_1, tmp4_safe_receiver);
|
|
2037
2007
|
}
|
|
2038
2008
|
}
|
|
2039
|
-
var len = ensureNotNull(this.
|
|
2040
|
-
if (this.
|
|
2009
|
+
var len = ensureNotNull(this.m3n_1).length;
|
|
2010
|
+
if (this.o3n_1 >= len) {
|
|
2041
2011
|
return new Long(-1, -1);
|
|
2042
2012
|
}
|
|
2043
2013
|
// Inline function 'kotlinx.io.minOf' call
|
|
2044
|
-
var b = len - this.
|
|
2014
|
+
var b = len - this.o3n_1 | 0;
|
|
2045
2015
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
2046
|
-
var b_0 =
|
|
2047
|
-
var bytesToRead = byteCount
|
|
2016
|
+
var b_0 = fromInt(b);
|
|
2017
|
+
var bytesToRead = compare(byteCount, b_0) <= 0 ? byteCount : b_0;
|
|
2048
2018
|
var inductionVariable = new Long(0, 0);
|
|
2049
|
-
if (inductionVariable
|
|
2019
|
+
if (compare(inductionVariable, bytesToRead) < 0)
|
|
2050
2020
|
do {
|
|
2051
2021
|
var i = inductionVariable;
|
|
2052
|
-
inductionVariable = inductionVariable
|
|
2053
|
-
var tmp = ensureNotNull(this.
|
|
2054
|
-
var _unary__edvuaz = this.
|
|
2055
|
-
this.
|
|
2056
|
-
sink.
|
|
2022
|
+
inductionVariable = add(inductionVariable, new Long(1, 0));
|
|
2023
|
+
var tmp = ensureNotNull(this.m3n_1);
|
|
2024
|
+
var _unary__edvuaz = this.o3n_1;
|
|
2025
|
+
this.o3n_1 = _unary__edvuaz + 1 | 0;
|
|
2026
|
+
sink.x3l(tmp.readInt8(_unary__edvuaz));
|
|
2057
2027
|
}
|
|
2058
|
-
while (inductionVariable
|
|
2028
|
+
while (compare(inductionVariable, bytesToRead) < 0);
|
|
2059
2029
|
return bytesToRead;
|
|
2060
2030
|
};
|
|
2031
|
+
protoOf(FileSource).d4 = function () {
|
|
2032
|
+
if (!this.n3n_1) {
|
|
2033
|
+
this.n3n_1 = true;
|
|
2034
|
+
get_fs().closeSync(this.p3n_1);
|
|
2035
|
+
}
|
|
2036
|
+
};
|
|
2061
2037
|
function open_0($this, path, append) {
|
|
2062
2038
|
var flags = append ? 'a' : 'w';
|
|
2063
2039
|
var fd = {_v: -1};
|
|
@@ -2066,59 +2042,52 @@ function open_0($this, path, append) {
|
|
|
2066
2042
|
null;
|
|
2067
2043
|
else {
|
|
2068
2044
|
// Inline function 'kotlin.also' call
|
|
2069
|
-
|
|
2070
|
-
// Inline function 'kotlinx.io.files.FileSink.open.<anonymous>' call
|
|
2071
|
-
throw IOException_init_$Create$_1('Failed to open a file ' + path.h2i_1 + '.', tmp5_safe_receiver);
|
|
2045
|
+
throw IOException_init_$Create$_1('Failed to open a file ' + path.j3n_1 + '.', tmp5_safe_receiver);
|
|
2072
2046
|
}
|
|
2073
2047
|
if (fd._v < 0)
|
|
2074
|
-
throw IOException_init_$Create$_0('Failed to open a file ' + path.
|
|
2048
|
+
throw IOException_init_$Create$_0('Failed to open a file ' + path.j3n_1 + '.');
|
|
2075
2049
|
return fd._v;
|
|
2076
2050
|
}
|
|
2077
2051
|
function FileSink$open$lambda($fd, $path, $flags) {
|
|
2078
2052
|
return function () {
|
|
2079
|
-
$fd._v = get_fs().openSync($path.
|
|
2053
|
+
$fd._v = get_fs().openSync($path.j3n_1, $flags);
|
|
2080
2054
|
return Unit_instance;
|
|
2081
2055
|
};
|
|
2082
2056
|
}
|
|
2083
2057
|
function FileSink$write$lambda(this$0, $buf) {
|
|
2084
2058
|
return function () {
|
|
2085
|
-
get_fs().writeFileSync(this$0.
|
|
2059
|
+
get_fs().writeFileSync(this$0.r3n_1, $buf);
|
|
2086
2060
|
return Unit_instance;
|
|
2087
2061
|
};
|
|
2088
2062
|
}
|
|
2089
2063
|
function FileSink(path, append) {
|
|
2090
|
-
this.
|
|
2091
|
-
this.
|
|
2064
|
+
this.q3n_1 = false;
|
|
2065
|
+
this.r3n_1 = open_0(this, path, append);
|
|
2092
2066
|
}
|
|
2093
|
-
protoOf(FileSink).
|
|
2067
|
+
protoOf(FileSink).m3l = function (source, byteCount) {
|
|
2094
2068
|
// Inline function 'kotlin.check' call
|
|
2095
|
-
|
|
2096
|
-
if (!!this.o2i_1) {
|
|
2097
|
-
// Inline function 'kotlinx.io.files.FileSink.write.<anonymous>' call
|
|
2069
|
+
if (!!this.q3n_1) {
|
|
2098
2070
|
var message = 'Sink is closed.';
|
|
2099
2071
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
2100
2072
|
}
|
|
2101
|
-
if (byteCount
|
|
2073
|
+
if (equalsLong(byteCount, new Long(0, 0))) {
|
|
2102
2074
|
return Unit_instance;
|
|
2103
2075
|
}
|
|
2104
2076
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
2105
|
-
var b = source.
|
|
2106
|
-
var remainingBytes = byteCount
|
|
2107
|
-
while (remainingBytes
|
|
2077
|
+
var b = source.a1();
|
|
2078
|
+
var remainingBytes = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
2079
|
+
while (compare(remainingBytes, new Long(0, 0)) > 0) {
|
|
2108
2080
|
var segmentBytes = 0;
|
|
2109
2081
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.readFromHead' call
|
|
2110
2082
|
// Inline function 'kotlin.require' call
|
|
2111
|
-
|
|
2112
|
-
if (!!source.t2f()) {
|
|
2113
|
-
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.readFromHead.<anonymous>' call
|
|
2083
|
+
if (!!source.v3k()) {
|
|
2114
2084
|
var message_0 = 'Buffer is empty';
|
|
2115
2085
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
2116
2086
|
}
|
|
2117
|
-
var head = ensureNotNull(source.
|
|
2118
|
-
|
|
2119
|
-
var
|
|
2120
|
-
|
|
2121
|
-
segmentBytes = head.a2g_1 - headPos | 0;
|
|
2087
|
+
var head = ensureNotNull(source.r3k_1);
|
|
2088
|
+
var tmp0 = head.p3m(true);
|
|
2089
|
+
var tmp2 = head.b3l_1;
|
|
2090
|
+
segmentBytes = head.c3l_1 - tmp2 | 0;
|
|
2122
2091
|
var buf = get_buffer().Buffer.allocUnsafe(segmentBytes);
|
|
2123
2092
|
var inductionVariable = 0;
|
|
2124
2093
|
var last = segmentBytes;
|
|
@@ -2126,7 +2095,7 @@ protoOf(FileSink).k2g = function (source, byteCount) {
|
|
|
2126
2095
|
do {
|
|
2127
2096
|
var offset = inductionVariable;
|
|
2128
2097
|
inductionVariable = inductionVariable + 1 | 0;
|
|
2129
|
-
buf.writeInt8(
|
|
2098
|
+
buf.writeInt8(tmp0[tmp2 + offset | 0], offset);
|
|
2130
2099
|
}
|
|
2131
2100
|
while (inductionVariable < last);
|
|
2132
2101
|
var tmp6_safe_receiver = withCaughtException(FileSink$write$lambda(this, buf));
|
|
@@ -2134,49 +2103,44 @@ protoOf(FileSink).k2g = function (source, byteCount) {
|
|
|
2134
2103
|
null;
|
|
2135
2104
|
else {
|
|
2136
2105
|
// Inline function 'kotlin.also' call
|
|
2137
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
2138
|
-
// Inline function 'kotlinx.io.files.FileSink.write.<anonymous>.<anonymous>' call
|
|
2139
2106
|
throw IOException_init_$Create$_1('Write failed', tmp6_safe_receiver);
|
|
2140
2107
|
}
|
|
2141
2108
|
var bytesRead = segmentBytes;
|
|
2142
2109
|
if (!(bytesRead === 0)) {
|
|
2143
2110
|
if (bytesRead < 0)
|
|
2144
2111
|
throw IllegalStateException_init_$Create$('Returned negative read bytes count');
|
|
2145
|
-
if (bytesRead > head.
|
|
2112
|
+
if (bytesRead > head.a1())
|
|
2146
2113
|
throw IllegalStateException_init_$Create$('Returned too many bytes');
|
|
2147
|
-
source.
|
|
2114
|
+
source.h3l(fromInt(bytesRead));
|
|
2148
2115
|
}
|
|
2116
|
+
var tmp0_0 = remainingBytes;
|
|
2149
2117
|
// Inline function 'kotlin.Long.minus' call
|
|
2150
|
-
var this_0 = remainingBytes;
|
|
2151
2118
|
var other = segmentBytes;
|
|
2152
|
-
remainingBytes =
|
|
2119
|
+
remainingBytes = subtract(tmp0_0, fromInt(other));
|
|
2153
2120
|
}
|
|
2154
2121
|
};
|
|
2155
|
-
protoOf(FileSink).
|
|
2122
|
+
protoOf(FileSink).z8 = function () {
|
|
2156
2123
|
return Unit_instance;
|
|
2157
2124
|
};
|
|
2158
|
-
function
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2125
|
+
protoOf(FileSink).d4 = function () {
|
|
2126
|
+
if (!this.q3n_1) {
|
|
2127
|
+
this.q3n_1 = true;
|
|
2128
|
+
get_fs().closeSync(this.r3n_1);
|
|
2129
|
+
}
|
|
2130
|
+
};
|
|
2162
2131
|
function SystemPathSeparator$delegate$lambda() {
|
|
2163
2132
|
_init_properties_PathsNodeJs_kt__bvvvsp();
|
|
2164
2133
|
var sep = get_path().sep;
|
|
2165
2134
|
// Inline function 'kotlin.check' call
|
|
2166
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
2167
|
-
// Inline function 'kotlin.check' call
|
|
2168
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
2169
2135
|
if (!(sep.length === 1)) {
|
|
2170
|
-
|
|
2171
|
-
var message = 'Check failed.';
|
|
2172
|
-
throw IllegalStateException_init_$Create$(toString(message));
|
|
2136
|
+
throw IllegalStateException_init_$Create$('Check failed.');
|
|
2173
2137
|
}
|
|
2174
|
-
return new Char(
|
|
2138
|
+
return new Char(charCodeAt(sep, 0));
|
|
2175
2139
|
}
|
|
2176
|
-
function
|
|
2177
|
-
return
|
|
2140
|
+
function _get_SystemPathSeparator_$ref_lvdbpt() {
|
|
2141
|
+
return function () {
|
|
2178
2142
|
return new Char(get_SystemPathSeparator());
|
|
2179
|
-
}
|
|
2143
|
+
};
|
|
2180
2144
|
}
|
|
2181
2145
|
var properties_initialized_PathsNodeJs_kt_2u5gc7;
|
|
2182
2146
|
function _init_properties_PathsNodeJs_kt__bvvvsp() {
|
|
@@ -2186,7 +2150,7 @@ function _init_properties_PathsNodeJs_kt__bvvvsp() {
|
|
|
2186
2150
|
}
|
|
2187
2151
|
}
|
|
2188
2152
|
//region block: post-declaration
|
|
2189
|
-
protoOf(SystemFileSystemImpl).
|
|
2153
|
+
protoOf(SystemFileSystemImpl).g3n = sink$default;
|
|
2190
2154
|
//endregion
|
|
2191
2155
|
//region block: init
|
|
2192
2156
|
Companion_instance = new Companion();
|