Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9cf96ec
Enable setting vectorcall field on PyFunctionObjects
May 3, 2022
282e3dc
check if vectorcall is nondefault before inlining call
May 3, 2022
edcdcf1
📜🤖 Added by blurb_it.
blurb-it[bot] May 3, 2022
debf5a9
Apply suggestions from code review
adphrost May 3, 2022
473d18d
addressed comments
May 3, 2022
76e8c9d
added to docs
May 3, 2022
3337459
Merge branch 'main' into pyfunctionobject-set-vectorcall-field
Jun 16, 2022
1543f44
updated doc with fix by itamaro
Jun 16, 2022
08082bd
formatting
Jun 16, 2022
ed93327
removed doc from 3.11
Jun 16, 2022
24ffd30
remove lines from 3.11
Jun 16, 2022
89cb4b2
Apply review feedback from vstinner and markshannon
itamaro Jun 21, 2022
3387d4a
Merge branch 'main' into gh-91049-set-vectorcall
itamaro Sep 2, 2022
b0cc28a
Merge branch 'main' into gh-91049-set-vectorcall
itamaro Sep 5, 2022
99e4085
Add deopt on func version in LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN
itamaro Sep 6, 2022
24353c8
write func version to cache keys version when specializing LOAD_ATTR_…
itamaro Sep 6, 2022
60f7769
remove redundant argcount check in LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN …
itamaro Sep 6, 2022
376ee75
Add missing periods in docs
itamaro Sep 6, 2022
56ffc70
move warning comment to the function C API docs
itamaro Sep 6, 2022
5340e87
Merge branch 'main' into pyfunctionobject-set-vectorcall-field
itamaro Sep 6, 2022
a5e9d13
fix race with GH-96519 (removed func_version in LOAD_ATTR_GETATTRIBUT…
itamaro Sep 6, 2022
12faf52
PEP-7 formatting
itamaro Sep 7, 2022
6623470
Address review feedback
itamaro Sep 7, 2022
9149f14
Add test for LOAD_ATTR specialization when overriding vectorcall of _…
itamaro Sep 8, 2022
e732d7e
Improve setvectorcall + specialization testing
itamaro Sep 8, 2022
84874fb
Merge branch 'main' into pyfunctionobject-set-vectorcall-field
itamaro Sep 15, 2022
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
Next Next commit
updated doc with fix by itamaro
  • Loading branch information
Andrew Frost committed Jun 16, 2022
commit 1543f445ef4ddecc2f9795f10a88cbcb6c39e91a
5 changes: 5 additions & 0 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ New Features
an additional metaclass argument.
(Contributed by Wenzel Jakob in :gh:`93012`.)


* Add new function :c:func:`PyFunction_SetVectorcall` to the C API
which sets the vectorcall field of a given PyFunctionObject
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may explain the purpose of the function here, like mention Cinder JIT and Pyjion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not have a "purpose". We should state clearly what the function does, not bless some particular use case.

@adphrost
Could you add a warning that the new function pointer must have exactly the same behavior as the unaltered function.
I am a little concerned that C extensions will abuse this, and we will have deal with the bug reports.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
which sets the vectorcall field of a given PyFunctionObject
which sets the vectorcall field of a given :c:type:`PyFunctionObject`.

(Contributed by Andrew Frost in :gh:`92257`.)

Porting to Python 3.12
----------------------

Expand Down