@noir-lang/noir_wasm
Advanced tools
Comparing version 0.17.0 to 0.18.0-1de0e6d.nightly
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export const memory: WebAssembly.Memory; | ||
export function __wbg_compileerror_free(a: number): void; | ||
export function __wbg_get_compileerror_message(a: number): number; | ||
export function __wbg_set_compileerror_message(a: number, b: number): void; | ||
export function __wbg_get_compileerror_diagnostics(a: number): number; | ||
export function __wbg_set_compileerror_diagnostics(a: number, b: number): void; | ||
export function init_log_level(a: number, b: number): void; | ||
export function build_info(): number; | ||
export function acir_read_bytes(a: number, b: number): number; | ||
export function acir_write_bytes(a: number, b: number): void; | ||
export function compile(a: number, b: number, c: number, d: number, e: number): void; | ||
export function init_log_level(a: number, b: number): void; | ||
export function build_info(): number; | ||
export function __wbindgen_export_0(a: number): number; | ||
@@ -15,0 +10,0 @@ export function __wbindgen_export_1(a: number, b: number, c: number): number; |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* @param {string} level | ||
*/ | ||
export function init_log_level(level: string): void; | ||
/** | ||
* @returns {any} | ||
*/ | ||
export function build_info(): any; | ||
/** | ||
* @param {Uint8Array} bytes | ||
@@ -24,10 +16,18 @@ * @returns {any} | ||
* @param {boolean | undefined} contracts | ||
* @param {string[] | undefined} dependencies | ||
* @param {DependencyGraph | undefined} dependency_graph | ||
* @returns {any} | ||
*/ | ||
export function compile(entry_point: string, contracts?: boolean, dependencies?: string[]): any; | ||
export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): any; | ||
/** | ||
* @param {string} level | ||
*/ | ||
export function init_log_level(level: string): void; | ||
/** | ||
* @returns {any} | ||
*/ | ||
export function build_info(): any; | ||
export type Diagnostic = { | ||
message: string; | ||
file_path: string; | ||
file: string; | ||
secondaries: ReadonlyArray<{ | ||
@@ -40,3 +40,4 @@ message: string; | ||
interface CompileError { | ||
export interface CompileError extends Error { | ||
message: string; | ||
diagnostics: ReadonlyArray<Diagnostic>; | ||
@@ -46,12 +47,8 @@ } | ||
/** | ||
*/ | ||
export class CompileError { | ||
free(): void; | ||
/** | ||
*/ | ||
diagnostics: any; | ||
/** | ||
*/ | ||
message: string; | ||
export type DependencyGraph = { | ||
root_dependencies: readonly string[]; | ||
library_dependencies: Readonly<Record<string, readonly string[]>>; | ||
} | ||
@@ -5,3 +5,3 @@ let imports = {}; | ||
const { read_file } = require(`@noir-lang/source-resolver`); | ||
const { TextEncoder, TextDecoder } = require(`util`); | ||
const { TextDecoder, TextEncoder } = require(`util`); | ||
@@ -28,2 +28,20 @@ const heap = new Array(128).fill(undefined); | ||
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); | ||
cachedTextDecoder.decode(); | ||
let cachedUint8Memory0 = null; | ||
function getUint8Memory0() { | ||
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { | ||
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); | ||
} | ||
return cachedUint8Memory0; | ||
} | ||
function getStringFromWasm0(ptr, len) { | ||
ptr = ptr >>> 0; | ||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); | ||
} | ||
function addHeapObject(obj) { | ||
@@ -40,11 +58,2 @@ if (heap_next === heap.length) heap.push(heap.length + 1); | ||
let cachedUint8Memory0 = null; | ||
function getUint8Memory0() { | ||
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { | ||
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); | ||
} | ||
return cachedUint8Memory0; | ||
} | ||
let cachedTextEncoder = new TextEncoder('utf-8'); | ||
@@ -116,27 +125,67 @@ | ||
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); | ||
cachedTextDecoder.decode(); | ||
function getStringFromWasm0(ptr, len) { | ||
ptr = ptr >>> 0; | ||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); | ||
function debugString(val) { | ||
// primitive types | ||
const type = typeof val; | ||
if (type == 'number' || type == 'boolean' || val == null) { | ||
return `${val}`; | ||
} | ||
if (type == 'string') { | ||
return `"${val}"`; | ||
} | ||
if (type == 'symbol') { | ||
const description = val.description; | ||
if (description == null) { | ||
return 'Symbol'; | ||
} else { | ||
return `Symbol(${description})`; | ||
} | ||
} | ||
if (type == 'function') { | ||
const name = val.name; | ||
if (typeof name == 'string' && name.length > 0) { | ||
return `Function(${name})`; | ||
} else { | ||
return 'Function'; | ||
} | ||
} | ||
// objects | ||
if (Array.isArray(val)) { | ||
const length = val.length; | ||
let debug = '['; | ||
if (length > 0) { | ||
debug += debugString(val[0]); | ||
} | ||
for(let i = 1; i < length; i++) { | ||
debug += ', ' + debugString(val[i]); | ||
} | ||
debug += ']'; | ||
return debug; | ||
} | ||
// Test for built-in | ||
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); | ||
let className; | ||
if (builtInMatches.length > 1) { | ||
className = builtInMatches[1]; | ||
} else { | ||
// Failed to match the standard '[object ClassName]' | ||
return toString.call(val); | ||
} | ||
if (className == 'Object') { | ||
// we're a user defined class or Object | ||
// JSON.stringify avoids problems with cycles, and is generally much | ||
// easier than looping through ownProperties of `val`. | ||
try { | ||
return 'Object(' + JSON.stringify(val) + ')'; | ||
} catch (_) { | ||
return 'Object'; | ||
} | ||
} | ||
// errors | ||
if (val instanceof Error) { | ||
return `${val.name}: ${val.message}\n${val.stack}`; | ||
} | ||
// TODO we could test for more things here, like `Set`s and `Map`s. | ||
return className; | ||
} | ||
/** | ||
* @param {string} level | ||
*/ | ||
module.exports.init_log_level = function(level) { | ||
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.init_log_level(ptr0, len0); | ||
}; | ||
/** | ||
* @returns {any} | ||
*/ | ||
module.exports.build_info = function() { | ||
const ret = wasm.build_info(); | ||
return takeObject(ret); | ||
}; | ||
function passArray8ToWasm0(arg, malloc) { | ||
@@ -184,6 +233,6 @@ const ptr = malloc(arg.length * 1) >>> 0; | ||
* @param {boolean | undefined} contracts | ||
* @param {string[] | undefined} dependencies | ||
* @param {DependencyGraph | undefined} dependency_graph | ||
* @returns {any} | ||
*/ | ||
module.exports.compile = function(entry_point, contracts, dependencies) { | ||
module.exports.compile = function(entry_point, contracts, dependency_graph) { | ||
try { | ||
@@ -193,3 +242,3 @@ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.compile(retptr, ptr0, len0, isLikeNone(contracts) ? 0xFFFFFF : contracts ? 1 : 0, isLikeNone(dependencies) ? 0 : addHeapObject(dependencies)); | ||
wasm.compile(retptr, ptr0, len0, isLikeNone(contracts) ? 0xFFFFFF : contracts ? 1 : 0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
@@ -215,56 +264,16 @@ var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
/** | ||
* @param {string} level | ||
*/ | ||
class CompileError { | ||
module.exports.init_log_level = function(level) { | ||
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.init_log_level(ptr0, len0); | ||
}; | ||
static __wrap(ptr) { | ||
ptr = ptr >>> 0; | ||
const obj = Object.create(CompileError.prototype); | ||
obj.__wbg_ptr = ptr; | ||
return obj; | ||
} | ||
__destroy_into_raw() { | ||
const ptr = this.__wbg_ptr; | ||
this.__wbg_ptr = 0; | ||
return ptr; | ||
} | ||
free() { | ||
const ptr = this.__destroy_into_raw(); | ||
wasm.__wbg_compileerror_free(ptr); | ||
} | ||
/** | ||
* @returns {string} | ||
*/ | ||
get message() { | ||
const ret = wasm.__wbg_get_compileerror_message(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {string} arg0 | ||
*/ | ||
set message(arg0) { | ||
wasm.__wbg_set_compileerror_message(this.__wbg_ptr, addHeapObject(arg0)); | ||
} | ||
/** | ||
* @returns {any} | ||
*/ | ||
get diagnostics() { | ||
const ret = wasm.__wbg_get_compileerror_diagnostics(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {any} arg0 | ||
*/ | ||
set diagnostics(arg0) { | ||
wasm.__wbg_set_compileerror_diagnostics(this.__wbg_ptr, addHeapObject(arg0)); | ||
} | ||
} | ||
module.exports.CompileError = CompileError; | ||
module.exports.__wbg_compileerror_new = function(arg0) { | ||
const ret = CompileError.__wrap(arg0); | ||
return addHeapObject(ret); | ||
/** | ||
* @returns {any} | ||
*/ | ||
module.exports.build_info = function() { | ||
const ret = wasm.build_info(); | ||
return takeObject(ret); | ||
}; | ||
@@ -276,16 +285,7 @@ | ||
module.exports.__wbindgen_object_clone_ref = function(arg0) { | ||
const ret = getObject(arg0); | ||
module.exports.__wbg_constructor_bc58db5a3b38f16c = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_string_get = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'string' ? obj : undefined; | ||
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
var len1 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len1; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr1; | ||
}; | ||
module.exports.__wbindgen_is_undefined = function(arg0) { | ||
@@ -296,3 +296,3 @@ const ret = getObject(arg0) === undefined; | ||
module.exports.__wbg_readfile_db7d495e3e198483 = function() { return handleError(function (arg0, arg1, arg2) { | ||
module.exports.__wbg_readfile_a8c4f775fbe0578e = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = read_file(getStringFromWasm0(arg1, arg2)); | ||
@@ -359,11 +359,15 @@ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
module.exports.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) { | ||
const ret = getObject(arg0)[arg1 >>> 0]; | ||
return addHeapObject(ret); | ||
module.exports.__wbindgen_string_get = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'string' ? obj : undefined; | ||
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
var len1 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len1; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr1; | ||
}; | ||
module.exports.__wbg_length_820c786973abdd8a = function(arg0) { | ||
const ret = getObject(arg0).length; | ||
module.exports.__wbg_set_07da13cc24b69217 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2)); | ||
return ret; | ||
}; | ||
}, arguments) }; | ||
@@ -380,2 +384,10 @@ module.exports.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) { | ||
module.exports.__wbindgen_debug_string = function(arg0, arg1) { | ||
const ret = debugString(getObject(arg1)); | ||
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
const len1 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len1; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr1; | ||
}; | ||
module.exports.__wbindgen_throw = function(arg0, arg1) { | ||
@@ -382,0 +394,0 @@ throw new Error(getStringFromWasm0(arg0, arg1)); |
@@ -6,3 +6,3 @@ { | ||
], | ||
"version": "0.17.0", | ||
"version": "0.18.0-1de0e6d.nightly", | ||
"license": "(MIT OR Apache-2.0)", | ||
@@ -35,3 +35,3 @@ "main": "./nodejs/noir_wasm.js", | ||
"peerDependencies": { | ||
"@noir-lang/source-resolver": "0.17.0" | ||
"@noir-lang/source-resolver": "0.18.0-1de0e6d.nightly" | ||
}, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export const memory: WebAssembly.Memory; | ||
export function __wbg_compileerror_free(a: number): void; | ||
export function __wbg_get_compileerror_message(a: number): number; | ||
export function __wbg_set_compileerror_message(a: number, b: number): void; | ||
export function __wbg_get_compileerror_diagnostics(a: number): number; | ||
export function __wbg_set_compileerror_diagnostics(a: number, b: number): void; | ||
export function init_log_level(a: number, b: number): void; | ||
export function build_info(): number; | ||
export function acir_read_bytes(a: number, b: number): number; | ||
export function acir_write_bytes(a: number, b: number): void; | ||
export function compile(a: number, b: number, c: number, d: number, e: number): void; | ||
export function init_log_level(a: number, b: number): void; | ||
export function build_info(): number; | ||
export function __wbindgen_export_0(a: number): number; | ||
@@ -15,0 +10,0 @@ export function __wbindgen_export_1(a: number, b: number, c: number): number; |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* @param {string} level | ||
*/ | ||
export function init_log_level(level: string): void; | ||
/** | ||
* @returns {any} | ||
*/ | ||
export function build_info(): any; | ||
/** | ||
* @param {Uint8Array} bytes | ||
@@ -24,10 +16,18 @@ * @returns {any} | ||
* @param {boolean | undefined} contracts | ||
* @param {string[] | undefined} dependencies | ||
* @param {DependencyGraph | undefined} dependency_graph | ||
* @returns {any} | ||
*/ | ||
export function compile(entry_point: string, contracts?: boolean, dependencies?: string[]): any; | ||
export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): any; | ||
/** | ||
* @param {string} level | ||
*/ | ||
export function init_log_level(level: string): void; | ||
/** | ||
* @returns {any} | ||
*/ | ||
export function build_info(): any; | ||
export type Diagnostic = { | ||
message: string; | ||
file_path: string; | ||
file: string; | ||
secondaries: ReadonlyArray<{ | ||
@@ -40,3 +40,4 @@ message: string; | ||
interface CompileError { | ||
export interface CompileError extends Error { | ||
message: string; | ||
diagnostics: ReadonlyArray<Diagnostic>; | ||
@@ -46,14 +47,10 @@ } | ||
/** | ||
*/ | ||
export class CompileError { | ||
free(): void; | ||
/** | ||
*/ | ||
diagnostics: any; | ||
/** | ||
*/ | ||
message: string; | ||
export type DependencyGraph = { | ||
root_dependencies: readonly string[]; | ||
library_dependencies: Readonly<Record<string, readonly string[]>>; | ||
} | ||
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; | ||
@@ -63,12 +60,7 @@ | ||
readonly memory: WebAssembly.Memory; | ||
readonly __wbg_compileerror_free: (a: number) => void; | ||
readonly __wbg_get_compileerror_message: (a: number) => number; | ||
readonly __wbg_set_compileerror_message: (a: number, b: number) => void; | ||
readonly __wbg_get_compileerror_diagnostics: (a: number) => number; | ||
readonly __wbg_set_compileerror_diagnostics: (a: number, b: number) => void; | ||
readonly init_log_level: (a: number, b: number) => void; | ||
readonly build_info: () => number; | ||
readonly acir_read_bytes: (a: number, b: number) => number; | ||
readonly acir_write_bytes: (a: number, b: number) => void; | ||
readonly compile: (a: number, b: number, c: number, d: number, e: number) => void; | ||
readonly init_log_level: (a: number, b: number) => void; | ||
readonly build_info: () => number; | ||
readonly __wbindgen_export_0: (a: number) => number; | ||
@@ -75,0 +67,0 @@ readonly __wbindgen_export_1: (a: number, b: number, c: number) => number; |
@@ -25,2 +25,20 @@ import { read_file } from '@noir-lang/source-resolver'; | ||
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); | ||
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; | ||
let cachedUint8Memory0 = null; | ||
function getUint8Memory0() { | ||
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { | ||
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); | ||
} | ||
return cachedUint8Memory0; | ||
} | ||
function getStringFromWasm0(ptr, len) { | ||
ptr = ptr >>> 0; | ||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); | ||
} | ||
function addHeapObject(obj) { | ||
@@ -37,11 +55,2 @@ if (heap_next === heap.length) heap.push(heap.length + 1); | ||
let cachedUint8Memory0 = null; | ||
function getUint8Memory0() { | ||
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { | ||
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); | ||
} | ||
return cachedUint8Memory0; | ||
} | ||
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } ); | ||
@@ -113,27 +122,67 @@ | ||
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); | ||
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; | ||
function getStringFromWasm0(ptr, len) { | ||
ptr = ptr >>> 0; | ||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); | ||
function debugString(val) { | ||
// primitive types | ||
const type = typeof val; | ||
if (type == 'number' || type == 'boolean' || val == null) { | ||
return `${val}`; | ||
} | ||
if (type == 'string') { | ||
return `"${val}"`; | ||
} | ||
if (type == 'symbol') { | ||
const description = val.description; | ||
if (description == null) { | ||
return 'Symbol'; | ||
} else { | ||
return `Symbol(${description})`; | ||
} | ||
} | ||
if (type == 'function') { | ||
const name = val.name; | ||
if (typeof name == 'string' && name.length > 0) { | ||
return `Function(${name})`; | ||
} else { | ||
return 'Function'; | ||
} | ||
} | ||
// objects | ||
if (Array.isArray(val)) { | ||
const length = val.length; | ||
let debug = '['; | ||
if (length > 0) { | ||
debug += debugString(val[0]); | ||
} | ||
for(let i = 1; i < length; i++) { | ||
debug += ', ' + debugString(val[i]); | ||
} | ||
debug += ']'; | ||
return debug; | ||
} | ||
// Test for built-in | ||
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); | ||
let className; | ||
if (builtInMatches.length > 1) { | ||
className = builtInMatches[1]; | ||
} else { | ||
// Failed to match the standard '[object ClassName]' | ||
return toString.call(val); | ||
} | ||
if (className == 'Object') { | ||
// we're a user defined class or Object | ||
// JSON.stringify avoids problems with cycles, and is generally much | ||
// easier than looping through ownProperties of `val`. | ||
try { | ||
return 'Object(' + JSON.stringify(val) + ')'; | ||
} catch (_) { | ||
return 'Object'; | ||
} | ||
} | ||
// errors | ||
if (val instanceof Error) { | ||
return `${val.name}: ${val.message}\n${val.stack}`; | ||
} | ||
// TODO we could test for more things here, like `Set`s and `Map`s. | ||
return className; | ||
} | ||
/** | ||
* @param {string} level | ||
*/ | ||
export function init_log_level(level) { | ||
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.init_log_level(ptr0, len0); | ||
} | ||
/** | ||
* @returns {any} | ||
*/ | ||
export function build_info() { | ||
const ret = wasm.build_info(); | ||
return takeObject(ret); | ||
} | ||
function passArray8ToWasm0(arg, malloc) { | ||
@@ -181,6 +230,6 @@ const ptr = malloc(arg.length * 1) >>> 0; | ||
* @param {boolean | undefined} contracts | ||
* @param {string[] | undefined} dependencies | ||
* @param {DependencyGraph | undefined} dependency_graph | ||
* @returns {any} | ||
*/ | ||
export function compile(entry_point, contracts, dependencies) { | ||
export function compile(entry_point, contracts, dependency_graph) { | ||
try { | ||
@@ -190,3 +239,3 @@ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.compile(retptr, ptr0, len0, isLikeNone(contracts) ? 0xFFFFFF : contracts ? 1 : 0, isLikeNone(dependencies) ? 0 : addHeapObject(dependencies)); | ||
wasm.compile(retptr, ptr0, len0, isLikeNone(contracts) ? 0xFFFFFF : contracts ? 1 : 0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
@@ -212,50 +261,16 @@ var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
/** | ||
* @param {string} level | ||
*/ | ||
export class CompileError { | ||
export function init_log_level(level) { | ||
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.init_log_level(ptr0, len0); | ||
} | ||
static __wrap(ptr) { | ||
ptr = ptr >>> 0; | ||
const obj = Object.create(CompileError.prototype); | ||
obj.__wbg_ptr = ptr; | ||
return obj; | ||
} | ||
__destroy_into_raw() { | ||
const ptr = this.__wbg_ptr; | ||
this.__wbg_ptr = 0; | ||
return ptr; | ||
} | ||
free() { | ||
const ptr = this.__destroy_into_raw(); | ||
wasm.__wbg_compileerror_free(ptr); | ||
} | ||
/** | ||
* @returns {string} | ||
*/ | ||
get message() { | ||
const ret = wasm.__wbg_get_compileerror_message(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {string} arg0 | ||
*/ | ||
set message(arg0) { | ||
wasm.__wbg_set_compileerror_message(this.__wbg_ptr, addHeapObject(arg0)); | ||
} | ||
/** | ||
* @returns {any} | ||
*/ | ||
get diagnostics() { | ||
const ret = wasm.__wbg_get_compileerror_diagnostics(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {any} arg0 | ||
*/ | ||
set diagnostics(arg0) { | ||
wasm.__wbg_set_compileerror_diagnostics(this.__wbg_ptr, addHeapObject(arg0)); | ||
} | ||
/** | ||
* @returns {any} | ||
*/ | ||
export function build_info() { | ||
const ret = wasm.build_info(); | ||
return takeObject(ret); | ||
} | ||
@@ -297,21 +312,9 @@ | ||
imports.wbg = {}; | ||
imports.wbg.__wbg_compileerror_new = function(arg0) { | ||
const ret = CompileError.__wrap(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
imports.wbg.__wbindgen_object_clone_ref = function(arg0) { | ||
const ret = getObject(arg0); | ||
imports.wbg.__wbg_constructor_bc58db5a3b38f16c = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_string_get = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'string' ? obj : undefined; | ||
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
var len1 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len1; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr1; | ||
}; | ||
imports.wbg.__wbindgen_is_undefined = function(arg0) { | ||
@@ -321,3 +324,3 @@ const ret = getObject(arg0) === undefined; | ||
}; | ||
imports.wbg.__wbg_readfile_db7d495e3e198483 = function() { return handleError(function (arg0, arg1, arg2) { | ||
imports.wbg.__wbg_readfile_a8c4f775fbe0578e = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = read_file(getStringFromWasm0(arg1, arg2)); | ||
@@ -373,10 +376,14 @@ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
}; | ||
imports.wbg.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) { | ||
const ret = getObject(arg0)[arg1 >>> 0]; | ||
return addHeapObject(ret); | ||
imports.wbg.__wbindgen_string_get = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'string' ? obj : undefined; | ||
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
var len1 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len1; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr1; | ||
}; | ||
imports.wbg.__wbg_length_820c786973abdd8a = function(arg0) { | ||
const ret = getObject(arg0).length; | ||
imports.wbg.__wbg_set_07da13cc24b69217 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2)); | ||
return ret; | ||
}; | ||
}, arguments) }; | ||
imports.wbg.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) { | ||
@@ -390,2 +397,9 @@ const ret = JSON.parse(getStringFromWasm0(arg0, arg1)); | ||
}, arguments) }; | ||
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { | ||
const ret = debugString(getObject(arg1)); | ||
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
const len1 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len1; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr1; | ||
}; | ||
imports.wbg.__wbindgen_throw = function(arg0, arg1) { | ||
@@ -392,0 +406,0 @@ throw new Error(getStringFromWasm0(arg0, arg1)); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
15467138
873