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

This commit is contained in:
2025-05-01 11:53:49 -05:00
parent 51f708e5d4
commit 26c9a577bb
2 changed files with 7 additions and 18 deletions

View File

@@ -1275,7 +1275,7 @@ static void js_trigger_gc(JSRuntime *rt, size_t size)
fprintf(dumpout, "GC: size=%" PRIu64 "\n",
(uint64_t)rt->malloc_state.malloc_size);
#endif
JS_RunGC(rt, NULL);
JS_RunGC(rt);
rt->malloc_gc_threshold = rt->malloc_state.malloc_size +
(rt->malloc_state.malloc_size >> 1);
}
@@ -5060,7 +5060,7 @@ static __maybe_unused void JS_DumpShapes(JSRuntime *rt)
fprintf(dumpout, "}\n");
}
JSShape *JS_ObjectShape(JSContext *js, JSValue v)
JSShape *JS_ObjectShape(JSContext *js, JSValueConst v)
{
JSObject *p = JS_VALUE_GET_OBJ(v);
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);
}
double n = stm_now();
double size = rt->malloc_state.malloc_size;
/* decrement the reference of the children of each object. mark =
1 after this pass. */
gc_decref(rt);
@@ -6307,8 +6304,6 @@ static void JS_RunGCInternal(JSRuntime *rt, BOOL remove_weak_objects)
}*/
/* free the GC objects in a cycle */
gc_free_cycles(rt);
return ret;
}
void JS_RunGC(JSRuntime *rt)
@@ -7005,11 +7000,6 @@ const char *get_func_name(JSContext *ctx, JSValueConst func)
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)
{
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->param_n = b->arg_count;
dbg->vararg = 1;
dbg->line = b->debug.line_num;
// dbg->line = b->debug.line_num;
dbg->source = b->debug.source;
dbg->srclen = b->debug.source_len;
break;
@@ -55066,7 +55056,8 @@ JSValue js_debugger_build_backtrace(JSContext *ctx, const uint8_t *cur_pc)
b = p->u.func.function_bytecode;
if (b->has_debug) {
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));
if (line_num1 != -1)
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;
if (b->has_debug) {
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:
return ret;