@next/swc-wasm-web 12.0.7 → 12.0.8-canary.3

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 +42 -42
  3. package/wasm_bg.wasm +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next/swc-wasm-web",
3
- "version": "12.0.7",
3
+ "version": "12.0.8-canary.3",
4
4
  "files": [
5
5
  "wasm_bg.wasm",
6
6
  "wasm.js",
package/wasm.js CHANGED
@@ -21,18 +21,7 @@ function takeObject(idx) {
21
21
  return ret;
22
22
  }
23
23
 
24
- function addHeapObject(obj) {
25
- if (heap_next === heap.length) heap.push(heap.length + 1);
26
- const idx = heap_next;
27
- heap_next = heap[idx];
28
-
29
- heap[idx] = obj;
30
- return idx;
31
- }
32
-
33
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
34
-
35
- cachedTextDecoder.decode();
24
+ let WASM_VECTOR_LEN = 0;
36
25
 
37
26
  let cachegetUint8Memory0 = null;
38
27
  function getUint8Memory0() {
@@ -42,12 +31,6 @@ function getUint8Memory0() {
42
31
  return cachegetUint8Memory0;
43
32
  }
44
33
 
45
- function getStringFromWasm0(ptr, len) {
46
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
47
- }
48
-
49
- let WASM_VECTOR_LEN = 0;
50
-
51
34
  let cachedTextEncoder = new TextEncoder('utf-8');
52
35
 
53
36
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
@@ -101,10 +84,6 @@ function passStringToWasm0(arg, malloc, realloc) {
101
84
  return ptr;
102
85
  }
103
86
 
104
- function isLikeNone(x) {
105
- return x === undefined || x === null;
106
- }
107
-
108
87
  let cachegetInt32Memory0 = null;
109
88
  function getInt32Memory0() {
110
89
  if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
@@ -112,6 +91,27 @@ function getInt32Memory0() {
112
91
  }
113
92
  return cachegetInt32Memory0;
114
93
  }
94
+
95
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
96
+
97
+ cachedTextDecoder.decode();
98
+
99
+ function getStringFromWasm0(ptr, len) {
100
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
101
+ }
102
+
103
+ function addHeapObject(obj) {
104
+ if (heap_next === heap.length) heap.push(heap.length + 1);
105
+ const idx = heap_next;
106
+ heap_next = heap[idx];
107
+
108
+ heap[idx] = obj;
109
+ return idx;
110
+ }
111
+
112
+ function isLikeNone(x) {
113
+ return x === undefined || x === null;
114
+ }
115
115
  /**
116
116
  * @param {string} query
117
117
  * @param {any} opts
@@ -210,6 +210,26 @@ async function init(input) {
210
210
  var ret = getObject(arg0).getTimezoneOffset();
211
211
  return ret;
212
212
  };
213
+ imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
214
+ const obj = getObject(arg1);
215
+ var ret = JSON.stringify(obj === undefined ? null : obj);
216
+ var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
217
+ var len0 = WASM_VECTOR_LEN;
218
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
219
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
220
+ };
221
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
222
+ var ret = getStringFromWasm0(arg0, arg1);
223
+ return addHeapObject(ret);
224
+ };
225
+ imports.wbg.__wbg_new_7c995f2adeba6fb5 = function() {
226
+ var ret = new Array();
227
+ return addHeapObject(ret);
228
+ };
229
+ imports.wbg.__wbg_push_3f7c76b58919ce0d = function(arg0, arg1) {
230
+ var ret = getObject(arg0).push(getObject(arg1));
231
+ return ret;
232
+ };
213
233
  imports.wbg.__wbg_self_35a0fda3eb965abe = handleError(function() {
214
234
  var ret = self.self;
215
235
  return addHeapObject(ret);
@@ -242,10 +262,6 @@ async function init(input) {
242
262
  var ret = getObject(arg0);
243
263
  return addHeapObject(ret);
244
264
  };
245
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
246
- var ret = getStringFromWasm0(arg0, arg1);
247
- return addHeapObject(ret);
248
- };
249
265
  imports.wbg.__wbg_get_4e90ba4e3de362de = handleError(function(arg0, arg1) {
250
266
  var ret = Reflect.get(getObject(arg0), getObject(arg1));
251
267
  return addHeapObject(ret);
@@ -258,22 +274,6 @@ async function init(input) {
258
274
  getInt32Memory0()[arg0 / 4 + 1] = len0;
259
275
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
260
276
  };
261
- imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
262
- const obj = getObject(arg1);
263
- var ret = JSON.stringify(obj === undefined ? null : obj);
264
- var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
265
- var len0 = WASM_VECTOR_LEN;
266
- getInt32Memory0()[arg0 / 4 + 1] = len0;
267
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
268
- };
269
- imports.wbg.__wbg_new_7c995f2adeba6fb5 = function() {
270
- var ret = new Array();
271
- return addHeapObject(ret);
272
- };
273
- imports.wbg.__wbg_push_3f7c76b58919ce0d = function(arg0, arg1) {
274
- var ret = getObject(arg0).push(getObject(arg1));
275
- return ret;
276
- };
277
277
  imports.wbg.__wbg_new_693216e109162396 = function() {
278
278
  var ret = new Error();
279
279
  return addHeapObject(ret);
package/wasm_bg.wasm CHANGED
Binary file