Skip to content

Commit 53f7d61

Browse files
committed
Add some FIXMEs about unwinding implementation
Issue #236
1 parent e8a1635 commit 53f7d61

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/comp/middle/trans.rs

+5
Original file line numberDiff line numberDiff line change
@@ -3808,6 +3808,8 @@ fn invoke_(bcx: &@block_ctxt, llfn: ValueRef,
38083808
llargs: &[ValueRef],
38093809
invoker: fn(&@block_ctxt, ValueRef, &[ValueRef],
38103810
BasicBlockRef, BasicBlockRef) -> ValueRef) -> result {
3811+
// FIXME: May be worth turning this into a plain call when there are no
3812+
// cleanups to run
38113813
let normal_bcx = new_sub_block_ctxt(bcx, "normal return");
38123814
let unwind_bcx = new_sub_block_ctxt(bcx, "unwind");
38133815
let retval = invoker(bcx, llfn, llargs,
@@ -3835,6 +3837,9 @@ fn trans_landing_pad(bcx: &@block_ctxt) {
38353837
// The landing pad block is a cleanup
38363838
SetCleanup(bcx, llpad);
38373839

3840+
// FIXME: This seems like a very naive and redundant way to generate the
3841+
// landing pads, as we're re-generating all in-scope cleanups for each
3842+
// function call. Probably good optimization opportunities here.
38383843
let bcx = bcx;
38393844
let scope_cx = bcx;
38403845
while true {

0 commit comments

Comments
 (0)