Inline Finallyalizer::drop, allowing LLVM to optimize finally.

* fixes the vec::from_elem regression caused by #8780
* added 5 benchmarks for allocating a 1KB ~[u8] and zeroing it
This commit is contained in:
Eduard Burtescu 2013-12-12 07:05:26 +02:00
parent 1b12dca7f9
commit 331c6efe45
2 changed files with 56 additions and 0 deletions

View file

@ -62,6 +62,7 @@ struct Finallyalizer<'a> {
#[unsafe_destructor]
impl<'a> Drop for Finallyalizer<'a> {
#[inline]
fn drop(&mut self) {
(self.dtor)();
}