feat: 对象字面量 spread({...obj} 展开可枚举自有属性)

This commit is contained in:
爱特每羊队
2026-08-08 11:24:09 +08:00
parent 2777b00c82
commit 6c7b10d6c5
10 changed files with 251 additions and 63 deletions
+4 -1
View File
@@ -36,6 +36,9 @@ pub(super) fn hash_object_property_kind(
hash_property_key(&p.key, h, include_binding_names);
expression::hash_expression(&p.value, h, include_binding_names);
}
ObjectPropertyKind::SpreadProperty(_) => {}
ObjectPropertyKind::SpreadProperty(spread) => {
// spread 的源表达式计入哈希:`{...a}` 与 `{...b}` 结构不同,避免缓存碰撞。
expression::hash_expression(&spread.argument, h, include_binding_names);
}
});
}