feat: class 私有成员语义(字段/方法/访问器 + brand 检查 + 契约修复)

This commit is contained in:
2026-08-09 11:08:36 +08:00
parent 088b3bc976
commit 6c79dbb21c
41 changed files with 573 additions and 216 deletions
+9 -1
View File
@@ -25,7 +25,15 @@ pub(super) fn partition_blocks(f: &IRFunction) -> Vec<bool> {
// 跳转的 fallthrough 后继是块头:条件跳转否则 cond+then 融块、条件边丢失;
// 无条件 JMP 同样必须切块头——JMP 不 fallthrough,但其后继位置需成块边界,
// 否则 JMP 与后续指令融块、块尾判定错、Jump 边丢失(DCE 可达性误删目标块)。
if matches!(inst.op, OpCode::JMP | OpCode::BREAK | OpCode::CONTINUE | OpCode::JMP_IF_TRUE | OpCode::JMP_IF_FALSE | OpCode::JMP_IF_NULLISH) {
if matches!(
inst.op,
OpCode::JMP
| OpCode::BREAK
| OpCode::CONTINUE
| OpCode::JMP_IF_TRUE
| OpCode::JMP_IF_FALSE
| OpCode::JMP_IF_NULLISH
) {
heads[i + 1] = true;
}
}