refactor: 移除 lexical 预声明函数的死参数 global_lexical

This commit is contained in:
2026-09-28 19:12:13 +00:00
parent 55133c0057
commit 2b565a4996
7 changed files with 18 additions and 28 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ impl Emitter {
ctx.push_scope();
for case in cases.iter() {
self.predeclare_block_function_declarations(&case.consequent, ctx, false);
self.predeclare_lexical_declarations(&case.consequent, ctx, false)?;
self.predeclare_lexical_declarations(&case.consequent, ctx)?;
}
// case 内函数声明的块入口初始化:同名重复声明按源序物化,末次声明成为
// 入口值;声明点复用块槽写回外层 var(见 emit_function_declaration)。