refactor: 移除 class 计数辅助

This commit is contained in:
2026-08-05 01:41:51 +08:00
parent 76fb0b5b88
commit 489fe5e6bb
12 changed files with 2 additions and 323 deletions
@@ -36,15 +36,6 @@ impl Compiler {
self.emit_expression(key.to_expression(), ctx)
}
pub(crate) fn count_class_key(&self, key: &PropertyKey, computed: bool, ctx: &mut CompileCtx) {
if computed {
self.count_expression(key.to_expression(), ctx);
} else {
ctx.alloc_reg();
ctx.projected_pc += 1;
}
}
pub(crate) fn static_property_name(&self, key: &PropertyKey) -> Result<String, String> {
match key {
PropertyKey::StaticIdentifier(ident) => Ok(ident.name.as_str().to_string()),