filling-drop: switch DTOR_NEEDED and DTOR_DONE to non-trivial values.

This commit is contained in:
Felix S. Klock II 2015-03-18 00:20:52 +01:00
parent 7c671e5177
commit 5bc35b1852
2 changed files with 3 additions and 3 deletions

View file

@ -334,7 +334,7 @@ macro_rules! repeat_u8_as_u64 {
// But having the sign bit set is a pain, so 0x1d is probably better.
//
// And of course, 0x00 brings back the old world of zero'ing on drop.
#[cfg(not(stage0))] pub const POST_DROP_U8: u8 = 0x0;
#[cfg(not(stage0))] pub const POST_DROP_U8: u8 = 0x1d;
#[cfg(not(stage0))] pub const POST_DROP_U32: u32 = repeat_u8_as_u32!(POST_DROP_U8);
#[cfg(not(stage0))] pub const POST_DROP_U64: u64 = repeat_u8_as_u64!(POST_DROP_U8);

View file

@ -166,7 +166,7 @@ macro_rules! repeat_u8_as_u64 {
(repeat_u8_as_u32!($name) as u64)) }
}
pub const DTOR_NEEDED: u8 = 0x1;
pub const DTOR_NEEDED: u8 = 0xd4;
pub const DTOR_NEEDED_U32: u32 = repeat_u8_as_u32!(DTOR_NEEDED);
pub const DTOR_NEEDED_U64: u64 = repeat_u8_as_u64!(DTOR_NEEDED);
#[allow(dead_code)]
@ -178,7 +178,7 @@ pub fn dtor_needed_usize(ccx: &CrateContext) -> usize {
}
}
pub const DTOR_DONE: u8 = 0x0;
pub const DTOR_DONE: u8 = 0x1d;
pub const DTOR_DONE_U32: u32 = repeat_u8_as_u32!(DTOR_DONE);
pub const DTOR_DONE_U64: u64 = repeat_u8_as_u64!(DTOR_DONE);
#[allow(dead_code)]