@next/swc-wasm-web 13.2.4-canary.8 → 13.2.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next/swc-wasm-web",
3
- "version": "13.2.4-canary.8",
3
+ "version": "13.2.4",
4
4
  "files": [
5
5
  "wasm_bg.wasm",
6
6
  "wasm.js",
package/wasm.d.ts CHANGED
@@ -71,11 +71,11 @@ export interface InitOutput {
71
71
  readonly __wbindgen_malloc: (a: number) => number;
72
72
  readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
73
73
  readonly __wbindgen_export_2: WebAssembly.Table;
74
- readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfb8f5884b3165946: (a: number, b: number, c: number) => void;
74
+ readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h15adffd5bae7dd04: (a: number, b: number, c: number) => void;
75
75
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
76
76
  readonly __wbindgen_free: (a: number, b: number) => void;
77
77
  readonly __wbindgen_exn_store: (a: number) => void;
78
- readonly wasm_bindgen__convert__closures__invoke2_mut__h2a560a595b44584b: (a: number, b: number, c: number, d: number) => void;
78
+ readonly wasm_bindgen__convert__closures__invoke2_mut__h12a00a4983389136: (a: number, b: number, c: number, d: number) => void;
79
79
  }
80
80
 
81
81
  export type SyncInitInput = BufferSource | WebAssembly.Module;
package/wasm.js CHANGED
@@ -1,27 +1,24 @@
1
1
  let wasm;
2
2
 
3
- const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
3
+ const heap = new Array(128).fill(undefined);
4
4
 
5
- cachedTextDecoder.decode();
5
+ heap.push(undefined, null, true, false);
6
6
 
7
- let cachedUint8Memory0 = null;
7
+ function getObject(idx) { return heap[idx]; }
8
8
 
9
- function getUint8Memory0() {
10
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
11
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
12
- }
13
- return cachedUint8Memory0;
14
- }
9
+ let heap_next = heap.length;
15
10
 
