Some tracing cleanups
This commit is contained in:
parent
dd91aba2fd
commit
ec6f554536
@ -194,6 +194,7 @@ where
|
|||||||
D: DropElaborator<'b, 'tcx>,
|
D: DropElaborator<'b, 'tcx>,
|
||||||
'tcx: 'b,
|
'tcx: 'b,
|
||||||
{
|
{
|
||||||
|
#[instrument(level = "trace", skip(self), ret)]
|
||||||
fn place_ty(&self, place: Place<'tcx>) -> Ty<'tcx> {
|
fn place_ty(&self, place: Place<'tcx>) -> Ty<'tcx> {
|
||||||
place.ty(self.elaborator.body(), self.tcx()).ty
|
place.ty(self.elaborator.body(), self.tcx()).ty
|
||||||
}
|
}
|
||||||
@ -220,11 +221,9 @@ where
|
|||||||
//
|
//
|
||||||
// FIXME: I think we should just control the flags externally,
|
// FIXME: I think we should just control the flags externally,
|
||||||
// and then we do not need this machinery.
|
// and then we do not need this machinery.
|
||||||
|
#[instrument(level = "debug")]
|
||||||
pub fn elaborate_drop(&mut self, bb: BasicBlock) {
|
pub fn elaborate_drop(&mut self, bb: BasicBlock) {
|
||||||
debug!("elaborate_drop({:?}, {:?})", bb, self);
|
match self.elaborator.drop_style(self.path, DropFlagMode::Deep) {
|
||||||
let style = self.elaborator.drop_style(self.path, DropFlagMode::Deep);
|
|
||||||
debug!("elaborate_drop({:?}, {:?}): live - {:?}", bb, self, style);
|
|
||||||
match style {
|
|
||||||
DropStyle::Dead => {
|
DropStyle::Dead => {
|
||||||
self.elaborator
|
self.elaborator
|
||||||
.patch()
|
.patch()
|
||||||
|
@ -170,6 +170,7 @@ impl<'a, 'tcx> DropElaborator<'a, 'tcx> for Elaborator<'a, '_, 'tcx> {
|
|||||||
self.ctxt.param_env()
|
self.ctxt.param_env()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[instrument(level = "debug", skip(self), ret)]
|
||||||
fn drop_style(&self, path: Self::Path, mode: DropFlagMode) -> DropStyle {
|
fn drop_style(&self, path: Self::Path, mode: DropFlagMode) -> DropStyle {
|
||||||
let ((maybe_live, maybe_dead), multipart) = match mode {
|
let ((maybe_live, maybe_dead), multipart) = match mode {
|
||||||
DropFlagMode::Shallow => (self.ctxt.init_data.maybe_live_dead(path), false),
|
DropFlagMode::Shallow => (self.ctxt.init_data.maybe_live_dead(path), false),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user