Compare commits

..

No commits in common. "0531387498a23fb1725bc73620ee9e956c167b70" and "5c08cd4acc2540b3379c310099784e3596a48497" have entirely different histories.

3 changed files with 10 additions and 2 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,10 +260,11 @@ 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,6 +109,8 @@
/* 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>
@ -310,11 +312,13 @@ 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 {
@ -1660,7 +1664,9 @@ 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;
@ -54315,6 +54321,7 @@ JSBreakpoint *JS_SetBreakpoint(JSContext *ctx, JSAtom file, int line)
} }
} }
} }
return NULL; return NULL;
} }