Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-91049: Introduce set vectorcall field API for PyFunctionObject#92257
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
markshannon merged 26 commits intopython:mainfromadphrost:pyfunctionobject-set-vectorcall-fieldSep 15, 2022
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
26 commits Select commitHold shift + click to select a range
9cf96ec Enable setting vectorcall field on PyFunctionObjects
282e3dc check if vectorcall is nondefault before inlining call
edcdcf1 📜🤖 Added by blurb_it.
blurb-it[bot]debf5a9 Apply suggestions from code review
adphrost473d18d addressed comments
76e8c9d added to docs
3337459 Merge branch 'main' into pyfunctionobject-set-vectorcall-field
1543f44 updated doc with fix by itamaro
08082bd formatting
ed93327 removed doc from 3.11
24ffd30 remove lines from 3.11
89cb4b2 Apply review feedback from vstinner and markshannon
itamaro3387d4a Merge branch 'main' into gh-91049-set-vectorcall
itamarob0cc28a Merge branch 'main' into gh-91049-set-vectorcall
itamaro99e4085 Add deopt on func version in LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN
itamaro24353c8 write func version to cache keys version when specializing LOAD_ATTR_…
itamaro60f7769 remove redundant argcount check in LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN …
itamaro376ee75 Add missing periods in docs
itamaro56ffc70 move warning comment to the function C API docs
itamaro5340e87 Merge branch 'main' into pyfunctionobject-set-vectorcall-field
itamaroa5e9d13 fix race with GH-96519 (removed func_version in LOAD_ATTR_GETATTRIBUT…
itamaro12faf52 PEP-7 formatting
itamaro6623470 Address review feedback
itamaro9149f14 Add test for LOAD_ATTR specialization when overriding vectorcall of _…
itamaroe732d7e Improve setvectorcall + specialization testing
itamaro84874fb Merge branch 'main' into pyfunctionobject-set-vectorcall-field
itamaroFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Add deopt on func version in LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit99e4085e7e40afb733fdfad0f55e4df29cb82ec6
There are no files selected for viewing
3 changes: 2 additions & 1 deletionInclude/cpython/funcobject.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3135,8 +3135,10 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int | ||
| PyObject *getattribute = read_obj(cache->descr); | ||
| assert(Py_IS_TYPE(getattribute, &PyFunction_Type)); | ||
| PyFunctionObject *f = (PyFunctionObject *)getattribute; | ||
| uint32_t func_version = read_u32(cache->keys_version); | ||
| DEOPT_IF(f->func_version != func_version, LOAD_ATTR); | ||
erlend-aasland marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| PyCodeObject *code = (PyCodeObject *)f->func_code; | ||
| DEOPT_IF(code->co_argcount != 2, LOAD_ATTR); | ||
| DEOPT_IF(!_PyThreadState_HasStackSpace(tstate, code->co_framesize), CALL); | ||
| STAT_INC(LOAD_ATTR, hit); | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.