GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — GH-93143: Don't turn `LOAD_FAST` into `LOAD_FAST_CHECK` by brandtbucher · Pull Request #99075 · python/cpython Conversation
| |||||||||||||||||||||||||||||||||
|
I can look closer this evening, but mutating co_code is not ideal, so I think this is probably a good idea. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
There are two cases when we need to set locals to
In the first case we can set the local to However when jumping, trying to decide which locals need to be set to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I've updated the code to skip scanning the bytecode for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
👍
This feels safer and more robust than what we have now.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| @@ -0,0 +1,4 @@ | |||
| Rather than changing :attr:`~types.CodeType.co_code`, the interpreter will | |||
| now display a :exc:`RuntimeWarning` and assign :const:`None` to any fast | |||
| locals that are incorrectly left unbound after jumps or :keyword:`del` | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
There aren't necessarily incorrect, so maybe just "locals that are unbound after ..."
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| } | ||
| value = Py_NewRef(Py_None); | ||
| } | ||
| Py_XINCREF(value); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Py_XINCREF(value); | |
| Py_INCREF(value); |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
When you're done making the requested changes, leave the comment: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.