Skip to content

Commit

Permalink
New debugger build
Browse files Browse the repository at this point in the history
  • Loading branch information
nekevss committed Jan 20, 2024
1 parent 3a17a52 commit 8556504
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 38 deletions.
16 changes: 16 additions & 0 deletions src/boa/experimental/pkg/boa_wasm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@
export function main(): void;
/**
* Evaluate the given ECMAScript code.
*
* # Errors
*
* If the execution of the script throws, returns a `JsValue` with the error string.
* @param {string} src
* @returns {string}
*/
export function evaluate(src: string): string;
/**
* Evaluate some JavaScript with trace hooks.
*
* # Errors
*
* If the execution of the script throws, returns a `JsValue` with the error string.
* @param {string} src
* @param {Function} compiled_output_action
* @param {Function} trace_output_action
Expand Down Expand Up @@ -38,12 +46,20 @@ export class BoaJs {
set_trace_output_action(f: Function): void;
/**
* Evaluate some Js Source Code with trace active.
*
* # Errors
*
* If the execution of the script throws, returns a `JsValue` with the error string.
* @param {string} src
* @returns {string}
*/
evaluate_with_trace(src: string): string;
/**
* Evaluate Js Source code without running trace.
*
* # Errors
*
* If the execution of the script throws, returns a `JsValue` with the error string.
* @param {string} src
* @returns {string}
*/
Expand Down
110 changes: 72 additions & 38 deletions src/boa/experimental/pkg/boa_wasm_bg.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ function getInt32Memory0() {
}
/**
* Evaluate the given ECMAScript code.
*
* # Errors
*
* If the execution of the script throws, returns a `JsValue` with the error string.
* @param {string} src
* @returns {string}
*/
Expand Down Expand Up @@ -164,6 +168,10 @@ function addBorrowedObject(obj) {
}
/**
* Evaluate some JavaScript with trace hooks.
*
* # Errors
*
* If the execution of the script throws, returns a `JsValue` with the error string.
* @param {string} src
* @param {Function} compiled_output_action
* @param {Function} trace_output_action
Expand Down Expand Up @@ -210,14 +218,6 @@ function handleError(f, args) {
*/
export class BoaJs {

static __wrap(ptr) {
ptr = ptr >>> 0;
const obj = Object.create(BoaJs.prototype);
obj.__wbg_ptr = ptr;

return obj;
}

__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
Expand All @@ -234,7 +234,8 @@ export class BoaJs {
*/
constructor() {
const ret = wasm.boajs_new();
return BoaJs.__wrap(ret);
this.__wbg_ptr = ret >>> 0;
return this;
}
/**
* Set a Js Closure action for handling Boa's ByteCompiler trace output.
Expand All @@ -260,6 +261,10 @@ export class BoaJs {
}
/**
* Evaluate some Js Source Code with trace active.
*
* # Errors
*
* If the execution of the script throws, returns a `JsValue` with the error string.
* @param {string} src
* @returns {string}
*/
Expand Down Expand Up @@ -291,6 +296,10 @@ export class BoaJs {
}
/**
* Evaluate Js Source code without running trace.
*
* # Errors
*
* If the execution of the script throws, returns a `JsValue` with the error string.
* @param {string} src
* @returns {string}
*/
Expand Down Expand Up @@ -361,15 +370,15 @@ export function __wbg_error_f851667af71bcfc6(arg0, arg1) {
}
};

export function __wbg_getRandomValues_37fa2ca9e4e07fab() { return handleError(function (arg0, arg1) {
export function __wbg_getRandomValues_7e42b4fb8779dc6d() { return handleError(function (arg0, arg1) {
getObject(arg0).getRandomValues(getObject(arg1));
}, arguments) };

export function __wbg_randomFillSync_dc1e9a60c158336d() { return handleError(function (arg0, arg1) {
export function __wbg_randomFillSync_b70ccbdf4926a99d() { return handleError(function (arg0, arg1) {
getObject(arg0).randomFillSync(takeObject(arg1));
}, arguments) };

export function __wbg_crypto_c48a774b022d20ac(arg0) {
export function __wbg_crypto_d05b68a3572bb8ca(arg0) {
const ret = getObject(arg0).crypto;
return addHeapObject(ret);
};
Expand All @@ -380,17 +389,17 @@ export function __wbindgen_is_object(arg0) {
return ret;
};

export function __wbg_process_298734cf255a885d(arg0) {
export function __wbg_process_b02b3570280d0366(arg0) {
const ret = getObject(arg0).process;
return addHeapObject(ret);
};

export function __wbg_versions_e2e78e134e3e5d01(arg0) {
export function __wbg_versions_c1cb42213cedf0f5(arg0) {
const ret = getObject(arg0).versions;
return addHeapObject(ret);
};

export function __wbg_node_1cd7a5d853dbea79(arg0) {
export function __wbg_node_43b1089f407e4ec2(arg0) {
const ret = getObject(arg0).node;
return addHeapObject(ret);
};
Expand All @@ -400,12 +409,12 @@ export function __wbindgen_is_string(arg0) {
return ret;
};

export function __wbg_msCrypto_bcb970640f50a1e8(arg0) {
export function __wbg_msCrypto_10fc94afee92bd76(arg0) {
const ret = getObject(arg0).msCrypto;
return addHeapObject(ret);
};

export function __wbg_require_8f08ceecec0f4fee() { return handleError(function () {
export function __wbg_require_9a7e0f667ead4995() { return handleError(function () {
const ret = module.require;
return addHeapObject(ret);
}, arguments) };
Expand All @@ -415,86 +424,111 @@ export function __wbindgen_is_function(arg0) {
return ret;
};

export function __wbg_newnoargs_581967eacc0e2604(arg0, arg1) {
export function __wbg_performance_3f3012faa4463882(arg0) {
const ret = getObject(arg0).performance;
return addHeapObject(ret);
};

export function __wbindgen_is_undefined(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
};

export function __wbg_now_2fd65358804c9485(arg0) {
const ret = getObject(arg0).now();
return ret;
};

export function __wbindgen_number_new(arg0) {
const ret = arg0;
return addHeapObject(ret);
};

export function __wbg_newnoargs_c62ea9419c21fbac(arg0, arg1) {
const ret = new Function(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};

export function __wbg_call_cb65541d95d71282() { return handleError(function (arg0, arg1) {
export function __wbg_call_90c26b09837aba1c() { return handleError(function (arg0, arg1) {
const ret = getObject(arg0).call(getObject(arg1));
return addHeapObject(ret);
}, arguments) };

export function __wbg_call_01734de55d61e11d() { return handleError(function (arg0, arg1, arg2) {
export function __wbg_call_5da1969d7cd31ccd() { return handleError(function (arg0, arg1, arg2) {
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
return addHeapObject(ret);
}, arguments) };

export function __wbg_getTime_5e2054f832d82ec9(arg0) {
export function __wbg_getTime_9272be78826033e1(arg0) {
const ret = getObject(arg0).getTime();
return ret;
};

export function __wbg_getTimezoneOffset_8aee3445f323973e(arg0) {
export function __wbg_getTimezoneOffset_e742a5098e2c04d3(arg0) {
const ret = getObject(arg0).getTimezoneOffset();
return ret;
};

export function __wbg_new0_c0be7df4b6bd481f() {
export function __wbg_new_d77fabdc03b9edd6(arg0) {
const ret = new Date(getObject(arg0));
return addHeapObject(ret);
};

export function __wbg_new0_622c21a64f3d83ea() {
const ret = new Date();
return addHeapObject(ret);
};

export function __wbg_buffer_085ec1f694018c4f(arg0) {
export function __wbg_newwithyearmonthdayhrminsec_8288090e39a68ed6(arg0, arg1, arg2, arg3, arg4, arg5) {
const ret = new Date(arg0 >>> 0, arg1, arg2, arg3, arg4, arg5);
return addHeapObject(ret);
};

export function __wbg_buffer_a448f833075b71ba(arg0) {
const ret = getObject(arg0).buffer;
return addHeapObject(ret);
};

export function __wbg_self_1ff1d729e9aae938() { return handleError(function () {
export function __wbg_self_f0e34d89f33b99fd() { return handleError(function () {
const ret = self.self;
return addHeapObject(ret);
}, arguments) };

export function __wbg_window_5f4faef6c12b79ec() { return handleError(function () {
export function __wbg_window_d3b084224f4774d7() { return handleError(function () {
const ret = window.window;
return addHeapObject(ret);
}, arguments) };

export function __wbg_globalThis_1d39714405582d3c() { return handleError(function () {
export function __wbg_globalThis_9caa27ff917c6860() { return handleError(function () {
const ret = globalThis.globalThis;
return addHeapObject(ret);
}, arguments) };

export function __wbg_global_651f05c6a0944d1c() { return handleError(function () {
export function __wbg_global_35dfdd59a4da3e74() { return handleError(function () {
const ret = global.global;
return addHeapObject(ret);
}, arguments) };

export function __wbindgen_is_undefined(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
};

export function __wbg_newwithbyteoffsetandlength_6da8e527659b86aa(arg0, arg1, arg2) {
export function __wbg_newwithbyteoffsetandlength_d0482f893617af71(arg0, arg1, arg2) {
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
return addHeapObject(ret);
};

export function __wbg_new_8125e318e6245eed(arg0) {
export function __wbg_new_8f67e318f15d7254(arg0) {
const ret = new Uint8Array(getObject(arg0));
return addHeapObject(ret);
};

export function __wbg_set_5cf90238115182c3(arg0, arg1, arg2) {
export function __wbg_set_2357bf09366ee480(arg0, arg1, arg2) {
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
};

export function __wbg_newwithlength_e5d69174d6984cd7(arg0) {
export function __wbg_newwithlength_6c2df9e2f3028c43(arg0) {
const ret = new Uint8Array(arg0 >>> 0);
return addHeapObject(ret);
};

export function __wbg_subarray_13db269f57aa838d(arg0, arg1, arg2) {
export function __wbg_subarray_2e940e41c0f5a1d9(arg0, arg1, arg2) {
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
return addHeapObject(ret);
};
Expand Down
Binary file modified src/boa/experimental/pkg/boa_wasm_bg.wasm
Binary file not shown.

0 comments on commit 8556504

Please sign in to comment.