client_plugin_logic_deb 1.8.451 → 1.8.453
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/Kosi-Kaverit-kaverit.js +94 -94
- package/Kosi-Kaverit-kaverit.js.map +1 -1
- package/Kosi-Kodein-kodein-di.js +828 -788
- package/Kosi-Kodein-kodein-di.js.map +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.js +1928 -1928
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
- package/Logic_Debertz-ai_module.js +684 -688
- package/Logic_Debertz-ai_module.js.map +1 -1
- package/Logic_Debertz-client_plugin.d.ts +784 -698
- package/Logic_Debertz-client_plugin.js +5091 -5091
- package/Logic_Debertz-client_plugin.js.map +1 -1
- package/Logic_Debertz-core.js +2256 -2270
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +21274 -21284
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_client.js +13526 -13573
- package/Logic_Debertz-game_client.js.map +1 -1
- package/Logic_Debertz-game_server.js +2260 -2273
- package/Logic_Debertz-game_server.js.map +1 -1
- package/error-library-error.js +7 -7
- package/kotlin-kotlin-stdlib.js +5719 -4846
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +22 -22
- package/kotlinx-coroutines-core.js +3652 -3603
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.js +204 -5
- package/kotlinx-io-kotlinx-io-bytestring.js.map +1 -1
- package/kotlinx-io-kotlinx-io-core.js +1699 -438
- package/kotlinx-io-kotlinx-io-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +2256 -2255
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json-io.js +15 -0
- package/kotlinx-serialization-kotlinx-serialization-json.js +1630 -1630
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/ktor-ktor-client-content-negotiation.js +457 -395
- package/ktor-ktor-client-content-negotiation.js.map +1 -1
- package/ktor-ktor-client-core.js +6643 -3939
- package/ktor-ktor-client-core.js.map +1 -1
- package/ktor-ktor-client-logging.js +2627 -893
- package/ktor-ktor-client-logging.js.map +1 -1
- package/ktor-ktor-events.js +14 -14
- package/ktor-ktor-events.js.map +1 -1
- package/ktor-ktor-http-cio.js +2278 -0
- package/ktor-ktor-http-cio.js.map +1 -0
- package/ktor-ktor-http.js +1268 -1128
- package/ktor-ktor-http.js.map +1 -1
- package/ktor-ktor-io.js +2624 -5540
- package/ktor-ktor-io.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx-json.js +8 -8
- package/ktor-ktor-serialization-kotlinx-json.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx.js +333 -339
- package/ktor-ktor-serialization-kotlinx.js.map +1 -1
- package/ktor-ktor-serialization.js +143 -153
- package/ktor-ktor-serialization.js.map +1 -1
- package/{ktor-ktor-client-js.js → ktor-ktor-sse.js} +2 -2
- package/ktor-ktor-sse.js.map +1 -0
- package/ktor-ktor-utils.js +1711 -1144
- package/ktor-ktor-utils.js.map +1 -1
- package/ktor-ktor-websockets.js +123 -136
- package/ktor-ktor-websockets.js.map +1 -1
- package/package.json +2 -4
- package/random-library-crypto-rand.js +15 -15
- package/random-library-crypto-rand.js.map +1 -1
- package/random-library-secure-random.js +10 -10
- package/random-library-secure-random.js.map +1 -1
- package/raspberry-cardgame-lib-core.js +376 -377
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/raspberry-cardgame-lib-logger.js +120 -121
- package/raspberry-cardgame-lib-logger.js.map +1 -1
- package/raspberry-cardgame-lib-random.js +1181 -1207
- package/raspberry-cardgame-lib-random.js.map +1 -1
- package/uuid.js +38 -38
- package/uuid.js.map +1 -1
- /package/{ktor-ktor-client-js.js.map → kotlinx-serialization-kotlinx-serialization-json-io.js.map} +0 -0
|
@@ -1,69 +1,95 @@
|
|
|
1
1
|
(function (factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports', './kotlin-kotlin-stdlib.js'], factory);
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib.js', './kotlinx-io-kotlinx-io-bytestring.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
|
-
factory(module.exports, require('./kotlin-kotlin-stdlib.js'));
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-io-kotlinx-io-bytestring.js'));
|
|
6
6
|
else {
|
|
7
7
|
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
8
|
throw new Error("Error loading module 'kotlinx-io-kotlinx-io-core'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'kotlinx-io-kotlinx-io-core'.");
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
if (typeof globalThis['kotlinx-io-kotlinx-io-bytestring'] === 'undefined') {
|
|
11
|
+
throw new Error("Error loading module 'kotlinx-io-kotlinx-io-core'. Its dependency 'kotlinx-io-kotlinx-io-bytestring' was not found. Please, check whether 'kotlinx-io-kotlinx-io-bytestring' is loaded prior to 'kotlinx-io-kotlinx-io-core'.");
|
|
12
|
+
}
|
|
13
|
+
globalThis['kotlinx-io-kotlinx-io-core'] = factory(typeof globalThis['kotlinx-io-kotlinx-io-core'] === 'undefined' ? {} : globalThis['kotlinx-io-kotlinx-io-core'], globalThis['kotlin-kotlin-stdlib'], globalThis['kotlinx-io-kotlinx-io-bytestring']);
|
|
11
14
|
}
|
|
12
|
-
}(function (_, kotlin_kotlin) {
|
|
15
|
+
}(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_io_bytestring) {
|
|
13
16
|
'use strict';
|
|
14
17
|
//region block: imports
|
|
15
18
|
var imul = Math.imul;
|
|
16
|
-
var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.
|
|
17
|
-
var Long = kotlin_kotlin.$_$.
|
|
18
|
-
var compare = kotlin_kotlin.$_$.
|
|
19
|
-
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.
|
|
20
|
-
var subtract = kotlin_kotlin.$_$.
|
|
21
|
-
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.
|
|
22
|
-
var charArrayOf = kotlin_kotlin.$_$.
|
|
23
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
24
|
-
var equalsLong = kotlin_kotlin.$_$.
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
var objectCreate = kotlin_kotlin.$_$.pd;
|
|
35
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.rc;
|
|
36
|
-
var arrayCopy = kotlin_kotlin.$_$.z5;
|
|
37
|
-
var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.j1;
|
|
38
|
-
var initMetadataForObject = kotlin_kotlin.$_$.vc;
|
|
19
|
+
var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.u1;
|
|
20
|
+
var Long = kotlin_kotlin.$_$.hi;
|
|
21
|
+
var compare = kotlin_kotlin.$_$.nb;
|
|
22
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.n1;
|
|
23
|
+
var subtract = kotlin_kotlin.$_$.ec;
|
|
24
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.o2;
|
|
25
|
+
var charArrayOf = kotlin_kotlin.$_$.lc;
|
|
26
|
+
var protoOf = kotlin_kotlin.$_$.be;
|
|
27
|
+
var equalsLong = kotlin_kotlin.$_$.sb;
|
|
28
|
+
var toString = kotlin_kotlin.$_$.ee;
|
|
29
|
+
var Unit_instance = kotlin_kotlin.$_$.i5;
|
|
30
|
+
var toShort = kotlin_kotlin.$_$.de;
|
|
31
|
+
var add = kotlin_kotlin.$_$.jb;
|
|
32
|
+
var ensureNotNull = kotlin_kotlin.$_$.fj;
|
|
33
|
+
var fromInt = kotlin_kotlin.$_$.tb;
|
|
34
|
+
var convertToInt = kotlin_kotlin.$_$.pb;
|
|
35
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.a1;
|
|
36
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ad;
|
|
39
37
|
var VOID = kotlin_kotlin.$_$.b;
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
38
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.r1;
|
|
39
|
+
var UnsafeByteStringOperations_instance = kotlin_org_jetbrains_kotlinx_kotlinx_io_bytestring.$_$.b;
|
|
40
|
+
var AutoCloseable = kotlin_kotlin.$_$.vh;
|
|
41
|
+
var objectCreate = kotlin_kotlin.$_$.ae;
|
|
42
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.bd;
|
|
43
|
+
var arrayCopy = kotlin_kotlin.$_$.b6;
|
|
44
|
+
var toByte = kotlin_kotlin.$_$.ce;
|
|
45
|
+
var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.l1;
|
|
46
|
+
var initMetadataForObject = kotlin_kotlin.$_$.gd;
|
|
47
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.ed;
|
|
48
|
+
var multiply = kotlin_kotlin.$_$.yb;
|
|
49
|
+
var charCodeAt = kotlin_kotlin.$_$.nc;
|
|
50
|
+
var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.u2;
|
|
51
|
+
var StringBuilder_init_$Create$_0 = kotlin_kotlin.$_$.b1;
|
|
52
|
+
var charSequenceLength = kotlin_kotlin.$_$.pc;
|
|
53
|
+
var endsWith = kotlin_kotlin.$_$.sf;
|
|
54
|
+
var startsWith = kotlin_kotlin.$_$.og;
|
|
55
|
+
var substring = kotlin_kotlin.$_$.vg;
|
|
56
|
+
var charArray = kotlin_kotlin.$_$.mc;
|
|
57
|
+
var numberToChar = kotlin_kotlin.$_$.yd;
|
|
58
|
+
var concatToString = kotlin_kotlin.$_$.lf;
|
|
59
|
+
var Exception_init_$Init$ = kotlin_kotlin.$_$.f1;
|
|
60
|
+
var captureStack = kotlin_kotlin.$_$.kc;
|
|
61
|
+
var Exception_init_$Init$_0 = kotlin_kotlin.$_$.g1;
|
|
62
|
+
var Exception_init_$Init$_1 = kotlin_kotlin.$_$.i1;
|
|
63
|
+
var Exception = kotlin_kotlin.$_$.ei;
|
|
64
|
+
var KProperty0 = kotlin_kotlin.$_$.ze;
|
|
65
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.xc;
|
|
66
|
+
var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.g2;
|
|
67
|
+
var lazy = kotlin_kotlin.$_$.lj;
|
|
68
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.i;
|
|
69
|
+
var asReversed = kotlin_kotlin.$_$.d6;
|
|
70
|
+
var contains = kotlin_kotlin.$_$.nf;
|
|
71
|
+
var getStringHashCode = kotlin_kotlin.$_$.yc;
|
|
72
|
+
var Char = kotlin_kotlin.$_$.xh;
|
|
63
73
|
//endregion
|
|
64
74
|
//region block: pre-declaration
|
|
65
|
-
|
|
66
|
-
|
|
75
|
+
initMetadataForInterface(Source, 'Source', VOID, VOID, [AutoCloseable]);
|
|
76
|
+
function write$default(source, startIndex, endIndex, $super) {
|
|
77
|
+
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
78
|
+
endIndex = endIndex === VOID ? source.length : endIndex;
|
|
79
|
+
var tmp;
|
|
80
|
+
if ($super === VOID) {
|
|
81
|
+
this.x1j(source, startIndex, endIndex);
|
|
82
|
+
tmp = Unit_instance;
|
|
83
|
+
} else {
|
|
84
|
+
tmp = $super.x1j.call(this, source, startIndex, endIndex);
|
|
85
|
+
}
|
|
86
|
+
return tmp;
|
|
87
|
+
}
|
|
88
|
+
initMetadataForInterface(Sink, 'Sink', VOID, VOID, [AutoCloseable]);
|
|
89
|
+
initMetadataForClass(Buffer, 'Buffer', Buffer, VOID, [Source, Sink]);
|
|
90
|
+
initMetadataForClass(PeekSource, 'PeekSource', VOID, VOID, [AutoCloseable]);
|
|
91
|
+
initMetadataForClass(RealSink, 'RealSink', VOID, VOID, [Sink]);
|
|
92
|
+
initMetadataForClass(RealSource, 'RealSource', VOID, VOID, [Source]);
|
|
67
93
|
initMetadataForCompanion(Companion);
|
|
68
94
|
initMetadataForClass(Segment, 'Segment');
|
|
69
95
|
initMetadataForClass(SegmentCopyTracker, 'SegmentCopyTracker');
|
|
@@ -72,10 +98,10 @@
|
|
|
72
98
|
mustExist = mustExist === VOID ? true : mustExist;
|
|
73
99
|
var tmp;
|
|
74
100
|
if ($super === VOID) {
|
|
75
|
-
this.
|
|
101
|
+
this.q1l(path, mustExist);
|
|
76
102
|
tmp = Unit_instance;
|
|
77
103
|
} else {
|
|
78
|
-
tmp = $super.
|
|
104
|
+
tmp = $super.q1l.call(this, path, mustExist);
|
|
79
105
|
}
|
|
80
106
|
return tmp;
|
|
81
107
|
}
|
|
@@ -83,10 +109,10 @@
|
|
|
83
109
|
mustCreate = mustCreate === VOID ? false : mustCreate;
|
|
84
110
|
var tmp;
|
|
85
111
|
if ($super === VOID) {
|
|
86
|
-
this.
|
|
112
|
+
this.s1l(path, mustCreate);
|
|
87
113
|
tmp = Unit_instance;
|
|
88
114
|
} else {
|
|
89
|
-
tmp = $super.
|
|
115
|
+
tmp = $super.s1l.call(this, path, mustCreate);
|
|
90
116
|
}
|
|
91
117
|
return tmp;
|
|
92
118
|
}
|
|
@@ -103,7 +129,7 @@
|
|
|
103
129
|
initMetadataForClass(FileNotFoundException, 'FileNotFoundException', VOID, IOException);
|
|
104
130
|
initMetadataForClass(SystemFileSystem$1, VOID, VOID, SystemFileSystemImpl);
|
|
105
131
|
initMetadataForClass(Path_0, 'Path');
|
|
106
|
-
initMetadataForClass(FileSink, 'FileSink');
|
|
132
|
+
initMetadataForClass(FileSink, 'FileSink', VOID, VOID, [AutoCloseable]);
|
|
107
133
|
//endregion
|
|
108
134
|
function get_HEX_DIGIT_CHARS() {
|
|
109
135
|
_init_properties__Util_kt__g8tcl9();
|
|
@@ -133,34 +159,187 @@
|
|
|
133
159
|
HEX_DIGIT_CHARS = charArrayOf([_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(49), _Char___init__impl__6a9atx(50), _Char___init__impl__6a9atx(51), _Char___init__impl__6a9atx(52), _Char___init__impl__6a9atx(53), _Char___init__impl__6a9atx(54), _Char___init__impl__6a9atx(55), _Char___init__impl__6a9atx(56), _Char___init__impl__6a9atx(57), _Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(98), _Char___init__impl__6a9atx(99), _Char___init__impl__6a9atx(100), _Char___init__impl__6a9atx(101), _Char___init__impl__6a9atx(102)]);
|
|
134
160
|
}
|
|
135
161
|
}
|
|
162
|
+
function throwEof($this, byteCount) {
|
|
163
|
+
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + $this.g1().toString() + ', required: ' + byteCount.toString() + ')');
|
|
164
|
+
}
|
|
136
165
|
function Buffer() {
|
|
137
|
-
this.
|
|
138
|
-
this.
|
|
139
|
-
this.
|
|
166
|
+
this.k1i_1 = null;
|
|
167
|
+
this.l1i_1 = null;
|
|
168
|
+
this.m1i_1 = new Long(0, 0);
|
|
140
169
|
}
|
|
141
|
-
protoOf(Buffer).
|
|
142
|
-
return this.
|
|
170
|
+
protoOf(Buffer).g1 = function () {
|
|
171
|
+
return this.m1i_1;
|
|
143
172
|
};
|
|
144
|
-
protoOf(Buffer).
|
|
173
|
+
protoOf(Buffer).n1i = function () {
|
|
145
174
|
return this;
|
|
146
175
|
};
|
|
147
|
-
protoOf(Buffer).
|
|
148
|
-
return equalsLong(this.
|
|
176
|
+
protoOf(Buffer).o1i = function () {
|
|
177
|
+
return equalsLong(this.g1(), new Long(0, 0));
|
|
178
|
+
};
|
|
179
|
+
protoOf(Buffer).p1i = function (byteCount) {
|
|
180
|
+
// Inline function 'kotlin.require' call
|
|
181
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
182
|
+
var message = 'byteCount: ' + byteCount.toString();
|
|
183
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
184
|
+
}
|
|
185
|
+
if (compare(this.g1(), byteCount) < 0) {
|
|
186
|
+
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + this.g1().toString() + ', required: ' + byteCount.toString() + ')');
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
protoOf(Buffer).q1i = function (byteCount) {
|
|
190
|
+
// Inline function 'kotlin.require' call
|
|
191
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
192
|
+
var message = 'byteCount: ' + byteCount.toString() + ' < 0';
|
|
193
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
194
|
+
}
|
|
195
|
+
return compare(this.g1(), byteCount) >= 0;
|
|
196
|
+
};
|
|
197
|
+
protoOf(Buffer).r1i = function () {
|
|
198
|
+
var tmp0_elvis_lhs = this.k1i_1;
|
|
199
|
+
var tmp;
|
|
200
|
+
if (tmp0_elvis_lhs == null) {
|
|
201
|
+
throwEof(this, new Long(1, 0));
|
|
202
|
+
} else {
|
|
203
|
+
tmp = tmp0_elvis_lhs;
|
|
204
|
+
}
|
|
205
|
+
var segment = tmp;
|
|
206
|
+
var segmentSize = segment.g1();
|
|
207
|
+
if (segmentSize === 0) {
|
|
208
|
+
this.z1i();
|
|
209
|
+
return this.r1i();
|
|
210
|
+
}
|
|
211
|
+
var v = segment.a1j();
|
|
212
|
+
this.m1i_1 = subtract(this.m1i_1, new Long(1, 0));
|
|
213
|
+
if (segmentSize === 1) {
|
|
214
|
+
this.z1i();
|
|
215
|
+
}
|
|
216
|
+
return v;
|
|
217
|
+
};
|
|
218
|
+
protoOf(Buffer).b1j = function () {
|
|
219
|
+
var tmp0_elvis_lhs = this.k1i_1;
|
|
220
|
+
var tmp;
|
|
221
|
+
if (tmp0_elvis_lhs == null) {
|
|
222
|
+
throwEof(this, new Long(2, 0));
|
|
223
|
+
} else {
|
|
224
|
+
tmp = tmp0_elvis_lhs;
|
|
225
|
+
}
|
|
226
|
+
var segment = tmp;
|
|
227
|
+
var segmentSize = segment.g1();
|
|
228
|
+
if (segmentSize < 2) {
|
|
229
|
+
this.p1i(new Long(2, 0));
|
|
230
|
+
if (segmentSize === 0) {
|
|
231
|
+
this.z1i();
|
|
232
|
+
return this.b1j();
|
|
233
|
+
}
|
|
234
|
+
// Inline function 'kotlinx.io.and' call
|
|
235
|
+
var tmp_0 = (this.r1i() & 255) << 8;
|
|
236
|
+
// Inline function 'kotlinx.io.and' call
|
|
237
|
+
var tmp$ret$1 = this.r1i() & 255;
|
|
238
|
+
return toShort(tmp_0 | tmp$ret$1);
|
|
239
|
+
}
|
|
240
|
+
var v = segment.c1j();
|
|
241
|
+
this.m1i_1 = subtract(this.m1i_1, new Long(2, 0));
|
|
242
|
+
if (segmentSize === 2) {
|
|
243
|
+
this.z1i();
|
|
244
|
+
}
|
|
245
|
+
return v;
|
|
149
246
|
};
|
|
150
|
-
protoOf(Buffer).
|
|
247
|
+
protoOf(Buffer).d1j = function () {
|
|
151
248
|
return Unit_instance;
|
|
152
249
|
};
|
|
153
|
-
protoOf(Buffer).
|
|
154
|
-
|
|
250
|
+
protoOf(Buffer).e1j = function (out, startIndex, endIndex) {
|
|
251
|
+
checkBounds(this.g1(), startIndex, endIndex);
|
|
252
|
+
if (equalsLong(startIndex, endIndex))
|
|
253
|
+
return Unit_instance;
|
|
254
|
+
var currentOffset = startIndex;
|
|
255
|
+
var remainingByteCount = subtract(endIndex, startIndex);
|
|
256
|
+
out.m1i_1 = add(out.m1i_1, remainingByteCount);
|
|
257
|
+
var s = this.k1i_1;
|
|
258
|
+
while (compare(currentOffset, fromInt(ensureNotNull(s).u1i_1 - s.t1i_1 | 0)) >= 0) {
|
|
259
|
+
currentOffset = subtract(currentOffset, fromInt(s.u1i_1 - s.t1i_1 | 0));
|
|
260
|
+
s = s.x1i_1;
|
|
261
|
+
}
|
|
262
|
+
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
263
|
+
var copy = ensureNotNull(s).f1j();
|
|
264
|
+
copy.t1i_1 = copy.t1i_1 + convertToInt(currentOffset) | 0;
|
|
265
|
+
var tmp = copy;
|
|
266
|
+
var tmp0 = copy.t1i_1 + convertToInt(remainingByteCount) | 0;
|
|
267
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
268
|
+
var b = copy.u1i_1;
|
|
269
|
+
tmp.u1i_1 = Math.min(tmp0, b);
|
|
270
|
+
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
271
|
+
if (out.k1i_1 == null) {
|
|
272
|
+
out.k1i_1 = copy;
|
|
273
|
+
out.l1i_1 = copy;
|
|
274
|
+
} else if (false) {
|
|
275
|
+
out.l1i_1 = ensureNotNull(out.l1i_1).g1j(copy).h1j();
|
|
276
|
+
if (ensureNotNull(out.l1i_1).y1i_1 == null) {
|
|
277
|
+
out.k1i_1 = out.l1i_1;
|
|
278
|
+
}
|
|
279
|
+
} else {
|
|
280
|
+
out.l1i_1 = ensureNotNull(out.l1i_1).g1j(copy);
|
|
281
|
+
}
|
|
282
|
+
remainingByteCount = subtract(remainingByteCount, fromInt(copy.u1i_1 - copy.t1i_1 | 0));
|
|
283
|
+
currentOffset = new Long(0, 0);
|
|
284
|
+
s = s.x1i_1;
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
protoOf(Buffer).i1j = function () {
|
|
288
|
+
var result = this.g1();
|
|
155
289
|
if (equalsLong(result, new Long(0, 0)))
|
|
156
290
|
return new Long(0, 0);
|
|
157
|
-
var tail = ensureNotNull(this.
|
|
158
|
-
if (tail.
|
|
159
|
-
result = subtract(result, fromInt(tail.
|
|
291
|
+
var tail = ensureNotNull(this.l1i_1);
|
|
292
|
+
if (tail.u1i_1 < 8192 && tail.w1i_1) {
|
|
293
|
+
result = subtract(result, fromInt(tail.u1i_1 - tail.t1i_1 | 0));
|
|
160
294
|
}
|
|
161
295
|
return result;
|
|
162
296
|
};
|
|
163
|
-
protoOf(Buffer).
|
|
297
|
+
protoOf(Buffer).j1j = function (position) {
|
|
298
|
+
if (compare(position, new Long(0, 0)) < 0 || compare(position, this.g1()) >= 0) {
|
|
299
|
+
throw IndexOutOfBoundsException_init_$Create$('position (' + position.toString() + ') is not within the range [0..size(' + this.g1().toString() + '))');
|
|
300
|
+
}
|
|
301
|
+
if (equalsLong(position, new Long(0, 0))) {
|
|
302
|
+
return ensureNotNull(this.k1i_1).k1j(0);
|
|
303
|
+
}
|
|
304
|
+
// Inline function 'kotlinx.io.seek' call
|
|
305
|
+
if (this.k1i_1 == null) {
|
|
306
|
+
var offset = new Long(-1, -1);
|
|
307
|
+
return ensureNotNull(null).k1j(convertToInt(subtract(position, offset)));
|
|
308
|
+
}
|
|
309
|
+
if (compare(subtract(this.g1(), position), position) < 0) {
|
|
310
|
+
var s = this.l1i_1;
|
|
311
|
+
var offset_0 = this.g1();
|
|
312
|
+
$l$loop: while (!(s == null) && compare(offset_0, position) > 0) {
|
|
313
|
+
offset_0 = subtract(offset_0, fromInt(s.u1i_1 - s.t1i_1 | 0));
|
|
314
|
+
if (compare(offset_0, position) <= 0)
|
|
315
|
+
break $l$loop;
|
|
316
|
+
s = s.y1i_1;
|
|
317
|
+
}
|
|
318
|
+
var tmp0 = s;
|
|
319
|
+
var offset_1 = offset_0;
|
|
320
|
+
return ensureNotNull(tmp0).k1j(convertToInt(subtract(position, offset_1)));
|
|
321
|
+
} else {
|
|
322
|
+
var s_0 = this.k1i_1;
|
|
323
|
+
var offset_2 = new Long(0, 0);
|
|
324
|
+
$l$loop_0: while (!(s_0 == null)) {
|
|
325
|
+
var tmp0_0 = offset_2;
|
|
326
|
+
// Inline function 'kotlin.Long.plus' call
|
|
327
|
+
var other = s_0.u1i_1 - s_0.t1i_1 | 0;
|
|
328
|
+
var nextOffset = add(tmp0_0, fromInt(other));
|
|
329
|
+
if (compare(nextOffset, position) > 0)
|
|
330
|
+
break $l$loop_0;
|
|
331
|
+
s_0 = s_0.x1i_1;
|
|
332
|
+
offset_2 = nextOffset;
|
|
333
|
+
}
|
|
334
|
+
var tmp0_1 = s_0;
|
|
335
|
+
var offset_3 = offset_2;
|
|
336
|
+
return ensureNotNull(tmp0_1).k1j(convertToInt(subtract(position, offset_3)));
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
protoOf(Buffer).b3 = function () {
|
|
340
|
+
return this.l1j(this.g1());
|
|
341
|
+
};
|
|
342
|
+
protoOf(Buffer).l1j = function (byteCount) {
|
|
164
343
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
165
344
|
// Inline function 'kotlin.require' call
|
|
166
345
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
@@ -169,7 +348,7 @@
|
|
|
169
348
|
}
|
|
170
349
|
var remainingByteCount = byteCount;
|
|
171
350
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
172
|
-
var tmp0_elvis_lhs = this.
|
|
351
|
+
var tmp0_elvis_lhs = this.k1i_1;
|
|
173
352
|
var tmp;
|
|
174
353
|
if (tmp0_elvis_lhs == null) {
|
|
175
354
|
throw EOFException_init_$Create$_0('Buffer exhausted before skipping ' + byteCount.toString() + ' bytes.');
|
|
@@ -179,180 +358,523 @@
|
|
|
179
358
|
var head = tmp;
|
|
180
359
|
var tmp0 = remainingByteCount;
|
|
181
360
|
// Inline function 'kotlinx.io.minOf' call
|
|
182
|
-
var b = head.
|
|
361
|
+
var b = head.u1i_1 - head.t1i_1 | 0;
|
|
183
362
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
184
363
|
var b_0 = fromInt(b);
|
|
185
364
|
var tmp$ret$4 = compare(tmp0, b_0) <= 0 ? tmp0 : b_0;
|
|
186
365
|
var toSkip = convertToInt(tmp$ret$4);
|
|
187
|
-
this.
|
|
366
|
+
this.m1i_1 = subtract(this.m1i_1, fromInt(toSkip));
|
|
188
367
|
remainingByteCount = subtract(remainingByteCount, fromInt(toSkip));
|
|
189
|
-
head.
|
|
190
|
-
if (head.
|
|
191
|
-
this.
|
|
368
|
+
head.t1i_1 = head.t1i_1 + toSkip | 0;
|
|
369
|
+
if (head.t1i_1 === head.u1i_1) {
|
|
370
|
+
this.z1i();
|
|
192
371
|
}
|
|
193
372
|
}
|
|
194
373
|
};
|
|
195
|
-
protoOf(Buffer).
|
|
374
|
+
protoOf(Buffer).m1j = function (sink, startIndex, endIndex) {
|
|
375
|
+
// Inline function 'kotlinx.io.checkBounds' call
|
|
376
|
+
var size = sink.length;
|
|
377
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
378
|
+
var tmp0_elvis_lhs = this.k1i_1;
|
|
379
|
+
var tmp;
|
|
380
|
+
if (tmp0_elvis_lhs == null) {
|
|
381
|
+
return -1;
|
|
382
|
+
} else {
|
|
383
|
+
tmp = tmp0_elvis_lhs;
|
|
384
|
+
}
|
|
385
|
+
var s = tmp;
|
|
386
|
+
var tmp0 = endIndex - startIndex | 0;
|
|
387
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
388
|
+
var b = s.g1();
|
|
389
|
+
var toCopy = Math.min(tmp0, b);
|
|
390
|
+
s.n1j(sink, startIndex, startIndex + toCopy | 0);
|
|
391
|
+
this.m1i_1 = subtract(this.m1i_1, fromInt(toCopy));
|
|
392
|
+
if (isEmpty(s)) {
|
|
393
|
+
this.z1i();
|
|
394
|
+
}
|
|
395
|
+
return toCopy;
|
|
396
|
+
};
|
|
397
|
+
protoOf(Buffer).o1j = function (sink, byteCount) {
|
|
398
|
+
// Inline function 'kotlinx.io.checkByteCount' call
|
|
399
|
+
// Inline function 'kotlin.require' call
|
|
400
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
401
|
+
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
402
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
403
|
+
}
|
|
404
|
+
if (equalsLong(this.g1(), new Long(0, 0)))
|
|
405
|
+
return new Long(-1, -1);
|
|
406
|
+
var bytesWritten = compare(byteCount, this.g1()) > 0 ? this.g1() : byteCount;
|
|
407
|
+
sink.p1j(this, bytesWritten);
|
|
408
|
+
return bytesWritten;
|
|
409
|
+
};
|
|
410
|
+
protoOf(Buffer).q1j = function (sink, byteCount) {
|
|
411
|
+
// Inline function 'kotlinx.io.checkByteCount' call
|
|
412
|
+
// Inline function 'kotlin.require' call
|
|
413
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
414
|
+
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
415
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
416
|
+
}
|
|
417
|
+
if (compare(this.g1(), byteCount) < 0) {
|
|
418
|
+
sink.p1j(this, this.g1());
|
|
419
|
+
throw EOFException_init_$Create$_0('Buffer exhausted before writing ' + byteCount.toString() + ' bytes. Only ' + this.g1().toString() + ' bytes were written.');
|
|
420
|
+
}
|
|
421
|
+
sink.p1j(this, byteCount);
|
|
422
|
+
};
|
|
423
|
+
protoOf(Buffer).r1j = function (sink) {
|
|
424
|
+
var byteCount = this.g1();
|
|
425
|
+
if (compare(byteCount, new Long(0, 0)) > 0) {
|
|
426
|
+
sink.p1j(this, byteCount);
|
|
427
|
+
}
|
|
428
|
+
return byteCount;
|
|
429
|
+
};
|
|
430
|
+
protoOf(Buffer).s1j = function () {
|
|
431
|
+
return buffered_0(new PeekSource(this));
|
|
432
|
+
};
|
|
433
|
+
protoOf(Buffer).t1j = function (minimumCapacity) {
|
|
196
434
|
// Inline function 'kotlin.require' call
|
|
197
435
|
if (!(minimumCapacity >= 1 && minimumCapacity <= 8192)) {
|
|
198
436
|
var message = 'unexpected capacity (' + minimumCapacity + '), should be in range [1, 8192]';
|
|
199
437
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
200
438
|
}
|
|
201
|
-
if (this.
|
|
202
|
-
var result = SegmentPool_instance.
|
|
203
|
-
this.
|
|
204
|
-
this.
|
|
439
|
+
if (this.l1i_1 == null) {
|
|
440
|
+
var result = SegmentPool_instance.w1j();
|
|
441
|
+
this.k1i_1 = result;
|
|
442
|
+
this.l1i_1 = result;
|
|
205
443
|
return result;
|
|
206
444
|
}
|
|
207
|
-
var t = ensureNotNull(this.
|
|
208
|
-
if ((t.
|
|
209
|
-
var newTail = t.
|
|
210
|
-
this.
|
|
445
|
+
var t = ensureNotNull(this.l1i_1);
|
|
446
|
+
if ((t.u1i_1 + minimumCapacity | 0) > 8192 || !t.w1i_1) {
|
|
447
|
+
var newTail = t.g1j(SegmentPool_instance.w1j());
|
|
448
|
+
this.l1i_1 = newTail;
|
|
211
449
|
return newTail;
|
|
212
450
|
}
|
|
213
451
|
return t;
|
|
214
452
|
};
|
|
215
|
-
protoOf(Buffer).
|
|
453
|
+
protoOf(Buffer).x1j = function (source, startIndex, endIndex) {
|
|
454
|
+
// Inline function 'kotlinx.io.checkBounds' call
|
|
455
|
+
var size = source.length;
|
|
456
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
457
|
+
var currentOffset = startIndex;
|
|
458
|
+
while (currentOffset < endIndex) {
|
|
459
|
+
var tail = this.t1j(1);
|
|
460
|
+
var tmp0 = endIndex - currentOffset | 0;
|
|
461
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
462
|
+
var b = tail.y1j();
|
|
463
|
+
var toCopy = Math.min(tmp0, b);
|
|
464
|
+
tail.z1j(source, currentOffset, currentOffset + toCopy | 0);
|
|
465
|
+
currentOffset = currentOffset + toCopy | 0;
|
|
466
|
+
}
|
|
467
|
+
var tmp = this;
|
|
468
|
+
var tmp0_0 = this.m1i_1;
|
|
469
|
+
// Inline function 'kotlin.Long.plus' call
|
|
470
|
+
var other = endIndex - startIndex | 0;
|
|
471
|
+
tmp.m1i_1 = add(tmp0_0, fromInt(other));
|
|
472
|
+
};
|
|
473
|
+
protoOf(Buffer).b1k = function (source, byteCount) {
|
|
474
|
+
// Inline function 'kotlinx.io.checkByteCount' call
|
|
475
|
+
// Inline function 'kotlin.require' call
|
|
476
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
477
|
+
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
478
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
479
|
+
}
|
|
480
|
+
var remainingByteCount = byteCount;
|
|
481
|
+
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
482
|
+
var read = source.o1j(this, remainingByteCount);
|
|
483
|
+
if (equalsLong(read, new Long(-1, -1))) {
|
|
484
|
+
throw EOFException_init_$Create$_0('Source exhausted before reading ' + byteCount.toString() + ' bytes. ' + ('Only ' + subtract(byteCount, remainingByteCount).toString() + ' were read.'));
|
|
485
|
+
}
|
|
486
|
+
remainingByteCount = subtract(remainingByteCount, read);
|
|
487
|
+
}
|
|
488
|
+
};
|
|
489
|
+
protoOf(Buffer).p1j = function (source, byteCount) {
|
|
216
490
|
// Inline function 'kotlin.require' call
|
|
217
491
|
if (!!(source === this)) {
|
|
218
492
|
var message = 'source == this';
|
|
219
493
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
220
494
|
}
|
|
221
|
-
checkOffsetAndCount(source.
|
|
495
|
+
checkOffsetAndCount(source.m1i_1, new Long(0, 0), byteCount);
|
|
222
496
|
var remainingByteCount = byteCount;
|
|
223
497
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
224
|
-
if (compare(remainingByteCount, fromInt(ensureNotNull(source.
|
|
225
|
-
var tail = this.
|
|
498
|
+
if (compare(remainingByteCount, fromInt(ensureNotNull(source.k1i_1).g1())) < 0) {
|
|
499
|
+
var tail = this.l1i_1;
|
|
226
500
|
var tmp;
|
|
227
|
-
if (!(tail == null) && tail.
|
|
501
|
+
if (!(tail == null) && tail.w1i_1) {
|
|
228
502
|
var tmp0 = remainingByteCount;
|
|
229
503
|
// Inline function 'kotlin.Long.plus' call
|
|
230
|
-
var other = tail.
|
|
504
|
+
var other = tail.u1i_1;
|
|
231
505
|
var tmp0_0 = add(tmp0, fromInt(other));
|
|
232
506
|
// Inline function 'kotlin.Long.minus' call
|
|
233
|
-
var other_0 = tail.
|
|
507
|
+
var other_0 = tail.c1k() ? 0 : tail.t1i_1;
|
|
234
508
|
var tmp$ret$3 = subtract(tmp0_0, fromInt(other_0));
|
|
235
509
|
tmp = compare(tmp$ret$3, new Long(8192, 0)) <= 0;
|
|
236
510
|
} else {
|
|
237
511
|
tmp = false;
|
|
238
512
|
}
|
|
239
513
|
if (tmp) {
|
|
240
|
-
ensureNotNull(source.
|
|
241
|
-
source.
|
|
242
|
-
this.
|
|
514
|
+
ensureNotNull(source.k1i_1).e1k(tail, convertToInt(remainingByteCount));
|
|
515
|
+
source.m1i_1 = subtract(source.m1i_1, remainingByteCount);
|
|
516
|
+
this.m1i_1 = add(this.m1i_1, remainingByteCount);
|
|
243
517
|
return Unit_instance;
|
|
244
518
|
} else {
|
|
245
|
-
source.
|
|
519
|
+
source.k1i_1 = ensureNotNull(source.k1i_1).d1k(convertToInt(remainingByteCount));
|
|
246
520
|
}
|
|
247
521
|
}
|
|
248
|
-
var segmentToMove = ensureNotNull(source.
|
|
249
|
-
var movedByteCount = fromInt(segmentToMove.
|
|
250
|
-
source.
|
|
251
|
-
if (source.
|
|
252
|
-
source.
|
|
522
|
+
var segmentToMove = ensureNotNull(source.k1i_1);
|
|
523
|
+
var movedByteCount = fromInt(segmentToMove.g1());
|
|
524
|
+
source.k1i_1 = segmentToMove.f1k();
|
|
525
|
+
if (source.k1i_1 == null) {
|
|
526
|
+
source.l1i_1 = null;
|
|
253
527
|
}
|
|
254
528
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
255
|
-
if (this.
|
|
256
|
-
this.
|
|
257
|
-
this.
|
|
529
|
+
if (this.k1i_1 == null) {
|
|
530
|
+
this.k1i_1 = segmentToMove;
|
|
531
|
+
this.l1i_1 = segmentToMove;
|
|
258
532
|
} else if (true) {
|
|
259
|
-
this.
|
|
260
|
-
if (ensureNotNull(this.
|
|
261
|
-
this.
|
|
533
|
+
this.l1i_1 = ensureNotNull(this.l1i_1).g1j(segmentToMove).h1j();
|
|
534
|
+
if (ensureNotNull(this.l1i_1).y1i_1 == null) {
|
|
535
|
+
this.k1i_1 = this.l1i_1;
|
|
262
536
|
}
|
|
263
537
|
} else {
|
|
264
|
-
this.
|
|
538
|
+
this.l1i_1 = ensureNotNull(this.l1i_1).g1j(segmentToMove);
|
|
265
539
|
}
|
|
266
|
-
source.
|
|
267
|
-
this.
|
|
540
|
+
source.m1i_1 = subtract(source.m1i_1, movedByteCount);
|
|
541
|
+
this.m1i_1 = add(this.m1i_1, movedByteCount);
|
|
268
542
|
remainingByteCount = subtract(remainingByteCount, movedByteCount);
|
|
269
543
|
}
|
|
270
544
|
};
|
|
271
|
-
protoOf(Buffer).
|
|
272
|
-
|
|
273
|
-
|
|
545
|
+
protoOf(Buffer).g1k = function (source) {
|
|
546
|
+
var totalBytesRead = new Long(0, 0);
|
|
547
|
+
$l$loop: while (true) {
|
|
548
|
+
var readCount = source.o1j(this, new Long(8192, 0));
|
|
549
|
+
if (equalsLong(readCount, new Long(-1, -1)))
|
|
550
|
+
break $l$loop;
|
|
551
|
+
totalBytesRead = add(totalBytesRead, readCount);
|
|
552
|
+
}
|
|
553
|
+
return totalBytesRead;
|
|
554
|
+
};
|
|
555
|
+
protoOf(Buffer).h1k = function (byte) {
|
|
556
|
+
this.t1j(1).i1k(byte);
|
|
557
|
+
this.m1i_1 = add(this.m1i_1, new Long(1, 0));
|
|
558
|
+
};
|
|
559
|
+
protoOf(Buffer).j1k = function (short) {
|
|
560
|
+
this.t1j(2).k1k(short);
|
|
561
|
+
this.m1i_1 = add(this.m1i_1, new Long(2, 0));
|
|
274
562
|
};
|
|
275
|
-
protoOf(Buffer).
|
|
563
|
+
protoOf(Buffer).n4 = function () {
|
|
276
564
|
return Unit_instance;
|
|
277
565
|
};
|
|
278
566
|
protoOf(Buffer).toString = function () {
|
|
279
|
-
if (equalsLong(this.
|
|
567
|
+
if (equalsLong(this.g1(), new Long(0, 0)))
|
|
280
568
|
return 'Buffer(size=0)';
|
|
281
569
|
var maxPrintableBytes = 64;
|
|
282
570
|
// Inline function 'kotlinx.io.minOf' call
|
|
283
|
-
var b = this.
|
|
571
|
+
var b = this.g1();
|
|
284
572
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
285
573
|
var a = fromInt(maxPrintableBytes);
|
|
286
574
|
var tmp$ret$1 = compare(a, b) <= 0 ? a : b;
|
|
287
575
|
var len = convertToInt(tmp$ret$1);
|
|
288
|
-
var builder = StringBuilder_init_$Create$(imul(len, 2) + (compare(this.
|
|
576
|
+
var builder = StringBuilder_init_$Create$(imul(len, 2) + (compare(this.g1(), fromInt(maxPrintableBytes)) > 0 ? 1 : 0) | 0);
|
|
289
577
|
var bytesWritten = 0;
|
|
290
578
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
291
|
-
var curr = this.
|
|
579
|
+
var curr = this.k1i_1;
|
|
292
580
|
while (!(curr == null)) {
|
|
293
581
|
var tmp0 = get_SegmentReadContextImpl();
|
|
294
582
|
var segment = curr;
|
|
295
583
|
var idx = 0;
|
|
296
|
-
while (bytesWritten < len && idx < segment.
|
|
584
|
+
while (bytesWritten < len && idx < segment.g1()) {
|
|
297
585
|
var _unary__edvuaz = idx;
|
|
298
586
|
idx = _unary__edvuaz + 1 | 0;
|
|
299
|
-
var b_0 = tmp0.
|
|
587
|
+
var b_0 = tmp0.l1k(segment, _unary__edvuaz);
|
|
300
588
|
bytesWritten = bytesWritten + 1 | 0;
|
|
301
589
|
var tmp = get_HEX_DIGIT_CHARS();
|
|
302
590
|
// Inline function 'kotlinx.io.shr' call
|
|
303
591
|
var tmp$ret$2 = b_0 >> 4;
|
|
304
|
-
var tmp_0 = builder.
|
|
592
|
+
var tmp_0 = builder.s(tmp[tmp$ret$2 & 15]);
|
|
305
593
|
var tmp_1 = get_HEX_DIGIT_CHARS();
|
|
306
594
|
// Inline function 'kotlinx.io.and' call
|
|
307
595
|
var tmp$ret$3 = b_0 & 15;
|
|
308
|
-
tmp_0.
|
|
596
|
+
tmp_0.s(tmp_1[tmp$ret$3]);
|
|
309
597
|
}
|
|
310
|
-
curr = curr.
|
|
598
|
+
curr = curr.x1i_1;
|
|
311
599
|
}
|
|
312
|
-
if (compare(this.
|
|
313
|
-
builder.
|
|
600
|
+
if (compare(this.g1(), fromInt(maxPrintableBytes)) > 0) {
|
|
601
|
+
builder.s(_Char___init__impl__6a9atx(8230));
|
|
314
602
|
}
|
|
315
|
-
return 'Buffer(size=' + this.
|
|
603
|
+
return 'Buffer(size=' + this.g1().toString() + ' hex=' + builder.toString() + ')';
|
|
316
604
|
};
|
|
317
|
-
protoOf(Buffer).
|
|
318
|
-
var oldHead = ensureNotNull(this.
|
|
319
|
-
var nextHead = oldHead.
|
|
320
|
-
this.
|
|
605
|
+
protoOf(Buffer).z1i = function () {
|
|
606
|
+
var oldHead = ensureNotNull(this.k1i_1);
|
|
607
|
+
var nextHead = oldHead.x1i_1;
|
|
608
|
+
this.k1i_1 = nextHead;
|
|
321
609
|
if (nextHead == null) {
|
|
322
|
-
this.
|
|
610
|
+
this.l1i_1 = null;
|
|
323
611
|
} else {
|
|
324
|
-
nextHead.
|
|
612
|
+
nextHead.y1i_1 = null;
|
|
325
613
|
}
|
|
326
|
-
oldHead.
|
|
327
|
-
SegmentPool_instance.
|
|
614
|
+
oldHead.x1i_1 = null;
|
|
615
|
+
SegmentPool_instance.m1k(oldHead);
|
|
328
616
|
};
|
|
329
|
-
protoOf(Buffer).
|
|
330
|
-
var oldTail = ensureNotNull(this.
|
|
331
|
-
var newTail = oldTail.
|
|
332
|
-
this.
|
|
617
|
+
protoOf(Buffer).n1k = function () {
|
|
618
|
+
var oldTail = ensureNotNull(this.l1i_1);
|
|
619
|
+
var newTail = oldTail.y1i_1;
|
|
620
|
+
this.l1i_1 = newTail;
|
|
333
621
|
if (newTail == null) {
|
|
334
|
-
this.
|
|
622
|
+
this.k1i_1 = null;
|
|
335
623
|
} else {
|
|
336
|
-
newTail.
|
|
624
|
+
newTail.x1i_1 = null;
|
|
337
625
|
}
|
|
338
|
-
oldTail.
|
|
339
|
-
SegmentPool_instance.
|
|
626
|
+
oldTail.y1i_1 = null;
|
|
627
|
+
SegmentPool_instance.m1k(oldTail);
|
|
340
628
|
};
|
|
629
|
+
function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
630
|
+
startIndex = startIndex === VOID ? new Long(0, 0) : startIndex;
|
|
631
|
+
endIndex = endIndex === VOID ? _this__u8e3s4.g1() : endIndex;
|
|
632
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
633
|
+
var b = _this__u8e3s4.g1();
|
|
634
|
+
var endOffset = compare(endIndex, b) <= 0 ? endIndex : b;
|
|
635
|
+
checkBounds(_this__u8e3s4.g1(), startIndex, endOffset);
|
|
636
|
+
if (equalsLong(startIndex, endOffset))
|
|
637
|
+
return new Long(-1, -1);
|
|
638
|
+
// Inline function 'kotlinx.io.seek' call
|
|
639
|
+
if (_this__u8e3s4.k1i_1 == null) {
|
|
640
|
+
var o = new Long(-1, -1);
|
|
641
|
+
if (equalsLong(o, new Long(-1, -1))) {
|
|
642
|
+
return new Long(-1, -1);
|
|
643
|
+
}
|
|
644
|
+
var segment = null;
|
|
645
|
+
var offset = o;
|
|
646
|
+
do {
|
|
647
|
+
// Inline function 'kotlin.check' call
|
|
648
|
+
if (!(compare(endOffset, offset) > 0)) {
|
|
649
|
+
throw IllegalStateException_init_$Create$('Check failed.');
|
|
650
|
+
}
|
|
651
|
+
ensureNotNull(segment);
|
|
652
|
+
var tmp = segment;
|
|
653
|
+
// Inline function 'kotlin.comparisons.maxOf' call
|
|
654
|
+
var a = convertToInt(subtract(startIndex, offset));
|
|
655
|
+
var tmp_0 = Math.max(a, 0);
|
|
656
|
+
var tmp0 = segment.g1();
|
|
657
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
658
|
+
var b_0 = convertToInt(subtract(endOffset, offset));
|
|
659
|
+
var tmp$ret$3 = Math.min(tmp0, b_0);
|
|
660
|
+
var idx = indexOf_0(tmp, byte, tmp_0, tmp$ret$3);
|
|
661
|
+
if (!(idx === -1)) {
|
|
662
|
+
return add(offset, fromInt(idx));
|
|
663
|
+
}
|
|
664
|
+
var tmp0_0 = offset;
|
|
665
|
+
// Inline function 'kotlin.Long.plus' call
|
|
666
|
+
var other = segment.g1();
|
|
667
|
+
offset = add(tmp0_0, fromInt(other));
|
|
668
|
+
segment = segment.x1i_1;
|
|
669
|
+
}
|
|
670
|
+
while (!(segment == null) && compare(offset, endOffset) < 0);
|
|
671
|
+
return new Long(-1, -1);
|
|
672
|
+
}
|
|
673
|
+
if (compare(subtract(_this__u8e3s4.g1(), startIndex), startIndex) < 0) {
|
|
674
|
+
var s = _this__u8e3s4.l1i_1;
|
|
675
|
+
var offset_0 = _this__u8e3s4.g1();
|
|
676
|
+
$l$loop: while (!(s == null) && compare(offset_0, startIndex) > 0) {
|
|
677
|
+
offset_0 = subtract(offset_0, fromInt(s.u1i_1 - s.t1i_1 | 0));
|
|
678
|
+
if (compare(offset_0, startIndex) <= 0)
|
|
679
|
+
break $l$loop;
|
|
680
|
+
s = s.y1i_1;
|
|
681
|
+
}
|
|
682
|
+
var tmp0_1 = s;
|
|
683
|
+
var o_0 = offset_0;
|
|
684
|
+
if (equalsLong(o_0, new Long(-1, -1))) {
|
|
685
|
+
return new Long(-1, -1);
|
|
686
|
+
}
|
|
687
|
+
var segment_0 = tmp0_1;
|
|
688
|
+
var offset_1 = o_0;
|
|
689
|
+
do {
|
|
690
|
+
// Inline function 'kotlin.check' call
|
|
691
|
+
if (!(compare(endOffset, offset_1) > 0)) {
|
|
692
|
+
throw IllegalStateException_init_$Create$('Check failed.');
|
|
693
|
+
}
|
|
694
|
+
ensureNotNull(segment_0);
|
|
695
|
+
var tmp_1 = segment_0;
|
|
696
|
+
// Inline function 'kotlin.comparisons.maxOf' call
|
|
697
|
+
var a_0 = convertToInt(subtract(startIndex, offset_1));
|
|
698
|
+
var tmp_2 = Math.max(a_0, 0);
|
|
699
|
+
var tmp0_2 = segment_0.g1();
|
|
700
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
701
|
+
var b_1 = convertToInt(subtract(endOffset, offset_1));
|
|
702
|
+
var tmp$ret$8 = Math.min(tmp0_2, b_1);
|
|
703
|
+
var idx_0 = indexOf_0(tmp_1, byte, tmp_2, tmp$ret$8);
|
|
704
|
+
if (!(idx_0 === -1)) {
|
|
705
|
+
return add(offset_1, fromInt(idx_0));
|
|
706
|
+
}
|
|
707
|
+
var tmp0_3 = offset_1;
|
|
708
|
+
// Inline function 'kotlin.Long.plus' call
|
|
709
|
+
var other_0 = segment_0.g1();
|
|
710
|
+
offset_1 = add(tmp0_3, fromInt(other_0));
|
|
711
|
+
segment_0 = segment_0.x1i_1;
|
|
712
|
+
}
|
|
713
|
+
while (!(segment_0 == null) && compare(offset_1, endOffset) < 0);
|
|
714
|
+
return new Long(-1, -1);
|
|
715
|
+
} else {
|
|
716
|
+
var s_0 = _this__u8e3s4.k1i_1;
|
|
717
|
+
var offset_2 = new Long(0, 0);
|
|
718
|
+
$l$loop_0: while (!(s_0 == null)) {
|
|
719
|
+
var tmp0_4 = offset_2;
|
|
720
|
+
// Inline function 'kotlin.Long.plus' call
|
|
721
|
+
var other_1 = s_0.u1i_1 - s_0.t1i_1 | 0;
|
|
722
|
+
var nextOffset = add(tmp0_4, fromInt(other_1));
|
|
723
|
+
if (compare(nextOffset, startIndex) > 0)
|
|
724
|
+
break $l$loop_0;
|
|
725
|
+
s_0 = s_0.x1i_1;
|
|
726
|
+
offset_2 = nextOffset;
|
|
727
|
+
}
|
|
728
|
+
var tmp0_5 = s_0;
|
|
729
|
+
var o_1 = offset_2;
|
|
730
|
+
if (equalsLong(o_1, new Long(-1, -1))) {
|
|
731
|
+
return new Long(-1, -1);
|
|
732
|
+
}
|
|
733
|
+
var segment_1 = tmp0_5;
|
|
734
|
+
var offset_3 = o_1;
|
|
735
|
+
do {
|
|
736
|
+
// Inline function 'kotlin.check' call
|
|
737
|
+
if (!(compare(endOffset, offset_3) > 0)) {
|
|
738
|
+
throw IllegalStateException_init_$Create$('Check failed.');
|
|
739
|
+
}
|
|
740
|
+
ensureNotNull(segment_1);
|
|
741
|
+
var tmp_3 = segment_1;
|
|
742
|
+
// Inline function 'kotlin.comparisons.maxOf' call
|
|
743
|
+
var a_1 = convertToInt(subtract(startIndex, offset_3));
|
|
744
|
+
var tmp_4 = Math.max(a_1, 0);
|
|
745
|
+
var tmp0_6 = segment_1.g1();
|
|
746
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
747
|
+
var b_2 = convertToInt(subtract(endOffset, offset_3));
|
|
748
|
+
var tmp$ret$13 = Math.min(tmp0_6, b_2);
|
|
749
|
+
var idx_1 = indexOf_0(tmp_3, byte, tmp_4, tmp$ret$13);
|
|
750
|
+
if (!(idx_1 === -1)) {
|
|
751
|
+
return add(offset_3, fromInt(idx_1));
|
|
752
|
+
}
|
|
753
|
+
var tmp0_7 = offset_3;
|
|
754
|
+
// Inline function 'kotlin.Long.plus' call
|
|
755
|
+
var other_2 = segment_1.g1();
|
|
756
|
+
offset_3 = add(tmp0_7, fromInt(other_2));
|
|
757
|
+
segment_1 = segment_1.x1i_1;
|
|
758
|
+
}
|
|
759
|
+
while (!(segment_1 == null) && compare(offset_3, endOffset) < 0);
|
|
760
|
+
return new Long(-1, -1);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
function readByteString(_this__u8e3s4, byteCount) {
|
|
764
|
+
return UnsafeByteStringOperations_instance.j1i(readByteArray_0(_this__u8e3s4, byteCount));
|
|
765
|
+
}
|
|
341
766
|
function buffered(_this__u8e3s4) {
|
|
342
767
|
return new RealSink(_this__u8e3s4);
|
|
343
768
|
}
|
|
769
|
+
function buffered_0(_this__u8e3s4) {
|
|
770
|
+
return new RealSource(_this__u8e3s4);
|
|
771
|
+
}
|
|
772
|
+
function PeekSource(upstream) {
|
|
773
|
+
this.o1k_1 = upstream;
|
|
774
|
+
this.p1k_1 = this.o1k_1.n1i();
|
|
775
|
+
this.q1k_1 = this.p1k_1.k1i_1;
|
|
776
|
+
var tmp = this;
|
|
777
|
+
var tmp0_safe_receiver = this.p1k_1.k1i_1;
|
|
778
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t1i_1;
|
|
779
|
+
tmp.r1k_1 = tmp1_elvis_lhs == null ? -1 : tmp1_elvis_lhs;
|
|
780
|
+
this.s1k_1 = false;
|
|
781
|
+
this.t1k_1 = new Long(0, 0);
|
|
782
|
+
}
|
|
783
|
+
protoOf(PeekSource).o1j = function (sink, byteCount) {
|
|
784
|
+
// Inline function 'kotlin.check' call
|
|
785
|
+
if (!!this.s1k_1) {
|
|
786
|
+
var message = 'Source is closed.';
|
|
787
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
788
|
+
}
|
|
789
|
+
// Inline function 'kotlinx.io.checkByteCount' call
|
|
790
|
+
// Inline function 'kotlin.require' call
|
|
791
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
792
|
+
var message_0 = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
793
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
794
|
+
}
|
|
795
|
+
// Inline function 'kotlin.check' call
|
|
796
|
+
if (!(this.q1k_1 == null || (this.q1k_1 === this.p1k_1.k1i_1 && this.r1k_1 === ensureNotNull(this.p1k_1.k1i_1).t1i_1))) {
|
|
797
|
+
var message_1 = 'Peek source is invalid because upstream source was used';
|
|
798
|
+
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
799
|
+
}
|
|
800
|
+
if (equalsLong(byteCount, new Long(0, 0)))
|
|
801
|
+
return new Long(0, 0);
|
|
802
|
+
// Inline function 'kotlin.Long.plus' call
|
|
803
|
+
var this_0 = this.t1k_1;
|
|
804
|
+
var tmp$ret$7 = add(this_0, fromInt(1));
|
|
805
|
+
if (!this.o1k_1.q1i(tmp$ret$7))
|
|
806
|
+
return new Long(-1, -1);
|
|
807
|
+
if (this.q1k_1 == null && !(this.p1k_1.k1i_1 == null)) {
|
|
808
|
+
this.q1k_1 = this.p1k_1.k1i_1;
|
|
809
|
+
this.r1k_1 = ensureNotNull(this.p1k_1.k1i_1).t1i_1;
|
|
810
|
+
}
|
|
811
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
812
|
+
var b = subtract(this.p1k_1.g1(), this.t1k_1);
|
|
813
|
+
var toCopy = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
814
|
+
this.p1k_1.e1j(sink, this.t1k_1, add(this.t1k_1, toCopy));
|
|
815
|
+
this.t1k_1 = add(this.t1k_1, toCopy);
|
|
816
|
+
return toCopy;
|
|
817
|
+
};
|
|
818
|
+
protoOf(PeekSource).n4 = function () {
|
|
819
|
+
this.s1k_1 = true;
|
|
820
|
+
};
|
|
344
821
|
function RealSink(sink) {
|
|
345
|
-
this.
|
|
346
|
-
this.
|
|
347
|
-
this.
|
|
822
|
+
this.u1k_1 = sink;
|
|
823
|
+
this.v1k_1 = false;
|
|
824
|
+
this.w1k_1 = new Buffer();
|
|
348
825
|
}
|
|
349
|
-
protoOf(RealSink).
|
|
350
|
-
return this.
|
|
826
|
+
protoOf(RealSink).n1i = function () {
|
|
827
|
+
return this.w1k_1;
|
|
828
|
+
};
|
|
829
|
+
protoOf(RealSink).p1j = function (source, byteCount) {
|
|
830
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
831
|
+
// Inline function 'kotlin.check' call
|
|
832
|
+
if (!!this.v1k_1) {
|
|
833
|
+
var message = 'Sink is closed.';
|
|
834
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
835
|
+
}
|
|
836
|
+
// Inline function 'kotlin.require' call
|
|
837
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
838
|
+
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
839
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
840
|
+
}
|
|
841
|
+
this.w1k_1.p1j(source, byteCount);
|
|
842
|
+
this.d1j();
|
|
351
843
|
};
|
|
352
|
-
protoOf(RealSink).
|
|
844
|
+
protoOf(RealSink).x1j = function (source, startIndex, endIndex) {
|
|
353
845
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
354
846
|
// Inline function 'kotlin.check' call
|
|
355
|
-
if (!!this.
|
|
847
|
+
if (!!this.v1k_1) {
|
|
848
|
+
var message = 'Sink is closed.';
|
|
849
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
850
|
+
}
|
|
851
|
+
// Inline function 'kotlinx.io.checkBounds' call
|
|
852
|
+
var size = source.length;
|
|
853
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
854
|
+
this.w1k_1.x1j(source, startIndex, endIndex);
|
|
855
|
+
this.d1j();
|
|
856
|
+
};
|
|
857
|
+
protoOf(RealSink).g1k = function (source) {
|
|
858
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
859
|
+
// Inline function 'kotlin.check' call
|
|
860
|
+
if (!!this.v1k_1) {
|
|
861
|
+
var message = 'Sink is closed.';
|
|
862
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
863
|
+
}
|
|
864
|
+
var totalBytesRead = new Long(0, 0);
|
|
865
|
+
$l$loop: while (true) {
|
|
866
|
+
var readCount = source.o1j(this.w1k_1, new Long(8192, 0));
|
|
867
|
+
if (equalsLong(readCount, new Long(-1, -1)))
|
|
868
|
+
break $l$loop;
|
|
869
|
+
totalBytesRead = add(totalBytesRead, readCount);
|
|
870
|
+
this.d1j();
|
|
871
|
+
}
|
|
872
|
+
return totalBytesRead;
|
|
873
|
+
};
|
|
874
|
+
protoOf(RealSink).b1k = function (source, byteCount) {
|
|
875
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
876
|
+
// Inline function 'kotlin.check' call
|
|
877
|
+
if (!!this.v1k_1) {
|
|
356
878
|
var message = 'Sink is closed.';
|
|
357
879
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
358
880
|
}
|
|
@@ -361,28 +883,56 @@
|
|
|
361
883
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
362
884
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
363
885
|
}
|
|
364
|
-
|
|
365
|
-
|
|
886
|
+
var remainingByteCount = byteCount;
|
|
887
|
+
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
888
|
+
var read = source.o1j(this.w1k_1, remainingByteCount);
|
|
889
|
+
if (equalsLong(read, new Long(-1, -1))) {
|
|
890
|
+
var bytesRead = subtract(byteCount, remainingByteCount);
|
|
891
|
+
throw EOFException_init_$Create$_0('Source exhausted before reading ' + byteCount.toString() + ' bytes from it (number of bytes read: ' + bytesRead.toString() + ').');
|
|
892
|
+
}
|
|
893
|
+
remainingByteCount = subtract(remainingByteCount, read);
|
|
894
|
+
this.d1j();
|
|
895
|
+
}
|
|
896
|
+
};
|
|
897
|
+
protoOf(RealSink).h1k = function (byte) {
|
|
898
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
899
|
+
// Inline function 'kotlin.check' call
|
|
900
|
+
if (!!this.v1k_1) {
|
|
901
|
+
var message = 'Sink is closed.';
|
|
902
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
903
|
+
}
|
|
904
|
+
this.w1k_1.h1k(byte);
|
|
905
|
+
this.d1j();
|
|
366
906
|
};
|
|
367
|
-
protoOf(RealSink).
|
|
907
|
+
protoOf(RealSink).j1k = function (short) {
|
|
368
908
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
369
909
|
// Inline function 'kotlin.check' call
|
|
370
|
-
if (!!this.
|
|
910
|
+
if (!!this.v1k_1) {
|
|
371
911
|
var message = 'Sink is closed.';
|
|
372
912
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
373
913
|
}
|
|
374
|
-
|
|
914
|
+
this.w1k_1.j1k(short);
|
|
915
|
+
this.d1j();
|
|
916
|
+
};
|
|
917
|
+
protoOf(RealSink).d1j = function () {
|
|
918
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
919
|
+
// Inline function 'kotlin.check' call
|
|
920
|
+
if (!!this.v1k_1) {
|
|
921
|
+
var message = 'Sink is closed.';
|
|
922
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
923
|
+
}
|
|
924
|
+
var byteCount = this.w1k_1.i1j();
|
|
375
925
|
if (compare(byteCount, new Long(0, 0)) > 0) {
|
|
376
|
-
this.
|
|
926
|
+
this.u1k_1.p1j(this.w1k_1, byteCount);
|
|
377
927
|
}
|
|
378
928
|
};
|
|
379
|
-
protoOf(RealSink).
|
|
380
|
-
if (this.
|
|
929
|
+
protoOf(RealSink).n4 = function () {
|
|
930
|
+
if (this.v1k_1)
|
|
381
931
|
return Unit_instance;
|
|
382
932
|
var thrown = null;
|
|
383
933
|
try {
|
|
384
|
-
if (compare(this.
|
|
385
|
-
this.
|
|
934
|
+
if (compare(this.w1k_1.g1(), new Long(0, 0)) > 0) {
|
|
935
|
+
this.u1k_1.p1j(this.w1k_1, this.w1k_1.g1());
|
|
386
936
|
}
|
|
387
937
|
} catch ($p) {
|
|
388
938
|
if ($p instanceof Error) {
|
|
@@ -393,7 +943,7 @@
|
|
|
393
943
|
}
|
|
394
944
|
}
|
|
395
945
|
try {
|
|
396
|
-
this.
|
|
946
|
+
this.u1k_1.n4();
|
|
397
947
|
} catch ($p) {
|
|
398
948
|
if ($p instanceof Error) {
|
|
399
949
|
var e_0 = $p;
|
|
@@ -403,18 +953,153 @@
|
|
|
403
953
|
throw $p;
|
|
404
954
|
}
|
|
405
955
|
}
|
|
406
|
-
this.
|
|
956
|
+
this.v1k_1 = true;
|
|
407
957
|
if (!(thrown == null))
|
|
408
958
|
throw thrown;
|
|
409
959
|
};
|
|
410
960
|
protoOf(RealSink).toString = function () {
|
|
411
|
-
return 'buffered(' + toString(this.
|
|
961
|
+
return 'buffered(' + toString(this.u1k_1) + ')';
|
|
962
|
+
};
|
|
963
|
+
function RealSource(source) {
|
|
964
|
+
this.x1k_1 = source;
|
|
965
|
+
this.y1k_1 = false;
|
|
966
|
+
this.z1k_1 = new Buffer();
|
|
967
|
+
}
|
|
968
|
+
protoOf(RealSource).n1i = function () {
|
|
969
|
+
return this.z1k_1;
|
|
970
|
+
};
|
|
971
|
+
protoOf(RealSource).o1j = function (sink, byteCount) {
|
|
972
|
+
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
973
|
+
// Inline function 'kotlin.check' call
|
|
974
|
+
if (!!this.y1k_1) {
|
|
975
|
+
var message = 'Source is closed.';
|
|
976
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
977
|
+
}
|
|
978
|
+
// Inline function 'kotlin.require' call
|
|
979
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
980
|
+
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
981
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
982
|
+
}
|
|
983
|
+
if (equalsLong(this.z1k_1.g1(), new Long(0, 0))) {
|
|
984
|
+
var read = this.x1k_1.o1j(this.z1k_1, new Long(8192, 0));
|
|
985
|
+
if (equalsLong(read, new Long(-1, -1)))
|
|
986
|
+
return new Long(-1, -1);
|
|
987
|
+
}
|
|
988
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
989
|
+
var b = this.z1k_1.g1();
|
|
990
|
+
var toRead = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
991
|
+
return this.z1k_1.o1j(sink, toRead);
|
|
992
|
+
};
|
|
993
|
+
protoOf(RealSource).o1i = function () {
|
|
994
|
+
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
995
|
+
// Inline function 'kotlin.check' call
|
|
996
|
+
if (!!this.y1k_1) {
|
|
997
|
+
var message = 'Source is closed.';
|
|
998
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
999
|
+
}
|
|
1000
|
+
return this.z1k_1.o1i() && equalsLong(this.x1k_1.o1j(this.z1k_1, new Long(8192, 0)), new Long(-1, -1));
|
|
1001
|
+
};
|
|
1002
|
+
protoOf(RealSource).p1i = function (byteCount) {
|
|
1003
|
+
if (!this.q1i(byteCount))
|
|
1004
|
+
throw EOFException_init_$Create$_0("Source doesn't contain required number of bytes (" + byteCount.toString() + ').');
|
|
1005
|
+
};
|
|
1006
|
+
protoOf(RealSource).q1i = function (byteCount) {
|
|
1007
|
+
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
1008
|
+
// Inline function 'kotlin.check' call
|
|
1009
|
+
if (!!this.y1k_1) {
|
|
1010
|
+
var message = 'Source is closed.';
|
|
1011
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
1012
|
+
}
|
|
1013
|
+
// Inline function 'kotlin.require' call
|
|
1014
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
1015
|
+
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
1016
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1017
|
+
}
|
|
1018
|
+
while (compare(this.z1k_1.g1(), byteCount) < 0) {
|
|
1019
|
+
if (equalsLong(this.x1k_1.o1j(this.z1k_1, new Long(8192, 0)), new Long(-1, -1)))
|
|
1020
|
+
return false;
|
|
1021
|
+
}
|
|
1022
|
+
return true;
|
|
1023
|
+
};
|
|
1024
|
+
protoOf(RealSource).r1i = function () {
|
|
1025
|
+
this.p1i(new Long(1, 0));
|
|
1026
|
+
return this.z1k_1.r1i();
|
|
1027
|
+
};
|
|
1028
|
+
protoOf(RealSource).m1j = function (sink, startIndex, endIndex) {
|
|
1029
|
+
// Inline function 'kotlinx.io.checkBounds' call
|
|
1030
|
+
var size = sink.length;
|
|
1031
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1032
|
+
if (equalsLong(this.z1k_1.g1(), new Long(0, 0))) {
|
|
1033
|
+
var read = this.x1k_1.o1j(this.z1k_1, new Long(8192, 0));
|
|
1034
|
+
if (equalsLong(read, new Long(-1, -1)))
|
|
1035
|
+
return -1;
|
|
1036
|
+
}
|
|
1037
|
+
var tmp0 = endIndex - startIndex | 0;
|
|
1038
|
+
// Inline function 'kotlinx.io.minOf' call
|
|
1039
|
+
var b = this.z1k_1.g1();
|
|
1040
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
1041
|
+
var a = fromInt(tmp0);
|
|
1042
|
+
var tmp$ret$2 = compare(a, b) <= 0 ? a : b;
|
|
1043
|
+
var toRead = convertToInt(tmp$ret$2);
|
|
1044
|
+
return this.z1k_1.m1j(sink, startIndex, startIndex + toRead | 0);
|
|
1045
|
+
};
|
|
1046
|
+
protoOf(RealSource).q1j = function (sink, byteCount) {
|
|
1047
|
+
try {
|
|
1048
|
+
this.p1i(byteCount);
|
|
1049
|
+
} catch ($p) {
|
|
1050
|
+
if ($p instanceof EOFException) {
|
|
1051
|
+
var e = $p;
|
|
1052
|
+
sink.p1j(this.z1k_1, this.z1k_1.g1());
|
|
1053
|
+
throw e;
|
|
1054
|
+
} else {
|
|
1055
|
+
throw $p;
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
this.z1k_1.q1j(sink, byteCount);
|
|
1059
|
+
};
|
|
1060
|
+
protoOf(RealSource).r1j = function (sink) {
|
|
1061
|
+
var totalBytesWritten = new Long(0, 0);
|
|
1062
|
+
while (!equalsLong(this.x1k_1.o1j(this.z1k_1, new Long(8192, 0)), new Long(-1, -1))) {
|
|
1063
|
+
var emitByteCount = this.z1k_1.i1j();
|
|
1064
|
+
if (compare(emitByteCount, new Long(0, 0)) > 0) {
|
|
1065
|
+
totalBytesWritten = add(totalBytesWritten, emitByteCount);
|
|
1066
|
+
sink.p1j(this.z1k_1, emitByteCount);
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
if (compare(this.z1k_1.g1(), new Long(0, 0)) > 0) {
|
|
1070
|
+
totalBytesWritten = add(totalBytesWritten, this.z1k_1.g1());
|
|
1071
|
+
sink.p1j(this.z1k_1, this.z1k_1.g1());
|
|
1072
|
+
}
|
|
1073
|
+
return totalBytesWritten;
|
|
1074
|
+
};
|
|
1075
|
+
protoOf(RealSource).b1j = function () {
|
|
1076
|
+
this.p1i(new Long(2, 0));
|
|
1077
|
+
return this.z1k_1.b1j();
|
|
1078
|
+
};
|
|
1079
|
+
protoOf(RealSource).s1j = function () {
|
|
1080
|
+
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
1081
|
+
// Inline function 'kotlin.check' call
|
|
1082
|
+
if (!!this.y1k_1) {
|
|
1083
|
+
var message = 'Source is closed.';
|
|
1084
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
1085
|
+
}
|
|
1086
|
+
return buffered_0(new PeekSource(this));
|
|
1087
|
+
};
|
|
1088
|
+
protoOf(RealSource).n4 = function () {
|
|
1089
|
+
if (this.y1k_1)
|
|
1090
|
+
return Unit_instance;
|
|
1091
|
+
this.y1k_1 = true;
|
|
1092
|
+
this.x1k_1.n4();
|
|
1093
|
+
this.z1k_1.b3();
|
|
1094
|
+
};
|
|
1095
|
+
protoOf(RealSource).toString = function () {
|
|
1096
|
+
return 'buffered(' + toString(this.x1k_1) + ')';
|
|
412
1097
|
};
|
|
413
1098
|
function Segment_init_$Init$($this) {
|
|
414
1099
|
Segment.call($this);
|
|
415
|
-
$this.
|
|
416
|
-
$this.
|
|
417
|
-
$this.
|
|
1100
|
+
$this.s1i_1 = new Int8Array(8192);
|
|
1101
|
+
$this.w1i_1 = true;
|
|
1102
|
+
$this.v1i_1 = null;
|
|
418
1103
|
return $this;
|
|
419
1104
|
}
|
|
420
1105
|
function Segment_init_$Create$() {
|
|
@@ -422,223 +1107,285 @@
|
|
|
422
1107
|
}
|
|
423
1108
|
function Segment_init_$Init$_0(data, pos, limit, shareToken, owner, $this) {
|
|
424
1109
|
Segment.call($this);
|
|
425
|
-
$this.
|
|
426
|
-
$this.
|
|
427
|
-
$this.
|
|
428
|
-
$this.
|
|
429
|
-
$this.
|
|
1110
|
+
$this.s1i_1 = data;
|
|
1111
|
+
$this.t1i_1 = pos;
|
|
1112
|
+
$this.u1i_1 = limit;
|
|
1113
|
+
$this.v1i_1 = shareToken;
|
|
1114
|
+
$this.w1i_1 = owner;
|
|
430
1115
|
return $this;
|
|
431
1116
|
}
|
|
432
1117
|
function Segment_init_$Create$_0(data, pos, limit, shareToken, owner) {
|
|
433
1118
|
return Segment_init_$Init$_0(data, pos, limit, shareToken, owner, objectCreate(protoOf(Segment)));
|
|
434
1119
|
}
|
|
435
1120
|
function Companion() {
|
|
436
|
-
this.
|
|
437
|
-
this.
|
|
1121
|
+
this.a1l_1 = 8192;
|
|
1122
|
+
this.b1l_1 = 1024;
|
|
438
1123
|
}
|
|
439
|
-
protoOf(Companion).
|
|
1124
|
+
protoOf(Companion).c1l = function () {
|
|
440
1125
|
return Segment_init_$Create$();
|
|
441
1126
|
};
|
|
442
1127
|
var Companion_instance;
|
|
443
1128
|
function Companion_getInstance() {
|
|
444
1129
|
return Companion_instance;
|
|
445
1130
|
}
|
|
446
|
-
protoOf(Segment).
|
|
447
|
-
var tmp0_safe_receiver = this.
|
|
448
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1131
|
+
protoOf(Segment).c1k = function () {
|
|
1132
|
+
var tmp0_safe_receiver = this.v1i_1;
|
|
1133
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.d1l();
|
|
449
1134
|
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
|
|
450
1135
|
};
|
|
451
|
-
protoOf(Segment).
|
|
452
|
-
var tmp0_elvis_lhs = this.
|
|
1136
|
+
protoOf(Segment).f1j = function () {
|
|
1137
|
+
var tmp0_elvis_lhs = this.v1i_1;
|
|
453
1138
|
var tmp;
|
|
454
1139
|
if (tmp0_elvis_lhs == null) {
|
|
455
1140
|
// Inline function 'kotlin.also' call
|
|
456
|
-
var this_0 = SegmentPool_instance.
|
|
457
|
-
this.
|
|
1141
|
+
var this_0 = SegmentPool_instance.e1l();
|
|
1142
|
+
this.v1i_1 = this_0;
|
|
458
1143
|
tmp = this_0;
|
|
459
1144
|
} else {
|
|
460
1145
|
tmp = tmp0_elvis_lhs;
|
|
461
1146
|
}
|
|
462
1147
|
var t = tmp;
|
|
463
|
-
var tmp_0 = this.
|
|
464
|
-
var tmp_1 = this.
|
|
1148
|
+
var tmp_0 = this.t1i_1;
|
|
1149
|
+
var tmp_1 = this.u1i_1;
|
|
465
1150
|
// Inline function 'kotlin.also' call
|
|
466
|
-
t.
|
|
467
|
-
return Segment_init_$Create$_0(this.
|
|
1151
|
+
t.f1l();
|
|
1152
|
+
return Segment_init_$Create$_0(this.s1i_1, tmp_0, tmp_1, t, false);
|
|
468
1153
|
};
|
|
469
|
-
protoOf(Segment).
|
|
470
|
-
var result = this.
|
|
471
|
-
if (!(this.
|
|
472
|
-
ensureNotNull(this.
|
|
1154
|
+
protoOf(Segment).f1k = function () {
|
|
1155
|
+
var result = this.x1i_1;
|
|
1156
|
+
if (!(this.y1i_1 == null)) {
|
|
1157
|
+
ensureNotNull(this.y1i_1).x1i_1 = this.x1i_1;
|
|
473
1158
|
}
|
|
474
|
-
if (!(this.
|
|
475
|
-
ensureNotNull(this.
|
|
1159
|
+
if (!(this.x1i_1 == null)) {
|
|
1160
|
+
ensureNotNull(this.x1i_1).y1i_1 = this.y1i_1;
|
|
476
1161
|
}
|
|
477
|
-
this.
|
|
478
|
-
this.
|
|
1162
|
+
this.x1i_1 = null;
|
|
1163
|
+
this.y1i_1 = null;
|
|
479
1164
|
return result;
|
|
480
1165
|
};
|
|
481
|
-
protoOf(Segment).
|
|
482
|
-
segment.
|
|
483
|
-
segment.
|
|
484
|
-
if (!(this.
|
|
485
|
-
ensureNotNull(this.
|
|
1166
|
+
protoOf(Segment).g1j = function (segment) {
|
|
1167
|
+
segment.y1i_1 = this;
|
|
1168
|
+
segment.x1i_1 = this.x1i_1;
|
|
1169
|
+
if (!(this.x1i_1 == null)) {
|
|
1170
|
+
ensureNotNull(this.x1i_1).y1i_1 = segment;
|
|
486
1171
|
}
|
|
487
|
-
this.
|
|
1172
|
+
this.x1i_1 = segment;
|
|
488
1173
|
return segment;
|
|
489
1174
|
};
|
|
490
|
-
protoOf(Segment).
|
|
1175
|
+
protoOf(Segment).d1k = function (byteCount) {
|
|
491
1176
|
// Inline function 'kotlin.require' call
|
|
492
|
-
if (!(byteCount > 0 && byteCount <= (this.
|
|
1177
|
+
if (!(byteCount > 0 && byteCount <= (this.u1i_1 - this.t1i_1 | 0))) {
|
|
493
1178
|
var message = 'byteCount out of range';
|
|
494
1179
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
495
1180
|
}
|
|
496
1181
|
var prefix;
|
|
497
1182
|
if (byteCount >= 1024) {
|
|
498
|
-
prefix = this.
|
|
1183
|
+
prefix = this.f1j();
|
|
499
1184
|
} else {
|
|
500
|
-
prefix = SegmentPool_instance.
|
|
501
|
-
var tmp0 = this.
|
|
502
|
-
var tmp2 = prefix.
|
|
503
|
-
var
|
|
1185
|
+
prefix = SegmentPool_instance.w1j();
|
|
1186
|
+
var tmp0 = this.s1i_1;
|
|
1187
|
+
var tmp2 = prefix.s1i_1;
|
|
1188
|
+
var tmp5 = this.t1i_1;
|
|
504
1189
|
// Inline function 'kotlin.collections.copyInto' call
|
|
505
|
-
var endIndex = this.
|
|
1190
|
+
var endIndex = this.t1i_1 + byteCount | 0;
|
|
506
1191
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
507
1192
|
// Inline function 'kotlin.js.asDynamic' call
|
|
508
1193
|
var tmp = tmp0;
|
|
509
1194
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
510
1195
|
// Inline function 'kotlin.js.asDynamic' call
|
|
511
|
-
arrayCopy(tmp, tmp2, 0,
|
|
1196
|
+
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
512
1197
|
}
|
|
513
|
-
prefix.
|
|
514
|
-
this.
|
|
515
|
-
if (!(this.
|
|
516
|
-
ensureNotNull(this.
|
|
1198
|
+
prefix.u1i_1 = prefix.t1i_1 + byteCount | 0;
|
|
1199
|
+
this.t1i_1 = this.t1i_1 + byteCount | 0;
|
|
1200
|
+
if (!(this.y1i_1 == null)) {
|
|
1201
|
+
ensureNotNull(this.y1i_1).g1j(prefix);
|
|
517
1202
|
} else {
|
|
518
|
-
prefix.
|
|
519
|
-
this.
|
|
1203
|
+
prefix.x1i_1 = this;
|
|
1204
|
+
this.y1i_1 = prefix;
|
|
520
1205
|
}
|
|
521
1206
|
return prefix;
|
|
522
1207
|
};
|
|
523
|
-
protoOf(Segment).
|
|
1208
|
+
protoOf(Segment).h1j = function () {
|
|
524
1209
|
// Inline function 'kotlin.check' call
|
|
525
|
-
if (!!(this.
|
|
1210
|
+
if (!!(this.y1i_1 == null)) {
|
|
526
1211
|
var message = 'cannot compact';
|
|
527
1212
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
528
1213
|
}
|
|
529
|
-
if (!ensureNotNull(this.
|
|
1214
|
+
if (!ensureNotNull(this.y1i_1).w1i_1)
|
|
530
1215
|
return this;
|
|
531
|
-
var byteCount = this.
|
|
532
|
-
var availableByteCount = (8192 - ensureNotNull(this.
|
|
1216
|
+
var byteCount = this.u1i_1 - this.t1i_1 | 0;
|
|
1217
|
+
var availableByteCount = (8192 - ensureNotNull(this.y1i_1).u1i_1 | 0) + (ensureNotNull(this.y1i_1).c1k() ? 0 : ensureNotNull(this.y1i_1).t1i_1) | 0;
|
|
533
1218
|
if (byteCount > availableByteCount)
|
|
534
1219
|
return this;
|
|
535
|
-
var predecessor = this.
|
|
536
|
-
this.
|
|
537
|
-
var successor = this.
|
|
1220
|
+
var predecessor = this.y1i_1;
|
|
1221
|
+
this.e1k(ensureNotNull(predecessor), byteCount);
|
|
1222
|
+
var successor = this.f1k();
|
|
538
1223
|
// Inline function 'kotlin.check' call
|
|
539
1224
|
if (!(successor == null)) {
|
|
540
1225
|
throw IllegalStateException_init_$Create$('Check failed.');
|
|
541
1226
|
}
|
|
542
|
-
SegmentPool_instance.
|
|
1227
|
+
SegmentPool_instance.m1k(this);
|
|
543
1228
|
return predecessor;
|
|
544
1229
|
};
|
|
545
|
-
protoOf(Segment).
|
|
546
|
-
var _unary__edvuaz = this.
|
|
547
|
-
this.
|
|
548
|
-
this.
|
|
1230
|
+
protoOf(Segment).i1k = function (byte) {
|
|
1231
|
+
var _unary__edvuaz = this.u1i_1;
|
|
1232
|
+
this.u1i_1 = _unary__edvuaz + 1 | 0;
|
|
1233
|
+
this.s1i_1[_unary__edvuaz] = byte;
|
|
549
1234
|
};
|
|
550
|
-
protoOf(Segment).
|
|
1235
|
+
protoOf(Segment).k1k = function (short) {
|
|
1236
|
+
var data = this.s1i_1;
|
|
1237
|
+
var limit = this.u1i_1;
|
|
1238
|
+
var _unary__edvuaz = limit;
|
|
1239
|
+
limit = _unary__edvuaz + 1 | 0;
|
|
1240
|
+
data[_unary__edvuaz] = toByte((short >>> 8 | 0) & 255);
|
|
1241
|
+
var _unary__edvuaz_0 = limit;
|
|
1242
|
+
limit = _unary__edvuaz_0 + 1 | 0;
|
|
1243
|
+
data[_unary__edvuaz_0] = toByte(short & 255);
|
|
1244
|
+
this.u1i_1 = limit;
|
|
1245
|
+
};
|
|
1246
|
+
protoOf(Segment).a1j = function () {
|
|
1247
|
+
var _unary__edvuaz = this.t1i_1;
|
|
1248
|
+
this.t1i_1 = _unary__edvuaz + 1 | 0;
|
|
1249
|
+
return this.s1i_1[_unary__edvuaz];
|
|
1250
|
+
};
|
|
1251
|
+
protoOf(Segment).c1j = function () {
|
|
1252
|
+
var data = this.s1i_1;
|
|
1253
|
+
var pos = this.t1i_1;
|
|
1254
|
+
var _unary__edvuaz = pos;
|
|
1255
|
+
pos = _unary__edvuaz + 1 | 0;
|
|
1256
|
+
// Inline function 'kotlinx.io.and' call
|
|
1257
|
+
var tmp = (data[_unary__edvuaz] & 255) << 8;
|
|
1258
|
+
var _unary__edvuaz_0 = pos;
|
|
1259
|
+
pos = _unary__edvuaz_0 + 1 | 0;
|
|
1260
|
+
// Inline function 'kotlinx.io.and' call
|
|
1261
|
+
var tmp$ret$1 = data[_unary__edvuaz_0] & 255;
|
|
1262
|
+
var s = toShort(tmp | tmp$ret$1);
|
|
1263
|
+
this.t1i_1 = pos;
|
|
1264
|
+
return s;
|
|
1265
|
+
};
|
|
1266
|
+
protoOf(Segment).e1k = function (sink, byteCount) {
|
|
551
1267
|
// Inline function 'kotlin.check' call
|
|
552
|
-
if (!sink.
|
|
1268
|
+
if (!sink.w1i_1) {
|
|
553
1269
|
var message = 'only owner can write';
|
|
554
1270
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
555
1271
|
}
|
|
556
|
-
if ((sink.
|
|
557
|
-
if (sink.
|
|
1272
|
+
if ((sink.u1i_1 + byteCount | 0) > 8192) {
|
|
1273
|
+
if (sink.c1k())
|
|
558
1274
|
throw IllegalArgumentException_init_$Create$_0();
|
|
559
|
-
if (((sink.
|
|
1275
|
+
if (((sink.u1i_1 + byteCount | 0) - sink.t1i_1 | 0) > 8192)
|
|
560
1276
|
throw IllegalArgumentException_init_$Create$_0();
|
|
561
|
-
var tmp0 = sink.
|
|
562
|
-
var tmp2 = sink.
|
|
563
|
-
var
|
|
1277
|
+
var tmp0 = sink.s1i_1;
|
|
1278
|
+
var tmp2 = sink.s1i_1;
|
|
1279
|
+
var tmp5 = sink.t1i_1;
|
|
564
1280
|
// Inline function 'kotlin.collections.copyInto' call
|
|
565
|
-
var endIndex = sink.
|
|
1281
|
+
var endIndex = sink.u1i_1;
|
|
566
1282
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
567
1283
|
// Inline function 'kotlin.js.asDynamic' call
|
|
568
1284
|
var tmp = tmp0;
|
|
569
1285
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
570
1286
|
// Inline function 'kotlin.js.asDynamic' call
|
|
571
|
-
arrayCopy(tmp, tmp2, 0,
|
|
572
|
-
sink.
|
|
573
|
-
sink.
|
|
574
|
-
}
|
|
575
|
-
var tmp0_0 = this.
|
|
576
|
-
var tmp2_0 = sink.
|
|
577
|
-
var
|
|
578
|
-
var tmp6 = this.
|
|
1287
|
+
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
1288
|
+
sink.u1i_1 = sink.u1i_1 - sink.t1i_1 | 0;
|
|
1289
|
+
sink.t1i_1 = 0;
|
|
1290
|
+
}
|
|
1291
|
+
var tmp0_0 = this.s1i_1;
|
|
1292
|
+
var tmp2_0 = sink.s1i_1;
|
|
1293
|
+
var tmp4 = sink.u1i_1;
|
|
1294
|
+
var tmp6 = this.t1i_1;
|
|
579
1295
|
// Inline function 'kotlin.collections.copyInto' call
|
|
580
|
-
var endIndex_0 = this.
|
|
1296
|
+
var endIndex_0 = this.t1i_1 + byteCount | 0;
|
|
581
1297
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
582
1298
|
// Inline function 'kotlin.js.asDynamic' call
|
|
583
1299
|
var tmp_0 = tmp0_0;
|
|
584
1300
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
585
1301
|
// Inline function 'kotlin.js.asDynamic' call
|
|
586
|
-
arrayCopy(tmp_0, tmp2_0,
|
|
587
|
-
sink.
|
|
588
|
-
this.
|
|
1302
|
+
arrayCopy(tmp_0, tmp2_0, tmp4, tmp6, endIndex_0);
|
|
1303
|
+
sink.u1i_1 = sink.u1i_1 + byteCount | 0;
|
|
1304
|
+
this.t1i_1 = this.t1i_1 + byteCount | 0;
|
|
589
1305
|
};
|
|
590
|
-
protoOf(Segment).
|
|
591
|
-
|
|
1306
|
+
protoOf(Segment).n1j = function (dst, dstStartOffset, dstEndOffset) {
|
|
1307
|
+
var len = dstEndOffset - dstStartOffset | 0;
|
|
1308
|
+
var tmp0 = this.s1i_1;
|
|
1309
|
+
var tmp6 = this.t1i_1;
|
|
1310
|
+
// Inline function 'kotlin.collections.copyInto' call
|
|
1311
|
+
var endIndex = this.t1i_1 + len | 0;
|
|
1312
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1313
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1314
|
+
var tmp = tmp0;
|
|
1315
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1316
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1317
|
+
arrayCopy(tmp, dst, dstStartOffset, tmp6, endIndex);
|
|
1318
|
+
this.t1i_1 = this.t1i_1 + len | 0;
|
|
592
1319
|
};
|
|
593
|
-
protoOf(Segment).
|
|
594
|
-
|
|
1320
|
+
protoOf(Segment).z1j = function (src, srcStartOffset, srcEndOffset) {
|
|
1321
|
+
var tmp2 = this.s1i_1;
|
|
1322
|
+
// Inline function 'kotlin.collections.copyInto' call
|
|
1323
|
+
var destinationOffset = this.u1i_1;
|
|
1324
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1325
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1326
|
+
var tmp = src;
|
|
1327
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1328
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1329
|
+
arrayCopy(tmp, tmp2, destinationOffset, srcStartOffset, srcEndOffset);
|
|
1330
|
+
this.u1i_1 = this.u1i_1 + (srcEndOffset - srcStartOffset | 0) | 0;
|
|
1331
|
+
};
|
|
1332
|
+
protoOf(Segment).g1 = function () {
|
|
1333
|
+
return this.u1i_1 - this.t1i_1 | 0;
|
|
1334
|
+
};
|
|
1335
|
+
protoOf(Segment).y1j = function () {
|
|
1336
|
+
return this.s1i_1.length - this.u1i_1 | 0;
|
|
595
1337
|
};
|
|
596
|
-
protoOf(Segment).
|
|
597
|
-
return this.
|
|
1338
|
+
protoOf(Segment).g1l = function (readOnly) {
|
|
1339
|
+
return this.s1i_1;
|
|
598
1340
|
};
|
|
599
|
-
protoOf(Segment).
|
|
600
|
-
return this.
|
|
1341
|
+
protoOf(Segment).k1j = function (index) {
|
|
1342
|
+
return this.s1i_1[this.t1i_1 + index | 0];
|
|
601
1343
|
};
|
|
602
|
-
protoOf(Segment).
|
|
603
|
-
this.
|
|
1344
|
+
protoOf(Segment).h1l = function (index, value) {
|
|
1345
|
+
this.s1i_1[this.u1i_1 + index | 0] = value;
|
|
604
1346
|
};
|
|
605
|
-
protoOf(Segment).
|
|
606
|
-
var d = this.
|
|
607
|
-
var l = this.
|
|
1347
|
+
protoOf(Segment).i1l = function (index, b0, b1) {
|
|
1348
|
+
var d = this.s1i_1;
|
|
1349
|
+
var l = this.u1i_1;
|
|
608
1350
|
d[l + index | 0] = b0;
|
|
609
1351
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
610
1352
|
};
|
|
611
|
-
protoOf(Segment).
|
|
612
|
-
var d = this.
|
|
613
|
-
var l = this.
|
|
1353
|
+
protoOf(Segment).j1l = function (index, b0, b1, b2) {
|
|
1354
|
+
var d = this.s1i_1;
|
|
1355
|
+
var l = this.u1i_1;
|
|
614
1356
|
d[l + index | 0] = b0;
|
|
615
1357
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
616
1358
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
617
1359
|
};
|
|
618
|
-
protoOf(Segment).
|
|
619
|
-
var d = this.
|
|
620
|
-
var l = this.
|
|
1360
|
+
protoOf(Segment).k1l = function (index, b0, b1, b2, b3) {
|
|
1361
|
+
var d = this.s1i_1;
|
|
1362
|
+
var l = this.u1i_1;
|
|
621
1363
|
d[l + index | 0] = b0;
|
|
622
1364
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
623
1365
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
624
1366
|
d[(l + index | 0) + 3 | 0] = b3;
|
|
625
1367
|
};
|
|
626
1368
|
function Segment() {
|
|
627
|
-
this.
|
|
628
|
-
this.
|
|
629
|
-
this.
|
|
630
|
-
this.
|
|
631
|
-
this.
|
|
632
|
-
this.
|
|
1369
|
+
this.t1i_1 = 0;
|
|
1370
|
+
this.u1i_1 = 0;
|
|
1371
|
+
this.v1i_1 = null;
|
|
1372
|
+
this.w1i_1 = false;
|
|
1373
|
+
this.x1i_1 = null;
|
|
1374
|
+
this.y1i_1 = null;
|
|
1375
|
+
}
|
|
1376
|
+
function isEmpty(_this__u8e3s4) {
|
|
1377
|
+
return _this__u8e3s4.g1() === 0;
|
|
1378
|
+
}
|
|
1379
|
+
function SegmentCopyTracker() {
|
|
633
1380
|
}
|
|
634
1381
|
function AlwaysSharedCopyTracker() {
|
|
635
1382
|
AlwaysSharedCopyTracker_instance = this;
|
|
636
1383
|
SegmentCopyTracker.call(this);
|
|
637
1384
|
}
|
|
638
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1385
|
+
protoOf(AlwaysSharedCopyTracker).d1l = function () {
|
|
639
1386
|
return true;
|
|
640
1387
|
};
|
|
641
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1388
|
+
protoOf(AlwaysSharedCopyTracker).f1l = function () {
|
|
642
1389
|
return Unit_instance;
|
|
643
1390
|
};
|
|
644
1391
|
var AlwaysSharedCopyTracker_instance;
|
|
@@ -647,10 +1394,127 @@
|
|
|
647
1394
|
new AlwaysSharedCopyTracker();
|
|
648
1395
|
return AlwaysSharedCopyTracker_instance;
|
|
649
1396
|
}
|
|
650
|
-
function
|
|
651
|
-
|
|
1397
|
+
function indexOf_0(_this__u8e3s4, byte, startOffset, endOffset) {
|
|
1398
|
+
// Inline function 'kotlin.require' call
|
|
1399
|
+
if (!(0 <= startOffset ? startOffset < _this__u8e3s4.g1() : false)) {
|
|
1400
|
+
var message = '' + startOffset;
|
|
1401
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1402
|
+
}
|
|
1403
|
+
// Inline function 'kotlin.require' call
|
|
1404
|
+
if (!(startOffset <= endOffset ? endOffset <= _this__u8e3s4.g1() : false)) {
|
|
1405
|
+
var message_0 = '' + endOffset;
|
|
1406
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1407
|
+
}
|
|
1408
|
+
var p = _this__u8e3s4.t1i_1;
|
|
1409
|
+
var data = _this__u8e3s4.g1l(true);
|
|
1410
|
+
var inductionVariable = startOffset;
|
|
1411
|
+
if (inductionVariable < endOffset)
|
|
1412
|
+
do {
|
|
1413
|
+
var idx = inductionVariable;
|
|
1414
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
1415
|
+
if (data[p + idx | 0] === byte) {
|
|
1416
|
+
return idx;
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
while (inductionVariable < endOffset);
|
|
1420
|
+
return -1;
|
|
652
1421
|
}
|
|
653
|
-
function
|
|
1422
|
+
function Sink() {
|
|
1423
|
+
}
|
|
1424
|
+
function Source() {
|
|
1425
|
+
}
|
|
1426
|
+
function readByteArray(_this__u8e3s4) {
|
|
1427
|
+
return readByteArrayImpl(_this__u8e3s4, -1);
|
|
1428
|
+
}
|
|
1429
|
+
function readByteArray_0(_this__u8e3s4, byteCount) {
|
|
1430
|
+
// Inline function 'kotlinx.io.checkByteCount' call
|
|
1431
|
+
var byteCount_0 = fromInt(byteCount);
|
|
1432
|
+
// Inline function 'kotlin.require' call
|
|
1433
|
+
if (!(compare(byteCount_0, new Long(0, 0)) >= 0)) {
|
|
1434
|
+
var message = 'byteCount (' + byteCount_0.toString() + ') < 0';
|
|
1435
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1436
|
+
}
|
|
1437
|
+
return readByteArrayImpl(_this__u8e3s4, byteCount);
|
|
1438
|
+
}
|
|
1439
|
+
function indexOf_1(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
1440
|
+
startIndex = startIndex === VOID ? new Long(0, 0) : startIndex;
|
|
1441
|
+
endIndex = endIndex === VOID ? new Long(-1, 2147483647) : endIndex;
|
|
1442
|
+
// Inline function 'kotlin.require' call
|
|
1443
|
+
if (!(compare(new Long(0, 0), startIndex) <= 0 ? compare(startIndex, endIndex) <= 0 : false)) {
|
|
1444
|
+
var tmp;
|
|
1445
|
+
if (compare(endIndex, new Long(0, 0)) < 0) {
|
|
1446
|
+
tmp = 'startIndex (' + startIndex.toString() + ') and endIndex (' + endIndex.toString() + ') should be non negative';
|
|
1447
|
+
} else {
|
|
1448
|
+
tmp = 'startIndex (' + startIndex.toString() + ') is not within the range [0..endIndex(' + endIndex.toString() + '))';
|
|
1449
|
+
}
|
|
1450
|
+
var message = tmp;
|
|
1451
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1452
|
+
}
|
|
1453
|
+
if (equalsLong(startIndex, endIndex))
|
|
1454
|
+
return new Long(-1, -1);
|
|
1455
|
+
var offset = startIndex;
|
|
1456
|
+
$l$loop: while (true) {
|
|
1457
|
+
var tmp_0;
|
|
1458
|
+
if (compare(offset, endIndex) < 0) {
|
|
1459
|
+
// Inline function 'kotlin.Long.plus' call
|
|
1460
|
+
var this_0 = offset;
|
|
1461
|
+
var tmp$ret$2 = add(this_0, fromInt(1));
|
|
1462
|
+
tmp_0 = _this__u8e3s4.q1i(tmp$ret$2);
|
|
1463
|
+
} else {
|
|
1464
|
+
tmp_0 = false;
|
|
1465
|
+
}
|
|
1466
|
+
if (!tmp_0) {
|
|
1467
|
+
break $l$loop;
|
|
1468
|
+
}
|
|
1469
|
+
var tmp_1 = _this__u8e3s4.n1i();
|
|
1470
|
+
var tmp_2 = offset;
|
|
1471
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
1472
|
+
var b = _this__u8e3s4.n1i().g1();
|
|
1473
|
+
var tmp$ret$3 = compare(endIndex, b) <= 0 ? endIndex : b;
|
|
1474
|
+
var idx = indexOf(tmp_1, byte, tmp_2, tmp$ret$3);
|
|
1475
|
+
if (!equalsLong(idx, new Long(-1, -1))) {
|
|
1476
|
+
return idx;
|
|
1477
|
+
}
|
|
1478
|
+
offset = _this__u8e3s4.n1i().g1();
|
|
1479
|
+
}
|
|
1480
|
+
return new Long(-1, -1);
|
|
1481
|
+
}
|
|
1482
|
+
function readByteArrayImpl(_this__u8e3s4, size) {
|
|
1483
|
+
var arraySize = size;
|
|
1484
|
+
if (size === -1) {
|
|
1485
|
+
var fetchSize = new Long(2147483647, 0);
|
|
1486
|
+
while (compare(_this__u8e3s4.n1i().g1(), new Long(2147483647, 0)) < 0 && _this__u8e3s4.q1i(fetchSize)) {
|
|
1487
|
+
// Inline function 'kotlin.Long.times' call
|
|
1488
|
+
var this_0 = fetchSize;
|
|
1489
|
+
fetchSize = multiply(this_0, fromInt(2));
|
|
1490
|
+
}
|
|
1491
|
+
// Inline function 'kotlin.check' call
|
|
1492
|
+
if (!(compare(_this__u8e3s4.n1i().g1(), new Long(2147483647, 0)) < 0)) {
|
|
1493
|
+
var message = "Can't create an array of size " + _this__u8e3s4.n1i().g1().toString();
|
|
1494
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
1495
|
+
}
|
|
1496
|
+
arraySize = convertToInt(_this__u8e3s4.n1i().g1());
|
|
1497
|
+
} else {
|
|
1498
|
+
_this__u8e3s4.p1i(fromInt(size));
|
|
1499
|
+
}
|
|
1500
|
+
var array = new Int8Array(arraySize);
|
|
1501
|
+
readTo(_this__u8e3s4.n1i(), array);
|
|
1502
|
+
return array;
|
|
1503
|
+
}
|
|
1504
|
+
function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
1505
|
+
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
1506
|
+
endIndex = endIndex === VOID ? sink.length : endIndex;
|
|
1507
|
+
// Inline function 'kotlinx.io.checkBounds' call
|
|
1508
|
+
var size = sink.length;
|
|
1509
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1510
|
+
var offset = startIndex;
|
|
1511
|
+
while (offset < endIndex) {
|
|
1512
|
+
var bytesRead = _this__u8e3s4.m1j(sink, offset, endIndex);
|
|
1513
|
+
if (bytesRead === -1) {
|
|
1514
|
+
throw EOFException_init_$Create$_0('Source exhausted before reading ' + (endIndex - startIndex | 0) + ' bytes. ' + ('Only ' + bytesRead + ' bytes were read.'));
|
|
1515
|
+
}
|
|
1516
|
+
offset = offset + bytesRead | 0;
|
|
1517
|
+
}
|
|
654
1518
|
}
|
|
655
1519
|
function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
656
1520
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
@@ -660,7 +1524,7 @@
|
|
|
660
1524
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
661
1525
|
// Inline function 'kotlinx.io.writeToInternalBuffer' call
|
|
662
1526
|
// Inline function 'kotlinx.io.commonWriteUtf8' call
|
|
663
|
-
var this_0 = _this__u8e3s4.
|
|
1527
|
+
var this_0 = _this__u8e3s4.n1i();
|
|
664
1528
|
var i = startIndex;
|
|
665
1529
|
while (i < endIndex) {
|
|
666
1530
|
var p0 = i;
|
|
@@ -670,15 +1534,15 @@
|
|
|
670
1534
|
if (c < 128) {
|
|
671
1535
|
$l$block_0: {
|
|
672
1536
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
673
|
-
var tail = this_0.
|
|
1537
|
+
var tail = this_0.t1j(1);
|
|
674
1538
|
var ctx = get_SegmentWriteContextImpl();
|
|
675
1539
|
var segmentOffset = -i | 0;
|
|
676
1540
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
677
|
-
var b = i + tail.
|
|
1541
|
+
var b = i + tail.y1j() | 0;
|
|
678
1542
|
var runLimit = Math.min(endIndex, b);
|
|
679
1543
|
var _unary__edvuaz = i;
|
|
680
1544
|
i = _unary__edvuaz + 1 | 0;
|
|
681
|
-
ctx.
|
|
1545
|
+
ctx.o1l(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
|
|
682
1546
|
$l$loop: while (i < runLimit) {
|
|
683
1547
|
var p0_0 = i;
|
|
684
1548
|
// Inline function 'kotlin.code' call
|
|
@@ -688,95 +1552,95 @@
|
|
|
688
1552
|
break $l$loop;
|
|
689
1553
|
var _unary__edvuaz_0 = i;
|
|
690
1554
|
i = _unary__edvuaz_0 + 1 | 0;
|
|
691
|
-
ctx.
|
|
1555
|
+
ctx.o1l(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
|
|
692
1556
|
}
|
|
693
1557
|
var bytesWritten = i + segmentOffset | 0;
|
|
694
1558
|
if (bytesWritten === 1) {
|
|
695
|
-
tail.
|
|
1559
|
+
tail.u1i_1 = tail.u1i_1 + bytesWritten | 0;
|
|
696
1560
|
var tmp = this_0;
|
|
697
1561
|
// Inline function 'kotlin.Long.plus' call
|
|
698
|
-
var this_3 = this_0.
|
|
699
|
-
tmp.
|
|
1562
|
+
var this_3 = this_0.m1i_1;
|
|
1563
|
+
tmp.m1i_1 = add(this_3, fromInt(bytesWritten));
|
|
700
1564
|
break $l$block_0;
|
|
701
1565
|
}
|
|
702
1566
|
// Inline function 'kotlin.check' call
|
|
703
|
-
if (!(0 <= bytesWritten ? bytesWritten <= tail.
|
|
704
|
-
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.
|
|
1567
|
+
if (!(0 <= bytesWritten ? bytesWritten <= tail.y1j() : false)) {
|
|
1568
|
+
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.y1j();
|
|
705
1569
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
706
1570
|
}
|
|
707
1571
|
if (!(bytesWritten === 0)) {
|
|
708
|
-
tail.
|
|
1572
|
+
tail.u1i_1 = tail.u1i_1 + bytesWritten | 0;
|
|
709
1573
|
var tmp_0 = this_0;
|
|
710
1574
|
// Inline function 'kotlin.Long.plus' call
|
|
711
|
-
var this_4 = this_0.
|
|
712
|
-
tmp_0.
|
|
1575
|
+
var this_4 = this_0.m1i_1;
|
|
1576
|
+
tmp_0.m1i_1 = add(this_4, fromInt(bytesWritten));
|
|
713
1577
|
break $l$block_0;
|
|
714
1578
|
}
|
|
715
1579
|
if (isEmpty(tail)) {
|
|
716
|
-
this_0.
|
|
1580
|
+
this_0.n1k();
|
|
717
1581
|
}
|
|
718
1582
|
}
|
|
719
1583
|
} else if (c < 2048) {
|
|
720
1584
|
$l$block_2: {
|
|
721
1585
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
722
|
-
var tail_0 = this_0.
|
|
723
|
-
get_SegmentWriteContextImpl().
|
|
1586
|
+
var tail_0 = this_0.t1j(2);
|
|
1587
|
+
get_SegmentWriteContextImpl().n1l(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
724
1588
|
var bytesWritten_0 = 2;
|
|
725
1589
|
if (bytesWritten_0 === 2) {
|
|
726
|
-
tail_0.
|
|
1590
|
+
tail_0.u1i_1 = tail_0.u1i_1 + bytesWritten_0 | 0;
|
|
727
1591
|
var tmp_1 = this_0;
|
|
728
1592
|
// Inline function 'kotlin.Long.plus' call
|
|
729
|
-
var this_5 = this_0.
|
|
730
|
-
tmp_1.
|
|
1593
|
+
var this_5 = this_0.m1i_1;
|
|
1594
|
+
tmp_1.m1i_1 = add(this_5, fromInt(bytesWritten_0));
|
|
731
1595
|
break $l$block_2;
|
|
732
1596
|
}
|
|
733
1597
|
// Inline function 'kotlin.check' call
|
|
734
|
-
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.
|
|
735
|
-
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.
|
|
1598
|
+
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.y1j() : false)) {
|
|
1599
|
+
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.y1j();
|
|
736
1600
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
737
1601
|
}
|
|
738
1602
|
if (!(bytesWritten_0 === 0)) {
|
|
739
|
-
tail_0.
|
|
1603
|
+
tail_0.u1i_1 = tail_0.u1i_1 + bytesWritten_0 | 0;
|
|
740
1604
|
var tmp_2 = this_0;
|
|
741
1605
|
// Inline function 'kotlin.Long.plus' call
|
|
742
|
-
var this_6 = this_0.
|
|
743
|
-
tmp_2.
|
|
1606
|
+
var this_6 = this_0.m1i_1;
|
|
1607
|
+
tmp_2.m1i_1 = add(this_6, fromInt(bytesWritten_0));
|
|
744
1608
|
break $l$block_2;
|
|
745
1609
|
}
|
|
746
1610
|
if (isEmpty(tail_0)) {
|
|
747
|
-
this_0.
|
|
1611
|
+
this_0.n1k();
|
|
748
1612
|
}
|
|
749
1613
|
}
|
|
750
1614
|
i = i + 1 | 0;
|
|
751
1615
|
} else if (c < 55296 || c > 57343) {
|
|
752
1616
|
$l$block_4: {
|
|
753
1617
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
754
|
-
var tail_1 = this_0.
|
|
755
|
-
get_SegmentWriteContextImpl().
|
|
1618
|
+
var tail_1 = this_0.t1j(3);
|
|
1619
|
+
get_SegmentWriteContextImpl().m1l(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
756
1620
|
var bytesWritten_1 = 3;
|
|
757
1621
|
if (bytesWritten_1 === 3) {
|
|
758
|
-
tail_1.
|
|
1622
|
+
tail_1.u1i_1 = tail_1.u1i_1 + bytesWritten_1 | 0;
|
|
759
1623
|
var tmp_3 = this_0;
|
|
760
1624
|
// Inline function 'kotlin.Long.plus' call
|
|
761
|
-
var this_7 = this_0.
|
|
762
|
-
tmp_3.
|
|
1625
|
+
var this_7 = this_0.m1i_1;
|
|
1626
|
+
tmp_3.m1i_1 = add(this_7, fromInt(bytesWritten_1));
|
|
763
1627
|
break $l$block_4;
|
|
764
1628
|
}
|
|
765
1629
|
// Inline function 'kotlin.check' call
|
|
766
|
-
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.
|
|
767
|
-
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.
|
|
1630
|
+
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.y1j() : false)) {
|
|
1631
|
+
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.y1j();
|
|
768
1632
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
769
1633
|
}
|
|
770
1634
|
if (!(bytesWritten_1 === 0)) {
|
|
771
|
-
tail_1.
|
|
1635
|
+
tail_1.u1i_1 = tail_1.u1i_1 + bytesWritten_1 | 0;
|
|
772
1636
|
var tmp_4 = this_0;
|
|
773
1637
|
// Inline function 'kotlin.Long.plus' call
|
|
774
|
-
var this_8 = this_0.
|
|
775
|
-
tmp_4.
|
|
1638
|
+
var this_8 = this_0.m1i_1;
|
|
1639
|
+
tmp_4.m1i_1 = add(this_8, fromInt(bytesWritten_1));
|
|
776
1640
|
break $l$block_4;
|
|
777
1641
|
}
|
|
778
1642
|
if (isEmpty(tail_1)) {
|
|
779
|
-
this_0.
|
|
1643
|
+
this_0.n1k();
|
|
780
1644
|
}
|
|
781
1645
|
}
|
|
782
1646
|
i = i + 1 | 0;
|
|
@@ -795,45 +1659,82 @@
|
|
|
795
1659
|
// Inline function 'kotlin.code' call
|
|
796
1660
|
var this_10 = _Char___init__impl__6a9atx(63);
|
|
797
1661
|
var tmp$ret$26 = Char__toInt_impl_vasixd(this_10);
|
|
798
|
-
this_0.
|
|
1662
|
+
this_0.h1k(toByte(tmp$ret$26));
|
|
799
1663
|
i = i + 1 | 0;
|
|
800
1664
|
} else {
|
|
801
1665
|
var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
|
|
802
1666
|
$l$block_6: {
|
|
803
1667
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
804
|
-
var tail_2 = this_0.
|
|
805
|
-
get_SegmentWriteContextImpl().
|
|
1668
|
+
var tail_2 = this_0.t1j(4);
|
|
1669
|
+
get_SegmentWriteContextImpl().l1l(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
806
1670
|
var bytesWritten_2 = 4;
|
|
807
1671
|
if (bytesWritten_2 === 4) {
|
|
808
|
-
tail_2.
|
|
1672
|
+
tail_2.u1i_1 = tail_2.u1i_1 + bytesWritten_2 | 0;
|
|
809
1673
|
var tmp_6 = this_0;
|
|
810
1674
|
// Inline function 'kotlin.Long.plus' call
|
|
811
|
-
var this_11 = this_0.
|
|
812
|
-
tmp_6.
|
|
1675
|
+
var this_11 = this_0.m1i_1;
|
|
1676
|
+
tmp_6.m1i_1 = add(this_11, fromInt(bytesWritten_2));
|
|
813
1677
|
break $l$block_6;
|
|
814
1678
|
}
|
|
815
1679
|
// Inline function 'kotlin.check' call
|
|
816
|
-
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.
|
|
817
|
-
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.
|
|
1680
|
+
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.y1j() : false)) {
|
|
1681
|
+
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.y1j();
|
|
818
1682
|
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
819
1683
|
}
|
|
820
1684
|
if (!(bytesWritten_2 === 0)) {
|
|
821
|
-
tail_2.
|
|
1685
|
+
tail_2.u1i_1 = tail_2.u1i_1 + bytesWritten_2 | 0;
|
|
822
1686
|
var tmp_7 = this_0;
|
|
823
1687
|
// Inline function 'kotlin.Long.plus' call
|
|
824
|
-
var this_12 = this_0.
|
|
825
|
-
tmp_7.
|
|
1688
|
+
var this_12 = this_0.m1i_1;
|
|
1689
|
+
tmp_7.m1i_1 = add(this_12, fromInt(bytesWritten_2));
|
|
826
1690
|
break $l$block_6;
|
|
827
1691
|
}
|
|
828
1692
|
if (isEmpty(tail_2)) {
|
|
829
|
-
this_0.
|
|
1693
|
+
this_0.n1k();
|
|
830
1694
|
}
|
|
831
1695
|
}
|
|
832
1696
|
i = i + 2 | 0;
|
|
833
1697
|
}
|
|
834
1698
|
}
|
|
835
1699
|
}
|
|
836
|
-
_this__u8e3s4.
|
|
1700
|
+
_this__u8e3s4.d1j();
|
|
1701
|
+
}
|
|
1702
|
+
function readString(_this__u8e3s4) {
|
|
1703
|
+
return commonReadUtf8(_this__u8e3s4, _this__u8e3s4.g1());
|
|
1704
|
+
}
|
|
1705
|
+
function readString_0(_this__u8e3s4) {
|
|
1706
|
+
_this__u8e3s4.q1i(new Long(-1, 2147483647));
|
|
1707
|
+
return commonReadUtf8(_this__u8e3s4.n1i(), _this__u8e3s4.n1i().g1());
|
|
1708
|
+
}
|
|
1709
|
+
function readString_1(_this__u8e3s4, byteCount) {
|
|
1710
|
+
_this__u8e3s4.p1i(byteCount);
|
|
1711
|
+
return commonReadUtf8(_this__u8e3s4.n1i(), byteCount);
|
|
1712
|
+
}
|
|
1713
|
+
function commonReadUtf8(_this__u8e3s4, byteCount) {
|
|
1714
|
+
if (equalsLong(byteCount, new Long(0, 0)))
|
|
1715
|
+
return '';
|
|
1716
|
+
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
1717
|
+
var curr = _this__u8e3s4.k1i_1;
|
|
1718
|
+
while (!(curr == null)) {
|
|
1719
|
+
get_SegmentReadContextImpl();
|
|
1720
|
+
if (compare(fromInt(curr.g1()), byteCount) >= 0) {
|
|
1721
|
+
var result = '';
|
|
1722
|
+
// Inline function 'kotlinx.io.unsafe.withData' call
|
|
1723
|
+
var tmp0 = curr.g1l(true);
|
|
1724
|
+
var tmp2 = curr.t1i_1;
|
|
1725
|
+
var tmp0_0 = curr.u1i_1;
|
|
1726
|
+
// Inline function 'kotlin.math.min' call
|
|
1727
|
+
var b = tmp2 + convertToInt(byteCount) | 0;
|
|
1728
|
+
var tmp$ret$0 = Math.min(tmp0_0, b);
|
|
1729
|
+
result = commonToUtf8String(tmp0, tmp2, tmp$ret$0);
|
|
1730
|
+
_this__u8e3s4.l1j(byteCount);
|
|
1731
|
+
return result;
|
|
1732
|
+
}
|
|
1733
|
+
return commonToUtf8String(readByteArray_0(_this__u8e3s4, convertToInt(byteCount)));
|
|
1734
|
+
}
|
|
1735
|
+
// Inline function 'kotlin.error' call
|
|
1736
|
+
var message = 'Unreacheable';
|
|
1737
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
837
1738
|
}
|
|
838
1739
|
function FileSystem() {
|
|
839
1740
|
}
|
|
@@ -841,9 +1742,9 @@
|
|
|
841
1742
|
isRegularFile = isRegularFile === VOID ? false : isRegularFile;
|
|
842
1743
|
isDirectory = isDirectory === VOID ? false : isDirectory;
|
|
843
1744
|
size = size === VOID ? new Long(0, 0) : size;
|
|
844
|
-
this.
|
|
845
|
-
this.
|
|
846
|
-
this.
|
|
1745
|
+
this.v1l_1 = isRegularFile;
|
|
1746
|
+
this.w1l_1 = isDirectory;
|
|
1747
|
+
this.x1l_1 = size;
|
|
847
1748
|
}
|
|
848
1749
|
function SystemFileSystemImpl() {
|
|
849
1750
|
}
|
|
@@ -851,7 +1752,7 @@
|
|
|
851
1752
|
// Inline function 'kotlin.text.buildString' call
|
|
852
1753
|
// Inline function 'kotlin.apply' call
|
|
853
1754
|
var this_0 = StringBuilder_init_$Create$_0();
|
|
854
|
-
this_0.
|
|
1755
|
+
this_0.q(base);
|
|
855
1756
|
// Inline function 'kotlin.collections.forEach' call
|
|
856
1757
|
var inductionVariable = 0;
|
|
857
1758
|
var last = parts.length;
|
|
@@ -866,9 +1767,9 @@
|
|
|
866
1767
|
tmp = false;
|
|
867
1768
|
}
|
|
868
1769
|
if (tmp) {
|
|
869
|
-
this_0.
|
|
1770
|
+
this_0.s(get_SystemPathSeparator());
|
|
870
1771
|
}
|
|
871
|
-
this_0.
|
|
1772
|
+
this_0.q(element);
|
|
872
1773
|
}
|
|
873
1774
|
var tmp$ret$5 = this_0.toString();
|
|
874
1775
|
return Path_1(tmp$ret$5);
|
|
@@ -927,6 +1828,349 @@
|
|
|
927
1828
|
}
|
|
928
1829
|
return substring(path, 0, idx);
|
|
929
1830
|
}
|
|
1831
|
+
function commonToUtf8String(_this__u8e3s4, beginIndex, endIndex) {
|
|
1832
|
+
beginIndex = beginIndex === VOID ? 0 : beginIndex;
|
|
1833
|
+
endIndex = endIndex === VOID ? _this__u8e3s4.length : endIndex;
|
|
1834
|
+
if (beginIndex < 0 || endIndex > _this__u8e3s4.length || beginIndex > endIndex) {
|
|
1835
|
+
throw IndexOutOfBoundsException_init_$Create$('size=' + _this__u8e3s4.length + ' beginIndex=' + beginIndex + ' endIndex=' + endIndex);
|
|
1836
|
+
}
|
|
1837
|
+
var chars = charArray(endIndex - beginIndex | 0);
|
|
1838
|
+
var length = 0;
|
|
1839
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars' call
|
|
1840
|
+
var index = beginIndex;
|
|
1841
|
+
while (index < endIndex) {
|
|
1842
|
+
var b0 = _this__u8e3s4[index];
|
|
1843
|
+
if (b0 >= 0) {
|
|
1844
|
+
var c = numberToChar(b0);
|
|
1845
|
+
var _unary__edvuaz = length;
|
|
1846
|
+
length = _unary__edvuaz + 1 | 0;
|
|
1847
|
+
chars[_unary__edvuaz] = c;
|
|
1848
|
+
index = index + 1 | 0;
|
|
1849
|
+
while (index < endIndex && _this__u8e3s4[index] >= 0) {
|
|
1850
|
+
var _unary__edvuaz_0 = index;
|
|
1851
|
+
index = _unary__edvuaz_0 + 1 | 0;
|
|
1852
|
+
var c_0 = numberToChar(_this__u8e3s4[_unary__edvuaz_0]);
|
|
1853
|
+
var _unary__edvuaz_1 = length;
|
|
1854
|
+
length = _unary__edvuaz_1 + 1 | 0;
|
|
1855
|
+
chars[_unary__edvuaz_1] = c_0;
|
|
1856
|
+
}
|
|
1857
|
+
} else {
|
|
1858
|
+
// Inline function 'kotlinx.io.shr' call
|
|
1859
|
+
if (b0 >> 5 === -2) {
|
|
1860
|
+
var tmp = index;
|
|
1861
|
+
var tmp2 = index;
|
|
1862
|
+
var tmp$ret$5;
|
|
1863
|
+
$l$block_0: {
|
|
1864
|
+
// Inline function 'kotlinx.io.internal.process2Utf8Bytes' call
|
|
1865
|
+
if (endIndex <= (tmp2 + 1 | 0)) {
|
|
1866
|
+
var c_1 = numberToChar(65533);
|
|
1867
|
+
var _unary__edvuaz_2 = length;
|
|
1868
|
+
length = _unary__edvuaz_2 + 1 | 0;
|
|
1869
|
+
chars[_unary__edvuaz_2] = c_1;
|
|
1870
|
+
tmp$ret$5 = 1;
|
|
1871
|
+
break $l$block_0;
|
|
1872
|
+
}
|
|
1873
|
+
var b0_0 = _this__u8e3s4[tmp2];
|
|
1874
|
+
var b1 = _this__u8e3s4[tmp2 + 1 | 0];
|
|
1875
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1876
|
+
// Inline function 'kotlinx.io.and' call
|
|
1877
|
+
if (!((b1 & 192) === 128)) {
|
|
1878
|
+
var c_2 = numberToChar(65533);
|
|
1879
|
+
var _unary__edvuaz_3 = length;
|
|
1880
|
+
length = _unary__edvuaz_3 + 1 | 0;
|
|
1881
|
+
chars[_unary__edvuaz_3] = c_2;
|
|
1882
|
+
tmp$ret$5 = 1;
|
|
1883
|
+
break $l$block_0;
|
|
1884
|
+
}
|
|
1885
|
+
var codePoint = 3968 ^ b1 ^ b0_0 << 6;
|
|
1886
|
+
if (codePoint < 128) {
|
|
1887
|
+
var c_3 = numberToChar(65533);
|
|
1888
|
+
var _unary__edvuaz_4 = length;
|
|
1889
|
+
length = _unary__edvuaz_4 + 1 | 0;
|
|
1890
|
+
chars[_unary__edvuaz_4] = c_3;
|
|
1891
|
+
} else {
|
|
1892
|
+
var c_4 = numberToChar(codePoint);
|
|
1893
|
+
var _unary__edvuaz_5 = length;
|
|
1894
|
+
length = _unary__edvuaz_5 + 1 | 0;
|
|
1895
|
+
chars[_unary__edvuaz_5] = c_4;
|
|
1896
|
+
}
|
|
1897
|
+
tmp$ret$5 = 2;
|
|
1898
|
+
}
|
|
1899
|
+
index = tmp + tmp$ret$5 | 0;
|
|
1900
|
+
} else {
|
|
1901
|
+
// Inline function 'kotlinx.io.shr' call
|
|
1902
|
+
if (b0 >> 4 === -2) {
|
|
1903
|
+
var tmp_0 = index;
|
|
1904
|
+
var tmp2_0 = index;
|
|
1905
|
+
var tmp$ret$19;
|
|
1906
|
+
$l$block_4: {
|
|
1907
|
+
// Inline function 'kotlinx.io.internal.process3Utf8Bytes' call
|
|
1908
|
+
if (endIndex <= (tmp2_0 + 2 | 0)) {
|
|
1909
|
+
var c_5 = numberToChar(65533);
|
|
1910
|
+
var _unary__edvuaz_6 = length;
|
|
1911
|
+
length = _unary__edvuaz_6 + 1 | 0;
|
|
1912
|
+
chars[_unary__edvuaz_6] = c_5;
|
|
1913
|
+
var tmp_1;
|
|
1914
|
+
if (endIndex <= (tmp2_0 + 1 | 0)) {
|
|
1915
|
+
tmp_1 = true;
|
|
1916
|
+
} else {
|
|
1917
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1918
|
+
// Inline function 'kotlinx.io.and' call
|
|
1919
|
+
tmp_1 = !((_this__u8e3s4[tmp2_0 + 1 | 0] & 192) === 128);
|
|
1920
|
+
}
|
|
1921
|
+
if (tmp_1) {
|
|
1922
|
+
tmp$ret$19 = 1;
|
|
1923
|
+
break $l$block_4;
|
|
1924
|
+
} else {
|
|
1925
|
+
tmp$ret$19 = 2;
|
|
1926
|
+
break $l$block_4;
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
var b0_1 = _this__u8e3s4[tmp2_0];
|
|
1930
|
+
var b1_0 = _this__u8e3s4[tmp2_0 + 1 | 0];
|
|
1931
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1932
|
+
// Inline function 'kotlinx.io.and' call
|
|
1933
|
+
if (!((b1_0 & 192) === 128)) {
|
|
1934
|
+
var c_6 = numberToChar(65533);
|
|
1935
|
+
var _unary__edvuaz_7 = length;
|
|
1936
|
+
length = _unary__edvuaz_7 + 1 | 0;
|
|
1937
|
+
chars[_unary__edvuaz_7] = c_6;
|
|
1938
|
+
tmp$ret$19 = 1;
|
|
1939
|
+
break $l$block_4;
|
|
1940
|
+
}
|
|
1941
|
+
var b2 = _this__u8e3s4[tmp2_0 + 2 | 0];
|
|
1942
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1943
|
+
// Inline function 'kotlinx.io.and' call
|
|
1944
|
+
if (!((b2 & 192) === 128)) {
|
|
1945
|
+
var c_7 = numberToChar(65533);
|
|
1946
|
+
var _unary__edvuaz_8 = length;
|
|
1947
|
+
length = _unary__edvuaz_8 + 1 | 0;
|
|
1948
|
+
chars[_unary__edvuaz_8] = c_7;
|
|
1949
|
+
tmp$ret$19 = 2;
|
|
1950
|
+
break $l$block_4;
|
|
1951
|
+
}
|
|
1952
|
+
var codePoint_0 = -123008 ^ b2 ^ b1_0 << 6 ^ b0_1 << 12;
|
|
1953
|
+
if (codePoint_0 < 2048) {
|
|
1954
|
+
var c_8 = numberToChar(65533);
|
|
1955
|
+
var _unary__edvuaz_9 = length;
|
|
1956
|
+
length = _unary__edvuaz_9 + 1 | 0;
|
|
1957
|
+
chars[_unary__edvuaz_9] = c_8;
|
|
1958
|
+
} else if (55296 <= codePoint_0 ? codePoint_0 <= 57343 : false) {
|
|
1959
|
+
var c_9 = numberToChar(65533);
|
|
1960
|
+
var _unary__edvuaz_10 = length;
|
|
1961
|
+
length = _unary__edvuaz_10 + 1 | 0;
|
|
1962
|
+
chars[_unary__edvuaz_10] = c_9;
|
|
1963
|
+
} else {
|
|
1964
|
+
var c_10 = numberToChar(codePoint_0);
|
|
1965
|
+
var _unary__edvuaz_11 = length;
|
|
1966
|
+
length = _unary__edvuaz_11 + 1 | 0;
|
|
1967
|
+
chars[_unary__edvuaz_11] = c_10;
|
|
1968
|
+
}
|
|
1969
|
+
tmp$ret$19 = 3;
|
|
1970
|
+
}
|
|
1971
|
+
index = tmp_0 + tmp$ret$19 | 0;
|
|
1972
|
+
} else {
|
|
1973
|
+
// Inline function 'kotlinx.io.shr' call
|
|
1974
|
+
if (b0 >> 3 === -2) {
|
|
1975
|
+
var tmp_2 = index;
|
|
1976
|
+
var tmp2_1 = index;
|
|
1977
|
+
var tmp$ret$41;
|
|
1978
|
+
$l$block_10: {
|
|
1979
|
+
// Inline function 'kotlinx.io.internal.process4Utf8Bytes' call
|
|
1980
|
+
if (endIndex <= (tmp2_1 + 3 | 0)) {
|
|
1981
|
+
if (!(65533 === 65533)) {
|
|
1982
|
+
var c_11 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1983
|
+
var _unary__edvuaz_12 = length;
|
|
1984
|
+
length = _unary__edvuaz_12 + 1 | 0;
|
|
1985
|
+
chars[_unary__edvuaz_12] = c_11;
|
|
1986
|
+
var c_12 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1987
|
+
var _unary__edvuaz_13 = length;
|
|
1988
|
+
length = _unary__edvuaz_13 + 1 | 0;
|
|
1989
|
+
chars[_unary__edvuaz_13] = c_12;
|
|
1990
|
+
} else {
|
|
1991
|
+
var c_13 = _Char___init__impl__6a9atx(65533);
|
|
1992
|
+
var _unary__edvuaz_14 = length;
|
|
1993
|
+
length = _unary__edvuaz_14 + 1 | 0;
|
|
1994
|
+
chars[_unary__edvuaz_14] = c_13;
|
|
1995
|
+
}
|
|
1996
|
+
var tmp_3;
|
|
1997
|
+
if (endIndex <= (tmp2_1 + 1 | 0)) {
|
|
1998
|
+
tmp_3 = true;
|
|
1999
|
+
} else {
|
|
2000
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
2001
|
+
// Inline function 'kotlinx.io.and' call
|
|
2002
|
+
tmp_3 = !((_this__u8e3s4[tmp2_1 + 1 | 0] & 192) === 128);
|
|
2003
|
+
}
|
|
2004
|
+
if (tmp_3) {
|
|
2005
|
+
tmp$ret$41 = 1;
|
|
2006
|
+
break $l$block_10;
|
|
2007
|
+
} else {
|
|
2008
|
+
var tmp_4;
|
|
2009
|
+
if (endIndex <= (tmp2_1 + 2 | 0)) {
|
|
2010
|
+
tmp_4 = true;
|
|
2011
|
+
} else {
|
|
2012
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
2013
|
+
// Inline function 'kotlinx.io.and' call
|
|
2014
|
+
tmp_4 = !((_this__u8e3s4[tmp2_1 + 2 | 0] & 192) === 128);
|
|
2015
|
+
}
|
|
2016
|
+
if (tmp_4) {
|
|
2017
|
+
tmp$ret$41 = 2;
|
|
2018
|
+
break $l$block_10;
|
|
2019
|
+
} else {
|
|
2020
|
+
tmp$ret$41 = 3;
|
|
2021
|
+
break $l$block_10;
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
var b0_2 = _this__u8e3s4[tmp2_1];
|
|
2026
|
+
var b1_1 = _this__u8e3s4[tmp2_1 + 1 | 0];
|
|
2027
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
2028
|
+
// Inline function 'kotlinx.io.and' call
|
|
2029
|
+
if (!((b1_1 & 192) === 128)) {
|
|
2030
|
+
if (!(65533 === 65533)) {
|
|
2031
|
+
var c_14 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
2032
|
+
var _unary__edvuaz_15 = length;
|
|
2033
|
+
length = _unary__edvuaz_15 + 1 | 0;
|
|
2034
|
+
chars[_unary__edvuaz_15] = c_14;
|
|
2035
|
+
var c_15 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
2036
|
+
var _unary__edvuaz_16 = length;
|
|
2037
|
+
length = _unary__edvuaz_16 + 1 | 0;
|
|
2038
|
+
chars[_unary__edvuaz_16] = c_15;
|
|
2039
|
+
} else {
|
|
2040
|
+
var c_16 = _Char___init__impl__6a9atx(65533);
|
|
2041
|
+
var _unary__edvuaz_17 = length;
|
|
2042
|
+
length = _unary__edvuaz_17 + 1 | 0;
|
|
2043
|
+
chars[_unary__edvuaz_17] = c_16;
|
|
2044
|
+
}
|
|
2045
|
+
tmp$ret$41 = 1;
|
|
2046
|
+
break $l$block_10;
|
|
2047
|
+
}
|
|
2048
|
+
var b2_0 = _this__u8e3s4[tmp2_1 + 2 | 0];
|
|
2049
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
2050
|
+
// Inline function 'kotlinx.io.and' call
|
|
2051
|
+
if (!((b2_0 & 192) === 128)) {
|
|
2052
|
+
if (!(65533 === 65533)) {
|
|
2053
|
+
var c_17 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
2054
|
+
var _unary__edvuaz_18 = length;
|
|
2055
|
+
length = _unary__edvuaz_18 + 1 | 0;
|
|
2056
|
+
chars[_unary__edvuaz_18] = c_17;
|
|
2057
|
+
var c_18 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
2058
|
+
var _unary__edvuaz_19 = length;
|
|
2059
|
+
length = _unary__edvuaz_19 + 1 | 0;
|
|
2060
|
+
chars[_unary__edvuaz_19] = c_18;
|
|
2061
|
+
} else {
|
|
2062
|
+
var c_19 = _Char___init__impl__6a9atx(65533);
|
|
2063
|
+
var _unary__edvuaz_20 = length;
|
|
2064
|
+
length = _unary__edvuaz_20 + 1 | 0;
|
|
2065
|
+
chars[_unary__edvuaz_20] = c_19;
|
|
2066
|
+
}
|
|
2067
|
+
tmp$ret$41 = 2;
|
|
2068
|
+
break $l$block_10;
|
|
2069
|
+
}
|
|
2070
|
+
var b3 = _this__u8e3s4[tmp2_1 + 3 | 0];
|
|
2071
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
2072
|
+
// Inline function 'kotlinx.io.and' call
|
|
2073
|
+
if (!((b3 & 192) === 128)) {
|
|
2074
|
+
if (!(65533 === 65533)) {
|
|
2075
|
+
var c_20 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
2076
|
+
var _unary__edvuaz_21 = length;
|
|
2077
|
+
length = _unary__edvuaz_21 + 1 | 0;
|
|
2078
|
+
chars[_unary__edvuaz_21] = c_20;
|
|
2079
|
+
var c_21 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
2080
|
+
var _unary__edvuaz_22 = length;
|
|
2081
|
+
length = _unary__edvuaz_22 + 1 | 0;
|
|
2082
|
+
chars[_unary__edvuaz_22] = c_21;
|
|
2083
|
+
} else {
|
|
2084
|
+
var c_22 = _Char___init__impl__6a9atx(65533);
|
|
2085
|
+
var _unary__edvuaz_23 = length;
|
|
2086
|
+
length = _unary__edvuaz_23 + 1 | 0;
|
|
2087
|
+
chars[_unary__edvuaz_23] = c_22;
|
|
2088
|
+
}
|
|
2089
|
+
tmp$ret$41 = 3;
|
|
2090
|
+
break $l$block_10;
|
|
2091
|
+
}
|
|
2092
|
+
var codePoint_1 = 3678080 ^ b3 ^ b2_0 << 6 ^ b1_1 << 12 ^ b0_2 << 18;
|
|
2093
|
+
if (codePoint_1 > 1114111) {
|
|
2094
|
+
if (!(65533 === 65533)) {
|
|
2095
|
+
var c_23 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
2096
|
+
var _unary__edvuaz_24 = length;
|
|
2097
|
+
length = _unary__edvuaz_24 + 1 | 0;
|
|
2098
|
+
chars[_unary__edvuaz_24] = c_23;
|
|
2099
|
+
var c_24 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
2100
|
+
var _unary__edvuaz_25 = length;
|
|
2101
|
+
length = _unary__edvuaz_25 + 1 | 0;
|
|
2102
|
+
chars[_unary__edvuaz_25] = c_24;
|
|
2103
|
+
} else {
|
|
2104
|
+
var c_25 = _Char___init__impl__6a9atx(65533);
|
|
2105
|
+
var _unary__edvuaz_26 = length;
|
|
2106
|
+
length = _unary__edvuaz_26 + 1 | 0;
|
|
2107
|
+
chars[_unary__edvuaz_26] = c_25;
|
|
2108
|
+
}
|
|
2109
|
+
} else if (55296 <= codePoint_1 ? codePoint_1 <= 57343 : false) {
|
|
2110
|
+
if (!(65533 === 65533)) {
|
|
2111
|
+
var c_26 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
2112
|
+
var _unary__edvuaz_27 = length;
|
|
2113
|
+
length = _unary__edvuaz_27 + 1 | 0;
|
|
2114
|
+
chars[_unary__edvuaz_27] = c_26;
|
|
2115
|
+
var c_27 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
2116
|
+
var _unary__edvuaz_28 = length;
|
|
2117
|
+
length = _unary__edvuaz_28 + 1 | 0;
|
|
2118
|
+
chars[_unary__edvuaz_28] = c_27;
|
|
2119
|
+
} else {
|
|
2120
|
+
var c_28 = _Char___init__impl__6a9atx(65533);
|
|
2121
|
+
var _unary__edvuaz_29 = length;
|
|
2122
|
+
length = _unary__edvuaz_29 + 1 | 0;
|
|
2123
|
+
chars[_unary__edvuaz_29] = c_28;
|
|
2124
|
+
}
|
|
2125
|
+
} else if (codePoint_1 < 65536) {
|
|
2126
|
+
if (!(65533 === 65533)) {
|
|
2127
|
+
var c_29 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
2128
|
+
var _unary__edvuaz_30 = length;
|
|
2129
|
+
length = _unary__edvuaz_30 + 1 | 0;
|
|
2130
|
+
chars[_unary__edvuaz_30] = c_29;
|
|
2131
|
+
var c_30 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
2132
|
+
var _unary__edvuaz_31 = length;
|
|
2133
|
+
length = _unary__edvuaz_31 + 1 | 0;
|
|
2134
|
+
chars[_unary__edvuaz_31] = c_30;
|
|
2135
|
+
} else {
|
|
2136
|
+
var c_31 = _Char___init__impl__6a9atx(65533);
|
|
2137
|
+
var _unary__edvuaz_32 = length;
|
|
2138
|
+
length = _unary__edvuaz_32 + 1 | 0;
|
|
2139
|
+
chars[_unary__edvuaz_32] = c_31;
|
|
2140
|
+
}
|
|
2141
|
+
} else {
|
|
2142
|
+
if (!(codePoint_1 === 65533)) {
|
|
2143
|
+
var c_32 = numberToChar((codePoint_1 >>> 10 | 0) + 55232 | 0);
|
|
2144
|
+
var _unary__edvuaz_33 = length;
|
|
2145
|
+
length = _unary__edvuaz_33 + 1 | 0;
|
|
2146
|
+
chars[_unary__edvuaz_33] = c_32;
|
|
2147
|
+
var c_33 = numberToChar((codePoint_1 & 1023) + 56320 | 0);
|
|
2148
|
+
var _unary__edvuaz_34 = length;
|
|
2149
|
+
length = _unary__edvuaz_34 + 1 | 0;
|
|
2150
|
+
chars[_unary__edvuaz_34] = c_33;
|
|
2151
|
+
} else {
|
|
2152
|
+
var c_34 = _Char___init__impl__6a9atx(65533);
|
|
2153
|
+
var _unary__edvuaz_35 = length;
|
|
2154
|
+
length = _unary__edvuaz_35 + 1 | 0;
|
|
2155
|
+
chars[_unary__edvuaz_35] = c_34;
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
tmp$ret$41 = 4;
|
|
2159
|
+
}
|
|
2160
|
+
index = tmp_2 + tmp$ret$41 | 0;
|
|
2161
|
+
} else {
|
|
2162
|
+
var c_35 = _Char___init__impl__6a9atx(65533);
|
|
2163
|
+
var _unary__edvuaz_36 = length;
|
|
2164
|
+
length = _unary__edvuaz_36 + 1 | 0;
|
|
2165
|
+
chars[_unary__edvuaz_36] = c_35;
|
|
2166
|
+
index = index + 1 | 0;
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
return concatToString(chars, 0, length);
|
|
2173
|
+
}
|
|
930
2174
|
function get_SegmentReadContextImpl() {
|
|
931
2175
|
_init_properties_UnsafeBufferOperations_kt__xw75gy();
|
|
932
2176
|
return SegmentReadContextImpl;
|
|
@@ -946,27 +2190,27 @@
|
|
|
946
2190
|
}
|
|
947
2191
|
function SegmentReadContextImpl$1() {
|
|
948
2192
|
}
|
|
949
|
-
protoOf(SegmentReadContextImpl$1).
|
|
950
|
-
return segment.
|
|
2193
|
+
protoOf(SegmentReadContextImpl$1).l1k = function (segment, offset) {
|
|
2194
|
+
return segment.k1j(offset);
|
|
951
2195
|
};
|
|
952
2196
|
function SegmentWriteContextImpl$1() {
|
|
953
2197
|
}
|
|
954
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
955
|
-
segment.
|
|
2198
|
+
protoOf(SegmentWriteContextImpl$1).o1l = function (segment, offset, value) {
|
|
2199
|
+
segment.h1l(offset, value);
|
|
956
2200
|
};
|
|
957
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
958
|
-
segment.
|
|
2201
|
+
protoOf(SegmentWriteContextImpl$1).n1l = function (segment, offset, b0, b1) {
|
|
2202
|
+
segment.i1l(offset, b0, b1);
|
|
959
2203
|
};
|
|
960
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
961
|
-
segment.
|
|
2204
|
+
protoOf(SegmentWriteContextImpl$1).m1l = function (segment, offset, b0, b1, b2) {
|
|
2205
|
+
segment.j1l(offset, b0, b1, b2);
|
|
962
2206
|
};
|
|
963
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
964
|
-
segment.
|
|
2207
|
+
protoOf(SegmentWriteContextImpl$1).l1l = function (segment, offset, b0, b1, b2, b3) {
|
|
2208
|
+
segment.k1l(offset, b0, b1, b2, b3);
|
|
965
2209
|
};
|
|
966
2210
|
function BufferIterationContextImpl$1() {
|
|
967
2211
|
}
|
|
968
|
-
protoOf(BufferIterationContextImpl$1).
|
|
969
|
-
return get_SegmentReadContextImpl().
|
|
2212
|
+
protoOf(BufferIterationContextImpl$1).l1k = function (segment, offset) {
|
|
2213
|
+
return get_SegmentReadContextImpl().l1k(segment, offset);
|
|
970
2214
|
};
|
|
971
2215
|
var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
|
|
972
2216
|
function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
@@ -977,29 +2221,6 @@
|
|
|
977
2221
|
BufferIterationContextImpl = new BufferIterationContextImpl$1();
|
|
978
2222
|
}
|
|
979
2223
|
}
|
|
980
|
-
function EOFException_init_$Init$($this) {
|
|
981
|
-
IOException_init_$Init$($this);
|
|
982
|
-
EOFException.call($this);
|
|
983
|
-
return $this;
|
|
984
|
-
}
|
|
985
|
-
function EOFException_init_$Create$() {
|
|
986
|
-
var tmp = EOFException_init_$Init$(objectCreate(protoOf(EOFException)));
|
|
987
|
-
captureStack(tmp, EOFException_init_$Create$);
|
|
988
|
-
return tmp;
|
|
989
|
-
}
|
|
990
|
-
function EOFException_init_$Init$_0(message, $this) {
|
|
991
|
-
IOException_init_$Init$_0(message, $this);
|
|
992
|
-
EOFException.call($this);
|
|
993
|
-
return $this;
|
|
994
|
-
}
|
|
995
|
-
function EOFException_init_$Create$_0(message) {
|
|
996
|
-
var tmp = EOFException_init_$Init$_0(message, objectCreate(protoOf(EOFException)));
|
|
997
|
-
captureStack(tmp, EOFException_init_$Create$_0);
|
|
998
|
-
return tmp;
|
|
999
|
-
}
|
|
1000
|
-
function EOFException() {
|
|
1001
|
-
captureStack(this, EOFException);
|
|
1002
|
-
}
|
|
1003
2224
|
function IOException_init_$Init$($this) {
|
|
1004
2225
|
Exception_init_$Init$($this);
|
|
1005
2226
|
IOException.call($this);
|
|
@@ -1033,6 +2254,29 @@
|
|
|
1033
2254
|
function IOException() {
|
|
1034
2255
|
captureStack(this, IOException);
|
|
1035
2256
|
}
|
|
2257
|
+
function EOFException_init_$Init$($this) {
|
|
2258
|
+
IOException_init_$Init$($this);
|
|
2259
|
+
EOFException.call($this);
|
|
2260
|
+
return $this;
|
|
2261
|
+
}
|
|
2262
|
+
function EOFException_init_$Create$() {
|
|
2263
|
+
var tmp = EOFException_init_$Init$(objectCreate(protoOf(EOFException)));
|
|
2264
|
+
captureStack(tmp, EOFException_init_$Create$);
|
|
2265
|
+
return tmp;
|
|
2266
|
+
}
|
|
2267
|
+
function EOFException_init_$Init$_0(message, $this) {
|
|
2268
|
+
IOException_init_$Init$_0(message, $this);
|
|
2269
|
+
EOFException.call($this);
|
|
2270
|
+
return $this;
|
|
2271
|
+
}
|
|
2272
|
+
function EOFException_init_$Create$_0(message) {
|
|
2273
|
+
var tmp = EOFException_init_$Init$_0(message, objectCreate(protoOf(EOFException)));
|
|
2274
|
+
captureStack(tmp, EOFException_init_$Create$_0);
|
|
2275
|
+
return tmp;
|
|
2276
|
+
}
|
|
2277
|
+
function EOFException() {
|
|
2278
|
+
captureStack(this, EOFException);
|
|
2279
|
+
}
|
|
1036
2280
|
function withCaughtException(block) {
|
|
1037
2281
|
try {
|
|
1038
2282
|
block();
|
|
@@ -1047,15 +2291,15 @@
|
|
|
1047
2291
|
}
|
|
1048
2292
|
}
|
|
1049
2293
|
function SegmentPool() {
|
|
1050
|
-
this.
|
|
1051
|
-
this.
|
|
2294
|
+
this.u1j_1 = 0;
|
|
2295
|
+
this.v1j_1 = 0;
|
|
1052
2296
|
}
|
|
1053
|
-
protoOf(SegmentPool).
|
|
1054
|
-
return Companion_instance.
|
|
2297
|
+
protoOf(SegmentPool).w1j = function () {
|
|
2298
|
+
return Companion_instance.c1l();
|
|
1055
2299
|
};
|
|
1056
|
-
protoOf(SegmentPool).
|
|
2300
|
+
protoOf(SegmentPool).m1k = function (segment) {
|
|
1057
2301
|
};
|
|
1058
|
-
protoOf(SegmentPool).
|
|
2302
|
+
protoOf(SegmentPool).e1l = function () {
|
|
1059
2303
|
return AlwaysSharedCopyTracker_getInstance();
|
|
1060
2304
|
};
|
|
1061
2305
|
var SegmentPool_instance;
|
|
@@ -1068,7 +2312,7 @@
|
|
|
1068
2312
|
var tmp = KProperty0;
|
|
1069
2313
|
// Inline function 'kotlin.getValue' call
|
|
1070
2314
|
getPropertyCallableRef('path', 0, tmp, _get_path_$ref_hpvpv9(), null);
|
|
1071
|
-
return tmp0.
|
|
2315
|
+
return tmp0.o1();
|
|
1072
2316
|
}
|
|
1073
2317
|
var path$delegate;
|
|
1074
2318
|
function get_fs() {
|
|
@@ -1077,7 +2321,7 @@
|
|
|
1077
2321
|
var tmp = KProperty0;
|
|
1078
2322
|
// Inline function 'kotlin.getValue' call
|
|
1079
2323
|
getPropertyCallableRef('fs', 0, tmp, _get_fs_$ref_rnlob1(), null);
|
|
1080
|
-
return tmp0.
|
|
2324
|
+
return tmp0.o1();
|
|
1081
2325
|
}
|
|
1082
2326
|
var fs$delegate;
|
|
1083
2327
|
function get_os() {
|
|
@@ -1086,7 +2330,7 @@
|
|
|
1086
2330
|
var tmp = KProperty0;
|
|
1087
2331
|
// Inline function 'kotlin.getValue' call
|
|
1088
2332
|
getPropertyCallableRef('os', 0, tmp, _get_os_$ref_hoy4d2(), null);
|
|
1089
|
-
return tmp0.
|
|
2333
|
+
return tmp0.o1();
|
|
1090
2334
|
}
|
|
1091
2335
|
var os$delegate;
|
|
1092
2336
|
function get_buffer() {
|
|
@@ -1095,7 +2339,7 @@
|
|
|
1095
2339
|
var tmp = KProperty0;
|
|
1096
2340
|
// Inline function 'kotlin.getValue' call
|
|
1097
2341
|
getPropertyCallableRef('buffer', 0, tmp, _get_buffer_$ref_mc964a(), null);
|
|
1098
|
-
return tmp0.
|
|
2342
|
+
return tmp0.o1();
|
|
1099
2343
|
}
|
|
1100
2344
|
var buffer$delegate;
|
|
1101
2345
|
function path$delegate$lambda() {
|
|
@@ -1213,7 +2457,7 @@
|
|
|
1213
2457
|
}
|
|
1214
2458
|
function SystemFileSystem$o$delete$lambda($path) {
|
|
1215
2459
|
return function () {
|
|
1216
|
-
var tmp0_elvis_lhs = get_fs().statSync($path.
|
|
2460
|
+
var tmp0_elvis_lhs = get_fs().statSync($path.y1l_1);
|
|
1217
2461
|
var tmp;
|
|
1218
2462
|
if (tmp0_elvis_lhs == null) {
|
|
1219
2463
|
throw new FileNotFoundException('File does not exist: ' + $path.toString());
|
|
@@ -1223,10 +2467,10 @@
|
|
|
1223
2467
|
var stats = tmp;
|
|
1224
2468
|
var tmp_0;
|
|
1225
2469
|
if (stats.isDirectory()) {
|
|
1226
|
-
get_fs().rmdirSync($path.
|
|
2470
|
+
get_fs().rmdirSync($path.y1l_1);
|
|
1227
2471
|
tmp_0 = Unit_instance;
|
|
1228
2472
|
} else {
|
|
1229
|
-
get_fs().rmSync($path.
|
|
2473
|
+
get_fs().rmSync($path.y1l_1);
|
|
1230
2474
|
tmp_0 = Unit_instance;
|
|
1231
2475
|
}
|
|
1232
2476
|
return Unit_instance;
|
|
@@ -1234,7 +2478,7 @@
|
|
|
1234
2478
|
}
|
|
1235
2479
|
function SystemFileSystem$o$metadataOrNull$lambda($path, $metadata) {
|
|
1236
2480
|
return function () {
|
|
1237
|
-
var tmp0_elvis_lhs = get_fs().statSync($path.
|
|
2481
|
+
var tmp0_elvis_lhs = get_fs().statSync($path.y1l_1);
|
|
1238
2482
|
var tmp;
|
|
1239
2483
|
if (tmp0_elvis_lhs == null) {
|
|
1240
2484
|
return Unit_instance;
|
|
@@ -1251,11 +2495,11 @@
|
|
|
1251
2495
|
function SystemFileSystem$1() {
|
|
1252
2496
|
SystemFileSystemImpl.call(this);
|
|
1253
2497
|
}
|
|
1254
|
-
protoOf(SystemFileSystem$1).
|
|
1255
|
-
return get_fs().existsSync(path.
|
|
2498
|
+
protoOf(SystemFileSystem$1).p1l = function (path) {
|
|
2499
|
+
return get_fs().existsSync(path.y1l_1);
|
|
1256
2500
|
};
|
|
1257
|
-
protoOf(SystemFileSystem$1).
|
|
1258
|
-
if (!this.
|
|
2501
|
+
protoOf(SystemFileSystem$1).q1l = function (path, mustExist) {
|
|
2502
|
+
if (!this.p1l(path)) {
|
|
1259
2503
|
if (mustExist) {
|
|
1260
2504
|
throw new FileNotFoundException('File does not exist: ' + path.toString());
|
|
1261
2505
|
}
|
|
@@ -1269,13 +2513,13 @@
|
|
|
1269
2513
|
throw IOException_init_$Create$_1('Delete failed for ' + path.toString(), tmp0_safe_receiver);
|
|
1270
2514
|
}
|
|
1271
2515
|
};
|
|
1272
|
-
protoOf(SystemFileSystem$1).
|
|
1273
|
-
var metadata = this.
|
|
2516
|
+
protoOf(SystemFileSystem$1).s1l = function (path, mustCreate) {
|
|
2517
|
+
var metadata = this.z1l(path);
|
|
1274
2518
|
if (!(metadata == null)) {
|
|
1275
2519
|
if (mustCreate) {
|
|
1276
2520
|
throw IOException_init_$Create$_0('Path already exists: ' + path.toString());
|
|
1277
2521
|
}
|
|
1278
|
-
if (metadata.
|
|
2522
|
+
if (metadata.v1l_1) {
|
|
1279
2523
|
throw IOException_init_$Create$_0("Path already exists and it's a file: " + path.toString());
|
|
1280
2524
|
}
|
|
1281
2525
|
return Unit_instance;
|
|
@@ -1283,19 +2527,19 @@
|
|
|
1283
2527
|
// Inline function 'kotlin.collections.arrayListOf' call
|
|
1284
2528
|
var parts = ArrayList_init_$Create$();
|
|
1285
2529
|
var p = path;
|
|
1286
|
-
while (!(p == null) && !this.
|
|
1287
|
-
parts.
|
|
1288
|
-
p = p.
|
|
2530
|
+
while (!(p == null) && !this.p1l(p)) {
|
|
2531
|
+
parts.e1(p.toString());
|
|
2532
|
+
p = p.a1m();
|
|
1289
2533
|
}
|
|
1290
2534
|
// Inline function 'kotlin.collections.forEach' call
|
|
1291
|
-
var _iterator__ex2g4s = asReversed(parts).
|
|
1292
|
-
while (_iterator__ex2g4s.
|
|
1293
|
-
var element = _iterator__ex2g4s.
|
|
2535
|
+
var _iterator__ex2g4s = asReversed(parts).t();
|
|
2536
|
+
while (_iterator__ex2g4s.u()) {
|
|
2537
|
+
var element = _iterator__ex2g4s.v();
|
|
1294
2538
|
get_fs().mkdirSync(element);
|
|
1295
2539
|
}
|
|
1296
2540
|
};
|
|
1297
|
-
protoOf(SystemFileSystem$1).
|
|
1298
|
-
if (!this.
|
|
2541
|
+
protoOf(SystemFileSystem$1).z1l = function (path) {
|
|
2542
|
+
if (!this.p1l(path))
|
|
1299
2543
|
return null;
|
|
1300
2544
|
var metadata = {_v: null};
|
|
1301
2545
|
var tmp0_safe_receiver = withCaughtException(SystemFileSystem$o$metadataOrNull$lambda(path, metadata));
|
|
@@ -1307,7 +2551,7 @@
|
|
|
1307
2551
|
}
|
|
1308
2552
|
return metadata._v;
|
|
1309
2553
|
};
|
|
1310
|
-
protoOf(SystemFileSystem$1).
|
|
2554
|
+
protoOf(SystemFileSystem$1).u1l = function (path, append) {
|
|
1311
2555
|
return new FileSink(path, append);
|
|
1312
2556
|
};
|
|
1313
2557
|
var properties_initialized_FileSystemNodeJs_kt_vmmd20;
|
|
@@ -1324,31 +2568,31 @@
|
|
|
1324
2568
|
var tmp = KProperty0;
|
|
1325
2569
|
// Inline function 'kotlin.getValue' call
|
|
1326
2570
|
getPropertyCallableRef('SystemPathSeparator', 0, tmp, _get_SystemPathSeparator_$ref_lvdbpt(), null);
|
|
1327
|
-
return tmp0.
|
|
2571
|
+
return tmp0.o1().z1_1;
|
|
1328
2572
|
}
|
|
1329
2573
|
var SystemPathSeparator$delegate;
|
|
1330
2574
|
function Path_0(rawPath, any) {
|
|
1331
|
-
this.
|
|
2575
|
+
this.y1l_1 = removeTrailingSeparators(rawPath);
|
|
1332
2576
|
}
|
|
1333
|
-
protoOf(Path_0).
|
|
2577
|
+
protoOf(Path_0).a1m = function () {
|
|
1334
2578
|
// Inline function 'kotlin.text.isEmpty' call
|
|
1335
|
-
var this_0 = this.
|
|
2579
|
+
var this_0 = this.y1l_1;
|
|
1336
2580
|
if (charSequenceLength(this_0) === 0)
|
|
1337
2581
|
return null;
|
|
1338
2582
|
if (get_isWindows()) {
|
|
1339
|
-
if (!contains(this.
|
|
2583
|
+
if (!contains(this.y1l_1, _Char___init__impl__6a9atx(47)) && !contains(this.y1l_1, _Char___init__impl__6a9atx(92))) {
|
|
1340
2584
|
return null;
|
|
1341
2585
|
}
|
|
1342
|
-
} else if (!contains(this.
|
|
2586
|
+
} else if (!contains(this.y1l_1, get_SystemPathSeparator())) {
|
|
1343
2587
|
return null;
|
|
1344
2588
|
}
|
|
1345
|
-
var p = get_path().dirname(this.
|
|
2589
|
+
var p = get_path().dirname(this.y1l_1);
|
|
1346
2590
|
var tmp;
|
|
1347
2591
|
// Inline function 'kotlin.text.isEmpty' call
|
|
1348
2592
|
if (charSequenceLength(p) === 0) {
|
|
1349
2593
|
tmp = null;
|
|
1350
2594
|
} else {
|
|
1351
|
-
if (p === this.
|
|
2595
|
+
if (p === this.y1l_1) {
|
|
1352
2596
|
tmp = null;
|
|
1353
2597
|
} else {
|
|
1354
2598
|
tmp = Path_1(p);
|
|
@@ -1357,17 +2601,17 @@
|
|
|
1357
2601
|
return tmp;
|
|
1358
2602
|
};
|
|
1359
2603
|
protoOf(Path_0).toString = function () {
|
|
1360
|
-
return this.
|
|
2604
|
+
return this.y1l_1;
|
|
1361
2605
|
};
|
|
1362
2606
|
protoOf(Path_0).equals = function (other) {
|
|
1363
2607
|
if (this === other)
|
|
1364
2608
|
return true;
|
|
1365
2609
|
if (!(other instanceof Path_0))
|
|
1366
2610
|
return false;
|
|
1367
|
-
return this.
|
|
2611
|
+
return this.y1l_1 === other.y1l_1;
|
|
1368
2612
|
};
|
|
1369
2613
|
protoOf(Path_0).hashCode = function () {
|
|
1370
|
-
return getStringHashCode(this.
|
|
2614
|
+
return getStringHashCode(this.y1l_1);
|
|
1371
2615
|
};
|
|
1372
2616
|
function Path_1(path) {
|
|
1373
2617
|
_init_properties_PathsNodeJs_kt__bvvvsp();
|
|
@@ -1381,31 +2625,31 @@
|
|
|
1381
2625
|
null;
|
|
1382
2626
|
else {
|
|
1383
2627
|
// Inline function 'kotlin.also' call
|
|
1384
|
-
throw IOException_init_$Create$_1('Failed to open a file ' + path.
|
|
2628
|
+
throw IOException_init_$Create$_1('Failed to open a file ' + path.y1l_1 + '.', tmp0_safe_receiver);
|
|
1385
2629
|
}
|
|
1386
2630
|
if (fd._v < 0)
|
|
1387
|
-
throw IOException_init_$Create$_0('Failed to open a file ' + path.
|
|
2631
|
+
throw IOException_init_$Create$_0('Failed to open a file ' + path.y1l_1 + '.');
|
|
1388
2632
|
return fd._v;
|
|
1389
2633
|
}
|
|
1390
2634
|
function FileSink$open$lambda($fd, $path, $flags) {
|
|
1391
2635
|
return function () {
|
|
1392
|
-
$fd._v = get_fs().openSync($path.
|
|
2636
|
+
$fd._v = get_fs().openSync($path.y1l_1, $flags);
|
|
1393
2637
|
return Unit_instance;
|
|
1394
2638
|
};
|
|
1395
2639
|
}
|
|
1396
2640
|
function FileSink$write$lambda(this$0, $buf) {
|
|
1397
2641
|
return function () {
|
|
1398
|
-
get_fs().writeFileSync(this$0.
|
|
2642
|
+
get_fs().writeFileSync(this$0.c1m_1, $buf);
|
|
1399
2643
|
return Unit_instance;
|
|
1400
2644
|
};
|
|
1401
2645
|
}
|
|
1402
2646
|
function FileSink(path, append) {
|
|
1403
|
-
this.
|
|
1404
|
-
this.
|
|
2647
|
+
this.b1m_1 = false;
|
|
2648
|
+
this.c1m_1 = open(this, path, append);
|
|
1405
2649
|
}
|
|
1406
|
-
protoOf(FileSink).
|
|
2650
|
+
protoOf(FileSink).p1j = function (source, byteCount) {
|
|
1407
2651
|
// Inline function 'kotlin.check' call
|
|
1408
|
-
if (!!this.
|
|
2652
|
+
if (!!this.b1m_1) {
|
|
1409
2653
|
var message = 'Sink is closed.';
|
|
1410
2654
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1411
2655
|
}
|
|
@@ -1413,20 +2657,20 @@
|
|
|
1413
2657
|
return Unit_instance;
|
|
1414
2658
|
}
|
|
1415
2659
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1416
|
-
var b = source.
|
|
2660
|
+
var b = source.g1();
|
|
1417
2661
|
var remainingBytes = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
1418
2662
|
while (compare(remainingBytes, new Long(0, 0)) > 0) {
|
|
1419
2663
|
var segmentBytes = 0;
|
|
1420
2664
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.readFromHead' call
|
|
1421
2665
|
// Inline function 'kotlin.require' call
|
|
1422
|
-
if (!!source.
|
|
2666
|
+
if (!!source.o1i()) {
|
|
1423
2667
|
var message_0 = 'Buffer is empty';
|
|
1424
2668
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1425
2669
|
}
|
|
1426
|
-
var head = ensureNotNull(source.
|
|
1427
|
-
var tmp0 = head.
|
|
1428
|
-
var tmp2 = head.
|
|
1429
|
-
segmentBytes = head.
|
|
2670
|
+
var head = ensureNotNull(source.k1i_1);
|
|
2671
|
+
var tmp0 = head.g1l(true);
|
|
2672
|
+
var tmp2 = head.t1i_1;
|
|
2673
|
+
segmentBytes = head.u1i_1 - tmp2 | 0;
|
|
1430
2674
|
var buf = get_buffer().Buffer.allocUnsafe(segmentBytes);
|
|
1431
2675
|
var inductionVariable = 0;
|
|
1432
2676
|
var last = segmentBytes;
|
|
@@ -1448,9 +2692,9 @@
|
|
|
1448
2692
|
if (!(bytesRead === 0)) {
|
|
1449
2693
|
if (bytesRead < 0)
|
|
1450
2694
|
throw IllegalStateException_init_$Create$('Returned negative read bytes count');
|
|
1451
|
-
if (bytesRead > head.
|
|
2695
|
+
if (bytesRead > head.g1())
|
|
1452
2696
|
throw IllegalStateException_init_$Create$('Returned too many bytes');
|
|
1453
|
-
source.
|
|
2697
|
+
source.l1j(fromInt(bytesRead));
|
|
1454
2698
|
}
|
|
1455
2699
|
var tmp0_0 = remainingBytes;
|
|
1456
2700
|
// Inline function 'kotlin.Long.minus' call
|
|
@@ -1458,10 +2702,10 @@
|
|
|
1458
2702
|
remainingBytes = subtract(tmp0_0, fromInt(other));
|
|
1459
2703
|
}
|
|
1460
2704
|
};
|
|
1461
|
-
protoOf(FileSink).
|
|
1462
|
-
if (!this.
|
|
1463
|
-
this.
|
|
1464
|
-
get_fs().closeSync(this.
|
|
2705
|
+
protoOf(FileSink).n4 = function () {
|
|
2706
|
+
if (!this.b1m_1) {
|
|
2707
|
+
this.b1m_1 = true;
|
|
2708
|
+
get_fs().closeSync(this.c1m_1);
|
|
1465
2709
|
}
|
|
1466
2710
|
};
|
|
1467
2711
|
function SystemPathSeparator$delegate$lambda() {
|
|
@@ -1486,8 +2730,10 @@
|
|
|
1486
2730
|
}
|
|
1487
2731
|
}
|
|
1488
2732
|
//region block: post-declaration
|
|
1489
|
-
protoOf(
|
|
1490
|
-
protoOf(
|
|
2733
|
+
protoOf(Buffer).a1k = write$default;
|
|
2734
|
+
protoOf(RealSink).a1k = write$default;
|
|
2735
|
+
protoOf(SystemFileSystemImpl).r1l = delete$default;
|
|
2736
|
+
protoOf(SystemFileSystemImpl).t1l = createDirectories$default;
|
|
1491
2737
|
//endregion
|
|
1492
2738
|
//region block: init
|
|
1493
2739
|
Companion_instance = new Companion();
|
|
@@ -1496,12 +2742,27 @@
|
|
|
1496
2742
|
//endregion
|
|
1497
2743
|
//region block: exports
|
|
1498
2744
|
_.$_$ = _.$_$ || {};
|
|
1499
|
-
_.$_$.a =
|
|
1500
|
-
_.$_$.b =
|
|
1501
|
-
_.$_$.c =
|
|
1502
|
-
_.$_$.d =
|
|
1503
|
-
_.$_$.e =
|
|
1504
|
-
_.$_$.f =
|
|
2745
|
+
_.$_$.a = EOFException_init_$Create$_0;
|
|
2746
|
+
_.$_$.b = IOException_init_$Init$_0;
|
|
2747
|
+
_.$_$.c = IOException_init_$Create$_0;
|
|
2748
|
+
_.$_$.d = IOException_init_$Init$_1;
|
|
2749
|
+
_.$_$.e = IOException_init_$Create$_1;
|
|
2750
|
+
_.$_$.f = Path;
|
|
2751
|
+
_.$_$.g = Path_1;
|
|
2752
|
+
_.$_$.h = get_SystemFileSystem;
|
|
2753
|
+
_.$_$.i = get_SystemTemporaryDirectory;
|
|
2754
|
+
_.$_$.j = Buffer;
|
|
2755
|
+
_.$_$.k = IOException;
|
|
2756
|
+
_.$_$.l = Source;
|
|
2757
|
+
_.$_$.m = buffered;
|
|
2758
|
+
_.$_$.n = indexOf_1;
|
|
2759
|
+
_.$_$.o = readByteArray_0;
|
|
2760
|
+
_.$_$.p = readByteArray;
|
|
2761
|
+
_.$_$.q = readByteString;
|
|
2762
|
+
_.$_$.r = readString_0;
|
|
2763
|
+
_.$_$.s = readString_1;
|
|
2764
|
+
_.$_$.t = readString;
|
|
2765
|
+
_.$_$.u = writeString;
|
|
1505
2766
|
//endregion
|
|
1506
2767
|
return _;
|
|
1507
2768
|
}));
|