qsharp-lang 1.0.18-dev → 1.0.19-dev

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.
@@ -20,9 +20,18 @@ function takeObject(idx) {
20
20
  return ret;
21
21
  }
22
22
 
23
- const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
23
+ function addHeapObject(obj) {
24
+ if (heap_next === heap.length) heap.push(heap.length + 1);
25
+ const idx = heap_next;
26
+ heap_next = heap[idx];
27
+
28
+ heap[idx] = obj;
29
+ return idx;
30
+ }
31
+
32
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
24
33
 
25
- cachedTextDecoder.decode();
34
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
26
35
 
27
36
  let cachedUint8Memory0 = null;
28
37
 
@@ -34,21 +43,13 @@ function getUint8Memory0() {
34
43
  }
35
44
 
36
45
  function getStringFromWasm0(ptr, len) {
46
+ ptr = ptr >>> 0;
37
47
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
38
48
  }
39
49
 
40
- function addHeapObject(obj) {
41
- if (heap_next === heap.length) heap.push(heap.length + 1);
42
- const idx = heap_next;
43
- heap_next = heap[idx];
44
-
45
- heap[idx] = obj;
46
- return idx;
47
- }
48
-
49
50
  let WASM_VECTOR_LEN = 0;
50
51
 
51
- const cachedTextEncoder = new TextEncoder('utf-8');
52
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
52
53
 
