Files
OxideJS-New/crates/oxide_dce/Cargo.toml
T
pjh123 213a9820de feat: 实现 Pass A 可达性 + Pass B use 计数迭代删除
- Pass A 消费 build_cfg,entry 沿 succs DFS(含 Exception 边保守,Pitfall 4)展开指令粒度 keep
- Pass B 可达存活指令聚合 use 计数,def 无 use 且 is_pure 迭代删至不动点(D-02 连锁)
- Pass C 最小 mark-sweep 重建 insts + label_pos 重映射(死 label 置 None)
- 依赖 oxide_bytecode(测试需 OpCode 常量,Rust 无 crate 传递可见性,与 oxide_cfg 骨架一致)
- 单测 8 条:死链/负例/STORE_VAR 特判/if-else/死块/Exception 保守/死闭包/连锁
2026-08-06 11:33:27 +08:00

18 lines
523 B
TOML

[package]
name = "oxide_dce"
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
description = "OxideJS - dead code elimination pass over IR (reachability + use-count iteration + mark-sweep)"
[dependencies]
oxide_ir = { path = "../oxide_ir" }
oxide_cfg = { path = "../oxide_cfg" }
oxide_bytecode = { path = "../oxide_bytecode" }
[dev-dependencies]
oxide_parser = { path = "../oxide_parser" }
oxide_emit = { path = "../oxide_emit" }
oxide_vm = { path = "../oxide_vm" }