@biomejs/wasm-web
Advanced tools
Comparing version 1.9.5-nightly.92879ae to 1.9.5-nightly.ff02a0b
let wasm; | ||
const heap = new Array(128).fill(undefined); | ||
heap.push(undefined, null, true, false); | ||
function getObject(idx) { return heap[idx]; } | ||
let heap_next = heap.length; | ||
function dropObject(idx) { | ||
if (idx < 132) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
function isLikeNone(x) { | ||
@@ -101,11 +81,2 @@ return x === undefined || x === null; | ||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
heap[idx] = obj; | ||
return idx; | ||
} | ||
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); | ||
@@ -184,4 +155,3 @@ | ||
} | ||
/** | ||
*/ | ||
export function main() { | ||
@@ -191,2 +161,14 @@ wasm.main(); | ||
function takeFromExternrefTable0(idx) { | ||
const value = wasm.__wbindgen_export_2.get(idx); | ||
wasm.__externref_table_dealloc(idx); | ||
return value; | ||
} | ||
function addToExternrefTable0(obj) { | ||
const idx = wasm.__externref_table_alloc(); | ||
wasm.__wbindgen_export_2.set(idx, obj); | ||
return idx; | ||
} | ||
function handleError(f, args) { | ||
@@ -196,3 +178,4 @@ try { | ||
} catch (e) { | ||
wasm.__wbindgen_exn_store(addHeapObject(e)); | ||
const idx = addToExternrefTable0(e); | ||
wasm.__wbindgen_exn_store(idx); | ||
} | ||
@@ -204,4 +187,3 @@ } | ||
: new FinalizationRegistry(ptr => wasm.__wbg_diagnosticprinter_free(ptr >>> 0, 1)); | ||
/** | ||
*/ | ||
export class DiagnosticPrinter { | ||
@@ -221,5 +203,5 @@ | ||
/** | ||
* @param {string} file_name | ||
* @param {string} file_source | ||
*/ | ||
* @param {string} file_name | ||
* @param {string} file_source | ||
*/ | ||
constructor(file_name, file_source) { | ||
@@ -236,36 +218,22 @@ const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
/** | ||
* @param {Diagnostic} diagnostic | ||
*/ | ||
* @param {Diagnostic} diagnostic | ||
*/ | ||
print_simple(diagnostic) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.diagnosticprinter_print_simple(retptr, this.__wbg_ptr, addHeapObject(diagnostic)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
if (r1) { | ||
throw takeObject(r0); | ||
} | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.diagnosticprinter_print_simple(this.__wbg_ptr, diagnostic); | ||
if (ret[1]) { | ||
throw takeFromExternrefTable0(ret[0]); | ||
} | ||
} | ||
/** | ||
* @param {Diagnostic} diagnostic | ||
*/ | ||
* @param {Diagnostic} diagnostic | ||
*/ | ||
print_verbose(diagnostic) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.diagnosticprinter_print_verbose(retptr, this.__wbg_ptr, addHeapObject(diagnostic)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
if (r1) { | ||
throw takeObject(r0); | ||
} | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.diagnosticprinter_print_verbose(this.__wbg_ptr, diagnostic); | ||
if (ret[1]) { | ||
throw takeFromExternrefTable0(ret[0]); | ||
} | ||
} | ||
/** | ||
* @returns {string} | ||
*/ | ||
* @returns {string} | ||
*/ | ||
finish() { | ||
@@ -276,13 +244,8 @@ let deferred2_0; | ||
const ptr = this.__destroy_into_raw(); | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.diagnosticprinter_finish(retptr, ptr); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true); | ||
var ptr1 = r0; | ||
var len1 = r1; | ||
if (r3) { | ||
const ret = wasm.diagnosticprinter_finish(ptr); | ||
var ptr1 = ret[0]; | ||
var len1 = ret[1]; | ||
if (ret[3]) { | ||
ptr1 = 0; len1 = 0; | ||
throw takeObject(r2); | ||
throw takeFromExternrefTable0(ret[2]); | ||
} | ||
@@ -293,3 +256,2 @@ deferred2_0 = ptr1; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); | ||
@@ -303,4 +265,3 @@ } | ||
: new FinalizationRegistry(ptr => wasm.__wbg_workspace_free(ptr >>> 0, 1)); | ||
/** | ||
*/ | ||
export class Workspace { | ||
@@ -319,4 +280,2 @@ | ||
} | ||
/** | ||
*/ | ||
constructor() { | ||
@@ -329,75 +288,45 @@ const ret = wasm.workspace_new(); | ||
/** | ||
* @param {SupportsFeatureParams} params | ||
* @returns {FileFeaturesResult} | ||
*/ | ||
* @param {SupportsFeatureParams} params | ||
* @returns {FileFeaturesResult} | ||
*/ | ||
fileFeatures(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_fileFeatures(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_fileFeatures(this.__wbg_ptr, params); | ||
if (ret[2]) { | ||
throw takeFromExternrefTable0(ret[1]); | ||
} | ||
return takeFromExternrefTable0(ret[0]); | ||
} | ||
/** | ||
* @param {UpdateSettingsParams} params | ||
*/ | ||
* @param {UpdateSettingsParams} params | ||
*/ | ||
updateSettings(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_updateSettings(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
if (r1) { | ||
throw takeObject(r0); | ||
} | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_updateSettings(this.__wbg_ptr, params); | ||
if (ret[1]) { | ||
throw takeFromExternrefTable0(ret[0]); | ||
} | ||
} | ||
/** | ||
* @param {RegisterProjectFolderParams} params | ||
* @returns {ProjectKey} | ||
*/ | ||
* @param {RegisterProjectFolderParams} params | ||
* @returns {ProjectKey} | ||
*/ | ||
registerProjectFolder(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_registerProjectFolder(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_registerProjectFolder(this.__wbg_ptr, params); | ||
if (ret[2]) { | ||
throw takeFromExternrefTable0(ret[1]); | ||
} | ||
return takeFromExternrefTable0(ret[0]); | ||
} | ||
/** | ||
* @param {OpenFileParams} params | ||
*/ | ||
* @param {OpenFileParams} params | ||
*/ | ||
openFile(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_openFile(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
if (r1) { | ||
throw takeObject(r0); | ||
} | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_openFile(this.__wbg_ptr, params); | ||
if (ret[1]) { | ||
throw takeFromExternrefTable0(ret[0]); | ||
} | ||
} | ||
/** | ||
* @param {GetFileContentParams} params | ||
* @returns {string} | ||
*/ | ||
* @param {GetFileContentParams} params | ||
* @returns {string} | ||
*/ | ||
getFileContent(params) { | ||
@@ -407,13 +336,8 @@ let deferred2_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_getFileContent(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true); | ||
var ptr1 = r0; | ||
var len1 = r1; | ||
if (r3) { | ||
const ret = wasm.workspace_getFileContent(this.__wbg_ptr, params); | ||
var ptr1 = ret[0]; | ||
var len1 = ret[1]; | ||
if (ret[3]) { | ||
ptr1 = 0; len1 = 0; | ||
throw takeObject(r2); | ||
throw takeFromExternrefTable0(ret[2]); | ||
} | ||
@@ -424,3 +348,2 @@ deferred2_0 = ptr1; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); | ||
@@ -430,24 +353,16 @@ } | ||
/** | ||
* @param {GetSyntaxTreeParams} params | ||
* @returns {GetSyntaxTreeResult} | ||
*/ | ||
* @param {GetSyntaxTreeParams} params | ||
* @returns {GetSyntaxTreeResult} | ||
*/ | ||
getSyntaxTree(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_getSyntaxTree(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_getSyntaxTree(this.__wbg_ptr, params); | ||
if (ret[2]) { | ||
throw takeFromExternrefTable0(ret[1]); | ||
} | ||
return takeFromExternrefTable0(ret[0]); | ||
} | ||
/** | ||
* @param {GetControlFlowGraphParams} params | ||
* @returns {string} | ||
*/ | ||
* @param {GetControlFlowGraphParams} params | ||
* @returns {string} | ||
*/ | ||
getControlFlowGraph(params) { | ||
@@ -457,13 +372,8 @@ let deferred2_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_getControlFlowGraph(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true); | ||
var ptr1 = r0; | ||
var len1 = r1; | ||
if (r3) { | ||
const ret = wasm.workspace_getControlFlowGraph(this.__wbg_ptr, params); | ||
var ptr1 = ret[0]; | ||
var len1 = ret[1]; | ||
if (ret[3]) { | ||
ptr1 = 0; len1 = 0; | ||
throw takeObject(r2); | ||
throw takeFromExternrefTable0(ret[2]); | ||
} | ||
@@ -474,3 +384,2 @@ deferred2_0 = ptr1; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); | ||
@@ -480,5 +389,5 @@ } | ||
/** | ||
* @param {GetFormatterIRParams} params | ||
* @returns {string} | ||
*/ | ||
* @param {GetFormatterIRParams} params | ||
* @returns {string} | ||
*/ | ||
getFormatterIr(params) { | ||
@@ -488,13 +397,8 @@ let deferred2_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_getFormatterIr(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true); | ||
var ptr1 = r0; | ||
var len1 = r1; | ||
if (r3) { | ||
const ret = wasm.workspace_getFormatterIr(this.__wbg_ptr, params); | ||
var ptr1 = ret[0]; | ||
var len1 = ret[1]; | ||
if (ret[3]) { | ||
ptr1 = 0; len1 = 0; | ||
throw takeObject(r2); | ||
throw takeFromExternrefTable0(ret[2]); | ||
} | ||
@@ -505,3 +409,2 @@ deferred2_0 = ptr1; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); | ||
@@ -511,184 +414,106 @@ } | ||
/** | ||
* @param {ChangeFileParams} params | ||
*/ | ||
* @param {ChangeFileParams} params | ||
*/ | ||
changeFile(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_changeFile(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
if (r1) { | ||
throw takeObject(r0); | ||
} | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_changeFile(this.__wbg_ptr, params); | ||
if (ret[1]) { | ||
throw takeFromExternrefTable0(ret[0]); | ||
} | ||
} | ||
/** | ||
* @param {CloseFileParams} params | ||
*/ | ||
* @param {CloseFileParams} params | ||
*/ | ||
closeFile(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_closeFile(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
if (r1) { | ||
throw takeObject(r0); | ||
} | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_closeFile(this.__wbg_ptr, params); | ||
if (ret[1]) { | ||
throw takeFromExternrefTable0(ret[0]); | ||
} | ||
} | ||
/** | ||
* @param {PullDiagnosticsParams} params | ||
* @returns {PullDiagnosticsResult} | ||
*/ | ||
* @param {PullDiagnosticsParams} params | ||
* @returns {PullDiagnosticsResult} | ||
*/ | ||
pullDiagnostics(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_pullDiagnostics(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_pullDiagnostics(this.__wbg_ptr, params); | ||
if (ret[2]) { | ||
throw takeFromExternrefTable0(ret[1]); | ||
} | ||
return takeFromExternrefTable0(ret[0]); | ||
} | ||
/** | ||
* @param {PullActionsParams} params | ||
* @returns {PullActionsResult} | ||
*/ | ||
* @param {PullActionsParams} params | ||
* @returns {PullActionsResult} | ||
*/ | ||
pullActions(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_pullActions(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_pullActions(this.__wbg_ptr, params); | ||
if (ret[2]) { | ||
throw takeFromExternrefTable0(ret[1]); | ||
} | ||
return takeFromExternrefTable0(ret[0]); | ||
} | ||
/** | ||
* @param {FormatFileParams} params | ||
* @returns {any} | ||
*/ | ||
* @param {FormatFileParams} params | ||
* @returns {any} | ||
*/ | ||
formatFile(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_formatFile(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_formatFile(this.__wbg_ptr, params); | ||
if (ret[2]) { | ||
throw takeFromExternrefTable0(ret[1]); | ||
} | ||
return takeFromExternrefTable0(ret[0]); | ||
} | ||
/** | ||
* @param {FormatRangeParams} params | ||
* @returns {any} | ||
*/ | ||
* @param {FormatRangeParams} params | ||
* @returns {any} | ||
*/ | ||
formatRange(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_formatRange(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_formatRange(this.__wbg_ptr, params); | ||
if (ret[2]) { | ||
throw takeFromExternrefTable0(ret[1]); | ||
} | ||
return takeFromExternrefTable0(ret[0]); | ||
} | ||
/** | ||
* @param {FormatOnTypeParams} params | ||
* @returns {any} | ||
*/ | ||
* @param {FormatOnTypeParams} params | ||
* @returns {any} | ||
*/ | ||
formatOnType(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_formatOnType(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_formatOnType(this.__wbg_ptr, params); | ||
if (ret[2]) { | ||
throw takeFromExternrefTable0(ret[1]); | ||
} | ||
return takeFromExternrefTable0(ret[0]); | ||
} | ||
/** | ||
* @param {FixFileParams} params | ||
* @returns {FixFileResult} | ||
*/ | ||
* @param {FixFileParams} params | ||
* @returns {FixFileResult} | ||
*/ | ||
fixFile(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_fixFile(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_fixFile(this.__wbg_ptr, params); | ||
if (ret[2]) { | ||
throw takeFromExternrefTable0(ret[1]); | ||
} | ||
return takeFromExternrefTable0(ret[0]); | ||
} | ||
/** | ||
* @param {OrganizeImportsParams} params | ||
* @returns {OrganizeImportsResult} | ||
*/ | ||
* @param {OrganizeImportsParams} params | ||
* @returns {OrganizeImportsResult} | ||
*/ | ||
organizeImports(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_organizeImports(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_organizeImports(this.__wbg_ptr, params); | ||
if (ret[2]) { | ||
throw takeFromExternrefTable0(ret[1]); | ||
} | ||
return takeFromExternrefTable0(ret[0]); | ||
} | ||
/** | ||
* @param {RenameParams} params | ||
* @returns {RenameResult} | ||
*/ | ||
* @param {RenameParams} params | ||
* @returns {RenameResult} | ||
*/ | ||
rename(params) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.workspace_rename(retptr, this.__wbg_ptr, addHeapObject(params)); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
const ret = wasm.workspace_rename(this.__wbg_ptr, params); | ||
if (ret[2]) { | ||
throw takeFromExternrefTable0(ret[1]); | ||
} | ||
return takeFromExternrefTable0(ret[0]); | ||
} | ||
@@ -705,3 +530,3 @@ } | ||
if (module.headers.get('Content-Type') != 'application/wasm') { | ||
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); | ||
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); | ||
@@ -733,14 +558,11 @@ } else { | ||
imports.wbg.__wbindgen_is_undefined = function(arg0) { | ||
const ret = getObject(arg0) === undefined; | ||
const ret = arg0 === undefined; | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_in = function(arg0, arg1) { | ||
const ret = getObject(arg0) in getObject(arg1); | ||
const ret = arg0 in arg1; | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
imports.wbg.__wbindgen_boolean_get = function(arg0) { | ||
const v = getObject(arg0); | ||
const v = arg0; | ||
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2; | ||
@@ -750,7 +572,7 @@ return ret; | ||
imports.wbg.__wbindgen_is_bigint = function(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'bigint'; | ||
const ret = typeof(arg0) === 'bigint'; | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_number_get = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const obj = arg1; | ||
const ret = typeof(obj) === 'number' ? obj : undefined; | ||
@@ -761,3 +583,3 @@ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true); | ||
imports.wbg.__wbindgen_string_get = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const obj = arg1; | ||
const ret = typeof(obj) === 'string' ? obj : undefined; | ||
@@ -770,3 +592,3 @@ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
imports.wbg.__wbindgen_is_object = function(arg0) { | ||
const val = getObject(arg0); | ||
const val = arg0; | ||
const ret = typeof(val) === 'object' && val !== null; | ||
@@ -777,6 +599,6 @@ return ret; | ||
const ret = arg0; | ||
return addHeapObject(ret); | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) { | ||
const ret = getObject(arg0) === getObject(arg1); | ||
const ret = arg0 === arg1; | ||
return ret; | ||
@@ -786,26 +608,22 @@ }; | ||
const ret = BigInt.asUintN(64, arg0); | ||
return addHeapObject(ret); | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_error_new = function(arg0, arg1) { | ||
const ret = new Error(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_is_string = function(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'string'; | ||
const ret = typeof(arg0) === 'string'; | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_as_number = function(arg0) { | ||
const ret = +getObject(arg0); | ||
const ret = +arg0; | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_object_clone_ref = function(arg0) { | ||
const ret = getObject(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) { | ||
const ret = getObject(arg0) == getObject(arg1); | ||
const ret = arg0 == arg1; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_String_b9412f8799faab3e = function(arg0, arg1) { | ||
const ret = String(getObject(arg1)); | ||
const ret = String(arg1); | ||
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
@@ -818,21 +636,21 @@ const len1 = WASM_VECTOR_LEN; | ||
const ret = arg0; | ||
return addHeapObject(ret); | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_string_new = function(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
return addHeapObject(ret); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) { | ||
const ret = getObject(arg0)[getObject(arg1)]; | ||
return addHeapObject(ret); | ||
const ret = arg0[arg1]; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) { | ||
getObject(arg0)[takeObject(arg1)] = takeObject(arg2); | ||
arg0[arg1] = arg2; | ||
}; | ||
imports.wbg.__wbg_new_abda76e883ba8a5f = function() { | ||
const ret = new Error(); | ||
return addHeapObject(ret); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) { | ||
const ret = getObject(arg1).stack; | ||
const ret = arg1.stack; | ||
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
@@ -855,64 +673,64 @@ const len1 = WASM_VECTOR_LEN; | ||
imports.wbg.__wbindgen_is_function = function(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'function'; | ||
const ret = typeof(arg0) === 'function'; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_get_3baa728f9d58d3f6 = function(arg0, arg1) { | ||
const ret = getObject(arg0)[arg1 >>> 0]; | ||
return addHeapObject(ret); | ||
imports.wbg.__wbg_get_5419cf6b954aa11d = function(arg0, arg1) { | ||
const ret = arg0[arg1 >>> 0]; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_length_ae22078168b726f5 = function(arg0) { | ||
const ret = getObject(arg0).length; | ||
imports.wbg.__wbg_length_f217bbbf7e8e4df4 = function(arg0) { | ||
const ret = arg0.length; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_new_a220cf903aa02ca2 = function() { | ||
imports.wbg.__wbg_new_034f913e7636e987 = function() { | ||
const ret = new Array(); | ||
return addHeapObject(ret); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_new_8608a2b51a5f6737 = function() { | ||
imports.wbg.__wbg_new_7a87a0376e40533b = function() { | ||
const ret = new Map(); | ||
return addHeapObject(ret); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_next_de3e9db4440638b2 = function(arg0) { | ||
const ret = getObject(arg0).next; | ||
return addHeapObject(ret); | ||
imports.wbg.__wbg_next_13b477da1eaa3897 = function(arg0) { | ||
const ret = arg0.next; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_next_f9cb570345655b9a = function() { return handleError(function (arg0) { | ||
const ret = getObject(arg0).next(); | ||
return addHeapObject(ret); | ||
imports.wbg.__wbg_next_b06e115d1b01e10b = function() { return handleError(function (arg0) { | ||
const ret = arg0.next(); | ||
return ret; | ||
}, arguments) }; | ||
imports.wbg.__wbg_done_bfda7aa8f252b39f = function(arg0) { | ||
const ret = getObject(arg0).done; | ||
imports.wbg.__wbg_done_983b5ffcaec8c583 = function(arg0) { | ||
const ret = arg0.done; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_value_6d39332ab4788d86 = function(arg0) { | ||
const ret = getObject(arg0).value; | ||
return addHeapObject(ret); | ||
imports.wbg.__wbg_value_2ab8a198c834c26a = function(arg0) { | ||
const ret = arg0.value; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_iterator_888179a48810a9fe = function() { | ||
imports.wbg.__wbg_iterator_695d699a44d6234c = function() { | ||
const ret = Symbol.iterator; | ||
return addHeapObject(ret); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_get_224d16597dbbfd96 = function() { return handleError(function (arg0, arg1) { | ||
const ret = Reflect.get(getObject(arg0), getObject(arg1)); | ||
return addHeapObject(ret); | ||
imports.wbg.__wbg_get_ef828680c64da212 = function() { return handleError(function (arg0, arg1) { | ||
const ret = Reflect.get(arg0, arg1); | ||
return ret; | ||
}, arguments) }; | ||
imports.wbg.__wbg_call_1084a111329e68ce = function() { return handleError(function (arg0, arg1) { | ||
const ret = getObject(arg0).call(getObject(arg1)); | ||
return addHeapObject(ret); | ||
imports.wbg.__wbg_call_a9ef466721e824f2 = function() { return handleError(function (arg0, arg1) { | ||
const ret = arg0.call(arg1); | ||
return ret; | ||
}, arguments) }; | ||
imports.wbg.__wbg_new_525245e2b9901204 = function() { | ||
imports.wbg.__wbg_new_e69b5f66fda8f13c = function() { | ||
const ret = new Object(); | ||
return addHeapObject(ret); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_set_673dda6c73d19609 = function(arg0, arg1, arg2) { | ||
getObject(arg0)[arg1 >>> 0] = takeObject(arg2); | ||
imports.wbg.__wbg_set_425e70f7c64ac962 = function(arg0, arg1, arg2) { | ||
arg0[arg1 >>> 0] = arg2; | ||
}; | ||
imports.wbg.__wbg_isArray_8364a5371e9737d8 = function(arg0) { | ||
const ret = Array.isArray(getObject(arg0)); | ||
imports.wbg.__wbg_isArray_6f3b47f09adb61b5 = function(arg0) { | ||
const ret = Array.isArray(arg0); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_instanceof_ArrayBuffer_61dfc3198373c902 = function(arg0) { | ||
imports.wbg.__wbg_instanceof_ArrayBuffer_74945570b4a62ec7 = function(arg0) { | ||
let result; | ||
try { | ||
result = getObject(arg0) instanceof ArrayBuffer; | ||
result = arg0 instanceof ArrayBuffer; | ||
} catch (_) { | ||
@@ -924,10 +742,10 @@ result = false; | ||
}; | ||
imports.wbg.__wbg_new_796382978dfd4fb0 = function(arg0, arg1) { | ||
imports.wbg.__wbg_new_70a2f23d1565c04c = function(arg0, arg1) { | ||
const ret = new Error(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_instanceof_Map_763ce0e95960d55e = function(arg0) { | ||
imports.wbg.__wbg_instanceof_Map_f96986929e7e89ed = function(arg0) { | ||
let result; | ||
try { | ||
result = getObject(arg0) instanceof Map; | ||
result = arg0 instanceof Map; | ||
} catch (_) { | ||
@@ -939,33 +757,33 @@ result = false; | ||
}; | ||
imports.wbg.__wbg_set_49185437f0ab06f8 = function(arg0, arg1, arg2) { | ||
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2)); | ||
return addHeapObject(ret); | ||
imports.wbg.__wbg_set_277a63e77c89279f = function(arg0, arg1, arg2) { | ||
const ret = arg0.set(arg1, arg2); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_isSafeInteger_7f1ed56200d90674 = function(arg0) { | ||
const ret = Number.isSafeInteger(getObject(arg0)); | ||
imports.wbg.__wbg_isSafeInteger_b9dff570f01a9100 = function(arg0) { | ||
const ret = Number.isSafeInteger(arg0); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_entries_7a0e06255456ebcd = function(arg0) { | ||
const ret = Object.entries(getObject(arg0)); | ||
return addHeapObject(ret); | ||
imports.wbg.__wbg_entries_c02034de337d3ee2 = function(arg0) { | ||
const ret = Object.entries(arg0); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_buffer_b7b08af79b0b0974 = function(arg0) { | ||
const ret = getObject(arg0).buffer; | ||
return addHeapObject(ret); | ||
imports.wbg.__wbg_buffer_ccaed51a635d8a2d = function(arg0) { | ||
const ret = arg0.buffer; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_new_ea1883e1e5e86686 = function(arg0) { | ||
const ret = new Uint8Array(getObject(arg0)); | ||
return addHeapObject(ret); | ||
imports.wbg.__wbg_new_fec2611eb9180f95 = function(arg0) { | ||
const ret = new Uint8Array(arg0); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_set_d1e79e2388520f18 = function(arg0, arg1, arg2) { | ||
getObject(arg0).set(getObject(arg1), arg2 >>> 0); | ||
imports.wbg.__wbg_set_ec2fcf81bc573fd9 = function(arg0, arg1, arg2) { | ||
arg0.set(arg1, arg2 >>> 0); | ||
}; | ||
imports.wbg.__wbg_length_8339fcf5d8ecd12e = function(arg0) { | ||
const ret = getObject(arg0).length; | ||
imports.wbg.__wbg_length_9254c4bd3b9f23c4 = function(arg0) { | ||
const ret = arg0.length; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_instanceof_Uint8Array_247a91427532499e = function(arg0) { | ||
imports.wbg.__wbg_instanceof_Uint8Array_df0761410414ef36 = function(arg0) { | ||
let result; | ||
try { | ||
result = getObject(arg0) instanceof Uint8Array; | ||
result = arg0 instanceof Uint8Array; | ||
} catch (_) { | ||
@@ -978,3 +796,3 @@ result = false; | ||
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) { | ||
const v = getObject(arg1); | ||
const v = arg1; | ||
const ret = typeof(v) === 'bigint' ? v : undefined; | ||
@@ -985,3 +803,3 @@ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true); | ||
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { | ||
const ret = debugString(getObject(arg1)); | ||
const ret = debugString(arg1); | ||
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
@@ -997,4 +815,14 @@ const len1 = WASM_VECTOR_LEN; | ||
const ret = wasm.memory; | ||
return addHeapObject(ret); | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_init_externref_table = function() { | ||
const table = wasm.__wbindgen_export_2; | ||
const offset = table.grow(4); | ||
table.set(0, undefined); | ||
table.set(offset + 0, undefined); | ||
table.set(offset + 1, null); | ||
table.set(offset + 2, true); | ||
table.set(offset + 3, false); | ||
; | ||
}; | ||
@@ -1023,6 +851,9 @@ return imports; | ||
if (typeof module !== 'undefined' && Object.getPrototypeOf(module) === Object.prototype) | ||
({module} = module) | ||
else | ||
console.warn('using deprecated parameters for `initSync()`; pass a single object instead') | ||
if (typeof module !== 'undefined') { | ||
if (Object.getPrototypeOf(module) === Object.prototype) { | ||
({module} = module) | ||
} else { | ||
console.warn('using deprecated parameters for `initSync()`; pass a single object instead') | ||
} | ||
} | ||
@@ -1046,6 +877,9 @@ const imports = __wbg_get_imports(); | ||
if (typeof module_or_path !== 'undefined' && Object.getPrototypeOf(module_or_path) === Object.prototype) | ||
({module_or_path} = module_or_path) | ||
else | ||
console.warn('using deprecated parameters for the initialization function; pass a single object instead') | ||
if (typeof module_or_path !== 'undefined') { | ||
if (Object.getPrototypeOf(module_or_path) === Object.prototype) { | ||
({module_or_path} = module_or_path) | ||
} else { | ||
console.warn('using deprecated parameters for the initialization function; pass a single object instead') | ||
} | ||
} | ||
@@ -1052,0 +886,0 @@ if (typeof module_or_path === 'undefined') { |
@@ -8,3 +8,3 @@ { | ||
"description": "WebAssembly bindings to the Biome workspace API", | ||
"version": "1.9.5-nightly.92879ae", | ||
"version": "1.9.5-nightly.ff02a0b", | ||
"license": "MIT OR Apache-2.0", | ||
@@ -11,0 +11,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
14927917
4233