16
- function getStringFromWasm0(ptr, len) {
17
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
11
+ function dropObject(idx) {
12
+ if (idx < 132) return;
13
+ heap[idx] = heap_next;
14
+ heap_next = idx;
18
15
  }
19
16
 
20
- const heap = new Array(128).fill(undefined);
21
-
22
- heap.push(undefined, null, true, false);
23
-
24
- let heap_next = heap.length;
17
+ function takeObject(idx) {
18
+ const ret = getObject(idx);
19
+ dropObject(idx);
20
+ return ret;
21
+ }
25
22
 
26
23
  function addHeapObject(obj) {
27
24
  if (heap_next === heap.length) heap.push(heap.length + 1);
@@ -32,18 +29,21 @@ function addHeapObject(obj) {
32
29
  return idx;
33
30
  }
34
31
 
35
- function getObject(idx) { return heap[idx]; }
32
+ const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
36
33
 
37
- function dropObject(idx) {
38
- if (idx < 132) return;
39
- heap[idx] = heap_next;
40
- heap_next = idx;
34
+ cachedTextDecoder.decode();
35
+
36
+ let cachedUint8Memory0 = null;
37
+
38
+ function getUint8Memory0() {
39
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
40
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
41
+ }
42
+ return cachedUint8Memory0;
41
43
  }
42
44
 
43
- function takeObject(idx) {
44
- const ret = getObject(idx);
45
- dropObject(idx);
46
- return ret;
45
+ function getStringFromWasm0(ptr, len) {
46
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
47
47
  }
48
48
 
49
49
  let WASM_VECTOR_LEN = 0;
@@ -114,15 +114,6 @@ function getInt32Memory0() {
114
114
  return cachedInt32Memory0;
115
115
  }
116
116
 
117
- let cachedFloat64Memory0 = null;
118
-
119
- function getFloat64Memory0() {
120
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
121
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
122
- }
123
- return cachedFloat64Memory0;
124
- }
125
-
126
117
  function debugString(val) {
127
118
  // primitive types
128
119
  const type = typeof val;
@@ -188,6 +179,15 @@ function debugString(val) {
188
179
  return className;
189
180
  }
190
181
 
182
+ let cachedFloat64Memory0 = null;
183
+
184
+ function getFloat64Memory0() {
185
+ if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
186
+ cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
187
+ }
188
+ return cachedFloat64Memory0;
189
+ }
190
+
191
191
  let cachedBigInt64Memory0 = null;
192
192
 
193
193
  function getBigInt64Memory0() {
@@ -222,7 +222,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
222
222
  return real;
223
223
  }
224
224
  function __wbg_adapter_46(arg0, arg1, arg2) {
225
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfb8f5884b3165946(arg0, arg1, addHeapObject(arg2));
225
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h15adffd5bae7dd04(arg0, arg1, addHeapObject(arg2));
226
226
  }
227
227
 
228
228
  /**
@@ -264,7 +264,7 @@ function handleError(f, args) {
264
264
  }
265
265
  }
266
266
  function __wbg_adapter_94(arg0, arg1, arg2, arg3) {
267
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h2a560a595b44584b(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
267
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h12a00a4983389136(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
268
268
  }
269
269
 
270
270
  /**
@@ -425,58 +425,6 @@ async function load(module, imports) {
425
425
  function getImports() {
426
426
  const imports = {};
427
427
  imports.wbg = {};
428
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
429
- const ret = new Error(getStringFromWasm0(arg0, arg1));
430
- return addHeapObject(ret);
431
- };
432
- imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
433
- const ret = getObject(arg0) == getObject(arg1);
434
- return ret;
435
- };
436
- imports.wbg.__wbindgen_is_object = function(arg0) {
437
- const val = getObject(arg0);
438
- const ret = typeof(val) === 'object' && val !== null;
439
- return ret;
440
- };
441
- imports.wbg.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
442
- const ret = getObject(arg0)[getObject(arg1)];
443
- return addHeapObject(ret);
444
- };
445
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
446
- const ret = getObject(arg0) === undefined;
447
- return ret;
448
- };
449
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
450
- const ret = getObject(arg0) in getObject(arg1);
451
- return ret;
452
- };
453
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
454
- takeObject(arg0);
455
- };
456
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
457
- const obj = getObject(arg1);
458
- const ret = typeof(obj) === 'string' ? obj : undefined;
459
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
460
- var len0 = WASM_VECTOR_LEN;
461
- getInt32Memory0()[arg0 / 4 + 1] = len0;
462
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
463
- };
464
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
465
- const v = getObject(arg0);
466
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
467
- return ret;
468
- };
469
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
470
- const ret = getStringFromWasm0(arg0, arg1);
471
- return addHeapObject(ret);
472
- };
473
- imports.wbg.__wbg_new_b525de17f44a8943 = function() {
474
- const ret = new Array();
475
- return addHeapObject(ret);
476
- };
477
- imports.wbg.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
478
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
479
- };
480
428
  imports.wbg.__wbg_new0_25059e40b1c02766 = function() {
481
429
  const ret = new Date();
482
430
  return addHeapObject(ret);
@@ -485,6 +433,9 @@ function getImports() {
485
433
  const ret = getObject(arg0).getTimezoneOffset();
486
434
  return ret;
487
435
  };
436
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
437
+ takeObject(arg0);
438
+ };
488
439
  imports.wbg.__wbg_self_e7c1f827057f6584 = function() { return handleError(function () {
489
440
  const ret = self.self;
490
441
  return addHeapObject(ret);
@@ -501,6 +452,10 @@ function getImports() {
501
452
  const ret = global.global;
502
453
  return addHeapObject(ret);
503
454
  }, arguments) };
455
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
456
+ const ret = getObject(arg0) === undefined;
457
+ return ret;
458
+ };
504
459
  imports.wbg.__wbg_newnoargs_2b8b6bd7753c76ba = function(arg0, arg1) {
505
460
  var v0 = getCachedStringFromWasm0(arg0, arg1);
506
461
  const ret = new Function(v0);
@@ -514,10 +469,55 @@ function getImports() {
514
469
  const ret = getObject(arg0);
515
470
  return addHeapObject(ret);
516
471
  };
472
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
473
+ const ret = getStringFromWasm0(arg0, arg1);
474
+ return addHeapObject(ret);
475
+ };
517
476
  imports.wbg.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
518
477
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
519
478
  return addHeapObject(ret);
520
479
  }, arguments) };
480
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
481
+ const obj = getObject(arg1);
482
+ const ret = typeof(obj) === 'string' ? obj : undefined;
483
+ var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
484
+ var len0 = WASM_VECTOR_LEN;
485
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
486
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
487
+ };
488
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
489
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
490
+ return addHeapObject(ret);
491
+ };
492
+ imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
493
+ const ret = getObject(arg0) == getObject(arg1);
494
+ return ret;
495
+ };
496
+ imports.wbg.__wbindgen_is_object = function(arg0) {
497
+ const val = getObject(arg0);
498
+ const ret = typeof(val) === 'object' && val !== null;
499
+ return ret;
500
+ };
501
+ imports.wbg.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
502
+ const ret = getObject(arg0)[getObject(arg1)];
503
+ return addHeapObject(ret);
504
+ };
505
+ imports.wbg.__wbindgen_in = function(arg0, arg1) {
506
+ const ret = getObject(arg0) in getObject(arg1);
507
+ return ret;
508
+ };
509
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
510
+ const v = getObject(arg0);
511
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
512
+ return ret;
513
+ };
514
+ imports.wbg.__wbg_new_b525de17f44a8943 = function() {
515
+ const ret = new Array();
516
+ return addHeapObject(ret);
517
+ };
518
+ imports.wbg.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
519
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
520
+ };
521
521
  imports.wbg.__wbg_getTime_7c59072d1651a3cf = function(arg0) {
522
522
  const ret = getObject(arg0).getTime();
523
523
  return ret;
@@ -569,6 +569,13 @@ imports.wbg.__wbg_new_537b7341ce90bb31 = function(arg0) {
569
569
  imports.wbg.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) {
570
570
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
571
571
  };
572
+ imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
573
+ const ret = debugString(getObject(arg1));
574
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
575
+ const len0 = WASM_VECTOR_LEN;
576
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
577
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
578
+ };
572
579
  imports.wbg.__wbg_entries_4e1315b774245952 = function(arg0) {
573
580
  const ret = Object.entries(getObject(arg0));
574
581
  return addHeapObject(ret);
@@ -599,12 +606,25 @@ imports.wbg.__wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065 = function(arg0) {
599
606
  const ret = result;
600
607
  return ret;
601
608
  };
602
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
603
- const ret = debugString(getObject(arg1));
604
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
605
- const len0 = WASM_VECTOR_LEN;
606
- getInt32Memory0()[arg0 / 4 + 1] = len0;
607
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
609
+ imports.wbg.__wbindgen_is_string = function(arg0) {
610
+ const ret = typeof(getObject(arg0)) === 'string';
611
+ return ret;
612
+ };
613
+ imports.wbg.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
614
+ const ret = getObject(arg0).length;
615
+ return ret;
616
+ };
617
+ imports.wbg.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) {
618
+ const ret = getObject(arg0)[arg1 >>> 0];
619
+ return addHeapObject(ret);
620
+ };
621
+ imports.wbg.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
622
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
623
+ return addHeapObject(ret);
624
+ }, arguments) };
625
+ imports.wbg.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
626
+ const ret = Array.isArray(getObject(arg0));
627
+ return ret;
608
628
  };
609
629
  imports.wbg.__wbg_next_88560ec06a094dea = function() { return handleError(function (arg0) {
610
630
  const ret = getObject(arg0).next();
@@ -618,9 +638,23 @@ imports.wbg.__wbg_value_6ac8da5cc5b3efda = function(arg0) {
618
638
  const ret = getObject(arg0).value;
619
639
  return addHeapObject(ret);
620
640
  };
621
- imports.wbg.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) {
622
- const ret = getObject(arg0)[arg1 >>> 0];
623
- return addHeapObject(ret);
641
+ imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
642
+ try {
643
+ var state0 = {a: arg0, b: arg1};
644
+ var cb0 = (arg0, arg1) => {
645
+ const a = state0.a;
646
+ state0.a = 0;
647
+ try {
648
+ return __wbg_adapter_94(a, state0.b, arg0, arg1);
649
+ } finally {
650
+ state0.a = a;
651
+ }
652
+ };
653
+ const ret = new Promise(cb0);
654
+ return addHeapObject(ret);
655
+ } finally {
656
+ state0.a = state0.b = 0;
657
+ }
624
658
  };
625
659
  imports.wbg.__wbindgen_is_bigint = function(arg0) {
626
660
  const ret = typeof(getObject(arg0)) === 'bigint';
@@ -644,44 +678,10 @@ imports.wbg.__wbg_isSafeInteger_8c4789029e885159 = function(arg0) {
644
678
  const ret = Number.isSafeInteger(getObject(arg0));
645
679
  return ret;
646
680
  };
647
- imports.wbg.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
648
- const ret = Array.isArray(getObject(arg0));
649
- return ret;
650
- };
651
681
  imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
652
682
  const ret = BigInt.asUintN(64, arg0);
653
683
  return addHeapObject(ret);
654
684
  };
655
- imports.wbg.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
656
- const ret = getObject(arg0).length;
657
- return ret;
658
- };
659
- imports.wbg.__wbindgen_is_string = function(arg0) {
660
- const ret = typeof(getObject(arg0)) === 'string';
661
- return ret;
662
- };
663
- imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
664
- try {
665
- var state0 = {a: arg0, b: arg1};
666
- var cb0 = (arg0, arg1) => {
667
- const a = state0.a;
668
- state0.a = 0;
669
- try {
670
- return __wbg_adapter_94(a, state0.b, arg0, arg1);
671
- } finally {
672
- state0.a = a;
673
- }
674
- };
675
- const ret = new Promise(cb0);
676
- return addHeapObject(ret);
677
- } finally {
678
- state0.a = state0.b = 0;
679
- }
680
- };
681
- imports.wbg.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
682
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
683
- return addHeapObject(ret);
684
- }, arguments) };
685
685
  imports.wbg.__wbg_new_f9876326328f45ed = function() {
686
686
  const ret = new Object();
687
687
  return addHeapObject(ret);
@@ -709,8 +709,8 @@ imports.wbg.__wbindgen_cb_drop = function(arg0) {
709
709
  const ret = false;
710
710
  return ret;
711
711
  };
712
- imports.wbg.__wbindgen_closure_wrapper23063 = function(arg0, arg1, arg2) {
713
- const ret = makeMutClosure(arg0, arg1, 269, __wbg_adapter_46);
712
+ imports.wbg.__wbindgen_closure_wrapper23157 = function(arg0, arg1, arg2) {
713
+ const ret = makeMutClosure(arg0, arg1, 274, __wbg_adapter_46);
714
714
  return addHeapObject(ret);
715
715
  };
716
716
 
package/wasm_bg.wasm CHANGED
Binary file