Skip to content

Commit c7ad988

Browse files
committed
Replace _PUSH_FRAME_INLINEABLE body with assert(0) since it can never be executed
1 parent dad9100 commit c7ad988

File tree

3 files changed

+6
-37
lines changed

3 files changed

+6
-37
lines changed

Include/internal/pycore_uop_metadata.h

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

Python/bytecodes.c

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3144,27 +3144,10 @@ dummy_func(
31443144
#endif
31453145
}
31463146

3147-
// Exact same as _PUSH_FRAME. But marks a frame as inlineable
3148-
// to the tier 2 redundancy eliminator.
3149-
// TODO: add support to pseudo for uops.
3147+
// Pseudo uop for inlineable _PUSH_FRAME -- replaced by _PUSH_FRAME if not.
31503148
op(_PUSH_FRAME_INLINEABLE, (new_frame: _PyInterpreterFrame* -- unused if (0))) {
3151-
// Write it out explicitly because it's subtly different.
3152-
// Eventually this should be the only occurrence of this code.
3153-
assert(tstate->interp->eval_frame == NULL);
3154-
SYNC_SP();
3155-
_PyFrame_SetStackPointer(frame, stack_pointer);
3156-
new_frame->previous = frame;
3157-
CALL_STAT_INC(inlined_py_calls);
3158-
frame = tstate->current_frame = new_frame;
3159-
tstate->py_recursion_remaining--;
3160-
LOAD_SP();
3161-
LOAD_IP(0);
3162-
#if LLTRACE && TIER_ONE
3163-
lltrace = maybe_lltrace_resume_frame(frame, &entry_frame, GLOBALS());
3164-
if (lltrace < 0) {
3165-
goto exit_unwind;
3166-
}
3167-
#endif
3149+
(void)new_frame;
3150+
assert(0);
31683151
}
31693152

31703153
macro(CALL_BOUND_METHOD_EXACT_ARGS) =

Python/executor_cases.c.h

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

0 commit comments

Comments
 (0)