@astral-sh/ruff-wasm-nodejs 0.5.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.
package/ruff_wasm.js ADDED
@@ -0,0 +1,810 @@
1
+ let imports = {};
2
+ imports['__wbindgen_placeholder__'] = module.exports;
3
+ let wasm;
4
+ const { TextDecoder, TextEncoder } = require(`util`);
5
+
6
+ const heap = new Array(128).fill(undefined);
7
+
8
+ heap.push(undefined, null, true, false);
9
+
10
+ function getObject(idx) { return heap[idx]; }
11
+
12
+ let heap_next = heap.length;
13
+
14
+ function dropObject(idx) {
15
+ if (idx < 132) return;
16
+ heap[idx] = heap_next;
17
+ heap_next = idx;
18
+ }
19
+
20
+ function takeObject(idx) {
21
+ const ret = getObject(idx);
22
+ dropObject(idx);
23
+ return ret;
24
+ }
25
+
26
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
27
+
28
+ cachedTextDecoder.decode();
29
+
30
+ let cachedUint8Memory0 = null;
31
+
32
+ function getUint8Memory0() {
33
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
34
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
35
+ }
36
+ return cachedUint8Memory0;
37
+ }
38
+
39
+ function getStringFromWasm0(ptr, len) {
40
+ ptr = ptr >>> 0;
41
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
42
+ }
43
+
44
+ function addHeapObject(obj) {
45
+ if (heap_next === heap.length) heap.push(heap.length + 1);
46
+ const idx = heap_next;
47
+ heap_next = heap[idx];
48
+
49
+ heap[idx] = obj;
50
+ return idx;
51
+ }
52
+
53
+ function isLikeNone(x) {
54
+ return x === undefined || x === null;
55
+ }
56
+
57
+ let cachedFloat64Memory0 = null;
58
+
59
+ function getFloat64Memory0() {
60
+ if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
61
+ cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
62
+ }
63
+ return cachedFloat64Memory0;
64
+ }
65
+
66
+ let cachedInt32Memory0 = null;
67
+
68
+ function getInt32Memory0() {
69
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
70
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
71
+ }
72
+ return cachedInt32Memory0;
73
+ }
74
+
75
+ let WASM_VECTOR_LEN = 0;
76
+
77
+ let cachedTextEncoder = new TextEncoder('utf-8');
78
+
79
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
80
+ ? function (arg, view) {
81
+ return cachedTextEncoder.encodeInto(arg, view);
82
+ }
83
+ : function (arg, view) {
84
+ const buf = cachedTextEncoder.encode(arg);
85
+ view.set(buf);
86
+ return {
87
+ read: arg.length,
88
+ written: buf.length
89
+ };
90
+ });
91
+
92
+ function passStringToWasm0(arg, malloc, realloc) {
93
+
94
+ if (realloc === undefined) {
95
+ const buf = cachedTextEncoder.encode(arg);
96
+ const ptr = malloc(buf.length, 1) >>> 0;
97
+ getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
98
+ WASM_VECTOR_LEN = buf.length;
99
+ return ptr;
100
+ }
101
+
102
+ let len = arg.length;
103
+ let ptr = malloc(len, 1) >>> 0;
104
+
105
+ const mem = getUint8Memory0();
106
+
107
+ let offset = 0;
108
+
109
+ for (; offset < len; offset++) {
110
+ const code = arg.charCodeAt(offset);
111
+ if (code > 0x7F) break;
112
+ mem[ptr + offset] = code;
113
+ }
114
+
115
+ if (offset !== len) {
116
+ if (offset !== 0) {
117
+ arg = arg.slice(offset);
118
+ }
119
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
120
+ const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
121
+ const ret = encodeString(arg, view);
122
+
123
+ offset += ret.written;
124
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
125
+ }
126
+
127
+ WASM_VECTOR_LEN = offset;
128
+ return ptr;
129
+ }
130
+
131
+ let cachedBigInt64Memory0 = null;
132
+
133
+ function getBigInt64Memory0() {
134
+ if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
135
+ cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
136
+ }
137
+ return cachedBigInt64Memory0;
138
+ }
139
+
140
+ function debugString(val) {
141
+ // primitive types
142
+ const type = typeof val;
143
+ if (type == 'number' || type == 'boolean' || val == null) {
144
+ return `${val}`;
145
+ }
146
+ if (type == 'string') {
147
+ return `"${val}"`;
148
+ }
149
+ if (type == 'symbol') {
150
+ const description = val.description;
151
+ if (description == null) {
152
+ return 'Symbol';
153
+ } else {
154
+ return `Symbol(${description})`;
155
+ }
156
+ }
157
+ if (type == 'function') {
158
+ const name = val.name;
159
+ if (typeof name == 'string' && name.length > 0) {
160
+ return `Function(${name})`;
161
+ } else {
162
+ return 'Function';
163
+ }
164
+ }
165
+ // objects
166
+ if (Array.isArray(val)) {
167
+ const length = val.length;
168
+ let debug = '[';
169
+ if (length > 0) {
170
+ debug += debugString(val[0]);
171
+ }
172
+ for(let i = 1; i < length; i++) {
173
+ debug += ', ' + debugString(val[i]);
174
+ }
175
+ debug += ']';
176
+ return debug;
177
+ }
178
+ // Test for built-in
179
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
180
+ let className;
181
+ if (builtInMatches.length > 1) {
182
+ className = builtInMatches[1];
183
+ } else {
184
+ // Failed to match the standard '[object ClassName]'
185
+ return toString.call(val);
186
+ }
187
+ if (className == 'Object') {
188
+ // we're a user defined class or Object
189
+ // JSON.stringify avoids problems with cycles, and is generally much
190
+ // easier than looping through ownProperties of `val`.
191
+ try {
192
+ return 'Object(' + JSON.stringify(val) + ')';
193
+ } catch (_) {
194
+ return 'Object';
195
+ }
196
+ }
197
+ // errors
198
+ if (val instanceof Error) {
199
+ return `${val.name}: ${val.message}\n${val.stack}`;
200
+ }
201
+ // TODO we could test for more things here, like `Set`s and `Map`s.
202
+ return className;
203
+ }
204
+ /**
205
+ */
206
+ module.exports.run = function() {
207
+ wasm.run();
208
+ };
209
+
210
+ function handleError(f, args) {
211
+ try {
212
+ return f.apply(this, args);
213
+ } catch (e) {
214
+ wasm.__wbindgen_exn_store(addHeapObject(e));
215
+ }
216
+ }
217
+
218
+ const WorkspaceFinalization = (typeof FinalizationRegistry === 'undefined')
219
+ ? { register: () => {}, unregister: () => {} }
220
+ : new FinalizationRegistry(ptr => wasm.__wbg_workspace_free(ptr >>> 0));
221
+ /**
222
+ */
223
+ class Workspace {
224
+
225
+ __destroy_into_raw() {
226
+ const ptr = this.__wbg_ptr;
227
+ this.__wbg_ptr = 0;
228
+ WorkspaceFinalization.unregister(this);
229
+ return ptr;
230
+ }
231
+
232
+ free() {
233
+ const ptr = this.__destroy_into_raw();
234
+ wasm.__wbg_workspace_free(ptr);
235
+ }
236
+ /**
237
+ * @returns {string}
238
+ */
239
+ static version() {
240
+ let deferred1_0;
241
+ let deferred1_1;
242
+ try {
243
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
244
+ wasm.workspace_version(retptr);
245
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
246
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
247
+ deferred1_0 = r0;
248
+ deferred1_1 = r1;
249
+ return getStringFromWasm0(r0, r1);
250
+ } finally {
251
+ wasm.__wbindgen_add_to_stack_pointer(16);
252
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
253
+ }
254
+ }
255
+ /**
256
+ * @param {any} options
257
+ */
258
+ constructor(options) {
259
+ try {
260
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
261
+ wasm.workspace_new(retptr, addHeapObject(options));
262
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
263
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
264
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
265
+ if (r2) {
266
+ throw takeObject(r1);
267
+ }
268
+ this.__wbg_ptr = r0 >>> 0;
269
+ return this;
270
+ } finally {
271
+ wasm.__wbindgen_add_to_stack_pointer(16);
272
+ }
273
+ }
274
+ /**
275
+ * @returns {any}
276
+ */
277
+ static defaultSettings() {
278
+ try {
279
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
280
+ wasm.workspace_defaultSettings(retptr);
281
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
282
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
283
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
284
+ if (r2) {
285
+ throw takeObject(r1);
286
+ }
287
+ return takeObject(r0);
288
+ } finally {
289
+ wasm.__wbindgen_add_to_stack_pointer(16);
290
+ }
291
+ }
292
+ /**
293
+ * @param {string} contents
294
+ * @returns {any}
295
+ */
296
+ check(contents) {
297
+ try {
298
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
299
+ const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
300
+ const len0 = WASM_VECTOR_LEN;
301
+ wasm.workspace_check(retptr, this.__wbg_ptr, ptr0, len0);
302
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
303
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
304
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
305
+ if (r2) {
306
+ throw takeObject(r1);
307
+ }
308
+ return takeObject(r0);
309
+ } finally {
310
+ wasm.__wbindgen_add_to_stack_pointer(16);
311
+ }
312
+ }
313
+ /**
314
+ * @param {string} contents
315
+ * @returns {string}
316
+ */
317
+ format(contents) {
318
+ let deferred3_0;
319
+ let deferred3_1;
320
+ try {
321
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
322
+ const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
323
+ const len0 = WASM_VECTOR_LEN;
324
+ wasm.workspace_format(retptr, this.__wbg_ptr, ptr0, len0);
325
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
326
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
327
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
328
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
329
+ var ptr2 = r0;
330
+ var len2 = r1;
331
+ if (r3) {
332
+ ptr2 = 0; len2 = 0;
333
+ throw takeObject(r2);
334
+ }
335
+ deferred3_0 = ptr2;
336
+ deferred3_1 = len2;
337
+ return getStringFromWasm0(ptr2, len2);
338
+ } finally {
339
+ wasm.__wbindgen_add_to_stack_pointer(16);
340
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
341
+ }
342
+ }
343
+ /**
344
+ * @param {string} contents
345
+ * @returns {string}
346
+ */
347
+ format_ir(contents) {
348
+ let deferred3_0;
349
+ let deferred3_1;
350
+ try {
351
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
352
+ const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
353
+ const len0 = WASM_VECTOR_LEN;
354
+ wasm.workspace_format_ir(retptr, this.__wbg_ptr, ptr0, len0);
355
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
356
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
357
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
358
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
359
+ var ptr2 = r0;
360
+ var len2 = r1;
361
+ if (r3) {
362
+ ptr2 = 0; len2 = 0;
363
+ throw takeObject(r2);
364
+ }
365
+ deferred3_0 = ptr2;
366
+ deferred3_1 = len2;
367
+ return getStringFromWasm0(ptr2, len2);
368
+ } finally {
369
+ wasm.__wbindgen_add_to_stack_pointer(16);
370
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
371
+ }
372
+ }
373
+ /**
374
+ * @param {string} contents
375
+ * @returns {string}
376
+ */
377
+ comments(contents) {
378
+ let deferred3_0;
379
+ let deferred3_1;
380
+ try {
381
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
382
+ const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
383
+ const len0 = WASM_VECTOR_LEN;
384
+ wasm.workspace_comments(retptr, this.__wbg_ptr, ptr0, len0);
385
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
386
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
387
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
388
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
389
+ var ptr2 = r0;
390
+ var len2 = r1;
391
+ if (r3) {
392
+ ptr2 = 0; len2 = 0;
393
+ throw takeObject(r2);
394
+ }
395
+ deferred3_0 = ptr2;
396
+ deferred3_1 = len2;
397
+ return getStringFromWasm0(ptr2, len2);
398
+ } finally {
399
+ wasm.__wbindgen_add_to_stack_pointer(16);
400
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
401
+ }
402
+ }
403
+ /**
404
+ * Parses the content and returns its AST
405
+ * @param {string} contents
406
+ * @returns {string}
407
+ */
408
+ parse(contents) {
409
+ let deferred3_0;
410
+ let deferred3_1;
411
+ try {
412
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
413
+ const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
414
+ const len0 = WASM_VECTOR_LEN;
415
+ wasm.workspace_parse(retptr, this.__wbg_ptr, ptr0, len0);
416
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
417
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
418
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
419
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
420
+ var ptr2 = r0;
421
+ var len2 = r1;
422
+ if (r3) {
423
+ ptr2 = 0; len2 = 0;
424
+ throw takeObject(r2);
425
+ }
426
+ deferred3_0 = ptr2;
427
+ deferred3_1 = len2;
428
+ return getStringFromWasm0(ptr2, len2);
429
+ } finally {
430
+ wasm.__wbindgen_add_to_stack_pointer(16);
431
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
432
+ }
433
+ }
434
+ /**
435
+ * @param {string} contents
436
+ * @returns {string}
437
+ */
438
+ tokens(contents) {
439
+ let deferred3_0;
440
+ let deferred3_1;
441
+ try {
442
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
443
+ const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
444
+ const len0 = WASM_VECTOR_LEN;
445
+ wasm.workspace_tokens(retptr, this.__wbg_ptr, ptr0, len0);
446
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
447
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
448
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
449
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
450
+ var ptr2 = r0;
451
+ var len2 = r1;
452
+ if (r3) {
453
+ ptr2 = 0; len2 = 0;
454
+ throw takeObject(r2);
455
+ }
456
+ deferred3_0 = ptr2;
457
+ deferred3_1 = len2;
458
+ return getStringFromWasm0(ptr2, len2);
459
+ } finally {
460
+ wasm.__wbindgen_add_to_stack_pointer(16);
461
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
462
+ }
463
+ }
464
+ }
465
+ module.exports.Workspace = Workspace;
466
+
467
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
468
+ takeObject(arg0);
469
+ };
470
+
471
+ module.exports.__wbindgen_is_string = function(arg0) {
472
+ const ret = typeof(getObject(arg0)) === 'string';
473
+ return ret;
474
+ };
475
+
476
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
477
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
478
+ return addHeapObject(ret);
479
+ };
480
+
481
+ module.exports.__wbindgen_as_number = function(arg0) {
482
+ const ret = +getObject(arg0);
483
+ return ret;
484
+ };
485
+
486
+ module.exports.__wbindgen_object_clone_ref = function(arg0) {
487
+ const ret = getObject(arg0);
488
+ return addHeapObject(ret);
489
+ };
490
+
491
+ module.exports.__wbindgen_boolean_get = function(arg0) {
492
+ const v = getObject(arg0);
493
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
494
+ return ret;
495
+ };
496
+
497
+ module.exports.__wbindgen_is_bigint = function(arg0) {
498
+ const ret = typeof(getObject(arg0)) === 'bigint';
499
+ return ret;
500
+ };
501
+
502
+ module.exports.__wbindgen_number_get = function(arg0, arg1) {
503
+ const obj = getObject(arg1);
504
+ const ret = typeof(obj) === 'number' ? obj : undefined;
505
+ getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
506
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
507
+ };
508
+
509
+ module.exports.__wbindgen_string_get = function(arg0, arg1) {
510
+ const obj = getObject(arg1);
511
+ const ret = typeof(obj) === 'string' ? obj : undefined;
512
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
513
+ var len1 = WASM_VECTOR_LEN;
514
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
515
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
516
+ };
517
+
518
+ module.exports.__wbindgen_is_object = function(arg0) {
519
+ const val = getObject(arg0);
520
+ const ret = typeof(val) === 'object' && val !== null;
521
+ return ret;
522
+ };
523
+
524
+ module.exports.__wbindgen_in = function(arg0, arg1) {
525
+ const ret = getObject(arg0) in getObject(arg1);
526
+ return ret;
527
+ };
528
+
529
+ module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
530
+ const ret = arg0;
531
+ return addHeapObject(ret);
532
+ };
533
+
534
+ module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
535
+ const ret = getObject(arg0) === getObject(arg1);
536
+ return ret;
537
+ };
538
+
539
+ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
540
+ const ret = BigInt.asUintN(64, arg0);
541
+ return addHeapObject(ret);
542
+ };
543
+
544
+ module.exports.__wbindgen_is_undefined = function(arg0) {
545
+ const ret = getObject(arg0) === undefined;
546
+ return ret;
547
+ };
548
+
549
+ module.exports.__wbindgen_number_new = function(arg0) {
550
+ const ret = arg0;
551
+ return addHeapObject(ret);
552
+ };
553
+
554
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
555
+ const ret = getStringFromWasm0(arg0, arg1);
556
+ return addHeapObject(ret);
557
+ };
558
+
559
+ module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
560
+ const ret = getObject(arg0) == getObject(arg1);
561
+ return ret;
562
+ };
563
+
564
+ module.exports.__wbg_String_b9412f8799faab3e = function(arg0, arg1) {
565
+ const ret = String(getObject(arg1));
566
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
567
+ const len1 = WASM_VECTOR_LEN;
568
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
569
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
570
+ };
571
+
572
+ module.exports.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
573
+ const ret = getObject(arg0)[getObject(arg1)];
574
+ return addHeapObject(ret);
575
+ };
576
+
577
+ module.exports.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
578
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
579
+ };
580
+
581
+ module.exports.__wbg_debug_5fb96680aecf5dc8 = function(arg0) {
582
+ console.debug(getObject(arg0));
583
+ };
584
+
585
+ module.exports.__wbg_error_8e3928cfb8a43e2b = function(arg0) {
586
+ console.error(getObject(arg0));
587
+ };
588
+
589
+ module.exports.__wbg_info_530a29cb2e4e3304 = function(arg0) {
590
+ console.info(getObject(arg0));
591
+ };
592
+
593
+ module.exports.__wbg_log_5bb5f88f245d7762 = function(arg0) {
594
+ console.log(getObject(arg0));
595
+ };
596
+
597
+ module.exports.__wbg_warn_63bbae1730aead09 = function(arg0) {
598
+ console.warn(getObject(arg0));
599
+ };
600
+
601
+ module.exports.__wbg_new_abda76e883ba8a5f = function() {
602
+ const ret = new Error();
603
+ return addHeapObject(ret);
604
+ };
605
+
606
+ module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
607
+ const ret = getObject(arg1).stack;
608
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
609
+ const len1 = WASM_VECTOR_LEN;
610
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
611
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
612
+ };
613
+
614
+ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
615
+ let deferred0_0;
616
+ let deferred0_1;
617
+ try {
618
+ deferred0_0 = arg0;
619
+ deferred0_1 = arg1;
620
+ console.error(getStringFromWasm0(arg0, arg1));
621
+ } finally {
622
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
623
+ }
624
+ };
625
+
626
+ module.exports.__wbindgen_is_function = function(arg0) {
627
+ const ret = typeof(getObject(arg0)) === 'function';
628
+ return ret;
629
+ };
630
+
631
+ module.exports.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
632
+ const ret = getObject(arg0)[arg1 >>> 0];
633
+ return addHeapObject(ret);
634
+ };
635
+
636
+ module.exports.__wbg_length_cd7af8117672b8b8 = function(arg0) {
637
+ const ret = getObject(arg0).length;
638
+ return ret;
639
+ };
640
+
641
+ module.exports.__wbg_new_16b304a2cfa7ff4a = function() {
642
+ const ret = new Array();
643
+ return addHeapObject(ret);
644
+ };
645
+
646
+ module.exports.__wbg_new_d9bc3a0147634640 = function() {
647
+ const ret = new Map();
648
+ return addHeapObject(ret);
649
+ };
650
+
651
+ module.exports.__wbg_next_40fc327bfc8770e6 = function(arg0) {
652
+ const ret = getObject(arg0).next;
653
+ return addHeapObject(ret);
654
+ };
655
+
656
+ module.exports.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {
657
+ const ret = getObject(arg0).next();
658
+ return addHeapObject(ret);
659
+ }, arguments) };
660
+
661
+ module.exports.__wbg_done_298b57d23c0fc80c = function(arg0) {
662
+ const ret = getObject(arg0).done;
663
+ return ret;
664
+ };
665
+
666
+ module.exports.__wbg_value_d93c65011f51a456 = function(arg0) {
667
+ const ret = getObject(arg0).value;
668
+ return addHeapObject(ret);
669
+ };
670
+
671
+ module.exports.__wbg_iterator_2cee6dadfd956dfa = function() {
672
+ const ret = Symbol.iterator;
673
+ return addHeapObject(ret);
674
+ };
675
+
676
+ module.exports.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
677
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
678
+ return addHeapObject(ret);
679
+ }, arguments) };
680
+
681
+ module.exports.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
682
+ const ret = getObject(arg0).call(getObject(arg1));
683
+ return addHeapObject(ret);
684
+ }, arguments) };
685
+
686
+ module.exports.__wbg_new_72fb9a18b5ae2624 = function() {
687
+ const ret = new Object();
688
+ return addHeapObject(ret);
689
+ };
690
+
691
+ module.exports.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
692
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
693
+ };
694
+
695
+ module.exports.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
696
+ const ret = Array.isArray(getObject(arg0));
697
+ return ret;
698
+ };
699
+
700
+ module.exports.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
701
+ let result;
702
+ try {
703
+ result = getObject(arg0) instanceof ArrayBuffer;
704
+ } catch (_) {
705
+ result = false;
706
+ }
707
+ const ret = result;
708
+ return ret;
709
+ };
710
+
711
+ module.exports.__wbg_new_28c511d9baebfa89 = function(arg0, arg1) {
712
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
713
+ return addHeapObject(ret);
714
+ };
715
+
716
+ module.exports.__wbg_instanceof_Map_87917e0a7aaf4012 = function(arg0) {
717
+ let result;
718
+ try {
719
+ result = getObject(arg0) instanceof Map;
720
+ } catch (_) {
721
+ result = false;
722
+ }
723
+ const ret = result;
724
+ return ret;
725
+ };
726
+
727
+ module.exports.__wbg_set_8417257aaedc936b = function(arg0, arg1, arg2) {
728
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
729
+ return addHeapObject(ret);
730
+ };
731
+
732
+ module.exports.__wbg_isSafeInteger_f7b04ef02296c4d2 = function(arg0) {
733
+ const ret = Number.isSafeInteger(getObject(arg0));
734
+ return ret;
735
+ };
736
+
737
+ module.exports.__wbg_entries_95cc2c823b285a09 = function(arg0) {
738
+ const ret = Object.entries(getObject(arg0));
739
+ return addHeapObject(ret);
740
+ };
741
+
742
+ module.exports.__wbg_fromCodePoint_cedd7612a2ff688f = function() { return handleError(function (arg0) {
743
+ const ret = String.fromCodePoint(arg0 >>> 0);
744
+ return addHeapObject(ret);
745
+ }, arguments) };
746
+
747
+ module.exports.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
748
+ const ret = getObject(arg0).buffer;
749
+ return addHeapObject(ret);
750
+ };
751
+
752
+ module.exports.__wbg_new_63b92bc8671ed464 = function(arg0) {
753
+ const ret = new Uint8Array(getObject(arg0));
754
+ return addHeapObject(ret);
755
+ };
756
+
757
+ module.exports.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {
758
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
759
+ };
760
+
761
+ module.exports.__wbg_length_c20a40f15020d68a = function(arg0) {
762
+ const ret = getObject(arg0).length;
763
+ return ret;
764
+ };
765
+
766
+ module.exports.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
767
+ let result;
768
+ try {
769
+ result = getObject(arg0) instanceof Uint8Array;
770
+ } catch (_) {
771
+ result = false;
772
+ }
773
+ const ret = result;
774
+ return ret;
775
+ };
776
+
777
+ module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
778
+ const v = getObject(arg1);
779
+ const ret = typeof(v) === 'bigint' ? v : undefined;
780
+ getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
781
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
782
+ };
783
+
784
+ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
785
+ const ret = debugString(getObject(arg1));
786
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
787
+ const len1 = WASM_VECTOR_LEN;
788
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
789
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
790
+ };
791
+
792
+ module.exports.__wbindgen_throw = function(arg0, arg1) {
793
+ throw new Error(getStringFromWasm0(arg0, arg1));
794
+ };
795
+
796
+ module.exports.__wbindgen_memory = function() {
797
+ const ret = wasm.memory;
798
+ return addHeapObject(ret);
799
+ };
800
+
801
+ const path = require('path').join(__dirname, 'ruff_wasm_bg.wasm');
802
+ const bytes = require('fs').readFileSync(path);
803
+
804
+ const wasmModule = new WebAssembly.Module(bytes);
805
+ const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
806
+ wasm = wasmInstance.exports;
807
+ module.exports.__wasm = wasm;
808
+
809
+ wasm.__wbindgen_start();
810
+