mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-26 11:41:13 +08:00
perf: 字节码调用压帧窗口按调用点存活上界拷贝减少整窗搬移
RegAlloc 改写后补第三次 liveness,为每条 CALL/NEW/SUPER_CALL 计算调用点 存活上界(最大存活物理槽号 + 1,254/255 由帧单独保存不计入),编码进 ext 高 8 位(nargs 低 8 位不变)。三处手写压帧窗口 = min(调用方活动寄存 器, 存活上界),restore_frame 按窗口回拷;CallFrame 新增 caller_active_reg_limit 保存调用方真实活动上限,恢复时不随截断窗口缩水。 生成器/异步函数体调用点保持全量窗口。spread 调用与运行时发起压帧 (accessor/内联)走全量路径不受影响。
This commit is contained in:
@@ -272,6 +272,7 @@ impl SuspendedFrame {
|
||||
return_addr: f.return_addr,
|
||||
function_name: f.function_name,
|
||||
caller_reg_limit: f.caller_reg_limit,
|
||||
caller_active_reg_limit: f.caller_active_reg_limit,
|
||||
saved_reg_offset: f.saved_reg_offset,
|
||||
spill_offset: f.spill_offset,
|
||||
arguments_base: f.arguments_base,
|
||||
@@ -331,6 +332,7 @@ mod tests {
|
||||
return_addr: 7,
|
||||
function_name: 1,
|
||||
caller_reg_limit: 2,
|
||||
caller_active_reg_limit: 2,
|
||||
saved_reg_offset: 3,
|
||||
spill_offset: 4,
|
||||
arguments_base: 5,
|
||||
|
||||
Reference in New Issue
Block a user