Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Include/internal/pycore_opcode_metadata.h

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

2 changes: 1 addition & 1 deletion Include/internal/pycore_uop_ids.h

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

6 changes: 3 additions & 3 deletions Include/internal/pycore_uop_metadata.h

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

3 changes: 2 additions & 1 deletion Lib/test/test_capi/test_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1938,7 +1938,8 @@ def testfunc(n):
self.assertIsNotNone(ex)
uops = get_opnames(ex)
self.assertIn("_CALL_TUPLE_1", uops)
self.assertIn("_POP_TOP_NOP", uops)
# Re-enable later gh-134584
# self.assertIn("_POP_TOP_NOP", uops)

def test_call_str_1(self):
def testfunc(n):
Expand Down
11 changes: 2 additions & 9 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -4068,13 +4068,13 @@ dummy_func(
DEOPT_IF(callable_o != (PyObject *)&PyTuple_Type);
}

op(_CALL_TUPLE_1, (callable, null, arg -- res, a)) {
op(_CALL_TUPLE_1, (callable, null, arg -- res)) {
PyObject *arg_o = PyStackRef_AsPyObjectBorrow(arg);

assert(oparg == 1);
STAT_INC(CALL, hit);
PyObject *res_o = PySequence_Tuple(arg_o);
a = arg;
PyStackRef_CLOSE(arg);
INPUTS_DEAD();
ERROR_IF(res_o == NULL);
res = PyStackRef_FromPyObjectSteal(res_o);
Expand All @@ -4086,7 +4086,6 @@ dummy_func(
_GUARD_NOS_NULL +
_GUARD_CALLABLE_TUPLE_1 +
_CALL_TUPLE_1 +
POP_TOP +
_CHECK_PERIODIC_AT_END;

op(_CHECK_AND_ALLOCATE_OBJECT, (type_version/2, callable, self_or_null, unused[oparg] -- callable, self_or_null, unused[oparg])) {
Expand Down Expand Up @@ -5454,12 +5453,6 @@ dummy_func(
}
}

label(pop_3_error) {
stack_pointer -= 3;
assert(WITHIN_STACK_BOUNDS());
goto error;
}

label(pop_2_error) {
stack_pointer -= 2;
assert(WITHIN_STACK_BOUNDS());
Expand Down
17 changes: 10 additions & 7 deletions Python/executor_cases.c.h

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

30 changes: 9 additions & 21 deletions Python/generated_cases.c.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/opcode_targets.h

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

3 changes: 1 addition & 2 deletions Python/optimizer_bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ dummy_func(void) {
}
}

op(_CALL_TUPLE_1, (callable, null, arg -- res, a)) {
op(_CALL_TUPLE_1, (callable, null, arg -- res)) {
if (sym_matches_type(arg, &PyTuple_Type)) {
// e.g. tuple((1, 2)) or tuple(foo) where foo is known to be a tuple
// Note: we must strip the reference information because it goes
Expand All @@ -1107,7 +1107,6 @@ dummy_func(void) {
else {
res = sym_new_type(ctx, &PyTuple_Type);
}
a = arg;
}

op(_GUARD_TOS_LIST, (tos -- tos)) {
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