fix delete gc bug
This commit is contained in:
@@ -845,6 +845,18 @@ static inline objhdr_t *chase(JSValue v) {
|
||||
return oh;
|
||||
}
|
||||
|
||||
/* Resolve a forward pointer in-place. After rec_resize the old record
|
||||
gets a forward header; any JSValue slot still pointing at it must be
|
||||
updated to follow the chain to the live copy. */
|
||||
static inline void mach_resolve_forward(JSValue *slot) {
|
||||
if (JS_IsPtr(*slot)) {
|
||||
objhdr_t h = *(objhdr_t *)JS_VALUE_GET_PTR(*slot);
|
||||
if (objhdr_type(h) == OBJ_FORWARD) {
|
||||
*slot = JS_MKPTR(objhdr_fwd_ptr(h));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Inline type checks — use these in the VM dispatch loop to avoid
|
||||
function call overhead. The public API (JS_IsArray etc. in quickjs.h)
|
||||
remains non-inline for external callers; those wrappers live in runtime.c. */
|
||||
|
||||
Reference in New Issue
Block a user