Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 26fe550

Browse files
committedMar 9, 2022
normalization change and rebase
1 parent 8a811a1 commit 26fe550

File tree

49 files changed

+290
-344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+290
-344
lines changed
 

‎Cargo.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ dependencies = [
311311

312312
[[package]]
313313
name = "cargo"
314-
version = "0.61.0"
314+
version = "0.62.0"
315315
dependencies = [
316316
"anyhow",
317317
"atty",

‎compiler/rustc_const_eval/src/interpret/eval_context.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ pub enum StackPopCleanup {
164164
}
165165

166166
/// State of a local variable including a memoized layout
167-
#[derive(Clone, PartialEq, Eq, HashStable)]
167+
#[derive(Clone, Debug, PartialEq, Eq, HashStable)]
168168
pub struct LocalState<'tcx, Tag: Provenance = AllocId> {
169169
pub value: LocalValue<Tag>,
170170
/// Don't modify if `Some`, this is only used to prevent computing the layout twice
@@ -714,13 +714,15 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
714714
self.size_and_align_of(&mplace.meta, &mplace.layout)
715715
}
716716

717+
#[instrument(skip(self, body, return_place, return_to_block), level = "debug")]
717718
pub fn push_stack_frame(
718719
&mut self,
719720
instance: ty::Instance<'tcx>,
720721
body: &'mir mir::Body<'tcx>,
721722
return_place: Option<&PlaceTy<'tcx, M::PointerTag>>,
722723
return_to_block: StackPopCleanup,
723724
) -> InterpResult<'tcx> {
725+
debug!("body: {:#?}", body);
724726
// first push a stack frame so we have access to the local substs
725727
let pre_frame = Frame {
726728
body,
@@ -824,6 +826,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
824826
/// `Drop` impls for any locals that have been initialized at this point.
825827
/// The cleanup block ends with a special `Resume` terminator, which will
826828
/// cause us to continue unwinding.
829+
#[instrument(skip(self), level = "debug")]
827830
pub(super) fn pop_stack_frame(&mut self, unwinding: bool) -> InterpResult<'tcx> {
828831
info!(
829832
"popping stack frame ({})",
@@ -876,6 +879,8 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
876879
return Ok(());
877880
}
878881

882+
debug!("locals: {:#?}", frame.locals);
883+
879884
// Cleanup: deallocate all locals that are backed by an allocation.
880885
for local in &frame.locals {
881886
self.deallocate_local(local.value)?;
@@ -935,6 +940,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
935940
Ok(())
936941
}
937942

943+
#[instrument(skip(self), level = "debug")]
938944
fn deallocate_local(&mut self, local: LocalValue<M::PointerTag>) -> InterpResult<'tcx> {
939945
if let LocalValue::Live(Operand::Indirect(MemPlace { ptr, .. })) = local {
940946
// All locals have a backing allocation, even if the allocation is empty

0 commit comments

Comments
 (0)
Please sign in to comment.