@@ -438,6 +438,9 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
438
438
return_place : Option < PlaceTy < ' tcx , M :: PointerTag > > ,
439
439
return_to_block : StackPopCleanup ,
440
440
) -> EvalResult < ' tcx > {
441
+ if self . stack . len ( ) > 1 { // FIXME should be "> 0", printing topmost frame crashes rustc...
442
+ debug ! ( "PAUSING({}) {}" , self . cur_frame( ) , self . frame( ) . instance) ;
443
+ }
441
444
:: log_settings:: settings ( ) . indentation += 1 ;
442
445
443
446
// first push a stack frame so we have access to the local substs
@@ -502,6 +505,10 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
502
505
self . frame_mut ( ) . locals = locals;
503
506
}
504
507
508
+ if self . stack . len ( ) > 1 { // FIXME no check should be needed, but printing topmost frame crashes rustc...
509
+ debug ! ( "ENTERING({}) {}" , self . cur_frame( ) , self . frame( ) . instance) ;
510
+ }
511
+
505
512
if self . stack . len ( ) > self . tcx . sess . const_eval_stack_frame_limit {
506
513
err ! ( StackFrameLimitReached )
507
514
} else {
@@ -510,6 +517,9 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
510
517
}
511
518
512
519
pub ( super ) fn pop_stack_frame ( & mut self ) -> EvalResult < ' tcx > {
520
+ if self . stack . len ( ) > 1 { // FIXME no check should be needed, but printing topmost frame crashes rustc...
521
+ debug ! ( "LEAVING({}) {}" , self . cur_frame( ) , self . frame( ) . instance) ;
522
+ }
513
523
:: log_settings:: settings ( ) . indentation -= 1 ;
514
524
let frame = self . stack . pop ( ) . expect (
515
525
"tried to pop a stack frame, but there were none" ,
@@ -553,6 +563,10 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
553
563
return err ! ( Unreachable ) ;
554
564
}
555
565
566
+ if self . stack . len ( ) > 1 { // FIXME should be "> 0", printing topmost frame crashes rustc...
567
+ debug ! ( "CONTINUING({}) {}" , self . cur_frame( ) , self . frame( ) . instance) ;
568
+ }
569
+
556
570
Ok ( ( ) )
557
571
}
558
572
0 commit comments