rustc: Back out box annihilator

This commit is contained in:
Patrick Walton 2012-09-14 19:58:40 -07:00
parent aa2ab2659f
commit 73e8ce1e1f
2 changed files with 10 additions and 3 deletions

View File

@ -1355,10 +1355,16 @@ fn spawn_raw(+opts: TaskOpts, +f: fn~()) {
let group = @TCB(child, move child_arc, move ancestors,
is_main, move notifier);
unsafe { local_set(child, taskgroup_key!(), group); }
// Run the child's body.
f();
// TLS cleanup code will exit the taskgroup.
}
// Run the box annihilator.
// XXX: Crashy.
// unsafe { cleanup::annihilate(); }
};
// Set up membership in taskgroup and descendantship in all ancestor

View File

@ -1994,9 +1994,10 @@ fn create_main_wrapper(ccx: @crate_ctxt, sp: span, main_llfn: ValueRef,
Call(bcx, main_llfn, args);
// Call the box annihilator.
let did = bcx.tcx().lang_items.annihilate_fn.get();
let bcx = callee::trans_rtcall_or_lang_call(bcx, did, ~[],
expr::Ignore);
// XXX: Crashes.
//let did = bcx.tcx().lang_items.annihilate_fn.get();
//let bcx = callee::trans_rtcall_or_lang_call(bcx, did, ~[],
// expr::Ignore);
build_return(bcx);
finish_fn(fcx, lltop);