@swc/wasm 1.2.220 → 1.2.221

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 (4) hide show
  1. package/package.json +1 -1
  2. package/wasm.d.ts +2798 -18
  3. package/wasm.js +31 -29
  4. package/wasm_bg.wasm +0 -0
package/wasm.js CHANGED
@@ -7,12 +7,13 @@ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true
7
7
 
8
8
  cachedTextDecoder.decode();
9
9
 
10
- let cachegetUint8Memory0 = null;
10
+ let cachedUint8Memory0 = new Uint8Array();
11
+
11
12
  function getUint8Memory0() {
12
- if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
13
- cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
13
+ if (cachedUint8Memory0.byteLength === 0) {
14
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
14
15
  }
15
- return cachegetUint8Memory0;
16
+ return cachedUint8Memory0;
16
17
  }
17
18
 
18
19
  function getStringFromWasm0(ptr, len) {
@@ -91,12 +92,13 @@ function passStringToWasm0(arg, malloc, realloc) {
91
92
  return ptr;
92
93
  }
93
94
 
94
- let cachegetInt32Memory0 = null;
95
+ let cachedInt32Memory0 = new Int32Array();
96
+
95
97
  function getInt32Memory0() {
96
- if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
97
- cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
98
+ if (cachedInt32Memory0.byteLength === 0) {
99
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
98
100
  }
99
- return cachegetInt32Memory0;
101
+ return cachedInt32Memory0;
100
102
  }
101
103
 
102
104
  function dropObject(idx) {
@@ -118,8 +120,8 @@ function takeObject(idx) {
118
120
  module.exports.minifySync = function(s, opts) {
119
121
  try {
120
122
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
121
- var ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
122
- var len0 = WASM_VECTOR_LEN;
123
+ const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
124
+ const len0 = WASM_VECTOR_LEN;
123
125
  wasm.minifySync(retptr, ptr0, len0, addHeapObject(opts));
124
126
  var r0 = getInt32Memory0()[retptr / 4 + 0];
125
127
  var r1 = getInt32Memory0()[retptr / 4 + 1];
@@ -141,8 +143,8 @@ module.exports.minifySync = function(s, opts) {
141
143
  module.exports.parseSync = function(s, opts) {
142
144
  try {
143
145
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
144
- var ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
145
- var len0 = WASM_VECTOR_LEN;
146
+ const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
147
+ const len0 = WASM_VECTOR_LEN;
146
148
  wasm.parseSync(retptr, ptr0, len0, addHeapObject(opts));
147
149
  var r0 = getInt32Memory0()[retptr / 4 + 0];
148
150
  var r1 = getInt32Memory0()[retptr / 4 + 1];
@@ -186,8 +188,8 @@ module.exports.printSync = function(s, opts) {
186
188
  module.exports.transformSync = function(s, opts, experimental_plugin_bytes_resolver) {
187
189
  try {
188
190
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
189
- var ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
190
- var len0 = WASM_VECTOR_LEN;
191
+ const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
192
+ const len0 = WASM_VECTOR_LEN;
191
193
  wasm.transformSync(retptr, ptr0, len0, addHeapObject(opts), addHeapObject(experimental_plugin_bytes_resolver));
192
194
  var r0 = getInt32Memory0()[retptr / 4 + 0];
193
195
  var r1 = getInt32Memory0()[retptr / 4 + 1];
@@ -202,15 +204,15 @@ module.exports.transformSync = function(s, opts, experimental_plugin_bytes_resol
202
204
  };
203
205
 
204
206
  module.exports.__wbindgen_json_parse = function(arg0, arg1) {
205
- var ret = JSON.parse(getStringFromWasm0(arg0, arg1));
207
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
206
208
  return addHeapObject(ret);
207
209
  };
208
210
 
209
211
  module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
210
212
  const obj = getObject(arg1);
211
- var ret = JSON.stringify(obj === undefined ? null : obj);
212
- var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
213
- var len0 = WASM_VECTOR_LEN;
213
+ const ret = JSON.stringify(obj === undefined ? null : obj);
214
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
215
+ const len0 = WASM_VECTOR_LEN;
214
216
  getInt32Memory0()[arg0 / 4 + 1] = len0;
215
217
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
216
218
  };
@@ -220,34 +222,34 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
220
222
  };
221
223
 
222
224
  module.exports.__wbindgen_string_new = function(arg0, arg1) {
223
- var ret = getStringFromWasm0(arg0, arg1);
225
+ const ret = getStringFromWasm0(arg0, arg1);
224
226
  return addHeapObject(ret);
225
227
  };
226
228
 
227
- module.exports.__wbg_new0_57a6a2c2aaed3fc5 = function() {
228
- var ret = new Date();
229
+ module.exports.__wbg_new0_adda2d4bcb124f0a = function() {
230
+ const ret = new Date();
229
231
  return addHeapObject(ret);
230
232
  };
231
233
 
232
- module.exports.__wbg_getTime_f8ce0ff902444efb = function(arg0) {
233
- var ret = getObject(arg0).getTime();
234
+ module.exports.__wbg_getTime_58b0bdbebd4ef11d = function(arg0) {
235
+ const ret = getObject(arg0).getTime();
234
236
  return ret;
235
237
  };
236
238
 
237
- module.exports.__wbg_getTimezoneOffset_41211a984662508b = function(arg0) {
238
- var ret = getObject(arg0).getTimezoneOffset();
239
+ module.exports.__wbg_getTimezoneOffset_8a39b51acb4f52c9 = function(arg0) {
240
+ const ret = getObject(arg0).getTimezoneOffset();
239
241
  return ret;
240
242
  };
241
243
 
242
244
  module.exports.__wbg_new_693216e109162396 = function() {
243
- var ret = new Error();
245
+ const ret = new Error();
244
246
  return addHeapObject(ret);
245
247
  };
246
248
 
247
249
  module.exports.__wbg_stack_0ddaca5d1abfb52f = function(arg0, arg1) {
248
- var ret = getObject(arg1).stack;
249
- var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
250
- var len0 = WASM_VECTOR_LEN;
250
+ const ret = getObject(arg1).stack;
251
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
252
+ const len0 = WASM_VECTOR_LEN;
251
253
  getInt32Memory0()[arg0 / 4 + 1] = len0;
252
254
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
253
255
  };
package/wasm_bg.wasm CHANGED
Binary file