Skip to content

bpo-46939: Specialize calls to Python classes #31707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
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
Use _Py_SET_OPCODE
  • Loading branch information
Fidget-Spinner committed Mar 12, 2022
commit c04f5daa4327ee44d3d0b9ab56cdf2d860367e1c
2 changes: 1 addition & 1 deletion Python/specialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ specialize_class_call(PyObject *callable, _Py_CODEUNIT *instr, int nargs,
assert(tp->tp_version_tag != 0);
write_u32(cache->type_version, tp->tp_version_tag);
((PyHeapTypeObject *)tp)->_spec_cache.init = descriptor;
*instr = _Py_MAKECODEUNIT(PRECALL_PY_CLASS, _Py_OPARG(*instr));
_Py_SET_OPCODE(*instr, PRECALL_PY_CLASS);
return 0;
}
SPECIALIZATION_FAIL(PRECALL, SPEC_FAIL_CALL_PYTHON_CLASS_NON_PY_INIT);
Expand Down