feat: 间接 eval 读全局词法环境镜像并补齐写路径

This commit is contained in:
2026-10-16 15:03:55 +00:00
parent 84900dc4a1
commit cf0b59d892
18 changed files with 250 additions and 31 deletions
+3
View File
@@ -426,6 +426,9 @@ impl Emitter {
Operand::Reg(ctor_reg),
Operand::None,
));
// 顶层词法双写镜像:类声明值同步写镜像,使跨脚本(间接 eval)读经
// 镜像见当前值。
self.emit_global_lex_mirror_write(name, ctor_reg, ctx);
if let Some(cell_idx) = class_self_cell {
// 以构造器初始化类名 cell 并解除 TDZ(占位 cell 已由类元素闭包在 hoist 期创建)。
ctx.inst(Inst::new(