interpret: only to track_caller in debug builds due to perf
This commit is contained in:
parent
1e0f3cb566
commit
cf9186ec69
1 changed files with 4 additions and 4 deletions
|
@ -71,7 +71,7 @@ impl<'tcx, Tag: Provenance> Immediate<Tag> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[track_caller]
|
#[cfg_attr(debug_assertions, track_caller)] // only in debug builds due to perf (see #98980)
|
||||||
pub fn to_scalar_or_uninit(self) -> ScalarMaybeUninit<Tag> {
|
pub fn to_scalar_or_uninit(self) -> ScalarMaybeUninit<Tag> {
|
||||||
match self {
|
match self {
|
||||||
Immediate::Scalar(val) => val,
|
Immediate::Scalar(val) => val,
|
||||||
|
@ -80,13 +80,13 @@ impl<'tcx, Tag: Provenance> Immediate<Tag> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[track_caller]
|
#[cfg_attr(debug_assertions, track_caller)] // only in debug builds due to perf (see #98980)
|
||||||
pub fn to_scalar(self) -> InterpResult<'tcx, Scalar<Tag>> {
|
pub fn to_scalar(self) -> InterpResult<'tcx, Scalar<Tag>> {
|
||||||
self.to_scalar_or_uninit().check_init()
|
self.to_scalar_or_uninit().check_init()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[track_caller]
|
#[cfg_attr(debug_assertions, track_caller)] // only in debug builds due to perf (see #98980)
|
||||||
pub fn to_scalar_or_uninit_pair(self) -> (ScalarMaybeUninit<Tag>, ScalarMaybeUninit<Tag>) {
|
pub fn to_scalar_or_uninit_pair(self) -> (ScalarMaybeUninit<Tag>, ScalarMaybeUninit<Tag>) {
|
||||||
match self {
|
match self {
|
||||||
Immediate::ScalarPair(val1, val2) => (val1, val2),
|
Immediate::ScalarPair(val1, val2) => (val1, val2),
|
||||||
|
@ -95,7 +95,7 @@ impl<'tcx, Tag: Provenance> Immediate<Tag> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[track_caller]
|
#[cfg_attr(debug_assertions, track_caller)] // only in debug builds due to perf (see #98980)
|
||||||
pub fn to_scalar_pair(self) -> InterpResult<'tcx, (Scalar<Tag>, Scalar<Tag>)> {
|
pub fn to_scalar_pair(self) -> InterpResult<'tcx, (Scalar<Tag>, Scalar<Tag>)> {
|
||||||
let (val1, val2) = self.to_scalar_or_uninit_pair();
|
let (val1, val2) = self.to_scalar_or_uninit_pair();
|
||||||
Ok((val1.check_init()?, val2.check_init()?))
|
Ok((val1.check_init()?, val2.check_init()?))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue