clean up
Some checks failed
ci / Linux (Ubuntu) (push) Failing after 0s
ci / linux-asan (push) Failing after 25s
ci / Windows (mingw) (push) Failing after 3s
ci / MinGW Windows target (push) Failing after 15s
ci / Linux 32bit (push) Failing after 26s
ci / qemu-alpine (linux/arm/v6) (push) Failing after 15s
ci / qemu-alpine (linux/s390x) (push) Failing after 6s
ci / qemu-alpine (linux/arm64) (push) Failing after 12s
ci / qemu-alpine (linux/riscv64) (push) Failing after 10s
ci / macOS (push) Has been cancelled
ci / macos-asan (push) Has been cancelled
ci / macos-ubsan (push) Has been cancelled
ci / Windows MSYS2 (push) Has been cancelled
ci / qemu-alpine (linux/386) (push) Has been cancelled
ci / Linux LTO (push) Has been cancelled
ci / linux-ubsan (push) Has been cancelled
ci / freebsd (push) Has been cancelled
ci / Cosmopolitan (push) Has been cancelled
ci / qemu-alpine (linux/arm/v7) (push) Has been cancelled
ci / qemu-alpine (linux/ppc64le) (push) Has been cancelled
Some checks failed
ci / Linux (Ubuntu) (push) Failing after 0s
ci / linux-asan (push) Failing after 25s
ci / Windows (mingw) (push) Failing after 3s
ci / MinGW Windows target (push) Failing after 15s
ci / Linux 32bit (push) Failing after 26s
ci / qemu-alpine (linux/arm/v6) (push) Failing after 15s
ci / qemu-alpine (linux/s390x) (push) Failing after 6s
ci / qemu-alpine (linux/arm64) (push) Failing after 12s
ci / qemu-alpine (linux/riscv64) (push) Failing after 10s
ci / macOS (push) Has been cancelled
ci / macos-asan (push) Has been cancelled
ci / macos-ubsan (push) Has been cancelled
ci / Windows MSYS2 (push) Has been cancelled
ci / qemu-alpine (linux/386) (push) Has been cancelled
ci / Linux LTO (push) Has been cancelled
ci / linux-ubsan (push) Has been cancelled
ci / freebsd (push) Has been cancelled
ci / Cosmopolitan (push) Has been cancelled
ci / qemu-alpine (linux/arm/v7) (push) Has been cancelled
ci / qemu-alpine (linux/ppc64le) (push) Has been cancelled
This commit is contained in:
21
quickjs.c
21
quickjs.c
@@ -1275,7 +1275,7 @@ static void js_trigger_gc(JSRuntime *rt, size_t size)
|
|||||||
fprintf(dumpout, "GC: size=%" PRIu64 "\n",
|
fprintf(dumpout, "GC: size=%" PRIu64 "\n",
|
||||||
(uint64_t)rt->malloc_state.malloc_size);
|
(uint64_t)rt->malloc_state.malloc_size);
|
||||||
#endif
|
#endif
|
||||||
JS_RunGC(rt, NULL);
|
JS_RunGC(rt);
|
||||||
rt->malloc_gc_threshold = rt->malloc_state.malloc_size +
|
rt->malloc_gc_threshold = rt->malloc_state.malloc_size +
|
||||||
(rt->malloc_state.malloc_size >> 1);
|
(rt->malloc_state.malloc_size >> 1);
|
||||||
}
|
}
|
||||||
@@ -5060,7 +5060,7 @@ static __maybe_unused void JS_DumpShapes(JSRuntime *rt)
|
|||||||
fprintf(dumpout, "}\n");
|
fprintf(dumpout, "}\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
JSShape *JS_ObjectShape(JSContext *js, JSValue v)
|
JSShape *JS_ObjectShape(JSContext *js, JSValueConst v)
|
||||||
{
|
{
|
||||||
JSObject *p = JS_VALUE_GET_OBJ(v);
|
JSObject *p = JS_VALUE_GET_OBJ(v);
|
||||||
if (!p || !p->shape) return NULL;
|
if (!p || !p->shape) return NULL;
|
||||||
@@ -6282,9 +6282,6 @@ static void JS_RunGCInternal(JSRuntime *rt, BOOL remove_weak_objects)
|
|||||||
gc_remove_weak_objects(rt);
|
gc_remove_weak_objects(rt);
|
||||||
}
|
}
|
||||||
|
|
||||||
double n = stm_now();
|
|
||||||
double size = rt->malloc_state.malloc_size;
|
|
||||||
|
|
||||||
/* decrement the reference of the children of each object. mark =
|
/* decrement the reference of the children of each object. mark =
|
||||||
1 after this pass. */
|
1 after this pass. */
|
||||||
gc_decref(rt);
|
gc_decref(rt);
|
||||||
@@ -6307,8 +6304,6 @@ static void JS_RunGCInternal(JSRuntime *rt, BOOL remove_weak_objects)
|
|||||||
}*/
|
}*/
|
||||||
/* free the GC objects in a cycle */
|
/* free the GC objects in a cycle */
|
||||||
gc_free_cycles(rt);
|
gc_free_cycles(rt);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JS_RunGC(JSRuntime *rt)
|
void JS_RunGC(JSRuntime *rt)
|
||||||
@@ -7005,11 +7000,6 @@ const char *get_func_name(JSContext *ctx, JSValueConst func)
|
|||||||
return JS_ToCString(ctx, val);
|
return JS_ToCString(ctx, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
int js_fn_linenum(JSContext *js, JSValueConst fn)
|
|
||||||
{
|
|
||||||
return JS_VALUE_GET_OBJ(fn)->u.func.function_bytecode->debug.line_num;
|
|
||||||
}
|
|
||||||
|
|
||||||
JSAtom js_fn_filename(JSContext *js, JSValueConst fn)
|
JSAtom js_fn_filename(JSContext *js, JSValueConst fn)
|
||||||
{
|
{
|
||||||
return JS_VALUE_GET_OBJ(fn)->u.func.function_bytecode->debug.filename;
|
return JS_VALUE_GET_OBJ(fn)->u.func.function_bytecode->debug.filename;
|
||||||
@@ -55014,7 +55004,7 @@ void js_debug_info(JSContext *js, JSValue fn, js_debug *dbg)
|
|||||||
dbg->closure_n = b->closure_var_count;
|
dbg->closure_n = b->closure_var_count;
|
||||||
dbg->param_n = b->arg_count;
|
dbg->param_n = b->arg_count;
|
||||||
dbg->vararg = 1;
|
dbg->vararg = 1;
|
||||||
dbg->line = b->debug.line_num;
|
// dbg->line = b->debug.line_num;
|
||||||
dbg->source = b->debug.source;
|
dbg->source = b->debug.source;
|
||||||
dbg->srclen = b->debug.source_len;
|
dbg->srclen = b->debug.source_len;
|
||||||
break;
|
break;
|
||||||
@@ -55066,7 +55056,8 @@ JSValue js_debugger_build_backtrace(JSContext *ctx, const uint8_t *cur_pc)
|
|||||||
b = p->u.func.function_bytecode;
|
b = p->u.func.function_bytecode;
|
||||||
if (b->has_debug) {
|
if (b->has_debug) {
|
||||||
const uint8_t *pc = sf != ctx->rt->current_stack_frame || !cur_pc ? sf->cur_pc : cur_pc;
|
const uint8_t *pc = sf != ctx->rt->current_stack_frame || !cur_pc ? sf->cur_pc : cur_pc;
|
||||||
line_num1 = find_line_num(ctx, b, pc - b->byte_code_buf - 1);
|
int col_num;
|
||||||
|
line_num1 = find_line_num(ctx, b, pc - b->byte_code_buf - 1, &col_num);
|
||||||
JS_SetPropertyStr(ctx, current_frame, "filename", JS_AtomToString(ctx, b->debug.filename));
|
JS_SetPropertyStr(ctx, current_frame, "filename", JS_AtomToString(ctx, b->debug.filename));
|
||||||
if (line_num1 != -1)
|
if (line_num1 != -1)
|
||||||
JS_SetPropertyStr(ctx, current_frame, "line", JS_NewUint32(ctx, line_num1));
|
JS_SetPropertyStr(ctx, current_frame, "line", JS_NewUint32(ctx, line_num1));
|
||||||
@@ -55089,7 +55080,7 @@ JSValue js_debugger_fn_info(JSContext *ctx, JSValue fn)
|
|||||||
JSFunctionBytecode *b = f->u.func.function_bytecode;
|
JSFunctionBytecode *b = f->u.func.function_bytecode;
|
||||||
if (b->has_debug) {
|
if (b->has_debug) {
|
||||||
JS_SetPropertyStr(ctx, ret, "filename", JS_AtomToString(ctx, b->debug.filename));
|
JS_SetPropertyStr(ctx, ret, "filename", JS_AtomToString(ctx, b->debug.filename));
|
||||||
JS_SetPropertyStr(ctx, ret, "line", JS_NewInt32(ctx,b->debug.line_num));
|
// JS_SetPropertyStr(ctx, ret, "line", JS_NewInt32(ctx,b->debug.line_num));
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -323,7 +323,6 @@ typedef struct JSValue {
|
|||||||
|
|
||||||
#define JS_NAN (JSValue){ .u.float64 = JS_FLOAT64_NAN, JS_TAG_FLOAT64 }
|
#define JS_NAN (JSValue){ .u.float64 = JS_FLOAT64_NAN, JS_TAG_FLOAT64 }
|
||||||
|
|
||||||
int js_fn_linenum(JSContext *js, JSValueConst fn);
|
|
||||||
JSAtom js_fn_filename(JSContext *js, JSValueConst fn);
|
JSAtom js_fn_filename(JSContext *js, JSValueConst fn);
|
||||||
const char *get_func_name(JSContext *js, JSValueConst fn);
|
const char *get_func_name(JSContext *js, JSValueConst fn);
|
||||||
|
|
||||||
@@ -460,7 +459,7 @@ void *JS_GetRuntimeOpaque(JSRuntime *rt);
|
|||||||
void JS_SetRuntimeOpaque(JSRuntime *rt, void *opaque);
|
void JS_SetRuntimeOpaque(JSRuntime *rt, void *opaque);
|
||||||
typedef void JS_MarkFunc(JSRuntime *rt, JSGCObjectHeader *gp);
|
typedef void JS_MarkFunc(JSRuntime *rt, JSGCObjectHeader *gp);
|
||||||
void JS_MarkValue(JSRuntime *rt, JSValueConst val, JS_MarkFunc *mark_func);
|
void JS_MarkValue(JSRuntime *rt, JSValueConst val, JS_MarkFunc *mark_func);
|
||||||
JSValue JS_RunGC(JSRuntime *rt, JSContext *ctx);
|
void JS_RunGC(JSRuntime *rt);
|
||||||
JS_BOOL JS_IsLiveObject(JSRuntime *rt, JSValueConst obj);
|
JS_BOOL JS_IsLiveObject(JSRuntime *rt, JSValueConst obj);
|
||||||
|
|
||||||
JSValue JS_NewSymbol(JSContext *ctx, const char *description, int is_global);
|
JSValue JS_NewSymbol(JSContext *ctx, const char *description, int is_global);
|
||||||
@@ -1226,7 +1225,6 @@ JSValue js_debugger_fn_info(JSContext *ctx, JSValue fn);
|
|||||||
JSValue js_debugger_backtrace_fns(JSContext *ctx, const uint8_t *cur_pc);
|
JSValue js_debugger_backtrace_fns(JSContext *ctx, const uint8_t *cur_pc);
|
||||||
uint32_t js_debugger_stack_depth(JSContext *ctx);
|
uint32_t js_debugger_stack_depth(JSContext *ctx);
|
||||||
JSValue js_dump_value(JSContext *ctx, JSValue v);
|
JSValue js_dump_value(JSContext *ctx, JSValue v);
|
||||||
JSValue js_dump_object(JSContext *ctx, JSGCObjectHeader *p);
|
|
||||||
JSValue js_dump_leaks(JSContext *ctx);
|
JSValue js_dump_leaks(JSContext *ctx);
|
||||||
JSValue js_dump_stack_info(JSContext *ctx);
|
JSValue js_dump_stack_info(JSContext *ctx);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user