53
54
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
54
55
  ? function (arg, view) {
@@ -67,14 +68,14 @@ function passStringToWasm0(arg, malloc, realloc) {
67
68
 
68
69
  if (realloc === undefined) {
69
70
  const buf = cachedTextEncoder.encode(arg);
70
- const ptr = malloc(buf.length);
71
+ const ptr = malloc(buf.length, 1) >>> 0;
71
72
  getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
72
73
  WASM_VECTOR_LEN = buf.length;
73
74
  return ptr;
74
75
  }
75
76
 
76
77
  let len = arg.length;
77
- let ptr = malloc(len);
78
+ let ptr = malloc(len, 1) >>> 0;
78
79
 
79
80
  const mem = getUint8Memory0();
80
81
 
@@ -90,7 +91,7 @@ function passStringToWasm0(arg, malloc, realloc) {
90
91
  if (offset !== 0) {
91
92
  arg = arg.slice(offset);
92
93
  }
93
- ptr = realloc(ptr, len, len = offset + arg.length * 3);
94
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
94
95
  const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
95
96
  const ret = encodeString(arg, view);
96
97
 
@@ -187,19 +188,72 @@ function debugString(val) {
187
188
  // TODO we could test for more things here, like `Set`s and `Map`s.
188
189
  return className;
189
190
  }
191
+
192
+ let stack_pointer = 128;
193
+
194
+ function addBorrowedObject(obj) {
195
+ if (stack_pointer == 1) throw new Error('out of js stack');
196
+ heap[--stack_pointer] = obj;
197
+ return stack_pointer;
198
+ }
199
+
200
+ let cachedUint32Memory0 = null;
201
+
202
+ function getUint32Memory0() {
203
+ if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {
204
+ cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
205
+ }
206
+ return cachedUint32Memory0;
207
+ }
208
+
209
+ function passArray32ToWasm0(arg, malloc) {
210
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
211
+ getUint32Memory0().set(arg, ptr / 4);
212
+ WASM_VECTOR_LEN = arg.length;
213
+ return ptr;
214
+ }
215
+ /**
216
+ * @param {any} callback
217
+ * @param {number} level
218
+ */
219
+ export function initLogging(callback, level) {
220
+ try {
221
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
222
+ wasm.initLogging(retptr, addHeapObject(callback), level);
223
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
224
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
225
+ if (r1) {
226
+ throw takeObject(r0);
227
+ }
228
+ } finally {
229
+ wasm.__wbindgen_add_to_stack_pointer(16);
230
+ }
231
+ }
232
+
233
+ /**
234
+ * @param {number} level
235
+ */
236
+ export function setLogLevel(level) {
237
+ wasm.setLogLevel(level);
238
+ }
239
+
190
240
  /**
191
241
  * @returns {string}
192
242
  */
193
243
  export function git_hash() {
244
+ let deferred1_0;
245
+ let deferred1_1;
194
246
  try {
195
247
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
196
248
  wasm.git_hash(retptr);
197
249
  var r0 = getInt32Memory0()[retptr / 4 + 0];
198
250
  var r1 = getInt32Memory0()[retptr / 4 + 1];
251
+ deferred1_0 = r0;
252
+ deferred1_1 = r1;
199
253
  return getStringFromWasm0(r0, r1);
200
254
  } finally {
201
255
  wasm.__wbindgen_add_to_stack_pointer(16);
202
- wasm.__wbindgen_export_2(r0, r1);
256
+ wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
203
257
  }
204
258
  }
205
259
 
@@ -208,6 +262,8 @@ export function git_hash() {
208
262
  * @returns {string}
209
263
  */
210
264
  export function get_qir(code) {
265
+ let deferred3_0;
266
+ let deferred3_1;
211
267
  try {
212
268
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
213
269
  const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
@@ -217,16 +273,18 @@ export function get_qir(code) {
217
273
  var r1 = getInt32Memory0()[retptr / 4 + 1];
218
274
  var r2 = getInt32Memory0()[retptr / 4 + 2];
219
275
  var r3 = getInt32Memory0()[retptr / 4 + 3];
220
- var ptr1 = r0;
221
- var len1 = r1;
276
+ var ptr2 = r0;
277
+ var len2 = r1;
222
278
  if (r3) {
223
- ptr1 = 0; len1 = 0;
279
+ ptr2 = 0; len2 = 0;
224
280
  throw takeObject(r2);
225
281
  }
226
- return getStringFromWasm0(ptr1, len1);
282
+ deferred3_0 = ptr2;
283
+ deferred3_1 = len2;
284
+ return getStringFromWasm0(ptr2, len2);
227
285
  } finally {
228
286
  wasm.__wbindgen_add_to_stack_pointer(16);
229
- wasm.__wbindgen_export_2(ptr1, len1);
287
+ wasm.__wbindgen_export_2(deferred3_0, deferred3_1, 1);
230
288
  }
231
289
  }
232
290
 
@@ -242,12 +300,12 @@ export function get_library_source_content(name) {
242
300
  wasm.get_library_source_content(retptr, ptr0, len0);
243
301
  var r0 = getInt32Memory0()[retptr / 4 + 0];
244
302
  var r1 = getInt32Memory0()[retptr / 4 + 1];
245
- let v1;
303
+ let v2;
246
304
  if (r0 !== 0) {
247
- v1 = getStringFromWasm0(r0, r1).slice();
305
+ v2 = getStringFromWasm0(r0, r1).slice();
248
306
  wasm.__wbindgen_export_2(r0, r1 * 1);
249
307
  }
250
- return v1;
308
+ return v2;
251
309
  } finally {
252
310
  wasm.__wbindgen_add_to_stack_pointer(16);
253
311
  }
@@ -258,6 +316,8 @@ export function get_library_source_content(name) {
258
316
  * @returns {string}
259
317
  */
260
318
  export function get_hir(code) {
319
+ let deferred2_0;
320
+ let deferred2_1;
261
321
  try {
262
322
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
263
323
  const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
@@ -265,20 +325,15 @@ export function get_hir(code) {
265
325
  wasm.get_hir(retptr, ptr0, len0);
266
326
  var r0 = getInt32Memory0()[retptr / 4 + 0];
267
327
  var r1 = getInt32Memory0()[retptr / 4 + 1];
328
+ deferred2_0 = r0;
329
+ deferred2_1 = r1;
268
330
  return getStringFromWasm0(r0, r1);
269
331
  } finally {
270
332
  wasm.__wbindgen_add_to_stack_pointer(16);
271
- wasm.__wbindgen_export_2(r0, r1);
333
+ wasm.__wbindgen_export_2(deferred2_0, deferred2_1, 1);
272
334
  }
273
335
  }
274
336
 
275
- let stack_pointer = 128;
276
-
277
- function addBorrowedObject(obj) {
278
- if (stack_pointer == 1) throw new Error('out of js stack');
279
- heap[--stack_pointer] = obj;
280
- return stack_pointer;
281
- }
282
337
  /**
283
338
  * @param {string} code
284
339
  * @param {string} expr
@@ -324,46 +379,6 @@ export function check_exercise_solution(solution_code, exercise_sources_js, even
324
379
  }
325
380
  }
326
381
 
327
- let cachedUint32Memory0 = null;
328
-
329
- function getUint32Memory0() {
330
- if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {
331
- cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
332
- }
333
- return cachedUint32Memory0;
334
- }
335
-
336
- function passArray32ToWasm0(arg, malloc) {
337
- const ptr = malloc(arg.length * 4);
338
- getUint32Memory0().set(arg, ptr / 4);
339
- WASM_VECTOR_LEN = arg.length;
340
- return ptr;
341
- }
342
- /**
343
- * @param {any} callback
344
- * @param {number} level
345
- */
346
- export function initLogging(callback, level) {
347
- try {
348
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
349
- wasm.initLogging(retptr, addHeapObject(callback), level);
350
- var r0 = getInt32Memory0()[retptr / 4 + 0];
351
- var r1 = getInt32Memory0()[retptr / 4 + 1];
352
- if (r1) {
353
- throw takeObject(r0);
354
- }
355
- } finally {
356
- wasm.__wbindgen_add_to_stack_pointer(16);
357
- }
358
- }
359
-
360
- /**
361
- * @param {number} level
362
- */
363
- export function setLogLevel(level) {
364
- wasm.setLogLevel(level);
365
- }
366
-
367
382
  function handleError(f, args) {
368
383
  try {
369
384
  return f.apply(this, args);
@@ -371,10 +386,6 @@ function handleError(f, args) {
371
386
  wasm.__wbindgen_export_3(addHeapObject(e));
372
387
  }
373
388
  }
374
-
375
- function getArrayU8FromWasm0(ptr, len) {
376
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
377
- }
378
389
  /**
379
390
  */
380
391
  export const StepResultId = Object.freeze({ BreakpointHit:0,"0":"BreakpointHit",Next:1,"1":"Next",StepIn:2,"2":"StepIn",StepOut:3,"3":"StepOut",Return:4,"4":"Return", });
@@ -383,15 +394,16 @@ export const StepResultId = Object.freeze({ BreakpointHit:0,"0":"BreakpointHit",
383
394
  export class DebugService {
384
395
 
385
396
  static __wrap(ptr) {
397
+ ptr = ptr >>> 0;
386
398
  const obj = Object.create(DebugService.prototype);
387
- obj.ptr = ptr;
399
+ obj.__wbg_ptr = ptr;
388
400
 
389
401
  return obj;
390
402
  }
391
403
 
392
404
  __destroy_into_raw() {
393
- const ptr = this.ptr;
394
- this.ptr = 0;
405
+ const ptr = this.__wbg_ptr;
406
+ this.__wbg_ptr = 0;
395
407
 
396
408
  return ptr;
397
409
  }
@@ -413,6 +425,8 @@ export class DebugService {
413
425
  * @returns {string}
414
426
  */
415
427
  load_source(path, source, entry) {
428
+ let deferred4_0;
429
+ let deferred4_1;
416
430
  try {
417
431
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
418
432
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
@@ -421,27 +435,29 @@ export class DebugService {
421
435
  const len1 = WASM_VECTOR_LEN;
422
436
  var ptr2 = isLikeNone(entry) ? 0 : passStringToWasm0(entry, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
423
437
  var len2 = WASM_VECTOR_LEN;
424
- wasm.debugservice_load_source(retptr, this.ptr, ptr0, len0, ptr1, len1, ptr2, len2);
438
+ wasm.debugservice_load_source(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
425
439
  var r0 = getInt32Memory0()[retptr / 4 + 0];
426
440
  var r1 = getInt32Memory0()[retptr / 4 + 1];
441
+ deferred4_0 = r0;
442
+ deferred4_1 = r1;
427
443
  return getStringFromWasm0(r0, r1);
428
444
  } finally {
429
445
  wasm.__wbindgen_add_to_stack_pointer(16);
430
- wasm.__wbindgen_export_2(r0, r1);
446
+ wasm.__wbindgen_export_2(deferred4_0, deferred4_1, 1);
431
447
  }
432
448
  }
433
449
  /**
434
450
  * @returns {IQuantumStateList}
435
451
  */
436
452
  capture_quantum_state() {
437
- const ret = wasm.debugservice_capture_quantum_state(this.ptr);
453
+ const ret = wasm.debugservice_capture_quantum_state(this.__wbg_ptr);
438
454
  return takeObject(ret);
439
455
  }
440
456
  /**
441
457
  * @returns {IStackFrameList}
442
458
  */
443
459
  get_stack_frames() {
444
- const ret = wasm.debugservice_get_stack_frames(this.ptr);
460
+ const ret = wasm.debugservice_get_stack_frames(this.__wbg_ptr);
445
461
  return takeObject(ret);
446
462
  }
447
463
  /**
@@ -454,7 +470,7 @@ export class DebugService {
454
470
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
455
471
  const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export_0);
456
472
  const len0 = WASM_VECTOR_LEN;
457
- wasm.debugservice_eval_next(retptr, this.ptr, addBorrowedObject(event_cb), ptr0, len0);
473
+ wasm.debugservice_eval_next(retptr, this.__wbg_ptr, addBorrowedObject(event_cb), ptr0, len0);
458
474
  var r0 = getInt32Memory0()[retptr / 4 + 0];
459
475
  var r1 = getInt32Memory0()[retptr / 4 + 1];
460
476
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -477,7 +493,7 @@ export class DebugService {
477
493
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
478
494
  const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export_0);
479
495
  const len0 = WASM_VECTOR_LEN;
480
- wasm.debugservice_eval_continue(retptr, this.ptr, addBorrowedObject(event_cb), ptr0, len0);
496
+ wasm.debugservice_eval_continue(retptr, this.__wbg_ptr, addBorrowedObject(event_cb), ptr0, len0);
481
497
  var r0 = getInt32Memory0()[retptr / 4 + 0];
482
498
  var r1 = getInt32Memory0()[retptr / 4 + 1];
483
499
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -500,7 +516,7 @@ export class DebugService {
500
516
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
501
517
  const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export_0);
502
518
  const len0 = WASM_VECTOR_LEN;
503
- wasm.debugservice_eval_step_in(retptr, this.ptr, addBorrowedObject(event_cb), ptr0, len0);
519
+ wasm.debugservice_eval_step_in(retptr, this.__wbg_ptr, addBorrowedObject(event_cb), ptr0, len0);
504
520
  var r0 = getInt32Memory0()[retptr / 4 + 0];
505
521
  var r1 = getInt32Memory0()[retptr / 4 + 1];
506
522
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -523,7 +539,7 @@ export class DebugService {
523
539
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
524
540
  const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export_0);
525
541
  const len0 = WASM_VECTOR_LEN;
526
- wasm.debugservice_eval_step_out(retptr, this.ptr, addBorrowedObject(event_cb), ptr0, len0);
542
+ wasm.debugservice_eval_step_out(retptr, this.__wbg_ptr, addBorrowedObject(event_cb), ptr0, len0);
527
543
  var r0 = getInt32Memory0()[retptr / 4 + 0];
528
544
  var r1 = getInt32Memory0()[retptr / 4 + 1];
529
545
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -543,14 +559,14 @@ export class DebugService {
543
559
  get_breakpoints(path) {
544
560
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
545
561
  const len0 = WASM_VECTOR_LEN;
546
- const ret = wasm.debugservice_get_breakpoints(this.ptr, ptr0, len0);
562
+ const ret = wasm.debugservice_get_breakpoints(this.__wbg_ptr, ptr0, len0);
547
563
  return takeObject(ret);
548
564
  }
549
565
  /**
550
566
  * @returns {IVariableList}
551
567
  */
552
568
  get_locals() {
553
- const ret = wasm.debugservice_get_locals(this.ptr);
569
+ const ret = wasm.debugservice_get_locals(this.__wbg_ptr);
554
570
  return takeObject(ret);
555
571
  }
556
572
  }
@@ -559,15 +575,16 @@ export class DebugService {
559
575
  export class LanguageService {
560
576
 
561
577
  static __wrap(ptr) {
578
+ ptr = ptr >>> 0;
562
579
  const obj = Object.create(LanguageService.prototype);
563
- obj.ptr = ptr;
580
+ obj.__wbg_ptr = ptr;
564
581
 
565
582
  return obj;
566
583
  }
567
584
 
568
585
  __destroy_into_raw() {
569
- const ptr = this.ptr;
570
- this.ptr = 0;
586
+ const ptr = this.__wbg_ptr;
587
+ this.__wbg_ptr = 0;
571
588
 
572
589
  return ptr;
573
590
  }
@@ -591,7 +608,7 @@ export class LanguageService {
591
608
  * @param {IWorkspaceConfiguration} config
592
609
  */
593
610
  update_configuration(config) {
594
- wasm.languageservice_update_configuration(this.ptr, addHeapObject(config));
611
+ wasm.languageservice_update_configuration(this.__wbg_ptr, addHeapObject(config));
595
612
  }
596
613
  /**
597
614
  * @param {string} uri
@@ -603,7 +620,7 @@ export class LanguageService {
603
620
  const len0 = WASM_VECTOR_LEN;
604
621
  const ptr1 = passStringToWasm0(text, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
605
622
  const len1 = WASM_VECTOR_LEN;
606
- wasm.languageservice_update_document(this.ptr, ptr0, len0, version, ptr1, len1);
623
+ wasm.languageservice_update_document(this.__wbg_ptr, ptr0, len0, version, ptr1, len1);
607
624
  }
608
625
  /**
609
626
  * @param {string} uri
@@ -611,7 +628,7 @@ export class LanguageService {
611
628
  close_document(uri) {
612
629
  const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
613
630
  const len0 = WASM_VECTOR_LEN;
614
- wasm.languageservice_close_document(this.ptr, ptr0, len0);
631
+ wasm.languageservice_close_document(this.__wbg_ptr, ptr0, len0);
615
632
  }
616
633
  /**
617
634
  * @param {string} uri
@@ -621,7 +638,7 @@ export class LanguageService {
621
638
  get_completions(uri, offset) {
622
639
  const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
623
640
  const len0 = WASM_VECTOR_LEN;
624
- const ret = wasm.languageservice_get_completions(this.ptr, ptr0, len0, offset);
641
+ const ret = wasm.languageservice_get_completions(this.__wbg_ptr, ptr0, len0, offset);
625
642
  return takeObject(ret);
626
643
  }
627
644
  /**
@@ -632,7 +649,7 @@ export class LanguageService {
632
649
  get_definition(uri, offset) {
633
650
  const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
634
651
  const len0 = WASM_VECTOR_LEN;
635
- const ret = wasm.languageservice_get_definition(this.ptr, ptr0, len0, offset);
652
+ const ret = wasm.languageservice_get_definition(this.__wbg_ptr, ptr0, len0, offset);
636
653
  return takeObject(ret);
637
654
  }
638
655
  /**
@@ -643,7 +660,7 @@ export class LanguageService {
643
660
  get_hover(uri, offset) {
644
661
  const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
645
662
  const len0 = WASM_VECTOR_LEN;
646
- const ret = wasm.languageservice_get_hover(this.ptr, ptr0, len0, offset);
663
+ const ret = wasm.languageservice_get_hover(this.__wbg_ptr, ptr0, len0, offset);
647
664
  return takeObject(ret);
648
665
  }
649
666
  /**
@@ -654,7 +671,7 @@ export class LanguageService {
654
671
  get_signature_help(uri, offset) {
655
672
  const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
656
673
  const len0 = WASM_VECTOR_LEN;
657
- const ret = wasm.languageservice_get_signature_help(this.ptr, ptr0, len0, offset);
674
+ const ret = wasm.languageservice_get_signature_help(this.__wbg_ptr, ptr0, len0, offset);
658
675
  return takeObject(ret);
659
676
  }
660
677
  /**
@@ -668,7 +685,7 @@ export class LanguageService {
668
685
  const len0 = WASM_VECTOR_LEN;
669
686
  const ptr1 = passStringToWasm0(new_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
670
687
  const len1 = WASM_VECTOR_LEN;
671
- const ret = wasm.languageservice_get_rename(this.ptr, ptr0, len0, offset, ptr1, len1);
688
+ const ret = wasm.languageservice_get_rename(this.__wbg_ptr, ptr0, len0, offset, ptr1, len1);
672
689
  return takeObject(ret);
673
690
  }
674
691
  /**
@@ -679,12 +696,12 @@ export class LanguageService {
679
696
  prepare_rename(uri, offset) {
680
697
  const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
681
698
  const len0 = WASM_VECTOR_LEN;
682
- const ret = wasm.languageservice_prepare_rename(this.ptr, ptr0, len0, offset);
699
+ const ret = wasm.languageservice_prepare_rename(this.__wbg_ptr, ptr0, len0, offset);
683
700
  return takeObject(ret);
684
701
  }
685
702
  }
686
703
 
687
- async function load(module, imports) {
704
+ async function __wbg_load(module, imports) {
688
705
  if (typeof Response === 'function' && module instanceof Response) {
689
706
  if (typeof WebAssembly.instantiateStreaming === 'function') {
690
707
  try {
@@ -715,36 +732,20 @@ async function load(module, imports) {
715
732
  }
716
733
  }
717
734
 
718
- function getImports() {
735
+ function __wbg_get_imports() {
719
736
  const imports = {};
720
737
  imports.wbg = {};
721
738
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
722
739
  takeObject(arg0);
723
740
  };
724
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
725
- const ret = getStringFromWasm0(arg0, arg1);
741
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
742
+ const ret = BigInt.asUintN(64, arg0);
726
743
  return addHeapObject(ret);
727
744
  };
728
- imports.wbg.__wbindgen_is_function = function(arg0) {
729
- const ret = typeof(getObject(arg0)) === 'function';
730
- return ret;
731
- };
732
745
  imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
733
746
  const ret = new Error(getStringFromWasm0(arg0, arg1));
734
747
  return addHeapObject(ret);
735
748
  };
736
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
737
- const ret = BigInt.asUintN(64, arg0);
738
- return addHeapObject(ret);
739
- };
740
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
741
- const obj = getObject(arg1);
742
- const ret = typeof(obj) === 'string' ? obj : undefined;
743
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
744
- var len0 = WASM_VECTOR_LEN;
745
- getInt32Memory0()[arg0 / 4 + 1] = len0;
746
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
747
- };
748
749
  imports.wbg.__wbindgen_is_object = function(arg0) {
749
750
  const val = getObject(arg0);
750
751
  const ret = typeof(val) === 'object' && val !== null;
@@ -758,24 +759,40 @@ function getImports() {
758
759
  const ret = getObject(arg0) in getObject(arg1);
759
760
  return ret;
760
761
  };
761
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
762
- const ret = getObject(arg0);
763
- return addHeapObject(ret);
762
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
763
+ const obj = getObject(arg1);
764
+ const ret = typeof(obj) === 'string' ? obj : undefined;
765
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
766
+ var len1 = WASM_VECTOR_LEN;
767
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
768
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
764
769
  };
765
770
  imports.wbg.__wbindgen_number_new = function(arg0) {
766
771
  const ret = arg0;
767
772
  return addHeapObject(ret);
768
773
  };
774
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
775
+ const ret = getStringFromWasm0(arg0, arg1);
776
+ return addHeapObject(ret);
777
+ };
769
778
  imports.wbg.__wbg_new_0232637a3cb0b1a7 = function() {
770
779
  const ret = new Error();
771
780
  return addHeapObject(ret);
772
781
  };
773
782
  imports.wbg.__wbg_stack_3090cd8fd3702c6e = function(arg0, arg1) {
774
783
  const ret = getObject(arg1).stack;
775
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
776
- const len0 = WASM_VECTOR_LEN;
777
- getInt32Memory0()[arg0 / 4 + 1] = len0;
778
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
784
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
785
+ const len1 = WASM_VECTOR_LEN;
786
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
787
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
788
+ };
789
+ imports.wbg.__wbindgen_is_function = function(arg0) {
790
+ const ret = typeof(getObject(arg0)) === 'function';
791
+ return ret;
792
+ };
793
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
794
+ const ret = getObject(arg0);
795
+ return addHeapObject(ret);
779
796
  };
780
797
  imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
781
798
  const ret = getObject(arg0) == getObject(arg1);
@@ -792,26 +809,32 @@ function getImports() {
792
809
  getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
793
810
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
794
811
  };
795
- imports.wbg.__wbg_getwithrefkey_5e6d9547403deab8 = function(arg0, arg1) {
812
+ imports.wbg.__wbg_getwithrefkey_d1f0d12f1f1b63ea = function(arg0, arg1) {
796
813
  const ret = getObject(arg0)[getObject(arg1)];
797
814
  return addHeapObject(ret);
798
815
  };
799
- imports.wbg.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
816
+ imports.wbg.__wbg_set_bd72c078edfa51ad = function(arg0, arg1, arg2) {
800
817
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
801
818
  };
802
- imports.wbg.__wbg_crypto_e1d53a1d73fb10b8 = function(arg0) {
819
+ imports.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) {
820
+ getObject(arg0).getRandomValues(getObject(arg1));
821
+ }, arguments) };
822
+ imports.wbg.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) {
823
+ getObject(arg0).randomFillSync(takeObject(arg1));
824
+ }, arguments) };
825
+ imports.wbg.__wbg_crypto_c48a774b022d20ac = function(arg0) {
803
826
  const ret = getObject(arg0).crypto;
804
827
  return addHeapObject(ret);
805
828
  };
806
- imports.wbg.__wbg_process_038c26bf42b093f8 = function(arg0) {
829
+ imports.wbg.__wbg_process_298734cf255a885d = function(arg0) {
807
830
  const ret = getObject(arg0).process;
808
831
  return addHeapObject(ret);
809
832
  };
810
- imports.wbg.__wbg_versions_ab37218d2f0b24a8 = function(arg0) {
833
+ imports.wbg.__wbg_versions_e2e78e134e3e5d01 = function(arg0) {
811
834
  const ret = getObject(arg0).versions;
812
835
  return addHeapObject(ret);
813
836
  };
814
- imports.wbg.__wbg_node_080f4b19d15bc1fe = function(arg0) {
837
+ imports.wbg.__wbg_node_1cd7a5d853dbea79 = function(arg0) {
815
838
  const ret = getObject(arg0).node;
816
839
  return addHeapObject(ret);
817
840
  };
@@ -819,92 +842,70 @@ function getImports() {
819
842
  const ret = typeof(getObject(arg0)) === 'string';
820
843
  return ret;
821
844
  };
822
- imports.wbg.__wbg_msCrypto_6e7d3e1f92610cbb = function(arg0) {
845
+ imports.wbg.__wbg_msCrypto_bcb970640f50a1e8 = function(arg0) {
823
846
  const ret = getObject(arg0).msCrypto;
824
847
  return addHeapObject(ret);
825
848
  };
826
- imports.wbg.__wbg_require_78a3dcfbdba9cbce = function() { return handleError(function () {
849
+ imports.wbg.__wbg_require_8f08ceecec0f4fee = function() { return handleError(function () {
827
850
  const ret = module.require;
828
851
  return addHeapObject(ret);
829
852
  }, arguments) };
830
- imports.wbg.__wbg_randomFillSync_6894564c2c334c42 = function() { return handleError(function (arg0, arg1, arg2) {
831
- getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
832
- }, arguments) };
833
- imports.wbg.__wbg_getRandomValues_805f1c3d65988a5a = function() { return handleError(function (arg0, arg1) {
834
- getObject(arg0).getRandomValues(getObject(arg1));
835
- }, arguments) };
836
- imports.wbg.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) {
853
+ imports.wbg.__wbg_get_44be0491f933a435 = function(arg0, arg1) {
837
854
  const ret = getObject(arg0)[arg1 >>> 0];
838
855
  return addHeapObject(ret);
839
856
  };
840
- imports.wbg.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
857
+ imports.wbg.__wbg_length_fff51ee6522a1a18 = function(arg0) {
841
858
  const ret = getObject(arg0).length;
842
859
  return ret;
843
860
  };
844
- imports.wbg.__wbg_new_b525de17f44a8943 = function() {
861
+ imports.wbg.__wbg_new_898a68150f225f2e = function() {
845
862
  const ret = new Array();
846
863
  return addHeapObject(ret);
847
864
  };
848
- imports.wbg.__wbg_newnoargs_2b8b6bd7753c76ba = function(arg0, arg1) {
865
+ imports.wbg.__wbg_newnoargs_581967eacc0e2604 = function(arg0, arg1) {
849
866
  const ret = new Function(getStringFromWasm0(arg0, arg1));
850
867
  return addHeapObject(ret);
851
868
  };
852
- imports.wbg.__wbg_next_b7d530c04fd8b217 = function(arg0) {
869
+ imports.wbg.__wbg_next_526fc47e980da008 = function(arg0) {
853
870
  const ret = getObject(arg0).next;
854
871
  return addHeapObject(ret);
855
872
  };
856
- imports.wbg.__wbg_next_88560ec06a094dea = function() { return handleError(function (arg0) {
873
+ imports.wbg.__wbg_next_ddb3312ca1c4e32a = function() { return handleError(function (arg0) {
857
874
  const ret = getObject(arg0).next();
858
875
  return addHeapObject(ret);
859
876
  }, arguments) };
860
- imports.wbg.__wbg_done_1ebec03bbd919843 = function(arg0) {
877
+ imports.wbg.__wbg_done_5c1f01fb660d73b5 = function(arg0) {
861
878
  const ret = getObject(arg0).done;
862
879
  return ret;
863
880
  };
864
- imports.wbg.__wbg_value_6ac8da5cc5b3efda = function(arg0) {
881
+ imports.wbg.__wbg_value_1695675138684bd5 = function(arg0) {
865
882
  const ret = getObject(arg0).value;
866
883
  return addHeapObject(ret);
867
884
  };
868
- imports.wbg.__wbg_iterator_55f114446221aa5a = function() {
885
+ imports.wbg.__wbg_iterator_97f0c81209c6c35a = function() {
869
886
  const ret = Symbol.iterator;
870
887
  return addHeapObject(ret);
871
888
  };
872
- imports.wbg.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
889
+ imports.wbg.__wbg_get_97b561fb56f034b5 = function() { return handleError(function (arg0, arg1) {
873
890
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
874
891
  return addHeapObject(ret);
875
892
  }, arguments) };
876
- imports.wbg.__wbg_call_95d1ea488d03e4e8 = function() { return handleError(function (arg0, arg1) {
893
+ imports.wbg.__wbg_call_cb65541d95d71282 = function() { return handleError(function (arg0, arg1) {
877
894
  const ret = getObject(arg0).call(getObject(arg1));
878
895
  return addHeapObject(ret);
879
896
  }, arguments) };
880
- imports.wbg.__wbg_new_f9876326328f45ed = function() {
897
+ imports.wbg.__wbg_new_b51585de1b234aff = function() {
881
898
  const ret = new Object();
882
899
  return addHeapObject(ret);
883
900
  };
884
- imports.wbg.__wbg_self_e7c1f827057f6584 = function() { return handleError(function () {
885
- const ret = self.self;
886
- return addHeapObject(ret);
887
- }, arguments) };
888
- imports.wbg.__wbg_window_a09ec664e14b1b81 = function() { return handleError(function () {
889
- const ret = window.window;
890
- return addHeapObject(ret);
891
- }, arguments) };
892
- imports.wbg.__wbg_globalThis_87cbb8506fecf3a9 = function() { return handleError(function () {
893
- const ret = globalThis.globalThis;
894
- return addHeapObject(ret);
895
- }, arguments) };
896
- imports.wbg.__wbg_global_c85a9259e621f3db = function() { return handleError(function () {
897
- const ret = global.global;
898
- return addHeapObject(ret);
899
- }, arguments) };
900
- imports.wbg.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
901
+ imports.wbg.__wbg_set_502d29070ea18557 = function(arg0, arg1, arg2) {
901
902
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
902
903
  };
903
- imports.wbg.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
904
+ imports.wbg.__wbg_isArray_4c24b343cb13cfb1 = function(arg0) {
904
905
  const ret = Array.isArray(getObject(arg0));
905
906
  return ret;
906
907
  };
907
- imports.wbg.__wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065 = function(arg0) {
908
+ imports.wbg.__wbg_instanceof_ArrayBuffer_39ac22089b74fddb = function(arg0) {
908
909
  let result;
909
910
  try {
910
911
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -914,30 +915,50 @@ function getImports() {
914
915
  const ret = result;
915
916
  return ret;
916
917
  };
917
- imports.wbg.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
918
+ imports.wbg.__wbg_call_01734de55d61e11d = function() { return handleError(function (arg0, arg1, arg2) {
918
919
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
919
920
  return addHeapObject(ret);
920
921
  }, arguments) };
921
- imports.wbg.__wbg_call_99043a1e2a9e5916 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
922
+ imports.wbg.__wbg_call_776890ca77946e2f = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
922
923
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
923
924
  return addHeapObject(ret);
924
925
  }, arguments) };
925
- imports.wbg.__wbg_buffer_cf65c07de34b9a08 = function(arg0) {
926
+ imports.wbg.__wbg_buffer_085ec1f694018c4f = function(arg0) {
926
927
  const ret = getObject(arg0).buffer;
927
928
  return addHeapObject(ret);
928
929
  };
929
- imports.wbg.__wbg_new_537b7341ce90bb31 = function(arg0) {
930
+ imports.wbg.__wbg_self_1ff1d729e9aae938 = function() { return handleError(function () {
931
+ const ret = self.self;
932
+ return addHeapObject(ret);
933
+ }, arguments) };
934
+ imports.wbg.__wbg_window_5f4faef6c12b79ec = function() { return handleError(function () {
935
+ const ret = window.window;
936
+ return addHeapObject(ret);
937
+ }, arguments) };
938
+ imports.wbg.__wbg_globalThis_1d39714405582d3c = function() { return handleError(function () {
939
+ const ret = globalThis.globalThis;
940
+ return addHeapObject(ret);
941
+ }, arguments) };
942
+ imports.wbg.__wbg_global_651f05c6a0944d1c = function() { return handleError(function () {
943
+ const ret = global.global;
944
+ return addHeapObject(ret);
945
+ }, arguments) };
946
+ imports.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = function(arg0, arg1, arg2) {
947
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
948
+ return addHeapObject(ret);
949
+ };
950
+ imports.wbg.__wbg_new_8125e318e6245eed = function(arg0) {
930
951
  const ret = new Uint8Array(getObject(arg0));
931
952
  return addHeapObject(ret);
932
953
  };
933
- imports.wbg.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) {
954
+ imports.wbg.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) {
934
955
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
935
956
  };
936
- imports.wbg.__wbg_length_27a2afe8ab42b09f = function(arg0) {
957
+ imports.wbg.__wbg_length_72e2208bbc0efc61 = function(arg0) {
937
958
  const ret = getObject(arg0).length;
938
959
  return ret;
939
960
  };
940
- imports.wbg.__wbg_instanceof_Uint8Array_01cebe79ca606cca = function(arg0) {
961
+ imports.wbg.__wbg_instanceof_Uint8Array_d8d9cb2b8e8ac1d4 = function(arg0) {
941
962
  let result;
942
963
  try {
943
964
  result = getObject(arg0) instanceof Uint8Array;
@@ -947,20 +968,20 @@ function getImports() {
947
968
  const ret = result;
948
969
  return ret;
949
970
  };
950
- imports.wbg.__wbg_newwithlength_b56c882b57805732 = function(arg0) {
971
+ imports.wbg.__wbg_newwithlength_e5d69174d6984cd7 = function(arg0) {
951
972
  const ret = new Uint8Array(arg0 >>> 0);
952
973
  return addHeapObject(ret);
953
974
  };
954
- imports.wbg.__wbg_subarray_7526649b91a252a6 = function(arg0, arg1, arg2) {
975
+ imports.wbg.__wbg_subarray_13db269f57aa838d = function(arg0, arg1, arg2) {
955
976
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
956
977
  return addHeapObject(ret);
957
978
  };
958
979
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
959
980
  const ret = debugString(getObject(arg1));
960
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
961
- const len0 = WASM_VECTOR_LEN;
962
- getInt32Memory0()[arg0 / 4 + 1] = len0;
963
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
981
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
982
+ const len1 = WASM_VECTOR_LEN;
983
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
984
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
964
985
  };
965
986
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
966
987
  throw new Error(getStringFromWasm0(arg0, arg1));
@@ -973,13 +994,13 @@ function getImports() {
973
994
  return imports;
974
995
  }
975
996
 
976
- function initMemory(imports, maybe_memory) {
997
+ function __wbg_init_memory(imports, maybe_memory) {
977
998
 
978
999
  }
979
1000
 
980
- function finalizeInit(instance, module) {
1001
+ function __wbg_finalize_init(instance, module) {
981
1002
  wasm = instance.exports;
982
- init.__wbindgen_wasm_module = module;
1003
+ __wbg_init.__wbindgen_wasm_module = module;
983
1004
  cachedFloat64Memory0 = null;
984
1005
  cachedInt32Memory0 = null;
985
1006
  cachedUint32Memory0 = null;
@@ -990,9 +1011,11 @@ function finalizeInit(instance, module) {
990
1011
  }
991
1012
 
992
1013
  function initSync(module) {
993
- const imports = getImports();
1014
+ if (wasm !== undefined) return wasm;
994
1015
 
995
- initMemory(imports);
1016
+ const imports = __wbg_get_imports();
1017
+
1018
+ __wbg_init_memory(imports);
996
1019
 
997
1020
  if (!(module instanceof WebAssembly.Module)) {
998
1021
  module = new WebAssembly.Module(module);
@@ -1000,25 +1023,27 @@ function initSync(module) {
1000
1023
 
1001
1024
  const instance = new WebAssembly.Instance(module, imports);
1002
1025
 
1003
- return finalizeInit(instance, module);
1026
+ return __wbg_finalize_init(instance, module);
1004
1027
  }
1005
1028
 
1006
- async function init(input) {
1029
+ async function __wbg_init(input) {
1030
+ if (wasm !== undefined) return wasm;
1031
+
1007
1032
  if (typeof input === 'undefined') {
1008
1033
  input = new URL('qsc_wasm_bg.wasm', import.meta.url);
1009
1034
  }
1010
- const imports = getImports();
1035
+ const imports = __wbg_get_imports();
1011
1036
 
1012
1037
  if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
1013
1038
  input = fetch(input);
1014
1039
  }
1015
1040
 
1016
- initMemory(imports);
1041
+ __wbg_init_memory(imports);
1017
1042
 
1018
- const { instance, module } = await load(await input, imports);
1043
+ const { instance, module } = await __wbg_load(await input, imports);
1019
1044
 
1020
- return finalizeInit(instance, module);
1045
+ return __wbg_finalize_init(instance, module);
1021
1046
  }
1022
1047
 
1023
1048
  export { initSync }
1024
- export default init;
1049
+ export default __wbg_init;