diff --git a/crates/oxide_compiler/src/compiler.rs b/crates/oxide_compiler/src/compiler.rs index f194d6b0..1ee8041e 100644 --- a/crates/oxide_compiler/src/compiler.rs +++ b/crates/oxide_compiler/src/compiler.rs @@ -310,7 +310,6 @@ impl CompileCtx { self.scopes.symbols.declare_initialized(name, reg, kind, is_const) } - #[allow(dead_code)] pub(crate) fn push_scope_with_kind(&mut self, kind: ScopeKind) { self.scopes.symbols.push_scope_with_kind(kind); } @@ -507,7 +506,6 @@ impl Compiler { Self } - #[allow(dead_code)] pub(crate) fn analyze_upvalue_captures( &self, body_stmts: &[Statement], parent_ctx: &CompileCtx, nested_symbols: &SymbolTable, ) -> (Vec, u8) { @@ -522,7 +520,6 @@ impl Compiler { (captures, count) } - #[allow(dead_code)] fn collect_upvalue_stmt( &self, stmt: &Statement, parent_ctx: &CompileCtx, nested_symbols: &SymbolTable, captures: &mut Vec, seen: &mut HashMap, @@ -607,7 +604,6 @@ impl Compiler { } } - #[allow(dead_code)] fn collect_upvalue_expr( &self, expr: &Expression, parent_ctx: &CompileCtx, nested_symbols: &SymbolTable, captures: &mut Vec, seen: &mut HashMap, diff --git a/crates/oxide_compiler/src/emit_ctx.rs b/crates/oxide_compiler/src/emit_ctx.rs index 80388913..3732b259 100644 --- a/crates/oxide_compiler/src/emit_ctx.rs +++ b/crates/oxide_compiler/src/emit_ctx.rs @@ -15,7 +15,6 @@ pub(crate) struct LabelCtx { /// label id → 指令下标。id 连续递增,Vec 索引即 id;写入前须扩容。 pub(crate) label_pos: Vec>, pub(crate) loop_stack: Vec<(LabelId, LabelId)>, - #[allow(dead_code)] pub(crate) switch_stack: Vec, /// Active labeled-statement scopes (resolves `break label` / `continue label`). pub(crate) label_scopes: Vec, diff --git a/crates/oxide_compiler/src/ir/lower.rs b/crates/oxide_compiler/src/ir/lower.rs index 7e158880..2577977e 100644 --- a/crates/oxide_compiler/src/ir/lower.rs +++ b/crates/oxide_compiler/src/ir/lower.rs @@ -13,10 +13,6 @@ use super::IRFunction; /// IRFunction → CompiledModule。错误消息与现状(退役前 compiler.rs)逐字一致。 pub fn lower(f: &IRFunction) -> Result { - if f.reg_overflow || f.const_overflow { - // 溢出标志在下方统一检查;先做结构验证 - } - // 溢出检查 1:寄存器(仅 Operand::Reg 变体;This/NewTarget 是语义操作数,映射 254/255 合法) if f.reg_overflow { return Err("RangeError: function body uses too many registers (max 253)".into());