diff --git a/oden-js-sys/quickjs/Makefile b/oden-js-sys/quickjs/Makefile index 097a7e9e..77f27a99 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 diff --git a/oden-js-sys/quickjs/quickjs-opcode.h b/oden-js-sys/quickjs/quickjs-opcode.h index 877ea45d..a99c5666 100644 --- a/oden-js-sys/quickjs/quickjs-opcode.h +++ b/oden-js-sys/quickjs/quickjs-opcode.h @@ -260,10 +260,11 @@ 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 */ diff --git a/oden-js-sys/quickjs/quickjs.c b/oden-js-sys/quickjs/quickjs.c index f7033f31..159ecb81 100644 --- a/oden-js-sys/quickjs/quickjs.c +++ b/oden-js-sys/quickjs/quickjs.c @@ -109,6 +109,8 @@ /* test the GC by forcing it before each object allocation */ //#define FORCE_GC_AT_MALLOC +#define CONFIG_DEBUGGER + #ifdef CONFIG_ATOMICS #include #include @@ -310,11 +312,13 @@ 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 { @@ -1660,7 +1664,9 @@ 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; @@ -54315,6 +54321,7 @@ JSBreakpoint *JS_SetBreakpoint(JSContext *ctx, JSAtom file, int line) } } } + return NULL; }