qsharp-lang 0.1.0-dev.1
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/LICENSE.txt +21 -0
- package/README.md +74 -0
- package/dist/browser.d.ts +26 -0
- package/dist/browser.js +156 -0
- package/dist/cancellation.d.ts +10 -0
- package/dist/cancellation.js +31 -0
- package/dist/compiler/common.d.ts +31 -0
- package/dist/compiler/common.js +47 -0
- package/dist/compiler/compiler.d.ts +28 -0
- package/dist/compiler/compiler.js +62 -0
- package/dist/compiler/events.d.ts +54 -0
- package/dist/compiler/events.js +92 -0
- package/dist/compiler/worker-browser.d.ts +1 -0
- package/dist/compiler/worker-browser.js +43 -0
- package/dist/compiler/worker-node.d.ts +1 -0
- package/dist/compiler/worker-node.js +41 -0
- package/dist/compiler/worker-proxy.d.ts +7 -0
- package/dist/compiler/worker-proxy.js +16 -0
- package/dist/debug-service/debug-service.d.ts +35 -0
- package/dist/debug-service/debug-service.js +136 -0
- package/dist/debug-service/worker-browser.d.ts +1 -0
- package/dist/debug-service/worker-browser.js +32 -0
- package/dist/debug-service/worker-node.d.ts +1 -0
- package/dist/debug-service/worker-node.js +30 -0
- package/dist/debug-service/worker-proxy.d.ts +7 -0
- package/dist/debug-service/worker-proxy.js +22 -0
- package/dist/katas-content.generated.d.ts +61 -0
- package/dist/katas-content.generated.js +2499 -0
- package/dist/katas.d.ts +55 -0
- package/dist/katas.js +16 -0
- package/dist/language-service/language-service.d.ts +48 -0
- package/dist/language-service/language-service.js +85 -0
- package/dist/language-service/worker-browser.d.ts +1 -0
- package/dist/language-service/worker-browser.js +32 -0
- package/dist/language-service/worker-node.d.ts +1 -0
- package/dist/language-service/worker-node.js +30 -0
- package/dist/language-service/worker-proxy.d.ts +6 -0
- package/dist/language-service/worker-proxy.js +20 -0
- package/dist/log.d.ts +33 -0
- package/dist/log.js +92 -0
- package/dist/main.d.ts +11 -0
- package/dist/main.js +82 -0
- package/dist/samples.generated.d.ts +6 -0
- package/dist/samples.generated.js +62 -0
- package/dist/vsdiagnostic.d.ts +27 -0
- package/dist/vsdiagnostic.js +117 -0
- package/dist/worker-proxy.d.ts +95 -0
- package/dist/worker-proxy.js +226 -0
- package/lib/node/qsc_wasm.cjs +1010 -0
- package/lib/node/qsc_wasm.d.cts +266 -0
- package/lib/node/qsc_wasm_bg.wasm +0 -0
- package/lib/web/qsc_wasm.d.ts +328 -0
- package/lib/web/qsc_wasm.js +1026 -0
- package/lib/web/qsc_wasm_bg.wasm +0 -0
- package/package.json +35 -0
|
@@ -0,0 +1,1010 @@
|
|
|
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
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function addHeapObject(obj) {
|
|
44
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
45
|
+
const idx = heap_next;
|
|
46
|
+
heap_next = heap[idx];
|
|
47
|
+
|
|
48
|
+
heap[idx] = obj;
|
|
49
|
+
return idx;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
let WASM_VECTOR_LEN = 0;
|
|
53
|
+
|
|
54
|
+
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
55
|
+
|
|
56
|
+
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
57
|
+
? function (arg, view) {
|
|
58
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
59
|
+
}
|
|
60
|
+
: function (arg, view) {
|
|
61
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
62
|
+
view.set(buf);
|
|
63
|
+
return {
|
|
64
|
+
read: arg.length,
|
|
65
|
+
written: buf.length
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
70
|
+
|
|
71
|
+
if (realloc === undefined) {
|
|
72
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
73
|
+
const ptr = malloc(buf.length);
|
|
74
|
+
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
75
|
+
WASM_VECTOR_LEN = buf.length;
|
|
76
|
+
return ptr;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
let len = arg.length;
|
|
80
|
+
let ptr = malloc(len);
|
|
81
|
+
|
|
82
|
+
const mem = getUint8Memory0();
|
|
83
|
+
|
|
84
|
+
let offset = 0;
|
|
85
|
+
|
|
86
|
+
for (; offset < len; offset++) {
|
|
87
|
+
const code = arg.charCodeAt(offset);
|
|
88
|
+
if (code > 0x7F) break;
|
|
89
|
+
mem[ptr + offset] = code;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (offset !== len) {
|
|
93
|
+
if (offset !== 0) {
|
|
94
|
+
arg = arg.slice(offset);
|
|
95
|
+
}
|
|
96
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3);
|
|
97
|
+
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
98
|
+
const ret = encodeString(arg, view);
|
|
99
|
+
|
|
100
|
+
offset += ret.written;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
WASM_VECTOR_LEN = offset;
|
|
104
|
+
return ptr;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function isLikeNone(x) {
|
|
108
|
+
return x === undefined || x === null;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
let cachedInt32Memory0 = null;
|
|
112
|
+
|
|
113
|
+
function getInt32Memory0() {
|
|
114
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
115
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
116
|
+
}
|
|
117
|
+
return cachedInt32Memory0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
let cachedFloat64Memory0 = null;
|
|
121
|
+
|
|
122
|
+
function getFloat64Memory0() {
|
|
123
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
124
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
125
|
+
}
|
|
126
|
+
return cachedFloat64Memory0;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function debugString(val) {
|
|
130
|
+
// primitive types
|
|
131
|
+
const type = typeof val;
|
|
132
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
133
|
+
return `${val}`;
|
|
134
|
+
}
|
|
135
|
+
if (type == 'string') {
|
|
136
|
+
return `"${val}"`;
|
|
137
|
+
}
|
|
138
|
+
if (type == 'symbol') {
|
|
139
|
+
const description = val.description;
|
|
140
|
+
if (description == null) {
|
|
141
|
+
return 'Symbol';
|
|
142
|
+
} else {
|
|
143
|
+
return `Symbol(${description})`;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
if (type == 'function') {
|
|
147
|
+
const name = val.name;
|
|
148
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
149
|
+
return `Function(${name})`;
|
|
150
|
+
} else {
|
|
151
|
+
return 'Function';
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// objects
|
|
155
|
+
if (Array.isArray(val)) {
|
|
156
|
+
const length = val.length;
|
|
157
|
+
let debug = '[';
|
|
158
|
+
if (length > 0) {
|
|
159
|
+
debug += debugString(val[0]);
|
|
160
|
+
}
|
|
161
|
+
for(let i = 1; i < length; i++) {
|
|
162
|
+
debug += ', ' + debugString(val[i]);
|
|
163
|
+
}
|
|
164
|
+
debug += ']';
|
|
165
|
+
return debug;
|
|
166
|
+
}
|
|
167
|
+
// Test for built-in
|
|
168
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
169
|
+
let className;
|
|
170
|
+
if (builtInMatches.length > 1) {
|
|
171
|
+
className = builtInMatches[1];
|
|
172
|
+
} else {
|
|
173
|
+
// Failed to match the standard '[object ClassName]'
|
|
174
|
+
return toString.call(val);
|
|
175
|
+
}
|
|
176
|
+
if (className == 'Object') {
|
|
177
|
+
// we're a user defined class or Object
|
|
178
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
179
|
+
// easier than looping through ownProperties of `val`.
|
|
180
|
+
try {
|
|
181
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
182
|
+
} catch (_) {
|
|
183
|
+
return 'Object';
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
// errors
|
|
187
|
+
if (val instanceof Error) {
|
|
188
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
189
|
+
}
|
|
190
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
191
|
+
return className;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* @param {any} callback
|
|
195
|
+
* @param {number} level
|
|
196
|
+
*/
|
|
197
|
+
module.exports.initLogging = function(callback, level) {
|
|
198
|
+
try {
|
|
199
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
200
|
+
wasm.initLogging(retptr, addHeapObject(callback), level);
|
|
201
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
202
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
203
|
+
if (r1) {
|
|
204
|
+
throw takeObject(r0);
|
|
205
|
+
}
|
|
206
|
+
} finally {
|
|
207
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* @param {number} level
|
|
213
|
+
*/
|
|
214
|
+
module.exports.setLogLevel = function(level) {
|
|
215
|
+
wasm.setLogLevel(level);
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* @returns {any}
|
|
220
|
+
*/
|
|
221
|
+
module.exports.git_hash = function() {
|
|
222
|
+
const ret = wasm.git_hash();
|
|
223
|
+
return takeObject(ret);
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @param {string} name
|
|
228
|
+
* @returns {any}
|
|
229
|
+
*/
|
|
230
|
+
module.exports.get_library_source_content = function(name) {
|
|
231
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
232
|
+
const len0 = WASM_VECTOR_LEN;
|
|
233
|
+
const ret = wasm.get_library_source_content(ptr0, len0);
|
|
234
|
+
return takeObject(ret);
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @param {string} code
|
|
239
|
+
* @returns {any}
|
|
240
|
+
*/
|
|
241
|
+
module.exports.get_hir = function(code) {
|
|
242
|
+
try {
|
|
243
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
244
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
245
|
+
const len0 = WASM_VECTOR_LEN;
|
|
246
|
+
wasm.get_hir(retptr, ptr0, len0);
|
|
247
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
248
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
249
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
250
|
+
if (r2) {
|
|
251
|
+
throw takeObject(r1);
|
|
252
|
+
}
|
|
253
|
+
return takeObject(r0);
|
|
254
|
+
} finally {
|
|
255
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
let stack_pointer = 128;
|
|
260
|
+
|
|
261
|
+
function addBorrowedObject(obj) {
|
|
262
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
263
|
+
heap[--stack_pointer] = obj;
|
|
264
|
+
return stack_pointer;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* @param {string} code
|
|
268
|
+
* @param {string} expr
|
|
269
|
+
* @param {Function} event_cb
|
|
270
|
+
* @param {number} shots
|
|
271
|
+
* @returns {any}
|
|
272
|
+
*/
|
|
273
|
+
module.exports.run = function(code, expr, event_cb, shots) {
|
|
274
|
+
try {
|
|
275
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
276
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
277
|
+
const len0 = WASM_VECTOR_LEN;
|
|
278
|
+
const ptr1 = passStringToWasm0(expr, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
279
|
+
const len1 = WASM_VECTOR_LEN;
|
|
280
|
+
wasm.run(retptr, ptr0, len0, ptr1, len1, addBorrowedObject(event_cb), shots);
|
|
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
|
+
heap[stack_pointer++] = undefined;
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* @param {string} solution_code
|
|
296
|
+
* @param {any} exercise_sources_js
|
|
297
|
+
* @param {Function} event_cb
|
|
298
|
+
* @returns {any}
|
|
299
|
+
*/
|
|
300
|
+
module.exports.check_exercise_solution = function(solution_code, exercise_sources_js, event_cb) {
|
|
301
|
+
try {
|
|
302
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
303
|
+
const ptr0 = passStringToWasm0(solution_code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
304
|
+
const len0 = WASM_VECTOR_LEN;
|
|
305
|
+
wasm.check_exercise_solution(retptr, ptr0, len0, addHeapObject(exercise_sources_js), addBorrowedObject(event_cb));
|
|
306
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
307
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
308
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
309
|
+
if (r2) {
|
|
310
|
+
throw takeObject(r1);
|
|
311
|
+
}
|
|
312
|
+
return takeObject(r0);
|
|
313
|
+
} finally {
|
|
314
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
315
|
+
heap[stack_pointer++] = undefined;
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
let cachedUint32Memory0 = null;
|
|
320
|
+
|
|
321
|
+
function getUint32Memory0() {
|
|
322
|
+
if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {
|
|
323
|
+
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
|
|
324
|
+
}
|
|
325
|
+
return cachedUint32Memory0;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
329
|
+
const ptr = malloc(arg.length * 4);
|
|
330
|
+
getUint32Memory0().set(arg, ptr / 4);
|
|
331
|
+
WASM_VECTOR_LEN = arg.length;
|
|
332
|
+
return ptr;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
function handleError(f, args) {
|
|
336
|
+
try {
|
|
337
|
+
return f.apply(this, args);
|
|
338
|
+
} catch (e) {
|
|
339
|
+
wasm.__wbindgen_export_3(addHeapObject(e));
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
344
|
+
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
*/
|
|
348
|
+
module.exports.StepResultId = Object.freeze({ BreakpointHit:0,"0":"BreakpointHit",Next:1,"1":"Next",StepIn:2,"2":"StepIn",StepOut:3,"3":"StepOut",Return:4,"4":"Return", });
|
|
349
|
+
/**
|
|
350
|
+
*/
|
|
351
|
+
class DebugService {
|
|
352
|
+
|
|
353
|
+
static __wrap(ptr) {
|
|
354
|
+
const obj = Object.create(DebugService.prototype);
|
|
355
|
+
obj.ptr = ptr;
|
|
356
|
+
|
|
357
|
+
return obj;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
__destroy_into_raw() {
|
|
361
|
+
const ptr = this.ptr;
|
|
362
|
+
this.ptr = 0;
|
|
363
|
+
|
|
364
|
+
return ptr;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
free() {
|
|
368
|
+
const ptr = this.__destroy_into_raw();
|
|
369
|
+
wasm.__wbg_debugservice_free(ptr);
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
*/
|
|
373
|
+
constructor() {
|
|
374
|
+
const ret = wasm.debugservice_new();
|
|
375
|
+
return DebugService.__wrap(ret);
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* @param {string} path
|
|
379
|
+
* @param {string} source
|
|
380
|
+
* @param {string | undefined} entry
|
|
381
|
+
* @returns {string}
|
|
382
|
+
*/
|
|
383
|
+
load_source(path, source, entry) {
|
|
384
|
+
try {
|
|
385
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
386
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
387
|
+
const len0 = WASM_VECTOR_LEN;
|
|
388
|
+
const ptr1 = passStringToWasm0(source, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
389
|
+
const len1 = WASM_VECTOR_LEN;
|
|
390
|
+
var ptr2 = isLikeNone(entry) ? 0 : passStringToWasm0(entry, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
391
|
+
var len2 = WASM_VECTOR_LEN;
|
|
392
|
+
wasm.debugservice_load_source(retptr, this.ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
393
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
394
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
395
|
+
return getStringFromWasm0(r0, r1);
|
|
396
|
+
} finally {
|
|
397
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
398
|
+
wasm.__wbindgen_export_2(r0, r1);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* @returns {any}
|
|
403
|
+
*/
|
|
404
|
+
capture_quantum_state() {
|
|
405
|
+
const ret = wasm.debugservice_capture_quantum_state(this.ptr);
|
|
406
|
+
return takeObject(ret);
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* @returns {any}
|
|
410
|
+
*/
|
|
411
|
+
get_stack_frames() {
|
|
412
|
+
const ret = wasm.debugservice_get_stack_frames(this.ptr);
|
|
413
|
+
return takeObject(ret);
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* @param {Function} event_cb
|
|
417
|
+
* @param {Uint32Array} ids
|
|
418
|
+
* @returns {any}
|
|
419
|
+
*/
|
|
420
|
+
eval_next(event_cb, ids) {
|
|
421
|
+
try {
|
|
422
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
423
|
+
const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export_0);
|
|
424
|
+
const len0 = WASM_VECTOR_LEN;
|
|
425
|
+
wasm.debugservice_eval_next(retptr, this.ptr, addBorrowedObject(event_cb), ptr0, len0);
|
|
426
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
427
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
428
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
429
|
+
if (r2) {
|
|
430
|
+
throw takeObject(r1);
|
|
431
|
+
}
|
|
432
|
+
return takeObject(r0);
|
|
433
|
+
} finally {
|
|
434
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
435
|
+
heap[stack_pointer++] = undefined;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* @param {Function} event_cb
|
|
440
|
+
* @param {Uint32Array} ids
|
|
441
|
+
* @returns {any}
|
|
442
|
+
*/
|
|
443
|
+
eval_continue(event_cb, ids) {
|
|
444
|
+
try {
|
|
445
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
446
|
+
const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export_0);
|
|
447
|
+
const len0 = WASM_VECTOR_LEN;
|
|
448
|
+
wasm.debugservice_eval_continue(retptr, this.ptr, addBorrowedObject(event_cb), ptr0, len0);
|
|
449
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
450
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
451
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
452
|
+
if (r2) {
|
|
453
|
+
throw takeObject(r1);
|
|
454
|
+
}
|
|
455
|
+
return takeObject(r0);
|
|
456
|
+
} finally {
|
|
457
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
458
|
+
heap[stack_pointer++] = undefined;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* @param {Function} event_cb
|
|
463
|
+
* @param {Uint32Array} ids
|
|
464
|
+
* @returns {any}
|
|
465
|
+
*/
|
|
466
|
+
eval_step_in(event_cb, ids) {
|
|
467
|
+
try {
|
|
468
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
469
|
+
const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export_0);
|
|
470
|
+
const len0 = WASM_VECTOR_LEN;
|
|
471
|
+
wasm.debugservice_eval_step_in(retptr, this.ptr, addBorrowedObject(event_cb), ptr0, len0);
|
|
472
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
473
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
474
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
475
|
+
if (r2) {
|
|
476
|
+
throw takeObject(r1);
|
|
477
|
+
}
|
|
478
|
+
return takeObject(r0);
|
|
479
|
+
} finally {
|
|
480
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
481
|
+
heap[stack_pointer++] = undefined;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* @param {Function} event_cb
|
|
486
|
+
* @param {Uint32Array} ids
|
|
487
|
+
* @returns {any}
|
|
488
|
+
*/
|
|
489
|
+
eval_step_out(event_cb, ids) {
|
|
490
|
+
try {
|
|
491
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
492
|
+
const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export_0);
|
|
493
|
+
const len0 = WASM_VECTOR_LEN;
|
|
494
|
+
wasm.debugservice_eval_step_out(retptr, this.ptr, addBorrowedObject(event_cb), ptr0, len0);
|
|
495
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
496
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
497
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
498
|
+
if (r2) {
|
|
499
|
+
throw takeObject(r1);
|
|
500
|
+
}
|
|
501
|
+
return takeObject(r0);
|
|
502
|
+
} finally {
|
|
503
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
504
|
+
heap[stack_pointer++] = undefined;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* @param {string} path
|
|
509
|
+
* @returns {any}
|
|
510
|
+
*/
|
|
511
|
+
get_breakpoints(path) {
|
|
512
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
513
|
+
const len0 = WASM_VECTOR_LEN;
|
|
514
|
+
const ret = wasm.debugservice_get_breakpoints(this.ptr, ptr0, len0);
|
|
515
|
+
return takeObject(ret);
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* @returns {any}
|
|
519
|
+
*/
|
|
520
|
+
get_locals() {
|
|
521
|
+
const ret = wasm.debugservice_get_locals(this.ptr);
|
|
522
|
+
return takeObject(ret);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
module.exports.DebugService = DebugService;
|
|
526
|
+
/**
|
|
527
|
+
*/
|
|
528
|
+
class LanguageService {
|
|
529
|
+
|
|
530
|
+
static __wrap(ptr) {
|
|
531
|
+
const obj = Object.create(LanguageService.prototype);
|
|
532
|
+
obj.ptr = ptr;
|
|
533
|
+
|
|
534
|
+
return obj;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
__destroy_into_raw() {
|
|
538
|
+
const ptr = this.ptr;
|
|
539
|
+
this.ptr = 0;
|
|
540
|
+
|
|
541
|
+
return ptr;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
free() {
|
|
545
|
+
const ptr = this.__destroy_into_raw();
|
|
546
|
+
wasm.__wbg_languageservice_free(ptr);
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* @param {Function} diagnostics_callback
|
|
550
|
+
*/
|
|
551
|
+
constructor(diagnostics_callback) {
|
|
552
|
+
try {
|
|
553
|
+
const ret = wasm.languageservice_new(addBorrowedObject(diagnostics_callback));
|
|
554
|
+
return LanguageService.__wrap(ret);
|
|
555
|
+
} finally {
|
|
556
|
+
heap[stack_pointer++] = undefined;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* @param {string} uri
|
|
561
|
+
* @param {number} version
|
|
562
|
+
* @param {string} text
|
|
563
|
+
* @param {boolean} is_exe
|
|
564
|
+
*/
|
|
565
|
+
update_document(uri, version, text, is_exe) {
|
|
566
|
+
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
567
|
+
const len0 = WASM_VECTOR_LEN;
|
|
568
|
+
const ptr1 = passStringToWasm0(text, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
569
|
+
const len1 = WASM_VECTOR_LEN;
|
|
570
|
+
wasm.languageservice_update_document(this.ptr, ptr0, len0, version, ptr1, len1, is_exe);
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* @param {string} uri
|
|
574
|
+
*/
|
|
575
|
+
close_document(uri) {
|
|
576
|
+
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
577
|
+
const len0 = WASM_VECTOR_LEN;
|
|
578
|
+
wasm.languageservice_close_document(this.ptr, ptr0, len0);
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* @param {string} uri
|
|
582
|
+
* @param {number} offset
|
|
583
|
+
* @returns {any}
|
|
584
|
+
*/
|
|
585
|
+
get_completions(uri, offset) {
|
|
586
|
+
try {
|
|
587
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
588
|
+
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
589
|
+
const len0 = WASM_VECTOR_LEN;
|
|
590
|
+
wasm.languageservice_get_completions(retptr, this.ptr, ptr0, len0, offset);
|
|
591
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
592
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
593
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
594
|
+
if (r2) {
|
|
595
|
+
throw takeObject(r1);
|
|
596
|
+
}
|
|
597
|
+
return takeObject(r0);
|
|
598
|
+
} finally {
|
|
599
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* @param {string} uri
|
|
604
|
+
* @param {number} offset
|
|
605
|
+
* @returns {any}
|
|
606
|
+
*/
|
|
607
|
+
get_definition(uri, offset) {
|
|
608
|
+
try {
|
|
609
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
610
|
+
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
611
|
+
const len0 = WASM_VECTOR_LEN;
|
|
612
|
+
wasm.languageservice_get_definition(retptr, this.ptr, ptr0, len0, offset);
|
|
613
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
614
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
615
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
616
|
+
if (r2) {
|
|
617
|
+
throw takeObject(r1);
|
|
618
|
+
}
|
|
619
|
+
return takeObject(r0);
|
|
620
|
+
} finally {
|
|
621
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* @param {string} uri
|
|
626
|
+
* @param {number} offset
|
|
627
|
+
* @returns {any}
|
|
628
|
+
*/
|
|
629
|
+
get_hover(uri, offset) {
|
|
630
|
+
try {
|
|
631
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
632
|
+
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
633
|
+
const len0 = WASM_VECTOR_LEN;
|
|
634
|
+
wasm.languageservice_get_hover(retptr, this.ptr, ptr0, len0, offset);
|
|
635
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
636
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
637
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
638
|
+
if (r2) {
|
|
639
|
+
throw takeObject(r1);
|
|
640
|
+
}
|
|
641
|
+
return takeObject(r0);
|
|
642
|
+
} finally {
|
|
643
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
module.exports.LanguageService = LanguageService;
|
|
648
|
+
/**
|
|
649
|
+
*/
|
|
650
|
+
class StructStepResult {
|
|
651
|
+
|
|
652
|
+
static __wrap(ptr) {
|
|
653
|
+
const obj = Object.create(StructStepResult.prototype);
|
|
654
|
+
obj.ptr = ptr;
|
|
655
|
+
|
|
656
|
+
return obj;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
__destroy_into_raw() {
|
|
660
|
+
const ptr = this.ptr;
|
|
661
|
+
this.ptr = 0;
|
|
662
|
+
|
|
663
|
+
return ptr;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
free() {
|
|
667
|
+
const ptr = this.__destroy_into_raw();
|
|
668
|
+
wasm.__wbg_structstepresult_free(ptr);
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* @returns {number}
|
|
672
|
+
*/
|
|
673
|
+
get id() {
|
|
674
|
+
const ret = wasm.__wbg_get_structstepresult_id(this.ptr);
|
|
675
|
+
return ret >>> 0;
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* @param {number} arg0
|
|
679
|
+
*/
|
|
680
|
+
set id(arg0) {
|
|
681
|
+
wasm.__wbg_set_structstepresult_id(this.ptr, arg0);
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* @returns {number}
|
|
685
|
+
*/
|
|
686
|
+
get value() {
|
|
687
|
+
const ret = wasm.__wbg_get_structstepresult_value(this.ptr);
|
|
688
|
+
return ret >>> 0;
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* @param {number} arg0
|
|
692
|
+
*/
|
|
693
|
+
set value(arg0) {
|
|
694
|
+
wasm.__wbg_set_structstepresult_value(this.ptr, arg0);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
module.exports.StructStepResult = StructStepResult;
|
|
698
|
+
|
|
699
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
700
|
+
takeObject(arg0);
|
|
701
|
+
};
|
|
702
|
+
|
|
703
|
+
module.exports.__wbg_new_0232637a3cb0b1a7 = function() {
|
|
704
|
+
const ret = new Error();
|
|
705
|
+
return addHeapObject(ret);
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
module.exports.__wbg_stack_3090cd8fd3702c6e = function(arg0, arg1) {
|
|
709
|
+
const ret = getObject(arg1).stack;
|
|
710
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
711
|
+
const len0 = WASM_VECTOR_LEN;
|
|
712
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
713
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
714
|
+
};
|
|
715
|
+
|
|
716
|
+
module.exports.__wbindgen_is_function = function(arg0) {
|
|
717
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
718
|
+
return ret;
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
722
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
723
|
+
return addHeapObject(ret);
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
727
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
728
|
+
return addHeapObject(ret);
|
|
729
|
+
};
|
|
730
|
+
|
|
731
|
+
module.exports.__wbg_structstepresult_new = function(arg0) {
|
|
732
|
+
const ret = StructStepResult.__wrap(arg0);
|
|
733
|
+
return addHeapObject(ret);
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
737
|
+
const obj = getObject(arg1);
|
|
738
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
739
|
+
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
740
|
+
var len0 = WASM_VECTOR_LEN;
|
|
741
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
742
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
module.exports.__wbindgen_number_new = function(arg0) {
|
|
746
|
+
const ret = arg0;
|
|
747
|
+
return addHeapObject(ret);
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
751
|
+
const ret = getObject(arg0);
|
|
752
|
+
return addHeapObject(ret);
|
|
753
|
+
};
|
|
754
|
+
|
|
755
|
+
module.exports.__wbindgen_is_object = function(arg0) {
|
|
756
|
+
const val = getObject(arg0);
|
|
757
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
758
|
+
return ret;
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
762
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
763
|
+
return ret;
|
|
764
|
+
};
|
|
765
|
+
|
|
766
|
+
module.exports.__wbindgen_boolean_get = function(arg0) {
|
|
767
|
+
const v = getObject(arg0);
|
|
768
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
769
|
+
return ret;
|
|
770
|
+
};
|
|
771
|
+
|
|
772
|
+
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
773
|
+
const obj = getObject(arg1);
|
|
774
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
775
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
776
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
777
|
+
};
|
|
778
|
+
|
|
779
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
780
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
781
|
+
return addHeapObject(ret);
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
module.exports.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
|
|
785
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
786
|
+
};
|
|
787
|
+
|
|
788
|
+
module.exports.__wbg_crypto_e1d53a1d73fb10b8 = function(arg0) {
|
|
789
|
+
const ret = getObject(arg0).crypto;
|
|
790
|
+
return addHeapObject(ret);
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
module.exports.__wbg_process_038c26bf42b093f8 = function(arg0) {
|
|
794
|
+
const ret = getObject(arg0).process;
|
|
795
|
+
return addHeapObject(ret);
|
|
796
|
+
};
|
|
797
|
+
|
|
798
|
+
module.exports.__wbg_versions_ab37218d2f0b24a8 = function(arg0) {
|
|
799
|
+
const ret = getObject(arg0).versions;
|
|
800
|
+
return addHeapObject(ret);
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
module.exports.__wbg_node_080f4b19d15bc1fe = function(arg0) {
|
|
804
|
+
const ret = getObject(arg0).node;
|
|
805
|
+
return addHeapObject(ret);
|
|
806
|
+
};
|
|
807
|
+
|
|
808
|
+
module.exports.__wbindgen_is_string = function(arg0) {
|
|
809
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
810
|
+
return ret;
|
|
811
|
+
};
|
|
812
|
+
|
|
813
|
+
module.exports.__wbg_msCrypto_6e7d3e1f92610cbb = function(arg0) {
|
|
814
|
+
const ret = getObject(arg0).msCrypto;
|
|
815
|
+
return addHeapObject(ret);
|
|
816
|
+
};
|
|
817
|
+
|
|
818
|
+
module.exports.__wbg_require_78a3dcfbdba9cbce = function() { return handleError(function () {
|
|
819
|
+
const ret = module.require;
|
|
820
|
+
return addHeapObject(ret);
|
|
821
|
+
}, arguments) };
|
|
822
|
+
|
|
823
|
+
module.exports.__wbg_randomFillSync_6894564c2c334c42 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
824
|
+
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
825
|
+
}, arguments) };
|
|
826
|
+
|
|
827
|
+
module.exports.__wbg_getRandomValues_805f1c3d65988a5a = function() { return handleError(function (arg0, arg1) {
|
|
828
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
829
|
+
}, arguments) };
|
|
830
|
+
|
|
831
|
+
module.exports.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) {
|
|
832
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
833
|
+
return addHeapObject(ret);
|
|
834
|
+
};
|
|
835
|
+
|
|
836
|
+
module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
|
|
837
|
+
const ret = getObject(arg0).length;
|
|
838
|
+
return ret;
|
|
839
|
+
};
|
|
840
|
+
|
|
841
|
+
module.exports.__wbg_new_b525de17f44a8943 = function() {
|
|
842
|
+
const ret = new Array();
|
|
843
|
+
return addHeapObject(ret);
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
module.exports.__wbg_newnoargs_2b8b6bd7753c76ba = function(arg0, arg1) {
|
|
847
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
848
|
+
return addHeapObject(ret);
|
|
849
|
+
};
|
|
850
|
+
|
|
851
|
+
module.exports.__wbg_next_b7d530c04fd8b217 = function(arg0) {
|
|
852
|
+
const ret = getObject(arg0).next;
|
|
853
|
+
return addHeapObject(ret);
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
module.exports.__wbg_next_88560ec06a094dea = function() { return handleError(function (arg0) {
|
|
857
|
+
const ret = getObject(arg0).next();
|
|
858
|
+
return addHeapObject(ret);
|
|
859
|
+
}, arguments) };
|
|
860
|
+
|
|
861
|
+
module.exports.__wbg_done_1ebec03bbd919843 = function(arg0) {
|
|
862
|
+
const ret = getObject(arg0).done;
|
|
863
|
+
return ret;
|
|
864
|
+
};
|
|
865
|
+
|
|
866
|
+
module.exports.__wbg_value_6ac8da5cc5b3efda = function(arg0) {
|
|
867
|
+
const ret = getObject(arg0).value;
|
|
868
|
+
return addHeapObject(ret);
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
module.exports.__wbg_iterator_55f114446221aa5a = function() {
|
|
872
|
+
const ret = Symbol.iterator;
|
|
873
|
+
return addHeapObject(ret);
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
module.exports.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
|
|
877
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
878
|
+
return addHeapObject(ret);
|
|
879
|
+
}, arguments) };
|
|
880
|
+
|
|
881
|
+
module.exports.__wbg_call_95d1ea488d03e4e8 = function() { return handleError(function (arg0, arg1) {
|
|
882
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
883
|
+
return addHeapObject(ret);
|
|
884
|
+
}, arguments) };
|
|
885
|
+
|
|
886
|
+
module.exports.__wbg_new_f9876326328f45ed = function() {
|
|
887
|
+
const ret = new Object();
|
|
888
|
+
return addHeapObject(ret);
|
|
889
|
+
};
|
|
890
|
+
|
|
891
|
+
module.exports.__wbg_self_e7c1f827057f6584 = function() { return handleError(function () {
|
|
892
|
+
const ret = self.self;
|
|
893
|
+
return addHeapObject(ret);
|
|
894
|
+
}, arguments) };
|
|
895
|
+
|
|
896
|
+
module.exports.__wbg_window_a09ec664e14b1b81 = function() { return handleError(function () {
|
|
897
|
+
const ret = window.window;
|
|
898
|
+
return addHeapObject(ret);
|
|
899
|
+
}, arguments) };
|
|
900
|
+
|
|
901
|
+
module.exports.__wbg_globalThis_87cbb8506fecf3a9 = function() { return handleError(function () {
|
|
902
|
+
const ret = globalThis.globalThis;
|
|
903
|
+
return addHeapObject(ret);
|
|
904
|
+
}, arguments) };
|
|
905
|
+
|
|
906
|
+
module.exports.__wbg_global_c85a9259e621f3db = function() { return handleError(function () {
|
|
907
|
+
const ret = global.global;
|
|
908
|
+
return addHeapObject(ret);
|
|
909
|
+
}, arguments) };
|
|
910
|
+
|
|
911
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
912
|
+
const ret = getObject(arg0) === undefined;
|
|
913
|
+
return ret;
|
|
914
|
+
};
|
|
915
|
+
|
|
916
|
+
module.exports.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
|
|
917
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
918
|
+
};
|
|
919
|
+
|
|
920
|
+
module.exports.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
|
|
921
|
+
const ret = Array.isArray(getObject(arg0));
|
|
922
|
+
return ret;
|
|
923
|
+
};
|
|
924
|
+
|
|
925
|
+
module.exports.__wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065 = function(arg0) {
|
|
926
|
+
let result;
|
|
927
|
+
try {
|
|
928
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
929
|
+
} catch {
|
|
930
|
+
result = false;
|
|
931
|
+
}
|
|
932
|
+
const ret = result;
|
|
933
|
+
return ret;
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
module.exports.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
|
|
937
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
938
|
+
return addHeapObject(ret);
|
|
939
|
+
}, arguments) };
|
|
940
|
+
|
|
941
|
+
module.exports.__wbg_call_99043a1e2a9e5916 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
942
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
|
|
943
|
+
return addHeapObject(ret);
|
|
944
|
+
}, arguments) };
|
|
945
|
+
|
|
946
|
+
module.exports.__wbg_buffer_cf65c07de34b9a08 = function(arg0) {
|
|
947
|
+
const ret = getObject(arg0).buffer;
|
|
948
|
+
return addHeapObject(ret);
|
|
949
|
+
};
|
|
950
|
+
|
|
951
|
+
module.exports.__wbg_new_537b7341ce90bb31 = function(arg0) {
|
|
952
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
953
|
+
return addHeapObject(ret);
|
|
954
|
+
};
|
|
955
|
+
|
|
956
|
+
module.exports.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) {
|
|
957
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
958
|
+
};
|
|
959
|
+
|
|
960
|
+
module.exports.__wbg_length_27a2afe8ab42b09f = function(arg0) {
|
|
961
|
+
const ret = getObject(arg0).length;
|
|
962
|
+
return ret;
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
module.exports.__wbg_instanceof_Uint8Array_01cebe79ca606cca = function(arg0) {
|
|
966
|
+
let result;
|
|
967
|
+
try {
|
|
968
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
969
|
+
} catch {
|
|
970
|
+
result = false;
|
|
971
|
+
}
|
|
972
|
+
const ret = result;
|
|
973
|
+
return ret;
|
|
974
|
+
};
|
|
975
|
+
|
|
976
|
+
module.exports.__wbg_newwithlength_b56c882b57805732 = function(arg0) {
|
|
977
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
978
|
+
return addHeapObject(ret);
|
|
979
|
+
};
|
|
980
|
+
|
|
981
|
+
module.exports.__wbg_subarray_7526649b91a252a6 = function(arg0, arg1, arg2) {
|
|
982
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
983
|
+
return addHeapObject(ret);
|
|
984
|
+
};
|
|
985
|
+
|
|
986
|
+
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
987
|
+
const ret = debugString(getObject(arg1));
|
|
988
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
989
|
+
const len0 = WASM_VECTOR_LEN;
|
|
990
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
991
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
992
|
+
};
|
|
993
|
+
|
|
994
|
+
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
995
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
996
|
+
};
|
|
997
|
+
|
|
998
|
+
module.exports.__wbindgen_memory = function() {
|
|
999
|
+
const ret = wasm.memory;
|
|
1000
|
+
return addHeapObject(ret);
|
|
1001
|
+
};
|
|
1002
|
+
|
|
1003
|
+
const path = require('path').join(__dirname, 'qsc_wasm_bg.wasm');
|
|
1004
|
+
const bytes = require('fs').readFileSync(path);
|
|
1005
|
+
|
|
1006
|
+
const wasmModule = new WebAssembly.Module(bytes);
|
|
1007
|
+
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
1008
|
+
wasm = wasmInstance.exports;
|
|
1009
|
+
module.exports.__wasm = wasm;
|
|
1010
|
+
|