@next/swc-wasm-nodejs 13.2.4-canary.7 → 13.2.4-canary.9

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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/wasm.js +150 -150
  3. package/wasm_bg.wasm +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next/swc-wasm-nodejs",
3
- "version": "13.2.4-canary.7",
3
+ "version": "13.2.4-canary.9",
4
4
  "files": [
5
5
  "wasm_bg.wasm",
6
6
  "wasm.js",
package/wasm.js CHANGED
@@ -3,28 +3,25 @@ imports['__wbindgen_placeholder__'] = module.exports;
3
3
  let wasm;
4
4
  const { TextDecoder, TextEncoder } = require(`util`);
5
5
 
6
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
6
+ const heap = new Array(128).fill(undefined);
7
7
 
8
- cachedTextDecoder.decode();
8
+ heap.push(undefined, null, true, false);
9
9
 
10
- let cachedUint8Memory0 = null;
10
+ function getObject(idx) { return heap[idx]; }
11
11
 
12
- function getUint8Memory0() {
13
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
14
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
15
- }
16
- return cachedUint8Memory0;
17
- }
12
+ let heap_next = heap.length;
18
13
 
19
- function getStringFromWasm0(ptr, len) {
20
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
14
+ function dropObject(idx) {
15
+ if (idx < 132) return;
16
+ heap[idx] = heap_next;
17
+ heap_next = idx;
21
18
  }
22
19
 
23
- const heap = new Array(128).fill(undefined);
24
-
25
- heap.push(undefined, null, true, false);
26
-
27
- let heap_next = heap.length;
20
+ function takeObject(idx) {
21
+ const ret = getObject(idx);
22
+ dropObject(idx);
23
+ return ret;
24
+ }
28
25
 
29
26
  function addHeapObject(obj) {
30
27
  if (heap_next === heap.length) heap.push(heap.length + 1);
@@ -35,18 +32,21 @@ function addHeapObject(obj) {
35
32
  return idx;
36
33
  }
37
34
 
38
- function getObject(idx) { return heap[idx]; }
35
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
39
36
 
40
- function dropObject(idx) {
41
- if (idx < 132) return;
42
- heap[idx] = heap_next;
43
- heap_next = idx;
37
+ cachedTextDecoder.decode();
38
+
39
+ let cachedUint8Memory0 = null;
40
+
41
+ function getUint8Memory0() {
42
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
43
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
44
+ }
45
+ return cachedUint8Memory0;
44
46
  }
45
47
 
46
- function takeObject(idx) {
47
- const ret = getObject(idx);
48
- dropObject(idx);
49
- return ret;
48
+ function getStringFromWasm0(ptr, len) {
49
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
50
50
  }
51
51
 
52
52
  let WASM_VECTOR_LEN = 0;
@@ -117,15 +117,6 @@ function getInt32Memory0() {
117
117
  return cachedInt32Memory0;
118
118
  }
119
119
 
120
- let cachedFloat64Memory0 = null;
121
-
122
- function getFloat64Memory0() {
123
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
124
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
125
- }
126
- return cachedFloat64Memory0;
127
- }
128
-
129
120
  function debugString(val) {
130
121
  // primitive types
131
122
  const type = typeof val;
@@ -191,6 +182,15 @@ function debugString(val) {
191
182
  return className;
192
183
  }
193
184
 
185
+ let cachedFloat64Memory0 = null;
186
+
187
+ function getFloat64Memory0() {
188
+ if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
189
+ cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
190
+ }
191
+ return cachedFloat64Memory0;
192
+ }
193
+
194
194
  let cachedBigInt64Memory0 = null;
195
195
 
196
196
  function getBigInt64Memory0() {
@@ -225,7 +225,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
225
225
  return real;
226
226
  }
227
227
  function __wbg_adapter_46(arg0, arg1, arg2) {
228
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfb8f5884b3165946(arg0, arg1, addHeapObject(arg2));
228
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h15adffd5bae7dd04(arg0, arg1, addHeapObject(arg2));
229
229
  }
230
230
 
231
231
  /**
@@ -267,7 +267,7 @@ function handleError(f, args) {
267
267
  }
268
268
  }
269
269
  function __wbg_adapter_94(arg0, arg1, arg2, arg3) {
270
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h2a560a595b44584b(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
270
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h12a00a4983389136(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
271
271
  }
272
272
 
273
273
  /**
@@ -394,70 +394,6 @@ module.exports.mdxCompile = function(value, opts) {
394
394
  return takeObject(ret);
395
395
  };
396
396
 
397
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
398
- const ret = new Error(getStringFromWasm0(arg0, arg1));
399
- return addHeapObject(ret);
400
- };
401
-
402
- module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
403
- const ret = getObject(arg0) == getObject(arg1);
404
- return ret;
405
- };
406
-
407
- module.exports.__wbindgen_is_object = function(arg0) {
408
- const val = getObject(arg0);
409
- const ret = typeof(val) === 'object' && val !== null;
410
- return ret;
411
- };
412
-
413
- module.exports.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
414
- const ret = getObject(arg0)[getObject(arg1)];
415
- return addHeapObject(ret);
416
- };
417
-
418
- module.exports.__wbindgen_is_undefined = function(arg0) {
419
- const ret = getObject(arg0) === undefined;
420
- return ret;
421
- };
422
-
423
- module.exports.__wbindgen_in = function(arg0, arg1) {
424
- const ret = getObject(arg0) in getObject(arg1);
425
- return ret;
426
- };
427
-
428
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
429
- takeObject(arg0);
430
- };
431
-
432
- module.exports.__wbindgen_string_get = function(arg0, arg1) {
433
- const obj = getObject(arg1);
434
- const ret = typeof(obj) === 'string' ? obj : undefined;
435
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
436
- var len0 = WASM_VECTOR_LEN;
437
- getInt32Memory0()[arg0 / 4 + 1] = len0;
438
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
439
- };
440
-
441
- module.exports.__wbindgen_boolean_get = function(arg0) {
442
- const v = getObject(arg0);
443
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
444
- return ret;
445
- };
446
-
447
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
448
- const ret = getStringFromWasm0(arg0, arg1);
449
- return addHeapObject(ret);
450
- };
451
-
452
- module.exports.__wbg_new_b525de17f44a8943 = function() {
453
- const ret = new Array();
454
- return addHeapObject(ret);
455
- };
456
-
457
- module.exports.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
458
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
459
- };
460
-
461
397
  module.exports.__wbg_new0_25059e40b1c02766 = function() {
462
398
  const ret = new Date();
463
399
  return addHeapObject(ret);
@@ -468,6 +404,10 @@ module.exports.__wbg_getTimezoneOffset_2a6b27fb18493a56 = function(arg0) {
468
404
  return ret;
469
405
  };
470
406
 
407
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
408
+ takeObject(arg0);
409
+ };
410
+
471
411
  module.exports.__wbg_self_e7c1f827057f6584 = function() { return handleError(function () {
472
412
  const ret = self.self;
473
413
  return addHeapObject(ret);
@@ -488,6 +428,11 @@ module.exports.__wbg_global_c85a9259e621f3db = function() { return handleError(f
488
428
  return addHeapObject(ret);
489
429
  }, arguments) };
490
430
 
431
+ module.exports.__wbindgen_is_undefined = function(arg0) {
432
+ const ret = getObject(arg0) === undefined;
433
+ return ret;
434
+ };
435
+
491
436
  module.exports.__wbg_newnoargs_2b8b6bd7753c76ba = function(arg0, arg1) {
492
437
  var v0 = getCachedStringFromWasm0(arg0, arg1);
493
438
  const ret = new Function(v0);
@@ -504,11 +449,66 @@ module.exports.__wbindgen_object_clone_ref = function(arg0) {
504
449
  return addHeapObject(ret);
505
450
  };
506
451
 
452
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
453
+ const ret = getStringFromWasm0(arg0, arg1);
454
+ return addHeapObject(ret);
455
+ };
456
+
507
457
  module.exports.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
508
458
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
509
459
  return addHeapObject(ret);
510
460
  }, arguments) };
511
461
 
462
+ module.exports.__wbindgen_string_get = function(arg0, arg1) {
463
+ const obj = getObject(arg1);
464
+ const ret = typeof(obj) === 'string' ? obj : undefined;
465
+ var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
466
+ var len0 = WASM_VECTOR_LEN;
467
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
468
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
469
+ };
470
+
471
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
472
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
473
+ return addHeapObject(ret);
474
+ };
475
+
476
+ module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
477
+ const ret = getObject(arg0) == getObject(arg1);
478
+ return ret;
479
+ };
480
+
481
+ module.exports.__wbindgen_is_object = function(arg0) {
482
+ const val = getObject(arg0);
483
+ const ret = typeof(val) === 'object' && val !== null;
484
+ return ret;
485
+ };
486
+
487
+ module.exports.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
488
+ const ret = getObject(arg0)[getObject(arg1)];
489
+ return addHeapObject(ret);
490
+ };
491
+
492
+ module.exports.__wbindgen_in = function(arg0, arg1) {
493
+ const ret = getObject(arg0) in getObject(arg1);
494
+ return ret;
495
+ };
496
+
497
+ module.exports.__wbindgen_boolean_get = function(arg0) {
498
+ const v = getObject(arg0);
499
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
500
+ return ret;
501
+ };
502
+
503
+ module.exports.__wbg_new_b525de17f44a8943 = function() {
504
+ const ret = new Array();
505
+ return addHeapObject(ret);
506
+ };
507
+
508
+ module.exports.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
509
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
510
+ };
511
+
512
512
  module.exports.__wbg_getTime_7c59072d1651a3cf = function(arg0) {
513
513
  const ret = getObject(arg0).getTime();
514
514
  return ret;
@@ -572,6 +572,14 @@ module.exports.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) {
572
572
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
573
573
  };
574
574
 
575
+ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
576
+ const ret = debugString(getObject(arg1));
577
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
578
+ const len0 = WASM_VECTOR_LEN;
579
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
580
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
581
+ };
582
+
575
583
  module.exports.__wbg_entries_4e1315b774245952 = function(arg0) {
576
584
  const ret = Object.entries(getObject(arg0));
577
585
  return addHeapObject(ret);
@@ -606,12 +614,29 @@ module.exports.__wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065 = function(arg0) {
606
614
  return ret;
607
615
  };
608
616
 
609
- module.exports.__wbindgen_debug_string = function(arg0, arg1) {
610
- const ret = debugString(getObject(arg1));
611
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
612
- const len0 = WASM_VECTOR_LEN;
613
- getInt32Memory0()[arg0 / 4 + 1] = len0;
614
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
617
+ module.exports.__wbindgen_is_string = function(arg0) {
618
+ const ret = typeof(getObject(arg0)) === 'string';
619
+ return ret;
620
+ };
621
+
622
+ module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
623
+ const ret = getObject(arg0).length;
624
+ return ret;
625
+ };
626
+
627
+ module.exports.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) {
628
+ const ret = getObject(arg0)[arg1 >>> 0];
629
+ return addHeapObject(ret);
630
+ };
631
+
632
+ module.exports.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
633
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
634
+ return addHeapObject(ret);
635
+ }, arguments) };
636
+
637
+ module.exports.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
638
+ const ret = Array.isArray(getObject(arg0));
639
+ return ret;
615
640
  };
616
641
 
617
642
  module.exports.__wbg_next_88560ec06a094dea = function() { return handleError(function (arg0) {
@@ -629,9 +654,23 @@ module.exports.__wbg_value_6ac8da5cc5b3efda = function(arg0) {
629
654
  return addHeapObject(ret);
630
655
  };
631
656
 
632
- module.exports.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) {
633
- const ret = getObject(arg0)[arg1 >>> 0];
634
- return addHeapObject(ret);
657
+ module.exports.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
658
+ try {
659
+ var state0 = {a: arg0, b: arg1};
660
+ var cb0 = (arg0, arg1) => {
661
+ const a = state0.a;
662
+ state0.a = 0;
663
+ try {
664
+ return __wbg_adapter_94(a, state0.b, arg0, arg1);
665
+ } finally {
666
+ state0.a = a;
667
+ }
668
+ };
669
+ const ret = new Promise(cb0);
670
+ return addHeapObject(ret);
671
+ } finally {
672
+ state0.a = state0.b = 0;
673
+ }
635
674
  };
636
675
 
637
676
  module.exports.__wbindgen_is_bigint = function(arg0) {
@@ -661,50 +700,11 @@ module.exports.__wbg_isSafeInteger_8c4789029e885159 = function(arg0) {
661
700
  return ret;
662
701
  };
663
702
 
664
- module.exports.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
665
- const ret = Array.isArray(getObject(arg0));
666
- return ret;
667
- };
668
-
669
703
  module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
670
704
  const ret = BigInt.asUintN(64, arg0);
671
705
  return addHeapObject(ret);
672
706
  };
673
707
 
674
- module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
675
- const ret = getObject(arg0).length;
676
- return ret;
677
- };
678
-
679
- module.exports.__wbindgen_is_string = function(arg0) {
680
- const ret = typeof(getObject(arg0)) === 'string';
681
- return ret;
682
- };
683
-
684
- module.exports.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
685
- try {
686
- var state0 = {a: arg0, b: arg1};
687
- var cb0 = (arg0, arg1) => {
688
- const a = state0.a;
689
- state0.a = 0;
690
- try {
691
- return __wbg_adapter_94(a, state0.b, arg0, arg1);
692
- } finally {
693
- state0.a = a;
694
- }
695
- };
696
- const ret = new Promise(cb0);
697
- return addHeapObject(ret);
698
- } finally {
699
- state0.a = state0.b = 0;
700
- }
701
- };
702
-
703
- module.exports.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
704
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
705
- return addHeapObject(ret);
706
- }, arguments) };
707
-
708
708
  module.exports.__wbg_new_f9876326328f45ed = function() {
709
709
  const ret = new Object();
710
710
  return addHeapObject(ret);
@@ -738,8 +738,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
738
738
  return ret;
739
739
  };
740
740
 
741
- module.exports.__wbindgen_closure_wrapper23065 = function(arg0, arg1, arg2) {
742
- const ret = makeMutClosure(arg0, arg1, 269, __wbg_adapter_46);
741
+ module.exports.__wbindgen_closure_wrapper23157 = function(arg0, arg1, arg2) {
742
+ const ret = makeMutClosure(arg0, arg1, 274, __wbg_adapter_46);
743
743
  return addHeapObject(ret);
744
744
  };
745
745
 
package/wasm_bg.wasm CHANGED
Binary file