mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-112354: _GUARD_IS_TRUE_POP
side-exits to target the next instruction, not themselves. (GH-114078)
This commit is contained in:
parent
2010d45327
commit
ac10947ba7
8 changed files with 40 additions and 26 deletions
|
@ -124,7 +124,7 @@ def replace_decrefs(
|
|||
out.emit(f"Py_DECREF({var.name});\n")
|
||||
|
||||
|
||||
def replace_store_sp(
|
||||
def replace_sync_sp(
|
||||
out: CWriter,
|
||||
tkn: Token,
|
||||
tkn_iter: Iterator[Token],
|
||||
|
@ -135,9 +135,7 @@ def replace_store_sp(
|
|||
next(tkn_iter)
|
||||
next(tkn_iter)
|
||||
next(tkn_iter)
|
||||
out.emit_at("", tkn)
|
||||
stack.flush(out)
|
||||
out.emit("_PyFrame_SetStackPointer(frame, stack_pointer);\n")
|
||||
|
||||
|
||||
def replace_check_eval_breaker(
|
||||
|
@ -160,7 +158,7 @@ REPLACEMENT_FUNCTIONS = {
|
|||
"ERROR_IF": replace_error,
|
||||
"DECREF_INPUTS": replace_decrefs,
|
||||
"CHECK_EVAL_BREAKER": replace_check_eval_breaker,
|
||||
"STORE_SP": replace_store_sp,
|
||||
"SYNC_SP": replace_sync_sp,
|
||||
}
|
||||
|
||||
ReplacementFunctionType = Callable[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue