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
@@ -2,16 +2,6 @@ use crate::compiler::{CompileCtx, Compiler};
use oxide_parser::ClassElement;
impl Compiler {
pub(crate) fn count_class_static_blocks(&self, elements: &[ClassElement], ctx: &mut CompileCtx) {
for element in elements {
if let ClassElement::StaticBlock(block) = element {
for stmt in &block.body {
self.count_statement(stmt, ctx);
}
}
}
}
pub(crate) fn emit_class_static_blocks(
&self, elements: &[ClassElement], ctor_reg: u8, ctx: &mut CompileCtx,
) -> Result<(), String> {