mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-27 12:11:12 +08:00
feat: using 声明登记释放栈指令与 GC 根
This commit is contained in:
@@ -230,6 +230,10 @@ pub struct Vm {
|
||||
/// VM 级 spill 栈。`CallFrame.spill_offset` 定位本帧区:调用子函数时从边界后分配,
|
||||
/// 帧恢复时截断到边界,子函数 spill 数据随帧丢弃。
|
||||
pub(crate) spill_stack: Vec<JsValue>,
|
||||
/// using/await using 声明的资源释放栈:DISPOSE_REGISTER 把资源值压入,
|
||||
/// 作用域出口点逆序释放(释放点由后续指令族承担)。栈内 JsValue 是 GC 根
|
||||
/// (`for_each_value` 遍历);run 边界清空,防跨 run 残留条目在下一 run 被误释放。
|
||||
pub(crate) dispose_stack: Vec<JsValue>,
|
||||
/// 本次 native 调用的 spill 溢出实参区:`spill_stack[base..base+count)`。
|
||||
/// 实参数超过寄存器窗口(253)时,窗口外的实参转存 spill 栈(GC 根),
|
||||
/// native 侧经 `VmHost::native_arg_count`/`native_arg_at` 读取。仅在一次
|
||||
|
||||
Reference in New Issue
Block a user