Support tail calls in mir via TerminatorKind::TailCall
This commit is contained in:
parent
e2cf31a614
commit
484152d562
41 changed files with 328 additions and 88 deletions
|
@ -281,6 +281,7 @@ pub fn cleanup_kinds(mir: &mir::Body<'_>) -> IndexVec<mir::BasicBlock, CleanupKi
|
|||
| TerminatorKind::UnwindResume
|
||||
| TerminatorKind::UnwindTerminate(_)
|
||||
| TerminatorKind::Return
|
||||
| TerminatorKind::TailCall { .. }
|
||||
| TerminatorKind::CoroutineDrop
|
||||
| TerminatorKind::Unreachable
|
||||
| TerminatorKind::SwitchInt { .. }
|
||||
|
|
|
@ -1389,6 +1389,13 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
fn_span,
|
||||
mergeable_succ(),
|
||||
),
|
||||
mir::TerminatorKind::TailCall { .. } => {
|
||||
// FIXME(explicit_tail_calls): implement tail calls in ssa backend
|
||||
span_bug!(
|
||||
terminator.source_info.span,
|
||||
"`TailCall` terminator is not yet supported by `rustc_codegen_ssa`"
|
||||
)
|
||||
}
|
||||
mir::TerminatorKind::CoroutineDrop | mir::TerminatorKind::Yield { .. } => {
|
||||
bug!("coroutine ops in codegen")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue