raspberry_games_server_game_logic 1.8.362 → 1.8.364
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 +95 -95
- package/Kosi-Kaverit-kaverit.js.map +1 -1
- package/Kosi-Kodein-kodein-di.js +797 -794
- package/Kosi-Kodein-kodein-di.js.map +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.js +2091 -2030
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
- package/Logic_Debertz-core.js +2052 -2095
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +18105 -18376
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_server.js +1812 -1868
- package/Logic_Debertz-game_server.js.map +1 -1
- package/error-library-error.js +7 -7
- package/kotlin-kotlin-stdlib.js +5696 -5645
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +83 -79
- package/kotlinx-atomicfu.js.map +1 -1
- package/kotlinx-coroutines-core.js +3341 -3350
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-core.js +431 -415
- package/kotlinx-io-kotlinx-io-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +2654 -2650
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.js +1803 -1791
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/ktor-ktor-client-content-negotiation.js +262 -269
- package/ktor-ktor-client-content-negotiation.js.map +1 -1
- package/ktor-ktor-client-core.js +2653 -2729
- package/ktor-ktor-client-core.js.map +1 -1
- package/ktor-ktor-client-logging.js +581 -606
- package/ktor-ktor-client-logging.js.map +1 -1
- package/ktor-ktor-events.js +13 -13
- package/ktor-ktor-http.js +903 -899
- package/ktor-ktor-http.js.map +1 -1
- package/ktor-ktor-io.js +1985 -1976
- package/ktor-ktor-io.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx-json.js +9 -9
- package/ktor-ktor-serialization-kotlinx.js +300 -316
- package/ktor-ktor-serialization-kotlinx.js.map +1 -1
- package/ktor-ktor-serialization.js +133 -141
- package/ktor-ktor-serialization.js.map +1 -1
- package/ktor-ktor-utils.js +846 -856
- package/ktor-ktor-utils.js.map +1 -1
- package/ktor-ktor-websockets.js +61 -61
- package/ktor-ktor-websockets.js.map +1 -1
- package/package.json +1 -1
- package/random-library-crypto-rand.js +16 -16
- 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 +372 -375
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/raspberry-cardgame-lib-logger.js +119 -119
- package/raspberry-cardgame-lib-logger.js.map +1 -1
- package/raspberry-cardgame-lib-random.js +1167 -1194
- package/raspberry-cardgame-lib-random.js.map +1 -1
- package/uuid.js +39 -39
- package/uuid.js.map +1 -1
|
@@ -13,48 +13,53 @@
|
|
|
13
13
|
'use strict';
|
|
14
14
|
//region block: imports
|
|
15
15
|
var imul = Math.imul;
|
|
16
|
-
var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.
|
|
17
|
-
var Long = kotlin_kotlin.$_$.
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
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
|
|
16
|
+
var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.t1;
|
|
17
|
+
var Long = kotlin_kotlin.$_$.fh;
|
|
18
|
+
var compare = kotlin_kotlin.$_$.wa;
|
|
19
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.l1;
|
|
20
|
+
var subtract = kotlin_kotlin.$_$.lb;
|
|
21
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.l2;
|
|
22
|
+
var charArrayOf = kotlin_kotlin.$_$.sb;
|
|
23
|
+
var protoOf = kotlin_kotlin.$_$.hd;
|
|
24
|
+
var equalsLong = kotlin_kotlin.$_$.bb;
|
|
25
|
+
var Unit_instance = kotlin_kotlin.$_$.f5;
|
|
26
|
+
var ensureNotNull = kotlin_kotlin.$_$.bi;
|
|
27
|
+
var fromInt = kotlin_kotlin.$_$.cb;
|
|
28
|
+
var toString = kotlin_kotlin.$_$.kd;
|
|
29
|
+
var convertToInt = kotlin_kotlin.$_$.ya;
|
|
30
|
+
var add = kotlin_kotlin.$_$.sa;
|
|
31
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.y;
|
|
32
|
+
var initMetadataForClass = kotlin_kotlin.$_$.hc;
|
|
33
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
34
|
+
var objectCreate = kotlin_kotlin.$_$.gd;
|
|
35
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.ic;
|
|
36
|
+
var arrayCopy = kotlin_kotlin.$_$.x5;
|
|
37
|
+
var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.j1;
|
|
38
|
+
var initMetadataForObject = kotlin_kotlin.$_$.mc;
|
|
39
|
+
var VOID = kotlin_kotlin.$_$.b;
|
|
40
|
+
var charCodeAt = kotlin_kotlin.$_$.ub;
|
|
41
|
+
var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.r2;
|
|
42
|
+
var toByte = kotlin_kotlin.$_$.id;
|
|
43
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.kc;
|
|
44
|
+
var StringBuilder_init_$Create$_0 = kotlin_kotlin.$_$.z;
|
|
45
|
+
var charSequenceLength = kotlin_kotlin.$_$.wb;
|
|
46
|
+
var endsWith = kotlin_kotlin.$_$.te;
|
|
47
|
+
var startsWith = kotlin_kotlin.$_$.rf;
|
|
48
|
+
var substring = kotlin_kotlin.$_$.wf;
|
|
49
|
+
var Exception_init_$Init$ = kotlin_kotlin.$_$.e1;
|
|
50
|
+
var captureStack = kotlin_kotlin.$_$.rb;
|
|
51
|
+
var Exception_init_$Init$_0 = kotlin_kotlin.$_$.f1;
|
|
52
|
+
var Exception_init_$Init$_1 = kotlin_kotlin.$_$.g1;
|
|
53
|
+
var Exception = kotlin_kotlin.$_$.ch;
|
|
54
|
+
var KProperty0 = kotlin_kotlin.$_$.fe;
|
|
55
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.ec;
|
|
56
|
+
var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.d2;
|
|
57
|
+
var lazy = kotlin_kotlin.$_$.hi;
|
|
58
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h;
|
|
59
|
+
var asReversed = kotlin_kotlin.$_$.z5;
|
|
60
|
+
var contains = kotlin_kotlin.$_$.qe;
|
|
61
|
+
var getStringHashCode = kotlin_kotlin.$_$.fc;
|
|
62
|
+
var Char = kotlin_kotlin.$_$.vg;
|
|
58
63
|
//endregion
|
|
59
64
|
//region block: pre-declaration
|
|
60
65
|
initMetadataForClass(Buffer, 'Buffer', Buffer);
|
|
@@ -67,10 +72,10 @@
|
|
|
67
72
|
mustExist = mustExist === VOID ? true : mustExist;
|
|
68
73
|
var tmp;
|
|
69
74
|
if ($super === VOID) {
|
|
70
|
-
this.
|
|
75
|
+
this.d1o(path, mustExist);
|
|
71
76
|
tmp = Unit_instance;
|
|
72
77
|
} else {
|
|
73
|
-
tmp = $super.
|
|
78
|
+
tmp = $super.d1o.call(this, path, mustExist);
|
|
74
79
|
}
|
|
75
80
|
return tmp;
|
|
76
81
|
}
|
|
@@ -78,10 +83,10 @@
|
|
|
78
83
|
mustCreate = mustCreate === VOID ? false : mustCreate;
|
|
79
84
|
var tmp;
|
|
80
85
|
if ($super === VOID) {
|
|
81
|
-
this.
|
|
86
|
+
this.f1o(path, mustCreate);
|
|
82
87
|
tmp = Unit_instance;
|
|
83
88
|
} else {
|
|
84
|
-
tmp = $super.
|
|
89
|
+
tmp = $super.f1o.call(this, path, mustCreate);
|
|
85
90
|
}
|
|
86
91
|
return tmp;
|
|
87
92
|
}
|
|
@@ -107,16 +112,16 @@
|
|
|
107
112
|
var HEX_DIGIT_CHARS;
|
|
108
113
|
function checkBounds(size, startIndex, endIndex) {
|
|
109
114
|
_init_properties__Util_kt__g8tcl9();
|
|
110
|
-
if (startIndex
|
|
115
|
+
if (compare(startIndex, new Long(0, 0)) < 0 || compare(endIndex, size) > 0) {
|
|
111
116
|
throw IndexOutOfBoundsException_init_$Create$('startIndex (' + startIndex.toString() + ') and endIndex (' + endIndex.toString() + ') are not within the range [0..size(' + size.toString() + '))');
|
|
112
117
|
}
|
|
113
|
-
if (startIndex
|
|
118
|
+
if (compare(startIndex, endIndex) > 0) {
|
|
114
119
|
throw IllegalArgumentException_init_$Create$('startIndex (' + startIndex.toString() + ') > endIndex (' + endIndex.toString() + ')');
|
|
115
120
|
}
|
|
116
121
|
}
|
|
117
122
|
function checkOffsetAndCount(size, offset, byteCount) {
|
|
118
123
|
_init_properties__Util_kt__g8tcl9();
|
|
119
|
-
if (offset
|
|
124
|
+
if (compare(offset, new Long(0, 0)) < 0 || compare(offset, size) > 0 || compare(subtract(size, offset), byteCount) < 0 || compare(byteCount, new Long(0, 0)) < 0) {
|
|
120
125
|
throw IllegalArgumentException_init_$Create$('offset (' + offset.toString() + ') and byteCount (' + byteCount.toString() + ') are not within the range [0..size(' + size.toString() + '))');
|
|
121
126
|
}
|
|
122
127
|
}
|
|
@@ -129,42 +134,42 @@
|
|
|
129
134
|
}
|
|
130
135
|
}
|
|
131
136
|
function Buffer() {
|
|
132
|
-
this.
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
137
|
+
this.a1m_1 = null;
|
|
138
|
+
this.b1m_1 = null;
|
|
139
|
+
this.c1m_1 = new Long(0, 0);
|
|
135
140
|
}
|
|
136
|
-
protoOf(Buffer).
|
|
137
|
-
return this.
|
|
141
|
+
protoOf(Buffer).o = function () {
|
|
142
|
+
return this.c1m_1;
|
|
138
143
|
};
|
|
139
|
-
protoOf(Buffer).
|
|
144
|
+
protoOf(Buffer).d1m = function () {
|
|
140
145
|
return this;
|
|
141
146
|
};
|
|
142
|
-
protoOf(Buffer).
|
|
143
|
-
return this.
|
|
147
|
+
protoOf(Buffer).e1m = function () {
|
|
148
|
+
return equalsLong(this.o(), new Long(0, 0));
|
|
144
149
|
};
|
|
145
|
-
protoOf(Buffer).
|
|
150
|
+
protoOf(Buffer).f1m = function () {
|
|
146
151
|
return Unit_instance;
|
|
147
152
|
};
|
|
148
|
-
protoOf(Buffer).
|
|
149
|
-
var result = this.
|
|
150
|
-
if (result
|
|
153
|
+
protoOf(Buffer).g1m = function () {
|
|
154
|
+
var result = this.o();
|
|
155
|
+
if (equalsLong(result, new Long(0, 0)))
|
|
151
156
|
return new Long(0, 0);
|
|
152
|
-
var tail = ensureNotNull(this.
|
|
153
|
-
if (tail.
|
|
154
|
-
result = result
|
|
157
|
+
var tail = ensureNotNull(this.b1m_1);
|
|
158
|
+
if (tail.j1m_1 < 8192 && tail.l1m_1) {
|
|
159
|
+
result = subtract(result, fromInt(tail.j1m_1 - tail.i1m_1 | 0));
|
|
155
160
|
}
|
|
156
161
|
return result;
|
|
157
162
|
};
|
|
158
|
-
protoOf(Buffer).
|
|
163
|
+
protoOf(Buffer).o1m = function (byteCount) {
|
|
159
164
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
160
165
|
// Inline function 'kotlin.require' call
|
|
161
|
-
if (!(byteCount
|
|
166
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
162
167
|
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
163
168
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
164
169
|
}
|
|
165
170
|
var remainingByteCount = byteCount;
|
|
166
|
-
while (remainingByteCount
|
|
167
|
-
var tmp0_elvis_lhs = this.
|
|
171
|
+
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
172
|
+
var tmp0_elvis_lhs = this.a1m_1;
|
|
168
173
|
var tmp;
|
|
169
174
|
if (tmp0_elvis_lhs == null) {
|
|
170
175
|
throw EOFException_init_$Create$_0('Buffer exhausted before skipping ' + byteCount.toString() + ' bytes.');
|
|
@@ -174,207 +179,210 @@
|
|
|
174
179
|
var head = tmp;
|
|
175
180
|
var tmp0 = remainingByteCount;
|
|
176
181
|
// Inline function 'kotlinx.io.minOf' call
|
|
177
|
-
var b = head.
|
|
182
|
+
var b = head.j1m_1 - head.i1m_1 | 0;
|
|
178
183
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
179
|
-
var b_0 =
|
|
180
|
-
var
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
var b_0 = fromInt(b);
|
|
185
|
+
var tmp$ret$4 = compare(tmp0, b_0) <= 0 ? tmp0 : b_0;
|
|
186
|
+
var toSkip = convertToInt(tmp$ret$4);
|
|
187
|
+
this.c1m_1 = subtract(this.c1m_1, fromInt(toSkip));
|
|
188
|
+
remainingByteCount = subtract(remainingByteCount, fromInt(toSkip));
|
|
189
|
+
head.i1m_1 = head.i1m_1 + toSkip | 0;
|
|
190
|
+
if (head.i1m_1 === head.j1m_1) {
|
|
191
|
+
this.p1m();
|
|
186
192
|
}
|
|
187
193
|
}
|
|
188
194
|
};
|
|
189
|
-
protoOf(Buffer).
|
|
195
|
+
protoOf(Buffer).q1m = function (minimumCapacity) {
|
|
190
196
|
// Inline function 'kotlin.require' call
|
|
191
197
|
if (!(minimumCapacity >= 1 && minimumCapacity <= 8192)) {
|
|
192
198
|
var message = 'unexpected capacity (' + minimumCapacity + '), should be in range [1, 8192]';
|
|
193
199
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
194
200
|
}
|
|
195
|
-
if (this.
|
|
196
|
-
var result = SegmentPool_instance.
|
|
197
|
-
this.
|
|
198
|
-
this.
|
|
201
|
+
if (this.b1m_1 == null) {
|
|
202
|
+
var result = SegmentPool_instance.t1m();
|
|
203
|
+
this.a1m_1 = result;
|
|
204
|
+
this.b1m_1 = result;
|
|
199
205
|
return result;
|
|
200
206
|
}
|
|
201
|
-
var t = ensureNotNull(this.
|
|
202
|
-
if ((t.
|
|
203
|
-
var newTail = t.
|
|
204
|
-
this.
|
|
207
|
+
var t = ensureNotNull(this.b1m_1);
|
|
208
|
+
if ((t.j1m_1 + minimumCapacity | 0) > 8192 || !t.l1m_1) {
|
|
209
|
+
var newTail = t.u1m(SegmentPool_instance.t1m());
|
|
210
|
+
this.b1m_1 = newTail;
|
|
205
211
|
return newTail;
|
|
206
212
|
}
|
|
207
213
|
return t;
|
|
208
214
|
};
|
|
209
|
-
protoOf(Buffer).
|
|
215
|
+
protoOf(Buffer).v1m = function (source, byteCount) {
|
|
210
216
|
// Inline function 'kotlin.require' call
|
|
211
217
|
if (!!(source === this)) {
|
|
212
218
|
var message = 'source == this';
|
|
213
219
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
214
220
|
}
|
|
215
|
-
checkOffsetAndCount(source.
|
|
221
|
+
checkOffsetAndCount(source.c1m_1, new Long(0, 0), byteCount);
|
|
216
222
|
var remainingByteCount = byteCount;
|
|
217
|
-
while (remainingByteCount
|
|
218
|
-
if (remainingByteCount
|
|
219
|
-
var tail = this.
|
|
223
|
+
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
224
|
+
if (compare(remainingByteCount, fromInt(ensureNotNull(source.a1m_1).o())) < 0) {
|
|
225
|
+
var tail = this.b1m_1;
|
|
220
226
|
var tmp;
|
|
221
|
-
if (!(tail == null) && tail.
|
|
227
|
+
if (!(tail == null) && tail.l1m_1) {
|
|
222
228
|
var tmp0 = remainingByteCount;
|
|
223
229
|
// Inline function 'kotlin.Long.plus' call
|
|
224
|
-
var other = tail.
|
|
225
|
-
var tmp0_0 = tmp0
|
|
230
|
+
var other = tail.j1m_1;
|
|
231
|
+
var tmp0_0 = add(tmp0, fromInt(other));
|
|
226
232
|
// Inline function 'kotlin.Long.minus' call
|
|
227
|
-
var other_0 = tail.
|
|
228
|
-
tmp = tmp0_0
|
|
233
|
+
var other_0 = tail.w1m() ? 0 : tail.i1m_1;
|
|
234
|
+
var tmp$ret$3 = subtract(tmp0_0, fromInt(other_0));
|
|
235
|
+
tmp = compare(tmp$ret$3, new Long(8192, 0)) <= 0;
|
|
229
236
|
} else {
|
|
230
237
|
tmp = false;
|
|
231
238
|
}
|
|
232
239
|
if (tmp) {
|
|
233
|
-
ensureNotNull(source.
|
|
234
|
-
source.
|
|
235
|
-
this.
|
|
240
|
+
ensureNotNull(source.a1m_1).y1m(tail, convertToInt(remainingByteCount));
|
|
241
|
+
source.c1m_1 = subtract(source.c1m_1, remainingByteCount);
|
|
242
|
+
this.c1m_1 = add(this.c1m_1, remainingByteCount);
|
|
236
243
|
return Unit_instance;
|
|
237
244
|
} else {
|
|
238
|
-
source.
|
|
245
|
+
source.a1m_1 = ensureNotNull(source.a1m_1).x1m(convertToInt(remainingByteCount));
|
|
239
246
|
}
|
|
240
247
|
}
|
|
241
|
-
var segmentToMove = ensureNotNull(source.
|
|
242
|
-
var movedByteCount =
|
|
243
|
-
source.
|
|
244
|
-
if (source.
|
|
245
|
-
source.
|
|
248
|
+
var segmentToMove = ensureNotNull(source.a1m_1);
|
|
249
|
+
var movedByteCount = fromInt(segmentToMove.o());
|
|
250
|
+
source.a1m_1 = segmentToMove.z1m();
|
|
251
|
+
if (source.a1m_1 == null) {
|
|
252
|
+
source.b1m_1 = null;
|
|
246
253
|
}
|
|
247
254
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
248
|
-
if (this.
|
|
249
|
-
this.
|
|
250
|
-
this.
|
|
255
|
+
if (this.a1m_1 == null) {
|
|
256
|
+
this.a1m_1 = segmentToMove;
|
|
257
|
+
this.b1m_1 = segmentToMove;
|
|
251
258
|
} else if (true) {
|
|
252
|
-
this.
|
|
253
|
-
if (ensureNotNull(this.
|
|
254
|
-
this.
|
|
259
|
+
this.b1m_1 = ensureNotNull(this.b1m_1).u1m(segmentToMove).a1n();
|
|
260
|
+
if (ensureNotNull(this.b1m_1).n1m_1 == null) {
|
|
261
|
+
this.a1m_1 = this.b1m_1;
|
|
255
262
|
}
|
|
256
263
|
} else {
|
|
257
|
-
this.
|
|
264
|
+
this.b1m_1 = ensureNotNull(this.b1m_1).u1m(segmentToMove);
|
|
258
265
|
}
|
|
259
|
-
source.
|
|
260
|
-
this.
|
|
261
|
-
remainingByteCount = remainingByteCount
|
|
266
|
+
source.c1m_1 = subtract(source.c1m_1, movedByteCount);
|
|
267
|
+
this.c1m_1 = add(this.c1m_1, movedByteCount);
|
|
268
|
+
remainingByteCount = subtract(remainingByteCount, movedByteCount);
|
|
262
269
|
}
|
|
263
270
|
};
|
|
264
|
-
protoOf(Buffer).
|
|
265
|
-
this.
|
|
266
|
-
this.
|
|
271
|
+
protoOf(Buffer).b1n = function (byte) {
|
|
272
|
+
this.q1m(1).c1n(byte);
|
|
273
|
+
this.c1m_1 = add(this.c1m_1, new Long(1, 0));
|
|
267
274
|
};
|
|
268
|
-
protoOf(Buffer).
|
|
275
|
+
protoOf(Buffer).d1n = function () {
|
|
269
276
|
return Unit_instance;
|
|
270
277
|
};
|
|
271
278
|
protoOf(Buffer).toString = function () {
|
|
272
|
-
if (this.
|
|
279
|
+
if (equalsLong(this.o(), new Long(0, 0)))
|
|
273
280
|
return 'Buffer(size=0)';
|
|
274
281
|
var maxPrintableBytes = 64;
|
|
275
282
|
// Inline function 'kotlinx.io.minOf' call
|
|
276
|
-
var b = this.
|
|
283
|
+
var b = this.o();
|
|
277
284
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
278
|
-
var a =
|
|
279
|
-
var
|
|
280
|
-
var
|
|
285
|
+
var a = fromInt(maxPrintableBytes);
|
|
286
|
+
var tmp$ret$1 = compare(a, b) <= 0 ? a : b;
|
|
287
|
+
var len = convertToInt(tmp$ret$1);
|
|
288
|
+
var builder = StringBuilder_init_$Create$(imul(len, 2) + (compare(this.o(), fromInt(maxPrintableBytes)) > 0 ? 1 : 0) | 0);
|
|
281
289
|
var bytesWritten = 0;
|
|
282
290
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
283
|
-
var curr = this.
|
|
291
|
+
var curr = this.a1m_1;
|
|
284
292
|
while (!(curr == null)) {
|
|
285
293
|
var tmp0 = get_SegmentReadContextImpl();
|
|
286
294
|
var segment = curr;
|
|
287
295
|
var idx = 0;
|
|
288
|
-
while (bytesWritten < len && idx < segment.
|
|
296
|
+
while (bytesWritten < len && idx < segment.o()) {
|
|
289
297
|
var _unary__edvuaz = idx;
|
|
290
298
|
idx = _unary__edvuaz + 1 | 0;
|
|
291
|
-
var b_0 = tmp0.
|
|
299
|
+
var b_0 = tmp0.e1n(segment, _unary__edvuaz);
|
|
292
300
|
bytesWritten = bytesWritten + 1 | 0;
|
|
293
301
|
var tmp = get_HEX_DIGIT_CHARS();
|
|
294
302
|
// Inline function 'kotlinx.io.shr' call
|
|
295
303
|
var tmp$ret$2 = b_0 >> 4;
|
|
296
|
-
var tmp_0 = builder.
|
|
304
|
+
var tmp_0 = builder.d8(tmp[tmp$ret$2 & 15]);
|
|
297
305
|
var tmp_1 = get_HEX_DIGIT_CHARS();
|
|
298
306
|
// Inline function 'kotlinx.io.and' call
|
|
299
307
|
var tmp$ret$3 = b_0 & 15;
|
|
300
|
-
tmp_0.
|
|
308
|
+
tmp_0.d8(tmp_1[tmp$ret$3]);
|
|
301
309
|
}
|
|
302
|
-
curr = curr.
|
|
310
|
+
curr = curr.m1m_1;
|
|
303
311
|
}
|
|
304
|
-
if (this.
|
|
305
|
-
builder.
|
|
312
|
+
if (compare(this.o(), fromInt(maxPrintableBytes)) > 0) {
|
|
313
|
+
builder.d8(_Char___init__impl__6a9atx(8230));
|
|
306
314
|
}
|
|
307
|
-
return 'Buffer(size=' + this.
|
|
315
|
+
return 'Buffer(size=' + this.o().toString() + ' hex=' + builder.toString() + ')';
|
|
308
316
|
};
|
|
309
|
-
protoOf(Buffer).
|
|
310
|
-
var oldHead = ensureNotNull(this.
|
|
311
|
-
var nextHead = oldHead.
|
|
312
|
-
this.
|
|
317
|
+
protoOf(Buffer).p1m = function () {
|
|
318
|
+
var oldHead = ensureNotNull(this.a1m_1);
|
|
319
|
+
var nextHead = oldHead.m1m_1;
|
|
320
|
+
this.a1m_1 = nextHead;
|
|
313
321
|
if (nextHead == null) {
|
|
314
|
-
this.
|
|
322
|
+
this.b1m_1 = null;
|
|
315
323
|
} else {
|
|
316
|
-
nextHead.
|
|
324
|
+
nextHead.n1m_1 = null;
|
|
317
325
|
}
|
|
318
|
-
oldHead.
|
|
319
|
-
SegmentPool_instance.
|
|
326
|
+
oldHead.m1m_1 = null;
|
|
327
|
+
SegmentPool_instance.f1n(oldHead);
|
|
320
328
|
};
|
|
321
|
-
protoOf(Buffer).
|
|
322
|
-
var oldTail = ensureNotNull(this.
|
|
323
|
-
var newTail = oldTail.
|
|
324
|
-
this.
|
|
329
|
+
protoOf(Buffer).g1n = function () {
|
|
330
|
+
var oldTail = ensureNotNull(this.b1m_1);
|
|
331
|
+
var newTail = oldTail.n1m_1;
|
|
332
|
+
this.b1m_1 = newTail;
|
|
325
333
|
if (newTail == null) {
|
|
326
|
-
this.
|
|
334
|
+
this.a1m_1 = null;
|
|
327
335
|
} else {
|
|
328
|
-
newTail.
|
|
336
|
+
newTail.m1m_1 = null;
|
|
329
337
|
}
|
|
330
|
-
oldTail.
|
|
331
|
-
SegmentPool_instance.
|
|
338
|
+
oldTail.n1m_1 = null;
|
|
339
|
+
SegmentPool_instance.f1n(oldTail);
|
|
332
340
|
};
|
|
333
341
|
function buffered(_this__u8e3s4) {
|
|
334
342
|
return new RealSink(_this__u8e3s4);
|
|
335
343
|
}
|
|
336
344
|
function RealSink(sink) {
|
|
337
|
-
this.
|
|
338
|
-
this.
|
|
339
|
-
this.
|
|
345
|
+
this.h1n_1 = sink;
|
|
346
|
+
this.i1n_1 = false;
|
|
347
|
+
this.j1n_1 = new Buffer();
|
|
340
348
|
}
|
|
341
|
-
protoOf(RealSink).
|
|
342
|
-
return this.
|
|
349
|
+
protoOf(RealSink).d1m = function () {
|
|
350
|
+
return this.j1n_1;
|
|
343
351
|
};
|
|
344
|
-
protoOf(RealSink).
|
|
352
|
+
protoOf(RealSink).v1m = function (source, byteCount) {
|
|
345
353
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
346
354
|
// Inline function 'kotlin.check' call
|
|
347
|
-
if (!!this.
|
|
355
|
+
if (!!this.i1n_1) {
|
|
348
356
|
var message = 'Sink is closed.';
|
|
349
357
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
350
358
|
}
|
|
351
359
|
// Inline function 'kotlin.require' call
|
|
352
|
-
if (!(byteCount
|
|
360
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
353
361
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
354
362
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
355
363
|
}
|
|
356
|
-
this.
|
|
357
|
-
this.
|
|
364
|
+
this.j1n_1.v1m(source, byteCount);
|
|
365
|
+
this.f1m();
|
|
358
366
|
};
|
|
359
|
-
protoOf(RealSink).
|
|
367
|
+
protoOf(RealSink).f1m = function () {
|
|
360
368
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
361
369
|
// Inline function 'kotlin.check' call
|
|
362
|
-
if (!!this.
|
|
370
|
+
if (!!this.i1n_1) {
|
|
363
371
|
var message = 'Sink is closed.';
|
|
364
372
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
365
373
|
}
|
|
366
|
-
var byteCount = this.
|
|
367
|
-
if (byteCount
|
|
368
|
-
this.
|
|
374
|
+
var byteCount = this.j1n_1.g1m();
|
|
375
|
+
if (compare(byteCount, new Long(0, 0)) > 0) {
|
|
376
|
+
this.h1n_1.v1m(this.j1n_1, byteCount);
|
|
369
377
|
}
|
|
370
378
|
};
|
|
371
|
-
protoOf(RealSink).
|
|
372
|
-
if (this.
|
|
379
|
+
protoOf(RealSink).d1n = function () {
|
|
380
|
+
if (this.i1n_1)
|
|
373
381
|
return Unit_instance;
|
|
374
382
|
var thrown = null;
|
|
375
383
|
try {
|
|
376
|
-
if (this.
|
|
377
|
-
this.
|
|
384
|
+
if (compare(this.j1n_1.o(), new Long(0, 0)) > 0) {
|
|
385
|
+
this.h1n_1.v1m(this.j1n_1, this.j1n_1.o());
|
|
378
386
|
}
|
|
379
387
|
} catch ($p) {
|
|
380
388
|
if ($p instanceof Error) {
|
|
@@ -385,7 +393,7 @@
|
|
|
385
393
|
}
|
|
386
394
|
}
|
|
387
395
|
try {
|
|
388
|
-
this.
|
|
396
|
+
this.h1n_1.d1n();
|
|
389
397
|
} catch ($p) {
|
|
390
398
|
if ($p instanceof Error) {
|
|
391
399
|
var e_0 = $p;
|
|
@@ -395,18 +403,18 @@
|
|
|
395
403
|
throw $p;
|
|
396
404
|
}
|
|
397
405
|
}
|
|
398
|
-
this.
|
|
406
|
+
this.i1n_1 = true;
|
|
399
407
|
if (!(thrown == null))
|
|
400
408
|
throw thrown;
|
|
401
409
|
};
|
|
402
410
|
protoOf(RealSink).toString = function () {
|
|
403
|
-
return 'buffered(' + toString(this.
|
|
411
|
+
return 'buffered(' + toString(this.h1n_1) + ')';
|
|
404
412
|
};
|
|
405
413
|
function Segment_init_$Init$($this) {
|
|
406
414
|
Segment.call($this);
|
|
407
|
-
$this.
|
|
408
|
-
$this.
|
|
409
|
-
$this.
|
|
415
|
+
$this.h1m_1 = new Int8Array(8192);
|
|
416
|
+
$this.l1m_1 = true;
|
|
417
|
+
$this.k1m_1 = null;
|
|
410
418
|
return $this;
|
|
411
419
|
}
|
|
412
420
|
function Segment_init_$Create$() {
|
|
@@ -414,87 +422,87 @@
|
|
|
414
422
|
}
|
|
415
423
|
function Segment_init_$Init$_0(data, pos, limit, shareToken, owner, $this) {
|
|
416
424
|
Segment.call($this);
|
|
417
|
-
$this.
|
|
418
|
-
$this.
|
|
419
|
-
$this.
|
|
420
|
-
$this.
|
|
421
|
-
$this.
|
|
425
|
+
$this.h1m_1 = data;
|
|
426
|
+
$this.i1m_1 = pos;
|
|
427
|
+
$this.j1m_1 = limit;
|
|
428
|
+
$this.k1m_1 = shareToken;
|
|
429
|
+
$this.l1m_1 = owner;
|
|
422
430
|
return $this;
|
|
423
431
|
}
|
|
424
432
|
function Segment_init_$Create$_0(data, pos, limit, shareToken, owner) {
|
|
425
433
|
return Segment_init_$Init$_0(data, pos, limit, shareToken, owner, objectCreate(protoOf(Segment)));
|
|
426
434
|
}
|
|
427
435
|
function Companion() {
|
|
428
|
-
this.
|
|
429
|
-
this.
|
|
436
|
+
this.k1n_1 = 8192;
|
|
437
|
+
this.l1n_1 = 1024;
|
|
430
438
|
}
|
|
431
|
-
protoOf(Companion).
|
|
439
|
+
protoOf(Companion).m1n = function () {
|
|
432
440
|
return Segment_init_$Create$();
|
|
433
441
|
};
|
|
434
442
|
var Companion_instance;
|
|
435
443
|
function Companion_getInstance() {
|
|
436
444
|
return Companion_instance;
|
|
437
445
|
}
|
|
438
|
-
protoOf(Segment).
|
|
439
|
-
var tmp0_safe_receiver = this.
|
|
440
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
446
|
+
protoOf(Segment).w1m = function () {
|
|
447
|
+
var tmp0_safe_receiver = this.k1m_1;
|
|
448
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n1n();
|
|
441
449
|
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
|
|
442
450
|
};
|
|
443
|
-
protoOf(Segment).
|
|
444
|
-
var tmp0_elvis_lhs = this.
|
|
451
|
+
protoOf(Segment).o1n = function () {
|
|
452
|
+
var tmp0_elvis_lhs = this.k1m_1;
|
|
445
453
|
var tmp;
|
|
446
454
|
if (tmp0_elvis_lhs == null) {
|
|
447
455
|
// Inline function 'kotlin.also' call
|
|
448
|
-
var this_0 = SegmentPool_instance.
|
|
449
|
-
this.
|
|
456
|
+
var this_0 = SegmentPool_instance.p1n();
|
|
457
|
+
this.k1m_1 = this_0;
|
|
450
458
|
tmp = this_0;
|
|
451
459
|
} else {
|
|
452
460
|
tmp = tmp0_elvis_lhs;
|
|
453
461
|
}
|
|
454
462
|
var t = tmp;
|
|
455
|
-
var tmp_0 = this.
|
|
456
|
-
var tmp_1 = this.
|
|
463
|
+
var tmp_0 = this.i1m_1;
|
|
464
|
+
var tmp_1 = this.j1m_1;
|
|
457
465
|
// Inline function 'kotlin.also' call
|
|
458
|
-
t.
|
|
459
|
-
return Segment_init_$Create$_0(this.
|
|
466
|
+
t.q1n();
|
|
467
|
+
return Segment_init_$Create$_0(this.h1m_1, tmp_0, tmp_1, t, false);
|
|
460
468
|
};
|
|
461
|
-
protoOf(Segment).
|
|
462
|
-
var result = this.
|
|
463
|
-
if (!(this.
|
|
464
|
-
ensureNotNull(this.
|
|
469
|
+
protoOf(Segment).z1m = function () {
|
|
470
|
+
var result = this.m1m_1;
|
|
471
|
+
if (!(this.n1m_1 == null)) {
|
|
472
|
+
ensureNotNull(this.n1m_1).m1m_1 = this.m1m_1;
|
|
465
473
|
}
|
|
466
|
-
if (!(this.
|
|
467
|
-
ensureNotNull(this.
|
|
474
|
+
if (!(this.m1m_1 == null)) {
|
|
475
|
+
ensureNotNull(this.m1m_1).n1m_1 = this.n1m_1;
|
|
468
476
|
}
|
|
469
|
-
this.
|
|
470
|
-
this.
|
|
477
|
+
this.m1m_1 = null;
|
|
478
|
+
this.n1m_1 = null;
|
|
471
479
|
return result;
|
|
472
480
|
};
|
|
473
|
-
protoOf(Segment).
|
|
474
|
-
segment.
|
|
475
|
-
segment.
|
|
476
|
-
if (!(this.
|
|
477
|
-
ensureNotNull(this.
|
|
481
|
+
protoOf(Segment).u1m = function (segment) {
|
|
482
|
+
segment.n1m_1 = this;
|
|
483
|
+
segment.m1m_1 = this.m1m_1;
|
|
484
|
+
if (!(this.m1m_1 == null)) {
|
|
485
|
+
ensureNotNull(this.m1m_1).n1m_1 = segment;
|
|
478
486
|
}
|
|
479
|
-
this.
|
|
487
|
+
this.m1m_1 = segment;
|
|
480
488
|
return segment;
|
|
481
489
|
};
|
|
482
|
-
protoOf(Segment).
|
|
490
|
+
protoOf(Segment).x1m = function (byteCount) {
|
|
483
491
|
// Inline function 'kotlin.require' call
|
|
484
|
-
if (!(byteCount > 0 && byteCount <= (this.
|
|
492
|
+
if (!(byteCount > 0 && byteCount <= (this.j1m_1 - this.i1m_1 | 0))) {
|
|
485
493
|
var message = 'byteCount out of range';
|
|
486
494
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
487
495
|
}
|
|
488
496
|
var prefix;
|
|
489
497
|
if (byteCount >= 1024) {
|
|
490
|
-
prefix = this.
|
|
498
|
+
prefix = this.o1n();
|
|
491
499
|
} else {
|
|
492
|
-
prefix = SegmentPool_instance.
|
|
493
|
-
var tmp0 = this.
|
|
494
|
-
var tmp2 = prefix.
|
|
495
|
-
var tmp4 = this.
|
|
500
|
+
prefix = SegmentPool_instance.t1m();
|
|
501
|
+
var tmp0 = this.h1m_1;
|
|
502
|
+
var tmp2 = prefix.h1m_1;
|
|
503
|
+
var tmp4 = this.i1m_1;
|
|
496
504
|
// Inline function 'kotlin.collections.copyInto' call
|
|
497
|
-
var endIndex = this.
|
|
505
|
+
var endIndex = this.i1m_1 + byteCount | 0;
|
|
498
506
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
499
507
|
// Inline function 'kotlin.js.asDynamic' call
|
|
500
508
|
var tmp = tmp0;
|
|
@@ -502,140 +510,140 @@
|
|
|
502
510
|
// Inline function 'kotlin.js.asDynamic' call
|
|
503
511
|
arrayCopy(tmp, tmp2, 0, tmp4, endIndex);
|
|
504
512
|
}
|
|
505
|
-
prefix.
|
|
506
|
-
this.
|
|
507
|
-
if (!(this.
|
|
508
|
-
ensureNotNull(this.
|
|
513
|
+
prefix.j1m_1 = prefix.i1m_1 + byteCount | 0;
|
|
514
|
+
this.i1m_1 = this.i1m_1 + byteCount | 0;
|
|
515
|
+
if (!(this.n1m_1 == null)) {
|
|
516
|
+
ensureNotNull(this.n1m_1).u1m(prefix);
|
|
509
517
|
} else {
|
|
510
|
-
prefix.
|
|
511
|
-
this.
|
|
518
|
+
prefix.m1m_1 = this;
|
|
519
|
+
this.n1m_1 = prefix;
|
|
512
520
|
}
|
|
513
521
|
return prefix;
|
|
514
522
|
};
|
|
515
|
-
protoOf(Segment).
|
|
523
|
+
protoOf(Segment).a1n = function () {
|
|
516
524
|
// Inline function 'kotlin.check' call
|
|
517
|
-
if (!!(this.
|
|
525
|
+
if (!!(this.n1m_1 == null)) {
|
|
518
526
|
var message = 'cannot compact';
|
|
519
527
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
520
528
|
}
|
|
521
|
-
if (!ensureNotNull(this.
|
|
529
|
+
if (!ensureNotNull(this.n1m_1).l1m_1)
|
|
522
530
|
return this;
|
|
523
|
-
var byteCount = this.
|
|
524
|
-
var availableByteCount = (8192 - ensureNotNull(this.
|
|
531
|
+
var byteCount = this.j1m_1 - this.i1m_1 | 0;
|
|
532
|
+
var availableByteCount = (8192 - ensureNotNull(this.n1m_1).j1m_1 | 0) + (ensureNotNull(this.n1m_1).w1m() ? 0 : ensureNotNull(this.n1m_1).i1m_1) | 0;
|
|
525
533
|
if (byteCount > availableByteCount)
|
|
526
534
|
return this;
|
|
527
|
-
var predecessor = this.
|
|
528
|
-
this.
|
|
529
|
-
var successor = this.
|
|
535
|
+
var predecessor = this.n1m_1;
|
|
536
|
+
this.y1m(ensureNotNull(predecessor), byteCount);
|
|
537
|
+
var successor = this.z1m();
|
|
530
538
|
// Inline function 'kotlin.check' call
|
|
531
539
|
if (!(successor == null)) {
|
|
532
540
|
throw IllegalStateException_init_$Create$('Check failed.');
|
|
533
541
|
}
|
|
534
|
-
SegmentPool_instance.
|
|
542
|
+
SegmentPool_instance.f1n(this);
|
|
535
543
|
return predecessor;
|
|
536
544
|
};
|
|
537
|
-
protoOf(Segment).
|
|
538
|
-
var _unary__edvuaz = this.
|
|
539
|
-
this.
|
|
540
|
-
this.
|
|
545
|
+
protoOf(Segment).c1n = function (byte) {
|
|
546
|
+
var _unary__edvuaz = this.j1m_1;
|
|
547
|
+
this.j1m_1 = _unary__edvuaz + 1 | 0;
|
|
548
|
+
this.h1m_1[_unary__edvuaz] = byte;
|
|
541
549
|
};
|
|
542
|
-
protoOf(Segment).
|
|
550
|
+
protoOf(Segment).y1m = function (sink, byteCount) {
|
|
543
551
|
// Inline function 'kotlin.check' call
|
|
544
|
-
if (!sink.
|
|
552
|
+
if (!sink.l1m_1) {
|
|
545
553
|
var message = 'only owner can write';
|
|
546
554
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
547
555
|
}
|
|
548
|
-
if ((sink.
|
|
549
|
-
if (sink.
|
|
556
|
+
if ((sink.j1m_1 + byteCount | 0) > 8192) {
|
|
557
|
+
if (sink.w1m())
|
|
550
558
|
throw IllegalArgumentException_init_$Create$_0();
|
|
551
|
-
if (((sink.
|
|
559
|
+
if (((sink.j1m_1 + byteCount | 0) - sink.i1m_1 | 0) > 8192)
|
|
552
560
|
throw IllegalArgumentException_init_$Create$_0();
|
|
553
|
-
var tmp0 = sink.
|
|
554
|
-
var tmp2 = sink.
|
|
555
|
-
var tmp4 = sink.
|
|
561
|
+
var tmp0 = sink.h1m_1;
|
|
562
|
+
var tmp2 = sink.h1m_1;
|
|
563
|
+
var tmp4 = sink.i1m_1;
|
|
556
564
|
// Inline function 'kotlin.collections.copyInto' call
|
|
557
|
-
var endIndex = sink.
|
|
565
|
+
var endIndex = sink.j1m_1;
|
|
558
566
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
559
567
|
// Inline function 'kotlin.js.asDynamic' call
|
|
560
568
|
var tmp = tmp0;
|
|
561
569
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
562
570
|
// Inline function 'kotlin.js.asDynamic' call
|
|
563
571
|
arrayCopy(tmp, tmp2, 0, tmp4, endIndex);
|
|
564
|
-
sink.
|
|
565
|
-
sink.
|
|
572
|
+
sink.j1m_1 = sink.j1m_1 - sink.i1m_1 | 0;
|
|
573
|
+
sink.i1m_1 = 0;
|
|
566
574
|
}
|
|
567
|
-
var tmp0_0 = this.
|
|
568
|
-
var tmp2_0 = sink.
|
|
569
|
-
var tmp4_0 = sink.
|
|
570
|
-
var tmp6 = this.
|
|
575
|
+
var tmp0_0 = this.h1m_1;
|
|
576
|
+
var tmp2_0 = sink.h1m_1;
|
|
577
|
+
var tmp4_0 = sink.j1m_1;
|
|
578
|
+
var tmp6 = this.i1m_1;
|
|
571
579
|
// Inline function 'kotlin.collections.copyInto' call
|
|
572
|
-
var endIndex_0 = this.
|
|
580
|
+
var endIndex_0 = this.i1m_1 + byteCount | 0;
|
|
573
581
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
574
582
|
// Inline function 'kotlin.js.asDynamic' call
|
|
575
583
|
var tmp_0 = tmp0_0;
|
|
576
584
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
577
585
|
// Inline function 'kotlin.js.asDynamic' call
|
|
578
586
|
arrayCopy(tmp_0, tmp2_0, tmp4_0, tmp6, endIndex_0);
|
|
579
|
-
sink.
|
|
580
|
-
this.
|
|
587
|
+
sink.j1m_1 = sink.j1m_1 + byteCount | 0;
|
|
588
|
+
this.i1m_1 = this.i1m_1 + byteCount | 0;
|
|
581
589
|
};
|
|
582
|
-
protoOf(Segment).
|
|
583
|
-
return this.
|
|
590
|
+
protoOf(Segment).o = function () {
|
|
591
|
+
return this.j1m_1 - this.i1m_1 | 0;
|
|
584
592
|
};
|
|
585
|
-
protoOf(Segment).
|
|
586
|
-
return this.
|
|
593
|
+
protoOf(Segment).r1n = function () {
|
|
594
|
+
return this.h1m_1.length - this.j1m_1 | 0;
|
|
587
595
|
};
|
|
588
|
-
protoOf(Segment).
|
|
589
|
-
return this.
|
|
596
|
+
protoOf(Segment).s1n = function (readOnly) {
|
|
597
|
+
return this.h1m_1;
|
|
590
598
|
};
|
|
591
|
-
protoOf(Segment).
|
|
592
|
-
return this.
|
|
599
|
+
protoOf(Segment).t1n = function (index) {
|
|
600
|
+
return this.h1m_1[this.i1m_1 + index | 0];
|
|
593
601
|
};
|
|
594
|
-
protoOf(Segment).
|
|
595
|
-
this.
|
|
602
|
+
protoOf(Segment).u1n = function (index, value) {
|
|
603
|
+
this.h1m_1[this.j1m_1 + index | 0] = value;
|
|
596
604
|
};
|
|
597
|
-
protoOf(Segment).
|
|
598
|
-
var d = this.
|
|
599
|
-
var l = this.
|
|
605
|
+
protoOf(Segment).v1n = function (index, b0, b1) {
|
|
606
|
+
var d = this.h1m_1;
|
|
607
|
+
var l = this.j1m_1;
|
|
600
608
|
d[l + index | 0] = b0;
|
|
601
609
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
602
610
|
};
|
|
603
|
-
protoOf(Segment).
|
|
604
|
-
var d = this.
|
|
605
|
-
var l = this.
|
|
611
|
+
protoOf(Segment).w1n = function (index, b0, b1, b2) {
|
|
612
|
+
var d = this.h1m_1;
|
|
613
|
+
var l = this.j1m_1;
|
|
606
614
|
d[l + index | 0] = b0;
|
|
607
615
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
608
616
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
609
617
|
};
|
|
610
|
-
protoOf(Segment).
|
|
611
|
-
var d = this.
|
|
612
|
-
var l = this.
|
|
618
|
+
protoOf(Segment).x1n = function (index, b0, b1, b2, b3) {
|
|
619
|
+
var d = this.h1m_1;
|
|
620
|
+
var l = this.j1m_1;
|
|
613
621
|
d[l + index | 0] = b0;
|
|
614
622
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
615
623
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
616
624
|
d[(l + index | 0) + 3 | 0] = b3;
|
|
617
625
|
};
|
|
618
626
|
function Segment() {
|
|
619
|
-
this.
|
|
620
|
-
this.
|
|
621
|
-
this.
|
|
622
|
-
this.
|
|
623
|
-
this.
|
|
624
|
-
this.
|
|
627
|
+
this.i1m_1 = 0;
|
|
628
|
+
this.j1m_1 = 0;
|
|
629
|
+
this.k1m_1 = null;
|
|
630
|
+
this.l1m_1 = false;
|
|
631
|
+
this.m1m_1 = null;
|
|
632
|
+
this.n1m_1 = null;
|
|
625
633
|
}
|
|
626
634
|
function SegmentCopyTracker() {
|
|
627
635
|
}
|
|
628
636
|
function isEmpty(_this__u8e3s4) {
|
|
629
|
-
return _this__u8e3s4.
|
|
637
|
+
return _this__u8e3s4.o() === 0;
|
|
630
638
|
}
|
|
631
639
|
function AlwaysSharedCopyTracker() {
|
|
632
640
|
AlwaysSharedCopyTracker_instance = this;
|
|
633
641
|
SegmentCopyTracker.call(this);
|
|
634
642
|
}
|
|
635
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
643
|
+
protoOf(AlwaysSharedCopyTracker).n1n = function () {
|
|
636
644
|
return true;
|
|
637
645
|
};
|
|
638
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
646
|
+
protoOf(AlwaysSharedCopyTracker).q1n = function () {
|
|
639
647
|
return Unit_instance;
|
|
640
648
|
};
|
|
641
649
|
var AlwaysSharedCopyTracker_instance;
|
|
@@ -649,10 +657,10 @@
|
|
|
649
657
|
endIndex = endIndex === VOID ? string.length : endIndex;
|
|
650
658
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
651
659
|
var size = string.length;
|
|
652
|
-
checkBounds(
|
|
660
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
653
661
|
// Inline function 'kotlinx.io.writeToInternalBuffer' call
|
|
654
662
|
// Inline function 'kotlinx.io.commonWriteUtf8' call
|
|
655
|
-
var this_0 = _this__u8e3s4.
|
|
663
|
+
var this_0 = _this__u8e3s4.d1m();
|
|
656
664
|
var i = startIndex;
|
|
657
665
|
while (i < endIndex) {
|
|
658
666
|
var p0 = i;
|
|
@@ -662,15 +670,15 @@
|
|
|
662
670
|
if (c < 128) {
|
|
663
671
|
$l$block_0: {
|
|
664
672
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
665
|
-
var tail = this_0.
|
|
673
|
+
var tail = this_0.q1m(1);
|
|
666
674
|
var ctx = get_SegmentWriteContextImpl();
|
|
667
675
|
var segmentOffset = -i | 0;
|
|
668
676
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
669
|
-
var b = i + tail.
|
|
677
|
+
var b = i + tail.r1n() | 0;
|
|
670
678
|
var runLimit = Math.min(endIndex, b);
|
|
671
679
|
var _unary__edvuaz = i;
|
|
672
680
|
i = _unary__edvuaz + 1 | 0;
|
|
673
|
-
ctx.
|
|
681
|
+
ctx.b1o(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
|
|
674
682
|
$l$loop: while (i < runLimit) {
|
|
675
683
|
var p0_0 = i;
|
|
676
684
|
// Inline function 'kotlin.code' call
|
|
@@ -680,89 +688,95 @@
|
|
|
680
688
|
break $l$loop;
|
|
681
689
|
var _unary__edvuaz_0 = i;
|
|
682
690
|
i = _unary__edvuaz_0 + 1 | 0;
|
|
683
|
-
ctx.
|
|
691
|
+
ctx.b1o(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
|
|
684
692
|
}
|
|
685
693
|
var bytesWritten = i + segmentOffset | 0;
|
|
686
694
|
if (bytesWritten === 1) {
|
|
687
|
-
tail.
|
|
695
|
+
tail.j1m_1 = tail.j1m_1 + bytesWritten | 0;
|
|
688
696
|
var tmp = this_0;
|
|
689
697
|
// Inline function 'kotlin.Long.plus' call
|
|
690
|
-
|
|
698
|
+
var this_3 = this_0.c1m_1;
|
|
699
|
+
tmp.c1m_1 = add(this_3, fromInt(bytesWritten));
|
|
691
700
|
break $l$block_0;
|
|
692
701
|
}
|
|
693
702
|
// Inline function 'kotlin.check' call
|
|
694
|
-
if (!(0 <= bytesWritten ? bytesWritten <= tail.
|
|
695
|
-
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.
|
|
703
|
+
if (!(0 <= bytesWritten ? bytesWritten <= tail.r1n() : false)) {
|
|
704
|
+
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.r1n();
|
|
696
705
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
697
706
|
}
|
|
698
707
|
if (!(bytesWritten === 0)) {
|
|
699
|
-
tail.
|
|
708
|
+
tail.j1m_1 = tail.j1m_1 + bytesWritten | 0;
|
|
700
709
|
var tmp_0 = this_0;
|
|
701
710
|
// Inline function 'kotlin.Long.plus' call
|
|
702
|
-
|
|
711
|
+
var this_4 = this_0.c1m_1;
|
|
712
|
+
tmp_0.c1m_1 = add(this_4, fromInt(bytesWritten));
|
|
703
713
|
break $l$block_0;
|
|
704
714
|
}
|
|
705
715
|
if (isEmpty(tail)) {
|
|
706
|
-
this_0.
|
|
716
|
+
this_0.g1n();
|
|
707
717
|
}
|
|
708
718
|
}
|
|
709
719
|
} else if (c < 2048) {
|
|
710
720
|
$l$block_2: {
|
|
711
721
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
712
|
-
var tail_0 = this_0.
|
|
713
|
-
get_SegmentWriteContextImpl().
|
|
722
|
+
var tail_0 = this_0.q1m(2);
|
|
723
|
+
get_SegmentWriteContextImpl().a1o(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
714
724
|
var bytesWritten_0 = 2;
|
|
715
725
|
if (bytesWritten_0 === 2) {
|
|
716
|
-
tail_0.
|
|
726
|
+
tail_0.j1m_1 = tail_0.j1m_1 + bytesWritten_0 | 0;
|
|
717
727
|
var tmp_1 = this_0;
|
|
718
728
|
// Inline function 'kotlin.Long.plus' call
|
|
719
|
-
|
|
729
|
+
var this_5 = this_0.c1m_1;
|
|
730
|
+
tmp_1.c1m_1 = add(this_5, fromInt(bytesWritten_0));
|
|
720
731
|
break $l$block_2;
|
|
721
732
|
}
|
|
722
733
|
// Inline function 'kotlin.check' call
|
|
723
|
-
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.
|
|
724
|
-
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.
|
|
734
|
+
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.r1n() : false)) {
|
|
735
|
+
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.r1n();
|
|
725
736
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
726
737
|
}
|
|
727
738
|
if (!(bytesWritten_0 === 0)) {
|
|
728
|
-
tail_0.
|
|
739
|
+
tail_0.j1m_1 = tail_0.j1m_1 + bytesWritten_0 | 0;
|
|
729
740
|
var tmp_2 = this_0;
|
|
730
741
|
// Inline function 'kotlin.Long.plus' call
|
|
731
|
-
|
|
742
|
+
var this_6 = this_0.c1m_1;
|
|
743
|
+
tmp_2.c1m_1 = add(this_6, fromInt(bytesWritten_0));
|
|
732
744
|
break $l$block_2;
|
|
733
745
|
}
|
|
734
746
|
if (isEmpty(tail_0)) {
|
|
735
|
-
this_0.
|
|
747
|
+
this_0.g1n();
|
|
736
748
|
}
|
|
737
749
|
}
|
|
738
750
|
i = i + 1 | 0;
|
|
739
751
|
} else if (c < 55296 || c > 57343) {
|
|
740
752
|
$l$block_4: {
|
|
741
753
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
742
|
-
var tail_1 = this_0.
|
|
743
|
-
get_SegmentWriteContextImpl().
|
|
754
|
+
var tail_1 = this_0.q1m(3);
|
|
755
|
+
get_SegmentWriteContextImpl().z1n(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
744
756
|
var bytesWritten_1 = 3;
|
|
745
757
|
if (bytesWritten_1 === 3) {
|
|
746
|
-
tail_1.
|
|
758
|
+
tail_1.j1m_1 = tail_1.j1m_1 + bytesWritten_1 | 0;
|
|
747
759
|
var tmp_3 = this_0;
|
|
748
760
|
// Inline function 'kotlin.Long.plus' call
|
|
749
|
-
|
|
761
|
+
var this_7 = this_0.c1m_1;
|
|
762
|
+
tmp_3.c1m_1 = add(this_7, fromInt(bytesWritten_1));
|
|
750
763
|
break $l$block_4;
|
|
751
764
|
}
|
|
752
765
|
// Inline function 'kotlin.check' call
|
|
753
|
-
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.
|
|
754
|
-
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.
|
|
766
|
+
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.r1n() : false)) {
|
|
767
|
+
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.r1n();
|
|
755
768
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
756
769
|
}
|
|
757
770
|
if (!(bytesWritten_1 === 0)) {
|
|
758
|
-
tail_1.
|
|
771
|
+
tail_1.j1m_1 = tail_1.j1m_1 + bytesWritten_1 | 0;
|
|
759
772
|
var tmp_4 = this_0;
|
|
760
773
|
// Inline function 'kotlin.Long.plus' call
|
|
761
|
-
|
|
774
|
+
var this_8 = this_0.c1m_1;
|
|
775
|
+
tmp_4.c1m_1 = add(this_8, fromInt(bytesWritten_1));
|
|
762
776
|
break $l$block_4;
|
|
763
777
|
}
|
|
764
778
|
if (isEmpty(tail_1)) {
|
|
765
|
-
this_0.
|
|
779
|
+
this_0.g1n();
|
|
766
780
|
}
|
|
767
781
|
}
|
|
768
782
|
i = i + 1 | 0;
|
|
@@ -771,53 +785,55 @@
|
|
|
771
785
|
if ((i + 1 | 0) < endIndex) {
|
|
772
786
|
var p0_1 = i + 1 | 0;
|
|
773
787
|
// Inline function 'kotlin.code' call
|
|
774
|
-
var
|
|
775
|
-
tmp_5 = Char__toInt_impl_vasixd(
|
|
788
|
+
var this_9 = charCodeAt(string, p0_1);
|
|
789
|
+
tmp_5 = Char__toInt_impl_vasixd(this_9);
|
|
776
790
|
} else {
|
|
777
791
|
tmp_5 = 0;
|
|
778
792
|
}
|
|
779
793
|
var low = tmp_5;
|
|
780
794
|
if (c > 56319 || !(56320 <= low ? low <= 57343 : false)) {
|
|
781
795
|
// Inline function 'kotlin.code' call
|
|
782
|
-
var
|
|
783
|
-
var tmp$ret$26 = Char__toInt_impl_vasixd(
|
|
784
|
-
this_0.
|
|
796
|
+
var this_10 = _Char___init__impl__6a9atx(63);
|
|
797
|
+
var tmp$ret$26 = Char__toInt_impl_vasixd(this_10);
|
|
798
|
+
this_0.b1n(toByte(tmp$ret$26));
|
|
785
799
|
i = i + 1 | 0;
|
|
786
800
|
} else {
|
|
787
801
|
var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
|
|
788
802
|
$l$block_6: {
|
|
789
803
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
790
|
-
var tail_2 = this_0.
|
|
791
|
-
get_SegmentWriteContextImpl().
|
|
804
|
+
var tail_2 = this_0.q1m(4);
|
|
805
|
+
get_SegmentWriteContextImpl().y1n(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
792
806
|
var bytesWritten_2 = 4;
|
|
793
807
|
if (bytesWritten_2 === 4) {
|
|
794
|
-
tail_2.
|
|
808
|
+
tail_2.j1m_1 = tail_2.j1m_1 + bytesWritten_2 | 0;
|
|
795
809
|
var tmp_6 = this_0;
|
|
796
810
|
// Inline function 'kotlin.Long.plus' call
|
|
797
|
-
|
|
811
|
+
var this_11 = this_0.c1m_1;
|
|
812
|
+
tmp_6.c1m_1 = add(this_11, fromInt(bytesWritten_2));
|
|
798
813
|
break $l$block_6;
|
|
799
814
|
}
|
|
800
815
|
// Inline function 'kotlin.check' call
|
|
801
|
-
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.
|
|
802
|
-
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.
|
|
816
|
+
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.r1n() : false)) {
|
|
817
|
+
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.r1n();
|
|
803
818
|
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
804
819
|
}
|
|
805
820
|
if (!(bytesWritten_2 === 0)) {
|
|
806
|
-
tail_2.
|
|
821
|
+
tail_2.j1m_1 = tail_2.j1m_1 + bytesWritten_2 | 0;
|
|
807
822
|
var tmp_7 = this_0;
|
|
808
823
|
// Inline function 'kotlin.Long.plus' call
|
|
809
|
-
|
|
824
|
+
var this_12 = this_0.c1m_1;
|
|
825
|
+
tmp_7.c1m_1 = add(this_12, fromInt(bytesWritten_2));
|
|
810
826
|
break $l$block_6;
|
|
811
827
|
}
|
|
812
828
|
if (isEmpty(tail_2)) {
|
|
813
|
-
this_0.
|
|
829
|
+
this_0.g1n();
|
|
814
830
|
}
|
|
815
831
|
}
|
|
816
832
|
i = i + 2 | 0;
|
|
817
833
|
}
|
|
818
834
|
}
|
|
819
835
|
}
|
|
820
|
-
_this__u8e3s4.
|
|
836
|
+
_this__u8e3s4.f1m();
|
|
821
837
|
}
|
|
822
838
|
function FileSystem() {
|
|
823
839
|
}
|
|
@@ -827,9 +843,9 @@
|
|
|
827
843
|
isRegularFile = isRegularFile === VOID ? false : isRegularFile;
|
|
828
844
|
isDirectory = isDirectory === VOID ? false : isDirectory;
|
|
829
845
|
size = size === VOID ? new Long(0, 0) : size;
|
|
830
|
-
this.
|
|
831
|
-
this.
|
|
832
|
-
this.
|
|
846
|
+
this.i1o_1 = isRegularFile;
|
|
847
|
+
this.j1o_1 = isDirectory;
|
|
848
|
+
this.k1o_1 = size;
|
|
833
849
|
}
|
|
834
850
|
function removeTrailingSeparators(path, isWindows_) {
|
|
835
851
|
isWindows_ = isWindows_ === VOID ? get_isWindows() : isWindows_;
|
|
@@ -857,7 +873,7 @@
|
|
|
857
873
|
// Inline function 'kotlin.text.buildString' call
|
|
858
874
|
// Inline function 'kotlin.apply' call
|
|
859
875
|
var this_0 = StringBuilder_init_$Create$_0();
|
|
860
|
-
this_0.
|
|
876
|
+
this_0.c8(base);
|
|
861
877
|
// Inline function 'kotlin.collections.forEach' call
|
|
862
878
|
var inductionVariable = 0;
|
|
863
879
|
var last = parts.length;
|
|
@@ -872,9 +888,9 @@
|
|
|
872
888
|
tmp = false;
|
|
873
889
|
}
|
|
874
890
|
if (tmp) {
|
|
875
|
-
this_0.
|
|
891
|
+
this_0.d8(get_SystemPathSeparator());
|
|
876
892
|
}
|
|
877
|
-
this_0.
|
|
893
|
+
this_0.c8(element);
|
|
878
894
|
}
|
|
879
895
|
var tmp$ret$5 = this_0.toString();
|
|
880
896
|
return Path_1(tmp$ret$5);
|
|
@@ -930,27 +946,27 @@
|
|
|
930
946
|
}
|
|
931
947
|
function SegmentReadContextImpl$1() {
|
|
932
948
|
}
|
|
933
|
-
protoOf(SegmentReadContextImpl$1).
|
|
934
|
-
return segment.
|
|
949
|
+
protoOf(SegmentReadContextImpl$1).e1n = function (segment, offset) {
|
|
950
|
+
return segment.t1n(offset);
|
|
935
951
|
};
|
|
936
952
|
function SegmentWriteContextImpl$1() {
|
|
937
953
|
}
|
|
938
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
939
|
-
segment.
|
|
954
|
+
protoOf(SegmentWriteContextImpl$1).b1o = function (segment, offset, value) {
|
|
955
|
+
segment.u1n(offset, value);
|
|
940
956
|
};
|
|
941
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
942
|
-
segment.
|
|
957
|
+
protoOf(SegmentWriteContextImpl$1).a1o = function (segment, offset, b0, b1) {
|
|
958
|
+
segment.v1n(offset, b0, b1);
|
|
943
959
|
};
|
|
944
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
945
|
-
segment.
|
|
960
|
+
protoOf(SegmentWriteContextImpl$1).z1n = function (segment, offset, b0, b1, b2) {
|
|
961
|
+
segment.w1n(offset, b0, b1, b2);
|
|
946
962
|
};
|
|
947
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
948
|
-
segment.
|
|
963
|
+
protoOf(SegmentWriteContextImpl$1).y1n = function (segment, offset, b0, b1, b2, b3) {
|
|
964
|
+
segment.x1n(offset, b0, b1, b2, b3);
|
|
949
965
|
};
|
|
950
966
|
function BufferIterationContextImpl$1() {
|
|
951
967
|
}
|
|
952
|
-
protoOf(BufferIterationContextImpl$1).
|
|
953
|
-
return get_SegmentReadContextImpl().
|
|
968
|
+
protoOf(BufferIterationContextImpl$1).e1n = function (segment, offset) {
|
|
969
|
+
return get_SegmentReadContextImpl().e1n(segment, offset);
|
|
954
970
|
};
|
|
955
971
|
var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
|
|
956
972
|
function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
@@ -1031,15 +1047,15 @@
|
|
|
1031
1047
|
captureStack(this, EOFException);
|
|
1032
1048
|
}
|
|
1033
1049
|
function SegmentPool() {
|
|
1034
|
-
this.
|
|
1035
|
-
this.
|
|
1050
|
+
this.r1m_1 = 0;
|
|
1051
|
+
this.s1m_1 = 0;
|
|
1036
1052
|
}
|
|
1037
|
-
protoOf(SegmentPool).
|
|
1038
|
-
return Companion_instance.
|
|
1053
|
+
protoOf(SegmentPool).t1m = function () {
|
|
1054
|
+
return Companion_instance.m1n();
|
|
1039
1055
|
};
|
|
1040
|
-
protoOf(SegmentPool).
|
|
1056
|
+
protoOf(SegmentPool).f1n = function (segment) {
|
|
1041
1057
|
};
|
|
1042
|
-
protoOf(SegmentPool).
|
|
1058
|
+
protoOf(SegmentPool).p1n = function () {
|
|
1043
1059
|
return AlwaysSharedCopyTracker_getInstance();
|
|
1044
1060
|
};
|
|
1045
1061
|
var SegmentPool_instance;
|
|
@@ -1052,7 +1068,7 @@
|
|
|
1052
1068
|
var tmp = KProperty0;
|
|
1053
1069
|
// Inline function 'kotlin.getValue' call
|
|
1054
1070
|
getPropertyCallableRef('path', 0, tmp, _get_path_$ref_hpvpv9(), null);
|
|
1055
|
-
return tmp0.
|
|
1071
|
+
return tmp0.w();
|
|
1056
1072
|
}
|
|
1057
1073
|
var path$delegate;
|
|
1058
1074
|
function get_fs() {
|
|
@@ -1061,7 +1077,7 @@
|
|
|
1061
1077
|
var tmp = KProperty0;
|
|
1062
1078
|
// Inline function 'kotlin.getValue' call
|
|
1063
1079
|
getPropertyCallableRef('fs', 0, tmp, _get_fs_$ref_rnlob1(), null);
|
|
1064
|
-
return tmp0.
|
|
1080
|
+
return tmp0.w();
|
|
1065
1081
|
}
|
|
1066
1082
|
var fs$delegate;
|
|
1067
1083
|
function get_os() {
|
|
@@ -1070,7 +1086,7 @@
|
|
|
1070
1086
|
var tmp = KProperty0;
|
|
1071
1087
|
// Inline function 'kotlin.getValue' call
|
|
1072
1088
|
getPropertyCallableRef('os', 0, tmp, _get_os_$ref_hoy4d2(), null);
|
|
1073
|
-
return tmp0.
|
|
1089
|
+
return tmp0.w();
|
|
1074
1090
|
}
|
|
1075
1091
|
var os$delegate;
|
|
1076
1092
|
function get_buffer() {
|
|
@@ -1079,7 +1095,7 @@
|
|
|
1079
1095
|
var tmp = KProperty0;
|
|
1080
1096
|
// Inline function 'kotlin.getValue' call
|
|
1081
1097
|
getPropertyCallableRef('buffer', 0, tmp, _get_buffer_$ref_mc964a(), null);
|
|
1082
|
-
return tmp0.
|
|
1098
|
+
return tmp0.w();
|
|
1083
1099
|
}
|
|
1084
1100
|
var buffer$delegate;
|
|
1085
1101
|
function path$delegate$lambda() {
|
|
@@ -1186,18 +1202,18 @@
|
|
|
1186
1202
|
return isWindows;
|
|
1187
1203
|
}
|
|
1188
1204
|
var isWindows;
|
|
1189
|
-
function FileNotFoundException(message) {
|
|
1190
|
-
IOException_init_$Init$_0(message, this);
|
|
1191
|
-
captureStack(this, FileNotFoundException);
|
|
1192
|
-
}
|
|
1193
1205
|
function get_SystemTemporaryDirectory() {
|
|
1194
1206
|
_init_properties_FileSystemNodeJs_kt__m4c3u();
|
|
1195
1207
|
var tmp0_elvis_lhs = get_os().tmpdir();
|
|
1196
1208
|
return Path_1(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
|
|
1197
1209
|
}
|
|
1210
|
+
function FileNotFoundException(message) {
|
|
1211
|
+
IOException_init_$Init$_0(message, this);
|
|
1212
|
+
captureStack(this, FileNotFoundException);
|
|
1213
|
+
}
|
|
1198
1214
|
function SystemFileSystem$o$delete$lambda($path) {
|
|
1199
1215
|
return function () {
|
|
1200
|
-
var tmp0_elvis_lhs = get_fs().statSync($path.
|
|
1216
|
+
var tmp0_elvis_lhs = get_fs().statSync($path.l1o_1);
|
|
1201
1217
|
var tmp;
|
|
1202
1218
|
if (tmp0_elvis_lhs == null) {
|
|
1203
1219
|
throw new FileNotFoundException('File does not exist: ' + $path.toString());
|
|
@@ -1207,10 +1223,10 @@
|
|
|
1207
1223
|
var stats = tmp;
|
|
1208
1224
|
var tmp_0;
|
|
1209
1225
|
if (stats.isDirectory()) {
|
|
1210
|
-
get_fs().rmdirSync($path.
|
|
1226
|
+
get_fs().rmdirSync($path.l1o_1);
|
|
1211
1227
|
tmp_0 = Unit_instance;
|
|
1212
1228
|
} else {
|
|
1213
|
-
get_fs().rmSync($path.
|
|
1229
|
+
get_fs().rmSync($path.l1o_1);
|
|
1214
1230
|
tmp_0 = Unit_instance;
|
|
1215
1231
|
}
|
|
1216
1232
|
return Unit_instance;
|
|
@@ -1218,7 +1234,7 @@
|
|
|
1218
1234
|
}
|
|
1219
1235
|
function SystemFileSystem$o$metadataOrNull$lambda($path, $metadata) {
|
|
1220
1236
|
return function () {
|
|
1221
|
-
var tmp0_elvis_lhs = get_fs().statSync($path.
|
|
1237
|
+
var tmp0_elvis_lhs = get_fs().statSync($path.l1o_1);
|
|
1222
1238
|
var tmp;
|
|
1223
1239
|
if (tmp0_elvis_lhs == null) {
|
|
1224
1240
|
return Unit_instance;
|
|
@@ -1228,18 +1244,18 @@
|
|
|
1228
1244
|
var stat = tmp;
|
|
1229
1245
|
var mode = stat.mode;
|
|
1230
1246
|
var isFile = (mode & get_fs().constants.S_IFMT) === get_fs().constants.S_IFREG;
|
|
1231
|
-
$metadata._v = new FileMetadata(isFile, (mode & get_fs().constants.S_IFMT) === get_fs().constants.S_IFDIR, isFile ?
|
|
1247
|
+
$metadata._v = new FileMetadata(isFile, (mode & get_fs().constants.S_IFMT) === get_fs().constants.S_IFDIR, isFile ? fromInt(stat.size) : new Long(-1, -1));
|
|
1232
1248
|
return Unit_instance;
|
|
1233
1249
|
};
|
|
1234
1250
|
}
|
|
1235
1251
|
function SystemFileSystem$1() {
|
|
1236
1252
|
SystemFileSystemImpl.call(this);
|
|
1237
1253
|
}
|
|
1238
|
-
protoOf(SystemFileSystem$1).
|
|
1239
|
-
return get_fs().existsSync(path.
|
|
1254
|
+
protoOf(SystemFileSystem$1).c1o = function (path) {
|
|
1255
|
+
return get_fs().existsSync(path.l1o_1);
|
|
1240
1256
|
};
|
|
1241
|
-
protoOf(SystemFileSystem$1).
|
|
1242
|
-
if (!this.
|
|
1257
|
+
protoOf(SystemFileSystem$1).d1o = function (path, mustExist) {
|
|
1258
|
+
if (!this.c1o(path)) {
|
|
1243
1259
|
if (mustExist) {
|
|
1244
1260
|
throw new FileNotFoundException('File does not exist: ' + path.toString());
|
|
1245
1261
|
}
|
|
@@ -1253,13 +1269,13 @@
|
|
|
1253
1269
|
throw IOException_init_$Create$_1('Delete failed for ' + path.toString(), tmp0_safe_receiver);
|
|
1254
1270
|
}
|
|
1255
1271
|
};
|
|
1256
|
-
protoOf(SystemFileSystem$1).
|
|
1257
|
-
var metadata = this.
|
|
1272
|
+
protoOf(SystemFileSystem$1).f1o = function (path, mustCreate) {
|
|
1273
|
+
var metadata = this.m1o(path);
|
|
1258
1274
|
if (!(metadata == null)) {
|
|
1259
1275
|
if (mustCreate) {
|
|
1260
1276
|
throw IOException_init_$Create$_0('Path already exists: ' + path.toString());
|
|
1261
1277
|
}
|
|
1262
|
-
if (metadata.
|
|
1278
|
+
if (metadata.i1o_1) {
|
|
1263
1279
|
throw IOException_init_$Create$_0("Path already exists and it's a file: " + path.toString());
|
|
1264
1280
|
}
|
|
1265
1281
|
return Unit_instance;
|
|
@@ -1267,19 +1283,19 @@
|
|
|
1267
1283
|
// Inline function 'kotlin.collections.arrayListOf' call
|
|
1268
1284
|
var parts = ArrayList_init_$Create$();
|
|
1269
1285
|
var p = path;
|
|
1270
|
-
while (!(p == null) && !this.
|
|
1271
|
-
parts.
|
|
1272
|
-
p = p.
|
|
1286
|
+
while (!(p == null) && !this.c1o(p)) {
|
|
1287
|
+
parts.j(p.toString());
|
|
1288
|
+
p = p.n1o();
|
|
1273
1289
|
}
|
|
1274
1290
|
// Inline function 'kotlin.collections.forEach' call
|
|
1275
|
-
var _iterator__ex2g4s = asReversed(parts).
|
|
1276
|
-
while (_iterator__ex2g4s.
|
|
1277
|
-
var element = _iterator__ex2g4s.
|
|
1291
|
+
var _iterator__ex2g4s = asReversed(parts).l();
|
|
1292
|
+
while (_iterator__ex2g4s.m()) {
|
|
1293
|
+
var element = _iterator__ex2g4s.n();
|
|
1278
1294
|
get_fs().mkdirSync(element);
|
|
1279
1295
|
}
|
|
1280
1296
|
};
|
|
1281
|
-
protoOf(SystemFileSystem$1).
|
|
1282
|
-
if (!this.
|
|
1297
|
+
protoOf(SystemFileSystem$1).m1o = function (path) {
|
|
1298
|
+
if (!this.c1o(path))
|
|
1283
1299
|
return null;
|
|
1284
1300
|
var metadata = {_v: null};
|
|
1285
1301
|
var tmp0_safe_receiver = withCaughtException(SystemFileSystem$o$metadataOrNull$lambda(path, metadata));
|
|
@@ -1291,7 +1307,7 @@
|
|
|
1291
1307
|
}
|
|
1292
1308
|
return metadata._v;
|
|
1293
1309
|
};
|
|
1294
|
-
protoOf(SystemFileSystem$1).
|
|
1310
|
+
protoOf(SystemFileSystem$1).h1o = function (path, append) {
|
|
1295
1311
|
return new FileSink(path, append);
|
|
1296
1312
|
};
|
|
1297
1313
|
var properties_initialized_FileSystemNodeJs_kt_vmmd20;
|
|
@@ -1308,31 +1324,31 @@
|
|
|
1308
1324
|
var tmp = KProperty0;
|
|
1309
1325
|
// Inline function 'kotlin.getValue' call
|
|
1310
1326
|
getPropertyCallableRef('SystemPathSeparator', 0, tmp, _get_SystemPathSeparator_$ref_lvdbpt(), null);
|
|
1311
|
-
return tmp0.
|
|
1327
|
+
return tmp0.w().h1_1;
|
|
1312
1328
|
}
|
|
1313
1329
|
var SystemPathSeparator$delegate;
|
|
1314
1330
|
function Path_0(rawPath, any) {
|
|
1315
|
-
this.
|
|
1331
|
+
this.l1o_1 = removeTrailingSeparators(rawPath);
|
|
1316
1332
|
}
|
|
1317
|
-
protoOf(Path_0).
|
|
1333
|
+
protoOf(Path_0).n1o = function () {
|
|
1318
1334
|
// Inline function 'kotlin.text.isEmpty' call
|
|
1319
|
-
var this_0 = this.
|
|
1335
|
+
var this_0 = this.l1o_1;
|
|
1320
1336
|
if (charSequenceLength(this_0) === 0)
|
|
1321
1337
|
return null;
|
|
1322
1338
|
if (get_isWindows()) {
|
|
1323
|
-
if (!contains(this.
|
|
1339
|
+
if (!contains(this.l1o_1, _Char___init__impl__6a9atx(47)) && !contains(this.l1o_1, _Char___init__impl__6a9atx(92))) {
|
|
1324
1340
|
return null;
|
|
1325
1341
|
}
|
|
1326
|
-
} else if (!contains(this.
|
|
1342
|
+
} else if (!contains(this.l1o_1, get_SystemPathSeparator())) {
|
|
1327
1343
|
return null;
|
|
1328
1344
|
}
|
|
1329
|
-
var p = get_path().dirname(this.
|
|
1345
|
+
var p = get_path().dirname(this.l1o_1);
|
|
1330
1346
|
var tmp;
|
|
1331
1347
|
// Inline function 'kotlin.text.isEmpty' call
|
|
1332
1348
|
if (charSequenceLength(p) === 0) {
|
|
1333
1349
|
tmp = null;
|
|
1334
1350
|
} else {
|
|
1335
|
-
if (p === this.
|
|
1351
|
+
if (p === this.l1o_1) {
|
|
1336
1352
|
tmp = null;
|
|
1337
1353
|
} else {
|
|
1338
1354
|
tmp = Path_1(p);
|
|
@@ -1341,17 +1357,17 @@
|
|
|
1341
1357
|
return tmp;
|
|
1342
1358
|
};
|
|
1343
1359
|
protoOf(Path_0).toString = function () {
|
|
1344
|
-
return this.
|
|
1360
|
+
return this.l1o_1;
|
|
1345
1361
|
};
|
|
1346
1362
|
protoOf(Path_0).equals = function (other) {
|
|
1347
1363
|
if (this === other)
|
|
1348
1364
|
return true;
|
|
1349
1365
|
if (!(other instanceof Path_0))
|
|
1350
1366
|
return false;
|
|
1351
|
-
return this.
|
|
1367
|
+
return this.l1o_1 === other.l1o_1;
|
|
1352
1368
|
};
|
|
1353
1369
|
protoOf(Path_0).hashCode = function () {
|
|
1354
|
-
return getStringHashCode(this.
|
|
1370
|
+
return getStringHashCode(this.l1o_1);
|
|
1355
1371
|
};
|
|
1356
1372
|
function open($this, path, append) {
|
|
1357
1373
|
var flags = append ? 'a' : 'w';
|
|
@@ -1361,52 +1377,52 @@
|
|
|
1361
1377
|
null;
|
|
1362
1378
|
else {
|
|
1363
1379
|
// Inline function 'kotlin.also' call
|
|
1364
|
-
throw IOException_init_$Create$_1('Failed to open a file ' + path.
|
|
1380
|
+
throw IOException_init_$Create$_1('Failed to open a file ' + path.l1o_1 + '.', tmp0_safe_receiver);
|
|
1365
1381
|
}
|
|
1366
1382
|
if (fd._v < 0)
|
|
1367
|
-
throw IOException_init_$Create$_0('Failed to open a file ' + path.
|
|
1383
|
+
throw IOException_init_$Create$_0('Failed to open a file ' + path.l1o_1 + '.');
|
|
1368
1384
|
return fd._v;
|
|
1369
1385
|
}
|
|
1370
1386
|
function FileSink$open$lambda($fd, $path, $flags) {
|
|
1371
1387
|
return function () {
|
|
1372
|
-
$fd._v = get_fs().openSync($path.
|
|
1388
|
+
$fd._v = get_fs().openSync($path.l1o_1, $flags);
|
|
1373
1389
|
return Unit_instance;
|
|
1374
1390
|
};
|
|
1375
1391
|
}
|
|
1376
1392
|
function FileSink$write$lambda(this$0, $buf) {
|
|
1377
1393
|
return function () {
|
|
1378
|
-
get_fs().writeFileSync(this$0.
|
|
1394
|
+
get_fs().writeFileSync(this$0.p1o_1, $buf);
|
|
1379
1395
|
return Unit_instance;
|
|
1380
1396
|
};
|
|
1381
1397
|
}
|
|
1382
1398
|
function FileSink(path, append) {
|
|
1383
|
-
this.
|
|
1384
|
-
this.
|
|
1399
|
+
this.o1o_1 = false;
|
|
1400
|
+
this.p1o_1 = open(this, path, append);
|
|
1385
1401
|
}
|
|
1386
|
-
protoOf(FileSink).
|
|
1402
|
+
protoOf(FileSink).v1m = function (source, byteCount) {
|
|
1387
1403
|
// Inline function 'kotlin.check' call
|
|
1388
|
-
if (!!this.
|
|
1404
|
+
if (!!this.o1o_1) {
|
|
1389
1405
|
var message = 'Sink is closed.';
|
|
1390
1406
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1391
1407
|
}
|
|
1392
|
-
if (byteCount
|
|
1408
|
+
if (equalsLong(byteCount, new Long(0, 0))) {
|
|
1393
1409
|
return Unit_instance;
|
|
1394
1410
|
}
|
|
1395
1411
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1396
|
-
var b = source.
|
|
1397
|
-
var remainingBytes = byteCount
|
|
1398
|
-
while (remainingBytes
|
|
1412
|
+
var b = source.o();
|
|
1413
|
+
var remainingBytes = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
1414
|
+
while (compare(remainingBytes, new Long(0, 0)) > 0) {
|
|
1399
1415
|
var segmentBytes = 0;
|
|
1400
1416
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.readFromHead' call
|
|
1401
1417
|
// Inline function 'kotlin.require' call
|
|
1402
|
-
if (!!source.
|
|
1418
|
+
if (!!source.e1m()) {
|
|
1403
1419
|
var message_0 = 'Buffer is empty';
|
|
1404
1420
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1405
1421
|
}
|
|
1406
|
-
var head = ensureNotNull(source.
|
|
1407
|
-
var tmp0 = head.
|
|
1408
|
-
var tmp2 = head.
|
|
1409
|
-
segmentBytes = head.
|
|
1422
|
+
var head = ensureNotNull(source.a1m_1);
|
|
1423
|
+
var tmp0 = head.s1n(true);
|
|
1424
|
+
var tmp2 = head.i1m_1;
|
|
1425
|
+
segmentBytes = head.j1m_1 - tmp2 | 0;
|
|
1410
1426
|
var buf = get_buffer().Buffer.allocUnsafe(segmentBytes);
|
|
1411
1427
|
var inductionVariable = 0;
|
|
1412
1428
|
var last = segmentBytes;
|
|
@@ -1428,20 +1444,20 @@
|
|
|
1428
1444
|
if (!(bytesRead === 0)) {
|
|
1429
1445
|
if (bytesRead < 0)
|
|
1430
1446
|
throw IllegalStateException_init_$Create$('Returned negative read bytes count');
|
|
1431
|
-
if (bytesRead > head.
|
|
1447
|
+
if (bytesRead > head.o())
|
|
1432
1448
|
throw IllegalStateException_init_$Create$('Returned too many bytes');
|
|
1433
|
-
source.
|
|
1449
|
+
source.o1m(fromInt(bytesRead));
|
|
1434
1450
|
}
|
|
1435
1451
|
var tmp0_0 = remainingBytes;
|
|
1436
1452
|
// Inline function 'kotlin.Long.minus' call
|
|
1437
1453
|
var other = segmentBytes;
|
|
1438
|
-
remainingBytes = tmp0_0
|
|
1454
|
+
remainingBytes = subtract(tmp0_0, fromInt(other));
|
|
1439
1455
|
}
|
|
1440
1456
|
};
|
|
1441
|
-
protoOf(FileSink).
|
|
1442
|
-
if (!this.
|
|
1443
|
-
this.
|
|
1444
|
-
get_fs().closeSync(this.
|
|
1457
|
+
protoOf(FileSink).d1n = function () {
|
|
1458
|
+
if (!this.o1o_1) {
|
|
1459
|
+
this.o1o_1 = true;
|
|
1460
|
+
get_fs().closeSync(this.p1o_1);
|
|
1445
1461
|
}
|
|
1446
1462
|
};
|
|
1447
1463
|
function Path_1(path) {
|
|
@@ -1470,8 +1486,8 @@
|
|
|
1470
1486
|
}
|
|
1471
1487
|
}
|
|
1472
1488
|
//region block: post-declaration
|
|
1473
|
-
protoOf(SystemFileSystemImpl).
|
|
1474
|
-
protoOf(SystemFileSystemImpl).
|
|
1489
|
+
protoOf(SystemFileSystemImpl).e1o = delete$default;
|
|
1490
|
+
protoOf(SystemFileSystemImpl).g1o = createDirectories$default;
|
|
1475
1491
|
//endregion
|
|
1476
1492
|
//region block: init
|
|
1477
1493
|
Companion_instance = new Companion();
|