@@ -467,13 +467,8 @@ dummy_func(
467
467
for (int i = 2 ; i < code -> co_nlocalsplus ; i ++ ) {
468
468
new_frame -> localsplus [i ] = NULL ;
469
469
}
470
- _PyFrame_SetStackPointer (frame , stack_pointer );
471
470
JUMPBY (INLINE_CACHE_ENTRIES_BINARY_SUBSCR );
472
- frame -> prev_instr = next_instr - 1 ;
473
- new_frame -> previous = frame ;
474
- frame = cframe .current_frame = new_frame ;
475
- CALL_STAT_INC (inlined_py_calls );
476
- goto start_frame ;
471
+ DISPATCH_INLINED (new_frame );
477
472
}
478
473
479
474
// stack effect: (__0 -- )
@@ -1938,13 +1933,8 @@ dummy_func(
1938
1933
for (int i = 1 ; i < code -> co_nlocalsplus ; i ++ ) {
1939
1934
new_frame -> localsplus [i ] = NULL ;
1940
1935
}
1941
- _PyFrame_SetStackPointer (frame , stack_pointer );
1942
1936
JUMPBY (INLINE_CACHE_ENTRIES_LOAD_ATTR );
1943
- frame -> prev_instr = next_instr - 1 ;
1944
- new_frame -> previous = frame ;
1945
- frame = cframe .current_frame = new_frame ;
1946
- CALL_STAT_INC (inlined_py_calls );
1947
- goto start_frame ;
1937
+ DISPATCH_INLINED (new_frame );
1948
1938
}
1949
1939
1950
1940
// error: LOAD_ATTR has irregular stack effect
@@ -1979,13 +1969,8 @@ dummy_func(
1979
1969
for (int i = 2 ; i < code -> co_nlocalsplus ; i ++ ) {
1980
1970
new_frame -> localsplus [i ] = NULL ;
1981
1971
}
1982
- _PyFrame_SetStackPointer (frame , stack_pointer );
1983
1972
JUMPBY (INLINE_CACHE_ENTRIES_LOAD_ATTR );
1984
- frame -> prev_instr = next_instr - 1 ;
1985
- new_frame -> previous = frame ;
1986
- frame = cframe .current_frame = new_frame ;
1987
- CALL_STAT_INC (inlined_py_calls );
1988
- goto start_frame ;
1973
+ DISPATCH_INLINED (new_frame );
1989
1974
}
1990
1975
1991
1976
// stack effect: (__0, __1 -- )
@@ -2685,18 +2670,14 @@ dummy_func(
2685
2670
DEOPT_IF (gen -> gi_frame_state >= FRAME_EXECUTING , FOR_ITER );
2686
2671
STAT_INC (FOR_ITER , hit );
2687
2672
_PyInterpreterFrame * gen_frame = (_PyInterpreterFrame * )gen -> gi_iframe ;
2688
- _PyFrame_SetStackPointer (frame , stack_pointer );
2689
2673
frame -> yield_offset = oparg ;
2690
- JUMPBY (INLINE_CACHE_ENTRIES_FOR_ITER + oparg );
2691
- assert (_Py_OPCODE (* next_instr ) == END_FOR );
2692
- frame -> prev_instr = next_instr - 1 ;
2693
2674
_PyFrame_StackPush (gen_frame , Py_NewRef (Py_None ));
2694
2675
gen -> gi_frame_state = FRAME_EXECUTING ;
2695
2676
gen -> gi_exc_state .previous_item = tstate -> exc_info ;
2696
2677
tstate -> exc_info = & gen -> gi_exc_state ;
2697
- gen_frame -> previous = frame ;
2698
- frame = cframe . current_frame = gen_frame ;
2699
- goto start_frame ;
2678
+ JUMPBY ( INLINE_CACHE_ENTRIES_FOR_ITER + oparg ) ;
2679
+ assert ( _Py_OPCODE ( * next_instr ) == END_FOR ) ;
2680
+ DISPATCH_INLINED ( gen_frame ) ;
2700
2681
}
2701
2682
2702
2683
// stack effect: ( -- __0)
@@ -2978,13 +2959,8 @@ dummy_func(
2978
2959
if (new_frame == NULL ) {
2979
2960
goto error ;
2980
2961
}
2981
- _PyFrame_SetStackPointer (frame , stack_pointer );
2982
2962
JUMPBY (INLINE_CACHE_ENTRIES_CALL );
2983
- frame -> prev_instr = next_instr - 1 ;
2984
- new_frame -> previous = frame ;
2985
- cframe .current_frame = frame = new_frame ;
2986
- CALL_STAT_INC (inlined_py_calls );
2987
- goto start_frame ;
2963
+ DISPATCH_INLINED (new_frame );
2988
2964
}
2989
2965
/* Callable is not a normal Python function */
2990
2966
PyObject * res ;
@@ -3032,7 +3008,6 @@ dummy_func(
3032
3008
DEOPT_IF (!_PyThreadState_HasStackSpace (tstate , code -> co_framesize ), CALL );
3033
3009
STAT_INC (CALL , hit );
3034
3010
_PyInterpreterFrame * new_frame = _PyFrame_PushUnchecked (tstate , func );
3035
- CALL_STAT_INC (inlined_py_calls );
3036
3011
STACK_SHRINK (argcount );
3037
3012
for (int i = 0 ; i < argcount ; i ++ ) {
3038
3013
new_frame -> localsplus [i ] = stack_pointer [i ];
@@ -3041,12 +3016,8 @@ dummy_func(
3041
3016
new_frame -> localsplus [i ] = NULL ;
3042
3017
}
3043
3018
STACK_SHRINK (2 - is_meth );
3044
- _PyFrame_SetStackPointer (frame , stack_pointer );
3045
3019
JUMPBY (INLINE_CACHE_ENTRIES_CALL );
3046
- frame -> prev_instr = next_instr - 1 ;
3047
- new_frame -> previous = frame ;
3048
- frame = cframe .current_frame = new_frame ;
3049
- goto start_frame ;
3020
+ DISPATCH_INLINED (new_frame );
3050
3021
}
3051
3022
3052
3023
// stack effect: (__0, __array[oparg] -- )
@@ -3067,7 +3038,6 @@ dummy_func(
3067
3038
DEOPT_IF (!_PyThreadState_HasStackSpace (tstate , code -> co_framesize ), CALL );
3068
3039
STAT_INC (CALL , hit );
3069
3040
_PyInterpreterFrame * new_frame = _PyFrame_PushUnchecked (tstate , func );
3070
- CALL_STAT_INC (inlined_py_calls );
3071
3041
STACK_SHRINK (argcount );
3072
3042
for (int i = 0 ; i < argcount ; i ++ ) {
3073
3043
new_frame -> localsplus [i ] = stack_pointer [i ];
@@ -3081,12 +3051,8 @@ dummy_func(
3081
3051
new_frame -> localsplus [i ] = NULL ;
3082
3052
}
3083
3053
STACK_SHRINK (2 - is_meth );
3084
- _PyFrame_SetStackPointer (frame , stack_pointer );
3085
3054
JUMPBY (INLINE_CACHE_ENTRIES_CALL );
3086
- frame -> prev_instr = next_instr - 1 ;
3087
- new_frame -> previous = frame ;
3088
- frame = cframe .current_frame = new_frame ;
3089
- goto start_frame ;
3055
+ DISPATCH_INLINED (new_frame );
3090
3056
}
3091
3057
3092
3058
// stack effect: (__0, __array[oparg] -- )
0 commit comments