@biomejs/wasm-nodejs 0.1.0-nightly.7b90623
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/package.json +1 -0
- package/rome_wasm.d.ts +1529 -0
- package/rome_wasm.js +962 -0
- package/rome_wasm_bg.wasm +0 -0
package/rome_wasm.js
ADDED
|
@@ -0,0 +1,962 @@
|
|
|
1
|
+
let imports = {};
|
|
2
|
+
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
|
+
let wasm;
|
|
4
|
+
const { TextEncoder, TextDecoder } = 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
|
+
function addHeapObject(obj) {
|
|
27
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
28
|
+
const idx = heap_next;
|
|
29
|
+
heap_next = heap[idx];
|
|
30
|
+
|
|
31
|
+
heap[idx] = obj;
|
|
32
|
+
return idx;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function isLikeNone(x) {
|
|
36
|
+
return x === undefined || x === null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
let cachedFloat64Memory0 = null;
|
|
40
|
+
|
|
41
|
+
function getFloat64Memory0() {
|
|
42
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
43
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
44
|
+
}
|
|
45
|
+
return cachedFloat64Memory0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
let cachedInt32Memory0 = null;
|
|
49
|
+
|
|
50
|
+
function getInt32Memory0() {
|
|
51
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
52
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
53
|
+
}
|
|
54
|
+
return cachedInt32Memory0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
let WASM_VECTOR_LEN = 0;
|
|
58
|
+
|
|
59
|
+
let cachedUint8Memory0 = null;
|
|
60
|
+
|
|
61
|
+
function getUint8Memory0() {
|
|
62
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
63
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
64
|
+
}
|
|
65
|
+
return cachedUint8Memory0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
69
|
+
|
|
70
|
+
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
71
|
+
? function (arg, view) {
|
|
72
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
73
|
+
}
|
|
74
|
+
: function (arg, view) {
|
|
75
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
76
|
+
view.set(buf);
|
|
77
|
+
return {
|
|
78
|
+
read: arg.length,
|
|
79
|
+
written: buf.length
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
84
|
+
|
|
85
|
+
if (realloc === undefined) {
|
|
86
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
87
|
+
const ptr = malloc(buf.length);
|
|
88
|
+
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
89
|
+
WASM_VECTOR_LEN = buf.length;
|
|
90
|
+
return ptr;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
let len = arg.length;
|
|
94
|
+
let ptr = malloc(len);
|
|
95
|
+
|
|
96
|
+
const mem = getUint8Memory0();
|
|
97
|
+
|
|
98
|
+
let offset = 0;
|
|
99
|
+
|
|
100
|
+
for (; offset < len; offset++) {
|
|
101
|
+
const code = arg.charCodeAt(offset);
|
|
102
|
+
if (code > 0x7F) break;
|
|
103
|
+
mem[ptr + offset] = code;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (offset !== len) {
|
|
107
|
+
if (offset !== 0) {
|
|
108
|
+
arg = arg.slice(offset);
|
|
109
|
+
}
|
|
110
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3);
|
|
111
|
+
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
112
|
+
const ret = encodeString(arg, view);
|
|
113
|
+
|
|
114
|
+
offset += ret.written;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
WASM_VECTOR_LEN = offset;
|
|
118
|
+
return ptr;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
122
|
+
|
|
123
|
+
cachedTextDecoder.decode();
|
|
124
|
+
|
|
125
|
+
function getStringFromWasm0(ptr, len) {
|
|
126
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
let cachedBigInt64Memory0 = null;
|
|
130
|
+
|
|
131
|
+
function getBigInt64Memory0() {
|
|
132
|
+
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
|
|
133
|
+
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
|
134
|
+
}
|
|
135
|
+
return cachedBigInt64Memory0;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function debugString(val) {
|
|
139
|
+
// primitive types
|
|
140
|
+
const type = typeof val;
|
|
141
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
142
|
+
return `${val}`;
|
|
143
|
+
}
|
|
144
|
+
if (type == 'string') {
|
|
145
|
+
return `"${val}"`;
|
|
146
|
+
}
|
|
147
|
+
if (type == 'symbol') {
|
|
148
|
+
const description = val.description;
|
|
149
|
+
if (description == null) {
|
|
150
|
+
return 'Symbol';
|
|
151
|
+
} else {
|
|
152
|
+
return `Symbol(${description})`;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
if (type == 'function') {
|
|
156
|
+
const name = val.name;
|
|
157
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
158
|
+
return `Function(${name})`;
|
|
159
|
+
} else {
|
|
160
|
+
return 'Function';
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// objects
|
|
164
|
+
if (Array.isArray(val)) {
|
|
165
|
+
const length = val.length;
|
|
166
|
+
let debug = '[';
|
|
167
|
+
if (length > 0) {
|
|
168
|
+
debug += debugString(val[0]);
|
|
169
|
+
}
|
|
170
|
+
for(let i = 1; i < length; i++) {
|
|
171
|
+
debug += ', ' + debugString(val[i]);
|
|
172
|
+
}
|
|
173
|
+
debug += ']';
|
|
174
|
+
return debug;
|
|
175
|
+
}
|
|
176
|
+
// Test for built-in
|
|
177
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
178
|
+
let className;
|
|
179
|
+
if (builtInMatches.length > 1) {
|
|
180
|
+
className = builtInMatches[1];
|
|
181
|
+
} else {
|
|
182
|
+
// Failed to match the standard '[object ClassName]'
|
|
183
|
+
return toString.call(val);
|
|
184
|
+
}
|
|
185
|
+
if (className == 'Object') {
|
|
186
|
+
// we're a user defined class or Object
|
|
187
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
188
|
+
// easier than looping through ownProperties of `val`.
|
|
189
|
+
try {
|
|
190
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
191
|
+
} catch (_) {
|
|
192
|
+
return 'Object';
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
// errors
|
|
196
|
+
if (val instanceof Error) {
|
|
197
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
198
|
+
}
|
|
199
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
200
|
+
return className;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
*/
|
|
204
|
+
module.exports.main = function() {
|
|
205
|
+
wasm.main();
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
function handleError(f, args) {
|
|
209
|
+
try {
|
|
210
|
+
return f.apply(this, args);
|
|
211
|
+
} catch (e) {
|
|
212
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
*/
|
|
217
|
+
class DiagnosticPrinter {
|
|
218
|
+
|
|
219
|
+
static __wrap(ptr) {
|
|
220
|
+
const obj = Object.create(DiagnosticPrinter.prototype);
|
|
221
|
+
obj.ptr = ptr;
|
|
222
|
+
|
|
223
|
+
return obj;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
__destroy_into_raw() {
|
|
227
|
+
const ptr = this.ptr;
|
|
228
|
+
this.ptr = 0;
|
|
229
|
+
|
|
230
|
+
return ptr;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
free() {
|
|
234
|
+
const ptr = this.__destroy_into_raw();
|
|
235
|
+
wasm.__wbg_diagnosticprinter_free(ptr);
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* @param {string} file_name
|
|
239
|
+
* @param {string} file_source
|
|
240
|
+
*/
|
|
241
|
+
constructor(file_name, file_source) {
|
|
242
|
+
const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
243
|
+
const len0 = WASM_VECTOR_LEN;
|
|
244
|
+
const ptr1 = passStringToWasm0(file_source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
245
|
+
const len1 = WASM_VECTOR_LEN;
|
|
246
|
+
const ret = wasm.diagnosticprinter_new(ptr0, len0, ptr1, len1);
|
|
247
|
+
return DiagnosticPrinter.__wrap(ret);
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* @param {Diagnostic} diagnostic
|
|
251
|
+
*/
|
|
252
|
+
print_simple(diagnostic) {
|
|
253
|
+
try {
|
|
254
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
255
|
+
wasm.diagnosticprinter_print_simple(retptr, this.ptr, addHeapObject(diagnostic));
|
|
256
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
257
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
258
|
+
if (r1) {
|
|
259
|
+
throw takeObject(r0);
|
|
260
|
+
}
|
|
261
|
+
} finally {
|
|
262
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* @param {Diagnostic} diagnostic
|
|
267
|
+
*/
|
|
268
|
+
print_verbose(diagnostic) {
|
|
269
|
+
try {
|
|
270
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
271
|
+
wasm.diagnosticprinter_print_verbose(retptr, this.ptr, addHeapObject(diagnostic));
|
|
272
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
273
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
274
|
+
if (r1) {
|
|
275
|
+
throw takeObject(r0);
|
|
276
|
+
}
|
|
277
|
+
} finally {
|
|
278
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* @returns {string}
|
|
283
|
+
*/
|
|
284
|
+
finish() {
|
|
285
|
+
try {
|
|
286
|
+
const ptr = this.__destroy_into_raw();
|
|
287
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
288
|
+
wasm.diagnosticprinter_finish(retptr, ptr);
|
|
289
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
290
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
291
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
292
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
293
|
+
var ptr0 = r0;
|
|
294
|
+
var len0 = r1;
|
|
295
|
+
if (r3) {
|
|
296
|
+
ptr0 = 0; len0 = 0;
|
|
297
|
+
throw takeObject(r2);
|
|
298
|
+
}
|
|
299
|
+
return getStringFromWasm0(ptr0, len0);
|
|
300
|
+
} finally {
|
|
301
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
302
|
+
wasm.__wbindgen_free(ptr0, len0);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
module.exports.DiagnosticPrinter = DiagnosticPrinter;
|
|
307
|
+
/**
|
|
308
|
+
*/
|
|
309
|
+
class Workspace {
|
|
310
|
+
|
|
311
|
+
static __wrap(ptr) {
|
|
312
|
+
const obj = Object.create(Workspace.prototype);
|
|
313
|
+
obj.ptr = ptr;
|
|
314
|
+
|
|
315
|
+
return obj;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
__destroy_into_raw() {
|
|
319
|
+
const ptr = this.ptr;
|
|
320
|
+
this.ptr = 0;
|
|
321
|
+
|
|
322
|
+
return ptr;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
free() {
|
|
326
|
+
const ptr = this.__destroy_into_raw();
|
|
327
|
+
wasm.__wbg_workspace_free(ptr);
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
*/
|
|
331
|
+
constructor() {
|
|
332
|
+
const ret = wasm.workspace_new();
|
|
333
|
+
return Workspace.__wrap(ret);
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* @param {SupportsFeatureParams} params
|
|
337
|
+
* @returns {SupportsFeatureResult}
|
|
338
|
+
*/
|
|
339
|
+
fileFeatures(params) {
|
|
340
|
+
try {
|
|
341
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
342
|
+
wasm.workspace_fileFeatures(retptr, this.ptr, addHeapObject(params));
|
|
343
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
344
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
345
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
346
|
+
if (r2) {
|
|
347
|
+
throw takeObject(r1);
|
|
348
|
+
}
|
|
349
|
+
return takeObject(r0);
|
|
350
|
+
} finally {
|
|
351
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* @param {UpdateSettingsParams} params
|
|
356
|
+
*/
|
|
357
|
+
updateSettings(params) {
|
|
358
|
+
try {
|
|
359
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
360
|
+
wasm.workspace_updateSettings(retptr, this.ptr, addHeapObject(params));
|
|
361
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
362
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
363
|
+
if (r1) {
|
|
364
|
+
throw takeObject(r0);
|
|
365
|
+
}
|
|
366
|
+
} finally {
|
|
367
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* @param {OpenFileParams} params
|
|
372
|
+
*/
|
|
373
|
+
openFile(params) {
|
|
374
|
+
try {
|
|
375
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
376
|
+
wasm.workspace_openFile(retptr, this.ptr, addHeapObject(params));
|
|
377
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
378
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
379
|
+
if (r1) {
|
|
380
|
+
throw takeObject(r0);
|
|
381
|
+
}
|
|
382
|
+
} finally {
|
|
383
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* @param {GetFileContentParams} params
|
|
388
|
+
* @returns {string}
|
|
389
|
+
*/
|
|
390
|
+
getFileContent(params) {
|
|
391
|
+
try {
|
|
392
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
393
|
+
wasm.workspace_getFileContent(retptr, this.ptr, addHeapObject(params));
|
|
394
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
395
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
396
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
397
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
398
|
+
var ptr0 = r0;
|
|
399
|
+
var len0 = r1;
|
|
400
|
+
if (r3) {
|
|
401
|
+
ptr0 = 0; len0 = 0;
|
|
402
|
+
throw takeObject(r2);
|
|
403
|
+
}
|
|
404
|
+
return getStringFromWasm0(ptr0, len0);
|
|
405
|
+
} finally {
|
|
406
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
407
|
+
wasm.__wbindgen_free(ptr0, len0);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* @param {GetSyntaxTreeParams} params
|
|
412
|
+
* @returns {GetSyntaxTreeResult}
|
|
413
|
+
*/
|
|
414
|
+
getSyntaxTree(params) {
|
|
415
|
+
try {
|
|
416
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
417
|
+
wasm.workspace_getSyntaxTree(retptr, this.ptr, addHeapObject(params));
|
|
418
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
419
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
420
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
421
|
+
if (r2) {
|
|
422
|
+
throw takeObject(r1);
|
|
423
|
+
}
|
|
424
|
+
return takeObject(r0);
|
|
425
|
+
} finally {
|
|
426
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* @param {GetControlFlowGraphParams} params
|
|
431
|
+
* @returns {string}
|
|
432
|
+
*/
|
|
433
|
+
getControlFlowGraph(params) {
|
|
434
|
+
try {
|
|
435
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
436
|
+
wasm.workspace_getControlFlowGraph(retptr, this.ptr, addHeapObject(params));
|
|
437
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
438
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
439
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
440
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
441
|
+
var ptr0 = r0;
|
|
442
|
+
var len0 = r1;
|
|
443
|
+
if (r3) {
|
|
444
|
+
ptr0 = 0; len0 = 0;
|
|
445
|
+
throw takeObject(r2);
|
|
446
|
+
}
|
|
447
|
+
return getStringFromWasm0(ptr0, len0);
|
|
448
|
+
} finally {
|
|
449
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
450
|
+
wasm.__wbindgen_free(ptr0, len0);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* @param {GetFormatterIRParams} params
|
|
455
|
+
* @returns {string}
|
|
456
|
+
*/
|
|
457
|
+
getFormatterIr(params) {
|
|
458
|
+
try {
|
|
459
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
460
|
+
wasm.workspace_getFormatterIr(retptr, this.ptr, addHeapObject(params));
|
|
461
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
462
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
463
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
464
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
465
|
+
var ptr0 = r0;
|
|
466
|
+
var len0 = r1;
|
|
467
|
+
if (r3) {
|
|
468
|
+
ptr0 = 0; len0 = 0;
|
|
469
|
+
throw takeObject(r2);
|
|
470
|
+
}
|
|
471
|
+
return getStringFromWasm0(ptr0, len0);
|
|
472
|
+
} finally {
|
|
473
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
474
|
+
wasm.__wbindgen_free(ptr0, len0);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* @param {ChangeFileParams} params
|
|
479
|
+
*/
|
|
480
|
+
changeFile(params) {
|
|
481
|
+
try {
|
|
482
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
483
|
+
wasm.workspace_changeFile(retptr, this.ptr, addHeapObject(params));
|
|
484
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
485
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
486
|
+
if (r1) {
|
|
487
|
+
throw takeObject(r0);
|
|
488
|
+
}
|
|
489
|
+
} finally {
|
|
490
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* @param {CloseFileParams} params
|
|
495
|
+
*/
|
|
496
|
+
closeFile(params) {
|
|
497
|
+
try {
|
|
498
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
499
|
+
wasm.workspace_closeFile(retptr, this.ptr, addHeapObject(params));
|
|
500
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
501
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
502
|
+
if (r1) {
|
|
503
|
+
throw takeObject(r0);
|
|
504
|
+
}
|
|
505
|
+
} finally {
|
|
506
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* @param {PullDiagnosticsParams} params
|
|
511
|
+
* @returns {PullDiagnosticsResult}
|
|
512
|
+
*/
|
|
513
|
+
pullDiagnostics(params) {
|
|
514
|
+
try {
|
|
515
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
516
|
+
wasm.workspace_pullDiagnostics(retptr, this.ptr, addHeapObject(params));
|
|
517
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
518
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
519
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
520
|
+
if (r2) {
|
|
521
|
+
throw takeObject(r1);
|
|
522
|
+
}
|
|
523
|
+
return takeObject(r0);
|
|
524
|
+
} finally {
|
|
525
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* @param {PullActionsParams} params
|
|
530
|
+
* @returns {PullActionsResult}
|
|
531
|
+
*/
|
|
532
|
+
pullActions(params) {
|
|
533
|
+
try {
|
|
534
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
535
|
+
wasm.workspace_pullActions(retptr, this.ptr, addHeapObject(params));
|
|
536
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
537
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
538
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
539
|
+
if (r2) {
|
|
540
|
+
throw takeObject(r1);
|
|
541
|
+
}
|
|
542
|
+
return takeObject(r0);
|
|
543
|
+
} finally {
|
|
544
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* @param {FormatFileParams} params
|
|
549
|
+
* @returns {any}
|
|
550
|
+
*/
|
|
551
|
+
formatFile(params) {
|
|
552
|
+
try {
|
|
553
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
554
|
+
wasm.workspace_formatFile(retptr, this.ptr, addHeapObject(params));
|
|
555
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
556
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
557
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
558
|
+
if (r2) {
|
|
559
|
+
throw takeObject(r1);
|
|
560
|
+
}
|
|
561
|
+
return takeObject(r0);
|
|
562
|
+
} finally {
|
|
563
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* @param {FormatRangeParams} params
|
|
568
|
+
* @returns {any}
|
|
569
|
+
*/
|
|
570
|
+
formatRange(params) {
|
|
571
|
+
try {
|
|
572
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
573
|
+
wasm.workspace_formatRange(retptr, this.ptr, addHeapObject(params));
|
|
574
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
575
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
576
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
577
|
+
if (r2) {
|
|
578
|
+
throw takeObject(r1);
|
|
579
|
+
}
|
|
580
|
+
return takeObject(r0);
|
|
581
|
+
} finally {
|
|
582
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* @param {FormatOnTypeParams} params
|
|
587
|
+
* @returns {any}
|
|
588
|
+
*/
|
|
589
|
+
formatOnType(params) {
|
|
590
|
+
try {
|
|
591
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
592
|
+
wasm.workspace_formatOnType(retptr, this.ptr, addHeapObject(params));
|
|
593
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
594
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
595
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
596
|
+
if (r2) {
|
|
597
|
+
throw takeObject(r1);
|
|
598
|
+
}
|
|
599
|
+
return takeObject(r0);
|
|
600
|
+
} finally {
|
|
601
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* @param {FixFileParams} params
|
|
606
|
+
* @returns {FixFileResult}
|
|
607
|
+
*/
|
|
608
|
+
fixFile(params) {
|
|
609
|
+
try {
|
|
610
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
611
|
+
wasm.workspace_fixFile(retptr, this.ptr, addHeapObject(params));
|
|
612
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
613
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
614
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
615
|
+
if (r2) {
|
|
616
|
+
throw takeObject(r1);
|
|
617
|
+
}
|
|
618
|
+
return takeObject(r0);
|
|
619
|
+
} finally {
|
|
620
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* @param {OrganizeImportsParams} params
|
|
625
|
+
* @returns {OrganizeImportsResult}
|
|
626
|
+
*/
|
|
627
|
+
organizeImports(params) {
|
|
628
|
+
try {
|
|
629
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
630
|
+
wasm.workspace_organizeImports(retptr, this.ptr, addHeapObject(params));
|
|
631
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
632
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
633
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
634
|
+
if (r2) {
|
|
635
|
+
throw takeObject(r1);
|
|
636
|
+
}
|
|
637
|
+
return takeObject(r0);
|
|
638
|
+
} finally {
|
|
639
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* @param {RenameParams} params
|
|
644
|
+
* @returns {RenameResult}
|
|
645
|
+
*/
|
|
646
|
+
rename(params) {
|
|
647
|
+
try {
|
|
648
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
649
|
+
wasm.workspace_rename(retptr, this.ptr, addHeapObject(params));
|
|
650
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
651
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
652
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
653
|
+
if (r2) {
|
|
654
|
+
throw takeObject(r1);
|
|
655
|
+
}
|
|
656
|
+
return takeObject(r0);
|
|
657
|
+
} finally {
|
|
658
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
module.exports.Workspace = Workspace;
|
|
663
|
+
|
|
664
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
665
|
+
const ret = getObject(arg0) === undefined;
|
|
666
|
+
return ret;
|
|
667
|
+
};
|
|
668
|
+
|
|
669
|
+
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
670
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
671
|
+
return ret;
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
675
|
+
takeObject(arg0);
|
|
676
|
+
};
|
|
677
|
+
|
|
678
|
+
module.exports.__wbindgen_boolean_get = function(arg0) {
|
|
679
|
+
const v = getObject(arg0);
|
|
680
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
681
|
+
return ret;
|
|
682
|
+
};
|
|
683
|
+
|
|
684
|
+
module.exports.__wbindgen_is_bigint = function(arg0) {
|
|
685
|
+
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
686
|
+
return ret;
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
690
|
+
const ret = arg0;
|
|
691
|
+
return addHeapObject(ret);
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
695
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
696
|
+
return ret;
|
|
697
|
+
};
|
|
698
|
+
|
|
699
|
+
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
700
|
+
const obj = getObject(arg1);
|
|
701
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
702
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
703
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
707
|
+
const obj = getObject(arg1);
|
|
708
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
709
|
+
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
710
|
+
var len0 = WASM_VECTOR_LEN;
|
|
711
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
712
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
module.exports.__wbindgen_is_object = function(arg0) {
|
|
716
|
+
const val = getObject(arg0);
|
|
717
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
718
|
+
return ret;
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
722
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
723
|
+
return addHeapObject(ret);
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
module.exports.__wbindgen_is_string = function(arg0) {
|
|
727
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
728
|
+
return ret;
|
|
729
|
+
};
|
|
730
|
+
|
|
731
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
732
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
733
|
+
return addHeapObject(ret);
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
module.exports.__wbindgen_number_new = function(arg0) {
|
|
737
|
+
const ret = arg0;
|
|
738
|
+
return addHeapObject(ret);
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
742
|
+
const ret = getObject(arg0);
|
|
743
|
+
return addHeapObject(ret);
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
747
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
748
|
+
return addHeapObject(ret);
|
|
749
|
+
};
|
|
750
|
+
|
|
751
|
+
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
752
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
753
|
+
return ret;
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
module.exports.__wbg_String_91fba7ded13ba54c = function(arg0, arg1) {
|
|
757
|
+
const ret = String(getObject(arg1));
|
|
758
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
759
|
+
const len0 = WASM_VECTOR_LEN;
|
|
760
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
761
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
762
|
+
};
|
|
763
|
+
|
|
764
|
+
module.exports.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
|
|
765
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
766
|
+
return addHeapObject(ret);
|
|
767
|
+
};
|
|
768
|
+
|
|
769
|
+
module.exports.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
|
|
770
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
771
|
+
};
|
|
772
|
+
|
|
773
|
+
module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
774
|
+
const ret = new Error();
|
|
775
|
+
return addHeapObject(ret);
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
779
|
+
const ret = getObject(arg1).stack;
|
|
780
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
781
|
+
const len0 = WASM_VECTOR_LEN;
|
|
782
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
783
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
784
|
+
};
|
|
785
|
+
|
|
786
|
+
module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
787
|
+
try {
|
|
788
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
789
|
+
} finally {
|
|
790
|
+
wasm.__wbindgen_free(arg0, arg1);
|
|
791
|
+
}
|
|
792
|
+
};
|
|
793
|
+
|
|
794
|
+
module.exports.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) {
|
|
795
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
796
|
+
return addHeapObject(ret);
|
|
797
|
+
};
|
|
798
|
+
|
|
799
|
+
module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
|
|
800
|
+
const ret = getObject(arg0).length;
|
|
801
|
+
return ret;
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
module.exports.__wbg_new_b525de17f44a8943 = function() {
|
|
805
|
+
const ret = new Array();
|
|
806
|
+
return addHeapObject(ret);
|
|
807
|
+
};
|
|
808
|
+
|
|
809
|
+
module.exports.__wbindgen_is_function = function(arg0) {
|
|
810
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
811
|
+
return ret;
|
|
812
|
+
};
|
|
813
|
+
|
|
814
|
+
module.exports.__wbg_new_f841cc6f2098f4b5 = function() {
|
|
815
|
+
const ret = new Map();
|
|
816
|
+
return addHeapObject(ret);
|
|
817
|
+
};
|
|
818
|
+
|
|
819
|
+
module.exports.__wbg_next_b7d530c04fd8b217 = function(arg0) {
|
|
820
|
+
const ret = getObject(arg0).next;
|
|
821
|
+
return addHeapObject(ret);
|
|
822
|
+
};
|
|
823
|
+
|
|
824
|
+
module.exports.__wbg_next_88560ec06a094dea = function() { return handleError(function (arg0) {
|
|
825
|
+
const ret = getObject(arg0).next();
|
|
826
|
+
return addHeapObject(ret);
|
|
827
|
+
}, arguments) };
|
|
828
|
+
|
|
829
|
+
module.exports.__wbg_done_1ebec03bbd919843 = function(arg0) {
|
|
830
|
+
const ret = getObject(arg0).done;
|
|
831
|
+
return ret;
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
module.exports.__wbg_value_6ac8da5cc5b3efda = function(arg0) {
|
|
835
|
+
const ret = getObject(arg0).value;
|
|
836
|
+
return addHeapObject(ret);
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
module.exports.__wbg_iterator_55f114446221aa5a = function() {
|
|
840
|
+
const ret = Symbol.iterator;
|
|
841
|
+
return addHeapObject(ret);
|
|
842
|
+
};
|
|
843
|
+
|
|
844
|
+
module.exports.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
|
|
845
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
846
|
+
return addHeapObject(ret);
|
|
847
|
+
}, arguments) };
|
|
848
|
+
|
|
849
|
+
module.exports.__wbg_call_95d1ea488d03e4e8 = function() { return handleError(function (arg0, arg1) {
|
|
850
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
851
|
+
return addHeapObject(ret);
|
|
852
|
+
}, arguments) };
|
|
853
|
+
|
|
854
|
+
module.exports.__wbg_new_f9876326328f45ed = function() {
|
|
855
|
+
const ret = new Object();
|
|
856
|
+
return addHeapObject(ret);
|
|
857
|
+
};
|
|
858
|
+
|
|
859
|
+
module.exports.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
|
|
860
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
861
|
+
};
|
|
862
|
+
|
|
863
|
+
module.exports.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
|
|
864
|
+
const ret = Array.isArray(getObject(arg0));
|
|
865
|
+
return ret;
|
|
866
|
+
};
|
|
867
|
+
|
|
868
|
+
module.exports.__wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065 = function(arg0) {
|
|
869
|
+
let result;
|
|
870
|
+
try {
|
|
871
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
872
|
+
} catch {
|
|
873
|
+
result = false;
|
|
874
|
+
}
|
|
875
|
+
const ret = result;
|
|
876
|
+
return ret;
|
|
877
|
+
};
|
|
878
|
+
|
|
879
|
+
module.exports.__wbg_new_15d3966e9981a196 = function(arg0, arg1) {
|
|
880
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
881
|
+
return addHeapObject(ret);
|
|
882
|
+
};
|
|
883
|
+
|
|
884
|
+
module.exports.__wbg_set_388c4c6422704173 = function(arg0, arg1, arg2) {
|
|
885
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
886
|
+
return addHeapObject(ret);
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
module.exports.__wbg_isSafeInteger_8c4789029e885159 = function(arg0) {
|
|
890
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
|
891
|
+
return ret;
|
|
892
|
+
};
|
|
893
|
+
|
|
894
|
+
module.exports.__wbg_entries_4e1315b774245952 = function(arg0) {
|
|
895
|
+
const ret = Object.entries(getObject(arg0));
|
|
896
|
+
return addHeapObject(ret);
|
|
897
|
+
};
|
|
898
|
+
|
|
899
|
+
module.exports.__wbg_buffer_cf65c07de34b9a08 = function(arg0) {
|
|
900
|
+
const ret = getObject(arg0).buffer;
|
|
901
|
+
return addHeapObject(ret);
|
|
902
|
+
};
|
|
903
|
+
|
|
904
|
+
module.exports.__wbg_new_537b7341ce90bb31 = function(arg0) {
|
|
905
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
906
|
+
return addHeapObject(ret);
|
|
907
|
+
};
|
|
908
|
+
|
|
909
|
+
module.exports.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) {
|
|
910
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
911
|
+
};
|
|
912
|
+
|
|
913
|
+
module.exports.__wbg_length_27a2afe8ab42b09f = function(arg0) {
|
|
914
|
+
const ret = getObject(arg0).length;
|
|
915
|
+
return ret;
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
module.exports.__wbg_instanceof_Uint8Array_01cebe79ca606cca = function(arg0) {
|
|
919
|
+
let result;
|
|
920
|
+
try {
|
|
921
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
922
|
+
} catch {
|
|
923
|
+
result = false;
|
|
924
|
+
}
|
|
925
|
+
const ret = result;
|
|
926
|
+
return ret;
|
|
927
|
+
};
|
|
928
|
+
|
|
929
|
+
module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
930
|
+
const v = getObject(arg1);
|
|
931
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
932
|
+
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
|
|
933
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
937
|
+
const ret = debugString(getObject(arg1));
|
|
938
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
939
|
+
const len0 = WASM_VECTOR_LEN;
|
|
940
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
941
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
942
|
+
};
|
|
943
|
+
|
|
944
|
+
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
945
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
946
|
+
};
|
|
947
|
+
|
|
948
|
+
module.exports.__wbindgen_memory = function() {
|
|
949
|
+
const ret = wasm.memory;
|
|
950
|
+
return addHeapObject(ret);
|
|
951
|
+
};
|
|
952
|
+
|
|
953
|
+
const path = require('path').join(__dirname, 'rome_wasm_bg.wasm');
|
|
954
|
+
const bytes = require('fs').readFileSync(path);
|
|
955
|
+
|
|
956
|
+
const wasmModule = new WebAssembly.Module(bytes);
|
|
957
|
+
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
958
|
+
wasm = wasmInstance.exports;
|
|
959
|
+
module.exports.__wasm = wasm;
|
|
960
|
+
|
|
961
|
+
wasm.__wbindgen_start();
|
|
962
|
+
|