refactor: 闭包捕获分析拆目录并自由函数化去除接收者

This commit is contained in:
2026-09-15 23:02:03 +00:00
parent 985c27e5bb
commit fa4c9edb81
12 changed files with 1453 additions and 1408 deletions
@@ -6,6 +6,7 @@
use std::collections::HashSet;
use crate::capture::collect_binding_pattern_names;
use crate::{CompileCtx, Emitter};
use oxide_bytecode::opcode::OpCode;
use oxide_ir::inst::Inst;
@@ -30,7 +31,7 @@ impl Emitter {
}
let mut names = HashSet::new();
for d in &decl.declarations {
self.collect_binding_pattern_names(&d.id, &mut names);
collect_binding_pattern_names(&d.id, &mut names);
}
let mut v: Vec<String> = names.into_iter().collect();
v.sort();