-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-44889: Specialize LOAD_METHOD with PEP 659 adaptive interpreter #27722
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
Merged
markshannon
merged 43 commits into
python:main
from
Fidget-Spinner:specialize_load_method
Aug 17, 2021
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
60ab351
WIP: implement LOAD_METHOD_HINT
Fidget-Spinner e0f7ebe
fix most tests: validate object __dict__ didn't modify keys
Fidget-Spinner ffd7ff3
fix all tests and allow no owner.__dict__ to be specialized!
Fidget-Spinner 2b014a2
specialize builtins too
Fidget-Spinner b200887
turn off specialization stats
Fidget-Spinner d977986
improve specialization
Fidget-Spinner 187fddb
fix a comment
Fidget-Spinner c71f142
better attribute detection - fix all tests
Fidget-Spinner f3082f4
always check attr inside instance __dict__
Fidget-Spinner 0f32d60
backoff immediately for LOAD_METHOD, fail on dict subclasses, optimiz…
Fidget-Spinner 8a31db3
Improve comments and specialization stats
Fidget-Spinner 06d606e
Merge remote-tracking branch 'upstream/main' into specialize_load_method
Fidget-Spinner 608f6d0
regen opcode
Fidget-Spinner 1f5e64a
simplify code, use new spec_fail stats style
Fidget-Spinner 29daf44
LOAD_METHOD_WITH_HINT now supports inherited methods
Fidget-Spinner a3d6dd3
remove unneeded deopt
Fidget-Spinner d7ee4ac
remove experiments, rename to LOAD_METHOD_CACHED
Fidget-Spinner c944af0
move deopt earlier
Fidget-Spinner 2f5cc63
Apply Mark's suggestions, fix up comments
Fidget-Spinner 70ad1ea
Create 2021-08-11-20-45-02.bpo-44889.2T3nTn.rst
Fidget-Spinner f4487fc
remove unused variable
Fidget-Spinner afcf51e
round two: apply mark's suggestions
Fidget-Spinner e551d7a
Merge remote-tracking branch 'upstream/main' into specialize_load_method
Fidget-Spinner 6f1f1f0
remove TARGET
Fidget-Spinner dc152ed
add to specialization stats dict
Fidget-Spinner dd77f75
improve borrowed ref safety explanation
Fidget-Spinner 601e9b8
implement LOAD_METHOD_MODULE, and LOAD_METHOD_CLASS (for python classes)
Fidget-Spinner 94b6106
fix macro
Fidget-Spinner 1d87e53
Partially address Mark's review
Fidget-Spinner 3697d4f
refactor, fully address review
Fidget-Spinner 1d83667
fix check for classes
Fidget-Spinner 5db1d3b
update comments, LOAD_METHOD_BUILTIN isn't worth it
Fidget-Spinner d12205b
apply mark's refactoring suggestions
Fidget-Spinner 8af701d
more refactoring
Fidget-Spinner ad4ff6e
refactor and address review comments
Fidget-Spinner a3d1b50
add cases, use pytype_check only
Fidget-Spinner d8384bc
address review number 100
Fidget-Spinner ae2a520
remove usless comment
Fidget-Spinner a12406b
Fix buildbot errors: cache the type/class and compare that too
Fidget-Spinner 33445d5
Revert "Fix buildbot errors: cache the type/class and compare that too"
Fidget-Spinner 6d806a2
add a few more checks to safeguard specializations
Fidget-Spinner 020a326
Merge remote-tracking branch 'upstream/main' into specialize_load_method
Fidget-Spinner d27e388
Fix for types with no dict
Fidget-Spinner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
8 changes: 8 additions & 0 deletions
8
Misc/NEWS.d/next/Core and Builtins/2021-08-11-20-45-02.bpo-44889.2T3nTn.rst
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Initial implementation of adaptive specialization of ``LOAD_METHOD``. The | ||
following specialized forms were added: | ||
|
||
* ``LOAD_METHOD_CACHED`` | ||
|
||
* ``LOAD_METHOD_MODULE`` | ||
|
||
* ``LOAD_METHOD_CLASS`` |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.