Commit 8f9ebcca authored by qinsoon's avatar qinsoon

a call with resumption will be translated as a call and a branch to

normal destination. The call instruction (machine code) has two successors, a normal cont
block which contains the branch to the normal destination, and the exceptional
parent c9a83f74
......@@ -2598,9 +2598,9 @@ impl <'a> InstructionSelection {
panic!("unexpected callee as {}", func);
// record exception branch
if resumption.is_some() {
// record exception branch
let ref exn_dest = resumption.as_ref().unwrap().exn_dest;
let target_block =;
......@@ -2611,7 +2611,17 @@ impl <'a> InstructionSelection {
let mut callsites = vec![];
self.current_exn_callsites.insert(target_block, callsites);
// insert an intermediate block to branch to normal
let fv_id = self.current_fv_id;
self.start_block(format!("normal_cont_for_call_{}_{}", fv_id,;
let ref normal_dest = resumption.as_ref().unwrap().normal_dest;
let normal_target_name = f_content.get_block(;
// deal with ret vals
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment