@next/swc-wasm-web 12.3.2-canary.21 → 12.3.2-canary.22
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/package.json +1 -1
- package/wasm.js +141 -134
- package/wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/wasm.js
CHANGED
|
@@ -30,69 +30,26 @@ function addHeapObject(obj) {
|
|
|
30
30
|
return idx;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (type == 'symbol') {
|
|
43
|
-
const description = val.description;
|
|
44
|
-
if (description == null) {
|
|
45
|
-
return 'Symbol';
|
|
46
|
-
} else {
|
|
47
|
-
return `Symbol(${description})`;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
if (type == 'function') {
|
|
51
|
-
const name = val.name;
|
|
52
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
53
|
-
return `Function(${name})`;
|
|
54
|
-
} else {
|
|
55
|
-
return 'Function';
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// objects
|
|
59
|
-
if (Array.isArray(val)) {
|
|
60
|
-
const length = val.length;
|
|
61
|
-
let debug = '[';
|
|
62
|
-
if (length > 0) {
|
|
63
|
-
debug += debugString(val[0]);
|
|
64
|
-
}
|
|
65
|
-
for(let i = 1; i < length; i++) {
|
|
66
|
-
debug += ', ' + debugString(val[i]);
|
|
67
|
-
}
|
|
68
|
-
debug += ']';
|
|
69
|
-
return debug;
|
|
70
|
-
}
|
|
71
|
-
// Test for built-in
|
|
72
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
73
|
-
let className;
|
|
74
|
-
if (builtInMatches.length > 1) {
|
|
75
|
-
className = builtInMatches[1];
|
|
76
|
-
} else {
|
|
77
|
-
// Failed to match the standard '[object ClassName]'
|
|
78
|
-
return toString.call(val);
|
|
79
|
-
}
|
|
80
|
-
if (className == 'Object') {
|
|
81
|
-
// we're a user defined class or Object
|
|
82
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
83
|
-
// easier than looping through ownProperties of `val`.
|
|
84
|
-
try {
|
|
85
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
86
|
-
} catch (_) {
|
|
87
|
-
return 'Object';
|
|
88
|
-
}
|
|
33
|
+
function isLikeNone(x) {
|
|
34
|
+
return x === undefined || x === null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
let cachedFloat64Memory0 = new Float64Array();
|
|
38
|
+
|
|
39
|
+
function getFloat64Memory0() {
|
|
40
|
+
if (cachedFloat64Memory0.byteLength === 0) {
|
|
41
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
89
42
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
43
|
+
return cachedFloat64Memory0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
let cachedInt32Memory0 = new Int32Array();
|
|
47
|
+
|
|
48
|
+
function getInt32Memory0() {
|
|
49
|
+
if (cachedInt32Memory0.byteLength === 0) {
|
|
50
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
93
51
|
}
|
|
94
|
-
|
|
95
|
-
return className;
|
|
52
|
+
return cachedInt32Memory0;
|
|
96
53
|
}
|
|
97
54
|
|
|
98
55
|
let WASM_VECTOR_LEN = 0;
|
|
@@ -159,34 +116,86 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
159
116
|
return ptr;
|
|
160
117
|
}
|
|
161
118
|
|
|
162
|
-
|
|
119
|
+
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
163
120
|
|
|
164
|
-
|
|
165
|
-
if (cachedInt32Memory0.byteLength === 0) {
|
|
166
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
167
|
-
}
|
|
168
|
-
return cachedInt32Memory0;
|
|
169
|
-
}
|
|
121
|
+
cachedTextDecoder.decode();
|
|
170
122
|
|
|
171
|
-
function
|
|
172
|
-
return
|
|
123
|
+
function getStringFromWasm0(ptr, len) {
|
|
124
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
173
125
|
}
|
|
174
126
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
if (
|
|
179
|
-
|
|
127
|
+
function debugString(val) {
|
|
128
|
+
// primitive types
|
|
129
|
+
const type = typeof val;
|
|
130
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
131
|
+
return `${val}`;
|
|
180
132
|
}
|
|
181
|
-
|
|
133
|
+
if (type == 'string') {
|
|
134
|
+
return `"${val}"`;
|
|
135
|
+
}
|
|
136
|
+
if (type == 'symbol') {
|
|
137
|
+
const description = val.description;
|
|
138
|
+
if (description == null) {
|
|
139
|
+
return 'Symbol';
|
|
140
|
+
} else {
|
|
141
|
+
return `Symbol(${description})`;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (type == 'function') {
|
|
145
|
+
const name = val.name;
|
|
146
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
147
|
+
return `Function(${name})`;
|
|
148
|
+
} else {
|
|
149
|
+
return 'Function';
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
// objects
|
|
153
|
+
if (Array.isArray(val)) {
|
|
154
|
+
const length = val.length;
|
|
155
|
+
let debug = '[';
|
|
156
|
+
if (length > 0) {
|
|
157
|
+
debug += debugString(val[0]);
|
|
158
|
+
}
|
|
159
|
+
for(let i = 1; i < length; i++) {
|
|
160
|
+
debug += ', ' + debugString(val[i]);
|
|
161
|
+
}
|
|
162
|
+
debug += ']';
|
|
163
|
+
return debug;
|
|
164
|
+
}
|
|
165
|
+
// Test for built-in
|
|
166
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
167
|
+
let className;
|
|
168
|
+
if (builtInMatches.length > 1) {
|
|
169
|
+
className = builtInMatches[1];
|
|
170
|
+
} else {
|
|
171
|
+
// Failed to match the standard '[object ClassName]'
|
|
172
|
+
return toString.call(val);
|
|
173
|
+
}
|
|
174
|
+
if (className == 'Object') {
|
|
175
|
+
// we're a user defined class or Object
|
|
176
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
177
|
+
// easier than looping through ownProperties of `val`.
|
|
178
|
+
try {
|
|
179
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
180
|
+
} catch (_) {
|
|
181
|
+
return 'Object';
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
// errors
|
|
185
|
+
if (val instanceof Error) {
|
|
186
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
187
|
+
}
|
|
188
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
189
|
+
return className;
|
|
182
190
|
}
|
|
183
191
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
cachedTextDecoder.decode();
|
|
192
|
+
let cachedBigInt64Memory0 = new BigInt64Array();
|
|
187
193
|
|
|
188
|
-
function
|
|
189
|
-
|
|
194
|
+
function getBigInt64Memory0() {
|
|
195
|
+
if (cachedBigInt64Memory0.byteLength === 0) {
|
|
196
|
+
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
|
197
|
+
}
|
|
198
|
+
return cachedBigInt64Memory0;
|
|
190
199
|
}
|
|
191
200
|
|
|
192
201
|
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
@@ -213,7 +222,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
213
222
|
|
|
214
223
|
return real;
|
|
215
224
|
}
|
|
216
|
-
function
|
|
225
|
+
function __wbg_adapter_46(arg0, arg1, arg2) {
|
|
217
226
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf0bd547216a53344(arg0, arg1, addHeapObject(arg2));
|
|
218
227
|
}
|
|
219
228
|
|
|
@@ -232,7 +241,7 @@ function handleError(f, args) {
|
|
|
232
241
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
233
242
|
}
|
|
234
243
|
}
|
|
235
|
-
function
|
|
244
|
+
function __wbg_adapter_87(arg0, arg1, arg2, arg3) {
|
|
236
245
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h3c64c44d7e6869aa(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
237
246
|
}
|
|
238
247
|
|
|
@@ -438,27 +447,12 @@ imports.wbg.__wbg_new_8c3f0052272a457a = function(arg0) {
|
|
|
438
447
|
imports.wbg.__wbg_set_83db9690f9353e79 = function(arg0, arg1, arg2) {
|
|
439
448
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
440
449
|
};
|
|
441
|
-
imports.wbg.__wbg_has_8359f114ce042f5a = function() { return handleError(function (arg0, arg1) {
|
|
442
|
-
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
443
|
-
return ret;
|
|
444
|
-
}, arguments) };
|
|
445
|
-
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
446
|
-
const ret = debugString(getObject(arg1));
|
|
447
|
-
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
448
|
-
const len0 = WASM_VECTOR_LEN;
|
|
449
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
450
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
451
|
-
};
|
|
452
450
|
imports.wbg.__wbg_entries_65a76a413fc91037 = function(arg0) {
|
|
453
451
|
const ret = Object.entries(getObject(arg0));
|
|
454
452
|
return addHeapObject(ret);
|
|
455
453
|
};
|
|
456
|
-
imports.wbg.
|
|
457
|
-
const ret = getObject(arg0)
|
|
458
|
-
return ret;
|
|
459
|
-
};
|
|
460
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
461
|
-
const ret = getObject(arg0) === undefined;
|
|
454
|
+
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
455
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
462
456
|
return ret;
|
|
463
457
|
};
|
|
464
458
|
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
@@ -500,9 +494,8 @@ imports.wbg.__wbg_instanceof_ArrayBuffer_e5e48f4762c5610b = function(arg0) {
|
|
|
500
494
|
const ret = result;
|
|
501
495
|
return ret;
|
|
502
496
|
};
|
|
503
|
-
imports.wbg.
|
|
504
|
-
|
|
505
|
-
const ret = new Error(v0);
|
|
497
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
498
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
506
499
|
return addHeapObject(ret);
|
|
507
500
|
};
|
|
508
501
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
@@ -513,10 +506,25 @@ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
|
513
506
|
const ret = getObject(arg0);
|
|
514
507
|
return addHeapObject(ret);
|
|
515
508
|
};
|
|
516
|
-
imports.wbg.
|
|
517
|
-
const ret = getObject(
|
|
509
|
+
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
510
|
+
const ret = debugString(getObject(arg1));
|
|
511
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
512
|
+
const len0 = WASM_VECTOR_LEN;
|
|
513
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
514
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
515
|
+
};
|
|
516
|
+
imports.wbg.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
|
|
517
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
518
518
|
return addHeapObject(ret);
|
|
519
519
|
};
|
|
520
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
521
|
+
const ret = getObject(arg0) === undefined;
|
|
522
|
+
return ret;
|
|
523
|
+
};
|
|
524
|
+
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
525
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
526
|
+
return ret;
|
|
527
|
+
};
|
|
520
528
|
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
521
529
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
522
530
|
return ret;
|
|
@@ -533,16 +541,18 @@ imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
|
533
541
|
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
534
542
|
return ret;
|
|
535
543
|
};
|
|
536
|
-
imports.wbg.
|
|
537
|
-
const
|
|
538
|
-
|
|
544
|
+
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
545
|
+
const v = getObject(arg1);
|
|
546
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
547
|
+
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0n : ret;
|
|
548
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
539
549
|
};
|
|
540
|
-
imports.wbg.
|
|
541
|
-
const ret =
|
|
550
|
+
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
551
|
+
const ret = arg0;
|
|
542
552
|
return addHeapObject(ret);
|
|
543
553
|
};
|
|
544
|
-
imports.wbg.
|
|
545
|
-
const ret =
|
|
554
|
+
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
555
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
546
556
|
return ret;
|
|
547
557
|
};
|
|
548
558
|
imports.wbg.__wbg_isSafeInteger_dfa0593e8d7ac35a = function(arg0) {
|
|
@@ -553,12 +563,20 @@ imports.wbg.__wbg_isArray_27c46c67f498e15d = function(arg0) {
|
|
|
553
563
|
const ret = Array.isArray(getObject(arg0));
|
|
554
564
|
return ret;
|
|
555
565
|
};
|
|
556
|
-
imports.wbg.
|
|
557
|
-
const ret = BigInt(
|
|
566
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
567
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
568
|
+
return addHeapObject(ret);
|
|
569
|
+
};
|
|
570
|
+
imports.wbg.__wbg_next_aaef7c8aa5e212ac = function() { return handleError(function (arg0) {
|
|
571
|
+
const ret = getObject(arg0).next();
|
|
572
|
+
return addHeapObject(ret);
|
|
573
|
+
}, arguments) };
|
|
574
|
+
imports.wbg.__wbg_done_1b73b0672e15f234 = function(arg0) {
|
|
575
|
+
const ret = getObject(arg0).done;
|
|
558
576
|
return ret;
|
|
559
577
|
};
|
|
560
|
-
imports.wbg.
|
|
561
|
-
const ret =
|
|
578
|
+
imports.wbg.__wbg_value_1ccc36bc03462d71 = function(arg0) {
|
|
579
|
+
const ret = getObject(arg0).value;
|
|
562
580
|
return addHeapObject(ret);
|
|
563
581
|
};
|
|
564
582
|
imports.wbg.__wbg_new_9962f939219f1820 = function(arg0, arg1) {
|
|
@@ -568,7 +586,7 @@ imports.wbg.__wbg_new_9962f939219f1820 = function(arg0, arg1) {
|
|
|
568
586
|
const a = state0.a;
|
|
569
587
|
state0.a = 0;
|
|
570
588
|
try {
|
|
571
|
-
return
|
|
589
|
+
return __wbg_adapter_87(a, state0.b, arg0, arg1);
|
|
572
590
|
} finally {
|
|
573
591
|
state0.a = a;
|
|
574
592
|
}
|
|
@@ -579,29 +597,17 @@ imports.wbg.__wbg_new_9962f939219f1820 = function(arg0, arg1) {
|
|
|
579
597
|
state0.a = state0.b = 0;
|
|
580
598
|
}
|
|
581
599
|
};
|
|
582
|
-
imports.wbg.
|
|
583
|
-
const ret =
|
|
600
|
+
imports.wbg.__wbg_new_0b9bfdd97583284e = function() {
|
|
601
|
+
const ret = new Object();
|
|
584
602
|
return addHeapObject(ret);
|
|
585
|
-
}, arguments) };
|
|
586
|
-
imports.wbg.__wbg_done_1b73b0672e15f234 = function(arg0) {
|
|
587
|
-
const ret = getObject(arg0).done;
|
|
588
|
-
return ret;
|
|
589
603
|
};
|
|
590
|
-
imports.wbg.
|
|
591
|
-
|
|
592
|
-
return addHeapObject(ret);
|
|
604
|
+
imports.wbg.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
|
|
605
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
593
606
|
};
|
|
594
607
|
imports.wbg.__wbg_call_168da88779e35f61 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
595
608
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
596
609
|
return addHeapObject(ret);
|
|
597
610
|
}, arguments) };
|
|
598
|
-
imports.wbg.__wbg_new_0b9bfdd97583284e = function() {
|
|
599
|
-
const ret = new Object();
|
|
600
|
-
return addHeapObject(ret);
|
|
601
|
-
};
|
|
602
|
-
imports.wbg.__wbg_set_c943d600fa71e4dd = function(arg0, arg1, arg2) {
|
|
603
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
604
|
-
};
|
|
605
611
|
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
606
612
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
607
613
|
};
|
|
@@ -623,7 +629,7 @@ imports.wbg.__wbg_then_11f7a54d67b4bfad = function(arg0, arg1) {
|
|
|
623
629
|
return addHeapObject(ret);
|
|
624
630
|
};
|
|
625
631
|
imports.wbg.__wbindgen_closure_wrapper19257 = function(arg0, arg1, arg2) {
|
|
626
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
632
|
+
const ret = makeMutClosure(arg0, arg1, 264, __wbg_adapter_46);
|
|
627
633
|
return addHeapObject(ret);
|
|
628
634
|
};
|
|
629
635
|
|
|
@@ -637,6 +643,7 @@ function initMemory(imports, maybe_memory) {
|
|
|
637
643
|
function finalizeInit(instance, module) {
|
|
638
644
|
wasm = instance.exports;
|
|
639
645
|
init.__wbindgen_wasm_module = module;
|
|
646
|
+
cachedBigInt64Memory0 = new BigInt64Array();
|
|
640
647
|
cachedFloat64Memory0 = new Float64Array();
|
|
641
648
|
cachedInt32Memory0 = new Int32Array();
|
|
642
649
|
cachedUint8Memory0 = new Uint8Array();
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|