Skip to content

Commit b68c512

Browse files
committed
Cursor feedback
1 parent 1af6390 commit b68c512

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

third_party/move/move-model/bytecode/src/astifier.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,9 +614,10 @@ impl Generator {
614614
match ctx.code_for_block(blk).last() {
615615
None => 0,
616616
Some(Abort(..)) => 1,
617-
Some(Jump(..)) => 2,
618-
Some(Branch(..)) => 3,
619-
Some(Ret(..)) => 4,
617+
Some(AbortMsg(..)) => 2,
618+
Some(Jump(..)) => 3,
619+
Some(Branch(..)) => 4,
620+
Some(Ret(..)) => 5,
620621
_ => panic!("unexpected block terminator"),
621622
}
622623
};
@@ -1931,6 +1932,7 @@ impl IfElseTransformer<'_> {
19311932
ExpData::LoopCont(..)
19321933
| ExpData::Return(..)
19331934
| ExpData::Call(_, Operation::Abort, _)
1935+
| ExpData::Call(_, Operation::AbortMsg, _)
19341936
)
19351937
})
19361938
.unwrap_or(stmts.len());
@@ -2912,7 +2914,10 @@ where
29122914
fn is_terminator(&self, exp: &ExpData) -> bool {
29132915
matches!(
29142916
exp,
2915-
ExpData::LoopCont(..) | ExpData::Return(..) | ExpData::Call(_, Operation::Abort, ..)
2917+
ExpData::LoopCont(..)
2918+
| ExpData::Return(..)
2919+
| ExpData::Call(_, Operation::Abort, ..)
2920+
| ExpData::Call(_, Operation::AbortMsg, ..)
29162921
)
29172922
}
29182923

third_party/move/move-model/bytecode/src/stackless_bytecode.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,10 @@ impl Bytecode {
561561
pub fn is_exit(&self) -> bool {
562562
matches!(
563563
self,
564-
Bytecode::Ret(..) | Bytecode::Abort(..) | Bytecode::Call(_, _, Operation::Stop, _, _)
564+
Bytecode::Ret(..)
565+
| Bytecode::Abort(..)
566+
| Bytecode::AbortMsg(..)
567+
| Bytecode::Call(_, _, Operation::Stop, _, _)
565568
)
566569
}
567570

@@ -575,6 +578,7 @@ impl Bytecode {
575578
Bytecode::Ret(..)
576579
| Bytecode::Jump(..)
577580
| Bytecode::Abort(..)
581+
| Bytecode::AbortMsg(..)
578582
| Bytecode::Branch(..)
579583
| Bytecode::Call(_, _, Operation::Stop, _, _)
580584
)

0 commit comments

Comments
 (0)