Skip to content

Commit 53a81a4

Browse files
committed
address review comments
1 parent df99f7e commit 53a81a4

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Python/bytecodes.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2773,7 +2773,8 @@ dummy_func(
27732773
gen->gi_frame_state = FRAME_EXECUTING;
27742774
gen->gi_exc_state.previous_item = tstate->exc_info;
27752775
tstate->exc_info = &gen->gi_exc_state;
2776-
frame->return_offset = (uint16_t)(2 + oparg);
2776+
// oparg is the return offset from the next instruction.
2777+
frame->return_offset = (uint16_t)(1 + INLINE_CACHE_ENTRIES_FOR_ITER + oparg);
27772778
}
27782779

27792780
macro(FOR_ITER_GEN) =
@@ -3171,9 +3172,6 @@ dummy_func(
31713172
}
31723173
}
31733174

3174-
// The 'unused' output effect represents the return value
3175-
// (which will be pushed when the frame returns).
3176-
// It is needed so CALL_PY_EXACT_ARGS matches its family.
31773175
op(_PUSH_FRAME, (new_frame: _PyInterpreterFrame* -- )) {
31783176
// Write it out explicitly because it's subtly different.
31793177
// Eventually this should be the only occurrence of this code.
@@ -4206,6 +4204,7 @@ dummy_func(
42064204
}
42074205
else {
42084206
if (!backoff_counter_triggers(exit->temperature)) {
4207+
exit->temperature = advance_backoff_counter(exit->temperature);
42094208
GOTO_TIER_ONE(target);
42104209
}
42114210
int optimized = _PyOptimizer_Optimize(frame, target, stack_pointer, &executor);

Python/executor_cases.c.h

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)