From 3570c7a55b8980ef3768e2797508fc331b03109f Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 23 Sep 2023 09:10:48 -0500 Subject: [PATCH 1/3] [quickjs] Remove CONFIG_DEBUGGER for now I will add it back later once the debugger is done --- oden-js-sys/quickjs/quickjs.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/oden-js-sys/quickjs/quickjs.c b/oden-js-sys/quickjs/quickjs.c index 159ecb81..f7033f31 100644 --- a/oden-js-sys/quickjs/quickjs.c +++ b/oden-js-sys/quickjs/quickjs.c @@ -109,8 +109,6 @@ /* test the GC by forcing it before each object allocation */ //#define FORCE_GC_AT_MALLOC -#define CONFIG_DEBUGGER - #ifdef CONFIG_ATOMICS #include #include @@ -312,13 +310,11 @@ struct JSRuntime { #endif void *user_opaque; -#ifdef CONFIG_DEBUGGER struct list_head breakpoint_list; JSDebugCallbackFunc *debug_callback; void *debug_opaque; int stepping_pc; uint8_t stepping_byte; -#endif }; struct JSClass { @@ -1664,9 +1660,7 @@ JSRuntime *JS_NewRuntime2(const JSMallocFunctions *mf, void *opaque) #endif init_list_head(&rt->job_list); -#ifdef CONFIG_DEBUGGER init_list_head(&rt->breakpoint_list); -#endif if (JS_InitAtoms(rt)) goto fail; @@ -54321,7 +54315,6 @@ JSBreakpoint *JS_SetBreakpoint(JSContext *ctx, JSAtom file, int line) } } } - return NULL; } From 26fb773b0bf6e5de32b7c16a9f0527dfb5ed0137 Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 23 Sep 2023 09:11:07 -0500 Subject: [PATCH 2/3] [quickjs] Oops the breakpoint op can't be defined here or bad things I should have read the very important comment. :( --- oden-js-sys/quickjs/quickjs-opcode.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/oden-js-sys/quickjs/quickjs-opcode.h b/oden-js-sys/quickjs/quickjs-opcode.h index a99c5666..877ea45d 100644 --- a/oden-js-sys/quickjs/quickjs-opcode.h +++ b/oden-js-sys/quickjs/quickjs-opcode.h @@ -260,11 +260,10 @@ DEF(is_undefined_or_null, 1, 1, 1, none) DEF( mul_pow10, 1, 2, 1, none) DEF( math_mod, 1, 2, 1, none) #endif +DEF( breakpoint, 1, 0, 1, none) /* must be the last non short and non temporary opcode */ DEF( nop, 1, 0, 0, none) -DEF( breakpoint, 1, 0, 1, none) - /* temporary opcodes: never emitted in the final bytecode */ def( enter_scope, 3, 0, 0, u16) /* emitted in phase 1, removed in phase 2 */ From 0531387498a23fb1725bc73620ee9e956c167b70 Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 23 Sep 2023 09:11:35 -0500 Subject: [PATCH 3/3] [quickjs] Turn off asan again --- oden-js-sys/quickjs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oden-js-sys/quickjs/Makefile b/oden-js-sys/quickjs/Makefile index 77f27a99..097a7e9e 100644 --- a/oden-js-sys/quickjs/Makefile +++ b/oden-js-sys/quickjs/Makefile @@ -46,7 +46,7 @@ prefix=/usr/local # use the gprof profiler #CONFIG_PROFILE=y # use address sanitizer -CONFIG_ASAN=y +#CONFIG_ASAN=y # include the code for BigInt/BigFloat/BigDecimal and math mode CONFIG_BIGNUM=y