On Wed, Jul 10, 2013 at 5:25 PM, Erick Tryzelaar <[email protected]> wrote: > On Wed, Jul 10, 2013 at 1:55 PM, Niko Matsakis <[email protected]> wrote: >> >> We would have to design the write barrier code to be able to cheaply >> check whether a given pointer is managed or not, but that's not a big >> >> deal (this requirement is already present). > > > > This may be treading into constant-expr territory, but could this > `contains_managed::<T>()` be an intrinsic that is compiled away for > non-managed types?
It evaluates to a constant like our `size_of` intrinsic. Although, intrinsics are currently `alwaysinline` functions instead of expanding in-place. At an opt-level above 0, LLVM will always discard the dead code path. _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
