File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -6713,7 +6713,7 @@ def _run_frame(
6713
6713
assert frame .inst_ptr <= max_inst_ptr
6714
6714
frame .inst_ptr += 1
6715
6715
inst : dis .Instruction = insts [inst_ptr_to_idx [frame .inst_ptr ]]
6716
-
6716
+ print ( "#############" , len ( frame . interpreter_stack ), inst )
6717
6717
# Updates the stack frame to the current position
6718
6718
# TODO maybe also have inst_ptr?
6719
6719
frame .nexti (inst )
@@ -6757,7 +6757,13 @@ def _run_frame(
6757
6757
frame .interpreter_stack .append (current_exception )
6758
6758
current_exception = None
6759
6759
skip_stack_effect_check = True
6760
- interpretation_result = et_handler // 2
6760
+ if sys .version_info >= (3 , 12 ):
6761
+ # yeah, this is *really* ugly to make interpretation_result stay relative... maybe introduce another signal
6762
+ interpretation_result = (
6763
+ et_handler // 2 - idx_to_next_inst_ptr [inst_ptr_to_idx [frame .inst_ptr ]]
6764
+ )
6765
+ else :
6766
+ interpretation_result = et_handler // 2
6761
6767
else :
6762
6768
# This is Python 3.10-style unwinding
6763
6769
skip_stack_effect_check = True # or only do this in ifs below?
Original file line number Diff line number Diff line change @@ -2750,6 +2750,10 @@ def foo(x):
2750
2750
jfn ()
2751
2751
2752
2752
2753
+ @pytest .mark .skipif (
2754
+ sys .version_info >= (3 , 12 ),
2755
+ reason = "Python 3.12 code.InteractiveInterpreter().runsource does not use the displayhook as before" ,
2756
+ )
2753
2757
def test_displayhook (jit ):
2754
2758
from contextlib import redirect_stdout
2755
2759
import io
You can’t perform that action at this time.
0 commit comments