@next/swc-wasm-web 12.3.2-canary.0 → 12.3.2-canary.10

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": "12.3.2-canary.0",
3
+ "version": "12.3.2-canary.10",
4
4
  "files": [
5
5
  "wasm_bg.wasm",
6
6
  "wasm.js",
package/wasm.d.ts CHANGED
@@ -50,10 +50,10 @@ export interface InitOutput {
50
50
  readonly __wbindgen_malloc: (a: number) => number;
51
51
  readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
52
52
  readonly __wbindgen_export_2: WebAssembly.Table;
53
- readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf62871ebd35f1abc: (a: number, b: number, c: number) => void;
53
+ readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9fbcc6187ecb9680: (a: number, b: number, c: number) => void;
54
54
  readonly __wbindgen_free: (a: number, b: number) => void;
55
55
  readonly __wbindgen_exn_store: (a: number) => void;
56
- readonly wasm_bindgen__convert__closures__invoke2_mut__h4098e489a3d44db2: (a: number, b: number, c: number, d: number) => void;
56
+ readonly wasm_bindgen__convert__closures__invoke2_mut__h05f470616c200189: (a: number, b: number, c: number, d: number) => void;
57
57
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
58
58
  }
59
59
 
package/wasm.js CHANGED
@@ -21,7 +21,9 @@ function takeObject(idx) {
21
21
  return ret;
22
22
  }
23
23
 
24
- let WASM_VECTOR_LEN = 0;
24
+ const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
25
+
26
+ cachedTextDecoder.decode();
25
27
 
26
28
  let cachedUint8Memory0 = new Uint8Array();
27
29
 
@@ -32,6 +34,21 @@ function getUint8Memory0() {
32
34
  return cachedUint8Memory0;
33
35
  }
34
36
 
37
+ function getStringFromWasm0(ptr, len) {
38
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
39
+ }
40
+
41
+ function addHeapObject(obj) {
42
+ if (heap_next === heap.length) heap.push(heap.length + 1);
43
+ const idx = heap_next;
44
+ heap_next = heap[idx];
45
+
46
+ heap[idx] = obj;
47
+ return idx;
48
+ }
49
+
50
+ let WASM_VECTOR_LEN = 0;
51
+
35
52
  const cachedTextEncoder = new TextEncoder('utf-8');
36
53
 
37
54
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
@@ -98,23 +115,6 @@ function isLikeNone(x) {
98
115
  return x === undefined || x === null;
99
116
  }
100
117
 
101
- const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
102
-
103
- cachedTextDecoder.decode();
104
-
105
- function getStringFromWasm0(ptr, len) {
106
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
107
- }
108
-
109
- function addHeapObject(obj) {
110
- if (heap_next === heap.length) heap.push(heap.length + 1);
111
- const idx = heap_next;
112
- heap_next = heap[idx];
113
-
114
- heap[idx] = obj;
115
- return idx;
116
- }
117
-
118
118
  function makeMutClosure(arg0, arg1, dtor, f) {
119
119
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
120
120
  const real = (...args) => {
@@ -140,7 +140,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
140
140
  return real;
141
141
  }
142
142
  function __wbg_adapter_18(arg0, arg1, arg2) {
143
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf62871ebd35f1abc(arg0, arg1, addHeapObject(arg2));
143
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9fbcc6187ecb9680(arg0, arg1, addHeapObject(arg2));
144
144
  }
145
145
 
146
146
  function getCachedStringFromWasm0(ptr, len) {
@@ -159,7 +159,7 @@ function handleError(f, args) {
159
159
  }
160
160
  }
161
161
  function __wbg_adapter_33(arg0, arg1, arg2, arg3) {
162
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h4098e489a3d44db2(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
162
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h05f470616c200189(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
163
163
  }
164
164
 
165
165
  /**
@@ -320,6 +320,10 @@ function getImports() {
320
320
  if (arg0 !== 0) { wasm.__wbindgen_free(arg0, arg1); }
321
321
  console.error(v0);
322
322
  };
323
+ imports.wbg.__wbindgen_json_parse = function(arg0, arg1) {
324
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
325
+ return addHeapObject(ret);
326
+ };
323
327
  imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
324
328
  const obj = getObject(arg1);
325
329
  const ret = JSON.stringify(obj === undefined ? null : obj);
@@ -340,6 +344,14 @@ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
340
344
  const ret = getStringFromWasm0(arg0, arg1);
341
345
  return addHeapObject(ret);
342
346
  };
347
+ imports.wbg.__wbindgen_is_string = function(arg0) {
348
+ const ret = typeof(getObject(arg0)) === 'string';
349
+ return ret;
350
+ };
351
+ imports.wbg.__wbg_call_65af9f665ab6ade5 = function() { return handleError(function (arg0, arg1, arg2) {
352
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
353
+ return addHeapObject(ret);
354
+ }, arguments) };
343
355
  imports.wbg.__wbg_new_52205195aa880fc2 = function(arg0, arg1) {
344
356
  try {
345
357
  var state0 = {a: arg0, b: arg1};
@@ -358,18 +370,6 @@ imports.wbg.__wbg_new_52205195aa880fc2 = function(arg0, arg1) {
358
370
  state0.a = state0.b = 0;
359
371
  }
360
372
  };
361
- imports.wbg.__wbg_call_65af9f665ab6ade5 = function() { return handleError(function (arg0, arg1, arg2) {
362
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
363
- return addHeapObject(ret);
364
- }, arguments) };
365
- imports.wbg.__wbindgen_json_parse = function(arg0, arg1) {
366
- const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
367
- return addHeapObject(ret);
368
- };
369
- imports.wbg.__wbindgen_is_string = function(arg0) {
370
- const ret = typeof(getObject(arg0)) === 'string';
371
- return ret;
372
- };
373
373
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
374
374
  throw new Error(getStringFromWasm0(arg0, arg1));
375
375
  };
@@ -390,8 +390,8 @@ imports.wbg.__wbg_then_18da6e5453572fc8 = function(arg0, arg1) {
390
390
  const ret = getObject(arg0).then(getObject(arg1));
391
391
  return addHeapObject(ret);
392
392
  };
393
- imports.wbg.__wbindgen_closure_wrapper16577 = function(arg0, arg1, arg2) {
394
- const ret = makeMutClosure(arg0, arg1, 168, __wbg_adapter_18);
393
+ imports.wbg.__wbindgen_closure_wrapper19249 = function(arg0, arg1, arg2) {
394
+ const ret = makeMutClosure(arg0, arg1, 260, __wbg_adapter_18);
395
395
  return addHeapObject(ret);
396
396
  };
397
397
 
package/wasm_bg.wasm CHANGED
Binary file