fix: 函数 async/generator 标志纳入编译缓存键防字节码错配

This commit is contained in:
2026-08-16 17:34:03 +08:00
parent c8b1ccd0a0
commit ae6c60d99d
4 changed files with 53 additions and 0 deletions
@@ -194,6 +194,8 @@ fn hash_for_statement(fr: &oxide_parser::ForStatement<'_>, h: &mut rustc_hash::F
}
fn hash_function_declaration(fd: &Function<'_>, h: &mut rustc_hash::FxHasher, include_binding_names: bool) {
fd.r#async.hash(h);
fd.generator.hash(h);
if include_binding_names {
if let Some(id) = &fd.id {
id.name.as_str().hash(h);