-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
GH-119866: Spill before escaping calls in all cases. #124392
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 62 commits into
python:main
from
faster-cpython:spill-before-escaping-calls-2
Oct 7, 2024
Merged
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
75bda28
Add copy and == support to Stack class
markshannon c7e9102
Merge branch 'main' into stack-copy-and-merge
markshannon d331371
blacken stack.py
markshannon 4673d8a
Cases generator: Track reachability and divergent stacks in if statem…
markshannon 132df06
Fix type errors and rename ahead to look_ahead
markshannon b7f71d4
Track state of output variables
markshannon b97dea9
Handle stack and output locals togather as Storage class
markshannon 9838a05
Track locals as well as stack on differing paths
markshannon 1f829be
Use 'PEP 7' in syntax error, to make it clear that this is not a C sy…
markshannon d2e5f12
Push peeks back to stack in optimizer code gen
markshannon 2753014
Merge branch 'main' into stack-copy-and-merge
markshannon 1754fc4
Update test
markshannon 98f9720
Cleanup whitespace
markshannon 0284b3f
Add tests for PEP 7 parsing and escaping call in condition
markshannon 03bea71
Remove merge artifact
markshannon ca2f457
Remove test for escaping calls in conditions
markshannon 57de61f
Spill before escaping calls. Initial attempt
markshannon a2e430a
Clean up asserts
markshannon 95408d3
Update test
markshannon eb3a645
Flush locals as well on error
markshannon 00f5265
Spill stack on escaping calls. Preparatory work
markshannon 7de1e60
Spill stack contents on escaping calls
markshannon 3bfed1b
Find end of statement when anlyzing escaping calls
markshannon d7e1c82
Spill stack pointer as well. Work in progress
markshannon 2cc4f64
Don't allow escaping calls in ERROR_IF or DEOPT_IF
markshannon 8e258ad
Improve tracking of stack and locals in conditional flow
markshannon 6da3fc6
Handle ERROR_NO_POP correctly
markshannon 60ee3e9
Fix up handling of liveness
markshannon 9f2f3bb
Allow assignments of new refs to input as well as output variables.
markshannon 87b5561
Merge branch 'main' into spill-before-escaping-calls-2
markshannon 9dda555
Add explicit kills and more stack tracking
markshannon a387cb2
Final fixups
markshannon c95d367
Fix tests
markshannon dd0e9f6
Fix up tier 2 and optimizer generators
markshannon e5d0e67
Publish symbol for the JIT
markshannon fee5c3f
Merge branch 'main' into spill-before-escaping-calls-2
markshannon d1f1d85
Merge branch 'main' into spill-before-escaping-calls-2
markshannon 2492e6d
Rename to KILL to the less aggressive DEAD
markshannon 4c813d1
Add type annotations and workaround mypy's lack of flow sensitivity
markshannon 8c94974
Add type ignore
markshannon 794eea5
Merge branch 'main' into spill-before-escaping-calls-2
markshannon 16d6345
Address some review comments
markshannon b9c645e
Address more review comments
markshannon d822866
Revert TO_BOOL changes in optimizer_bytecodes.c
markshannon c61905a
Remove dead code
markshannon bded308
Better analysis of escaping calls
markshannon 56b0bd5
Remove debug statement
markshannon ddd3bac
Merge branch 'main' into spill-before-escaping-calls-2
markshannon e2408e2
Find escaping calls of form (func)(args) and table[oparg](args)
markshannon 7cd6f90
Refactor optimizer_bytecodes.c a bit to help codegen understand it
markshannon 7a77491
Fix lexer bug
markshannon 60f5054
Tweak formatting of code directly after C macros
markshannon d3d6259
Merge branch 'main' into spill-before-escaping-calls-2
markshannon 6771c4a
Remove debugging code
markshannon 8c48eaa
Add more non-escaping functions
markshannon 6288f80
Move casts to avoid extra spilling. Regenerate files
markshannon d183767
Sort non-escaping function names
markshannon 0244d77
A cast to (int) is not a call
markshannon efb5e7d
Prohibit switch statements in bytecodes.c and remove the last one.
markshannon de3b86c
Insert extra braces to handle 'else if' without an 'else' correctly.
markshannon 2db84df
Merge branch 'main' into spill-before-escaping-calls-2
markshannon a1e55d4
Fix test. gc.get_referrers can now see values on generator stacks
markshannon 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
Allow assignments of new refs to input as well as output variables.
- Loading branch information
commit 9f2f3bb79493666b76fb15c76974cd962aa401ab
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
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
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.