@@ -416,7 +416,7 @@ private static FrameDescriptor makeFrameDescriptor(CodeUnit co) {
416
416
// stack
417
417
newBuilder .addSlots (co .stacksize , FrameSlotKind .Illegal );
418
418
// BCI filled when unwinding the stack or when pausing generators
419
- newBuilder .addSlot (FrameSlotKind .Int , null , null );
419
+ newBuilder .addSlot (FrameSlotKind .Static , null , null );
420
420
if (co .isGeneratorOrCoroutine ()) {
421
421
// stackTop saved when pausing a generator
422
422
newBuilder .addSlot (FrameSlotKind .Int , null , null );
@@ -754,6 +754,9 @@ Object executeFromBci(VirtualFrame virtualFrame, Frame localFrame, Frame stackFr
754
754
long [] localLongConsts = longConsts ;
755
755
String [] localNames = names ;
756
756
Node [] localNodes = adoptedNodes ;
757
+ final int bciSlot = bcioffset ;
758
+
759
+ virtualFrame .setIntStatic (bciSlot , initialBci );
757
760
758
761
/*
759
762
* This separate tracking of local exception is necessary to make exception state saving
@@ -775,6 +778,7 @@ Object executeFromBci(VirtualFrame virtualFrame, Frame localFrame, Frame stackFr
775
778
while (true ) {
776
779
final byte bc = localBC [bci ];
777
780
final int beginBci = bci ;
781
+ virtualFrame .setIntStatic (bciSlot , bci );
778
782
779
783
CompilerAsserts .partialEvaluationConstant (bc );
780
784
CompilerAsserts .partialEvaluationConstant (bci );
@@ -1409,7 +1413,7 @@ Object executeFromBci(VirtualFrame virtualFrame, Frame localFrame, Frame stackFr
1409
1413
}
1410
1414
if (newTarget == -1 ) {
1411
1415
// For tracebacks
1412
- virtualFrame .setInt ( bcioffset , beginBci );
1416
+ virtualFrame .setIntStatic ( bciSlot , beginBci );
1413
1417
if (isGeneratorOrCoroutine ) {
1414
1418
if (localFrame != stackFrame ) {
1415
1419
// Unwind the generator frame stack
0 commit comments