Ready for in-game testing
All checks were successful
CI/CD Pipeline / test (pull_request) Successful in 37s
CI/CD Pipeline / build (pull_request) Has been skipped
CI/CD Pipeline / release (pull_request) Has been skipped

This commit is contained in:
2025-12-31 03:08:41 -07:00
parent 2dfe36f8be
commit 2a5dfd9ab6
5 changed files with 53 additions and 146 deletions

View File

@@ -358,11 +358,12 @@ fn find_matching_ra_pop<'a>(
return Some((idx, &instructions[1..idx]));
}
// Stop searching if we hit a jump (different control flow)
// Labels are OK - they're just markers
// Stop searching if we hit a jump (different control flow) or a function label
// Labels are OK - they're just markers EXCEPT for user-defined function labels
// which indicate a function boundary
if matches!(
node.instruction,
Instruction::Jump(_) | Instruction::JumpRelative(_)
Instruction::Jump(_) | Instruction::JumpRelative(_) | Instruction::LabelDef(_)
) {
return None;
}