Compare commits

...

3 commits

Author SHA1 Message Date
0531387498 [quickjs] Turn off asan again 2023-09-23 09:11:35 -05:00
26fb773b0b [quickjs] Oops the breakpoint op can't be defined here or bad things
I should have read the very important comment. :(
2023-09-23 09:11:07 -05:00
3570c7a55b [quickjs] Remove CONFIG_DEBUGGER for now
I will add it back later once the debugger is done
2023-09-23 09:10:48 -05:00
3 changed files with 2 additions and 10 deletions

View file

@ -46,7 +46,7 @@ prefix=/usr/local
# use the gprof profiler # use the gprof profiler
#CONFIG_PROFILE=y #CONFIG_PROFILE=y
# use address sanitizer # use address sanitizer
CONFIG_ASAN=y #CONFIG_ASAN=y
# include the code for BigInt/BigFloat/BigDecimal and math mode # include the code for BigInt/BigFloat/BigDecimal and math mode
CONFIG_BIGNUM=y CONFIG_BIGNUM=y

View file

@ -260,11 +260,10 @@ DEF(is_undefined_or_null, 1, 1, 1, none)
DEF( mul_pow10, 1, 2, 1, none) DEF( mul_pow10, 1, 2, 1, none)
DEF( math_mod, 1, 2, 1, none) DEF( math_mod, 1, 2, 1, none)
#endif #endif
DEF( breakpoint, 1, 0, 1, none)
/* must be the last non short and non temporary opcode */ /* must be the last non short and non temporary opcode */
DEF( nop, 1, 0, 0, none) DEF( nop, 1, 0, 0, none)
DEF( breakpoint, 1, 0, 1, none)
/* temporary opcodes: never emitted in the final bytecode */ /* temporary opcodes: never emitted in the final bytecode */
def( enter_scope, 3, 0, 0, u16) /* emitted in phase 1, removed in phase 2 */ def( enter_scope, 3, 0, 0, u16) /* emitted in phase 1, removed in phase 2 */

View file

@ -109,8 +109,6 @@
/* test the GC by forcing it before each object allocation */ /* test the GC by forcing it before each object allocation */
//#define FORCE_GC_AT_MALLOC //#define FORCE_GC_AT_MALLOC
#define CONFIG_DEBUGGER
#ifdef CONFIG_ATOMICS #ifdef CONFIG_ATOMICS
#include <pthread.h> #include <pthread.h>
#include <stdatomic.h> #include <stdatomic.h>
@ -312,13 +310,11 @@ struct JSRuntime {
#endif #endif
void *user_opaque; void *user_opaque;
#ifdef CONFIG_DEBUGGER
struct list_head breakpoint_list; struct list_head breakpoint_list;
JSDebugCallbackFunc *debug_callback; JSDebugCallbackFunc *debug_callback;
void *debug_opaque; void *debug_opaque;
int stepping_pc; int stepping_pc;
uint8_t stepping_byte; uint8_t stepping_byte;
#endif
}; };
struct JSClass { struct JSClass {
@ -1664,9 +1660,7 @@ JSRuntime *JS_NewRuntime2(const JSMallocFunctions *mf, void *opaque)
#endif #endif
init_list_head(&rt->job_list); init_list_head(&rt->job_list);
#ifdef CONFIG_DEBUGGER
init_list_head(&rt->breakpoint_list); init_list_head(&rt->breakpoint_list);
#endif
if (JS_InitAtoms(rt)) if (JS_InitAtoms(rt))
goto fail; goto fail;
@ -54321,7 +54315,6 @@ JSBreakpoint *JS_SetBreakpoint(JSContext *ctx, JSAtom file, int line)
} }
} }
} }
return NULL; return NULL;
} }