Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge remote-tracking branch 'upstream/main' into gh-134584-unicode
  • Loading branch information
corona10 committed Jun 23, 2025
commit d95aee942ad0cbf2360cbd283cf39654aa2588c0
2 changes: 1 addition & 1 deletion Include/internal/pycore_uop_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ dummy_func(
PyStackRef_XCLOSE(value);
}


op(_POP_TOP_NOP, (value --)) {
assert(PyStackRef_IsNull(value) || (!PyStackRef_RefcountOnObject(value)) ||
_Py_IsImmortal((PyStackRef_AsPyObjectBorrow(value))));
Expand Down
2 changes: 0 additions & 2 deletions Python/executor_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 9 additions & 10 deletions Python/optimizer_bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,16 +570,11 @@ dummy_func(void) {
}
}

op(_COPY, (bottom, unused[oparg-1] -- bottom, unused[oparg-1], top)) {
assert(oparg > 0);
top = bottom;
}

op(_POP_TOP, (value -- )) {
PyTypeObject *typ = sym_get_type(value);
PyObject *const_val = sym_get_const(ctx, value);
if (PyJitRef_IsBorrowed(value) ||
(const_val != NULL && _Py_IsImmortal(const_val))) {
sym_is_immortal(PyJitRef_Unwrap(value)) ||
sym_is_null(value)) {
REPLACE_OP(this_instr, _POP_TOP_NOP, 0, 0);
}
else if (typ == &PyLong_Type) {
Expand All @@ -591,9 +586,11 @@ dummy_func(void) {
else if (typ == &PyUnicode_Type) {
REPLACE_OP(this_instr, _POP_TOP_UNICODE, 0, 0);
}
else if (typ == &PyBool_Type) {
REPLACE_OP(this_instr, _POP_TOP_NOP, 0, 0);
}
}

op(_COPY, (bottom, unused[oparg-1] -- bottom, unused[oparg-1], top)) {
assert(oparg > 0);
top = bottom;
}

op(_SWAP, (bottom, unused[oparg-2], top -- bottom, unused[oparg-2], top)) {
Expand Down Expand Up @@ -833,6 +830,8 @@ dummy_func(void) {
}

op(_RETURN_VALUE, (retval -- res)) {
// We wrap and unwrap the value to mimic PyStackRef_MakeHeapSafe
// in bytecodes.c
JitOptRef temp = PyJitRef_Wrap(PyJitRef_Unwrap(retval));
DEAD(retval);
SAVE_STACK();
Expand Down
7 changes: 2 additions & 5 deletions Python/optimizer_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.