diff options
| author | Michael Wu <mwu@mozilla.com> | 2015-05-06 17:09:55 -0400 |
|---|---|---|
| committer | Michael Wu <mwu@mozilla.com> | 2015-05-06 17:09:55 -0400 |
| commit | bfdbda24d970515acc453f3ace7700374b8e9324 (patch) | |
| tree | 839bf55695dc5572808fd5a9e10f9e6c2e539fcd | |
| parent | e6378cbda39521fa3b9a457b5ed36ecefe37f932 (diff) | |
| download | rust-bfdbda24d970515acc453f3ace7700374b8e9324.tar.gz rust-bfdbda24d970515acc453f3ace7700374b8e9324.zip | |
Remove schedule_free_slice
Nothing uses it anymore.
| -rw-r--r-- | src/librustc_trans/trans/cleanup.rs | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/librustc_trans/trans/cleanup.rs b/src/librustc_trans/trans/cleanup.rs index 63732588143..d23543924dd 100644 --- a/src/librustc_trans/trans/cleanup.rs +++ b/src/librustc_trans/trans/cleanup.rs @@ -507,23 +507,6 @@ impl<'blk, 'tcx> CleanupMethods<'blk, 'tcx> for FunctionContext<'blk, 'tcx> { self.schedule_clean(cleanup_scope, drop as CleanupObj); } - /// Schedules a call to `free(val)`. Note that this is a shallow operation. - fn schedule_free_slice(&self, - cleanup_scope: ScopeId, - val: ValueRef, - size: ValueRef, - align: ValueRef, - heap: Heap) { - let drop = box FreeSlice { ptr: val, size: size, align: align, heap: heap }; - - debug!("schedule_free_slice({:?}, val={}, heap={:?})", - cleanup_scope, - self.ccx.tn().val_to_string(val), - heap); - - self.schedule_clean(cleanup_scope, drop as CleanupObj); - } - fn schedule_clean(&self, cleanup_scope: ScopeId, cleanup: CleanupObj<'tcx>) { @@ -1107,43 +1090,6 @@ impl<'tcx> Cleanup<'tcx> for FreeValue<'tcx> { } #[derive(Copy, Clone)] -pub struct FreeSlice { - ptr: ValueRef, - size: ValueRef, - align: ValueRef, - heap: Heap, -} - -impl<'tcx> Cleanup<'tcx> for FreeSlice { - fn must_unwind(&self) -> bool { - true - } - - fn clean_on_unwind(&self) -> bool { - true - } - - fn is_lifetime_end(&self) -> bool { - false - } - - fn trans<'blk>(&self, - bcx: Block<'blk, 'tcx>, - debug_loc: DebugLoc) - -> Block<'blk, 'tcx> { - match self.heap { - HeapExchange => { - glue::trans_exchange_free_dyn(bcx, - self.ptr, - self.size, - self.align, - debug_loc) - } - } - } -} - -#[derive(Copy, Clone)] pub struct LifetimeEnd { ptr: ValueRef, } @@ -1253,12 +1199,6 @@ pub trait CleanupMethods<'blk, 'tcx> { val: ValueRef, heap: Heap, content_ty: Ty<'tcx>); - fn schedule_free_slice(&self, - cleanup_scope: ScopeId, - val: ValueRef, - size: ValueRef, - align: ValueRef, - heap: Heap); fn schedule_clean(&self, cleanup_scope: ScopeId, cleanup: CleanupObj<'tcx>); |
