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-132732: Clear errors in JIT optimizer on error by Fidget-Spinner · Pull Request #136048 · python/cpython Conversation
|
|
Asking just to educate myself: what kind of errors are we expecting inside the JIT and is it safe to always clear them? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
In general, we want to shift as much computation as possible to optimization-time instead of runtime. Some classes of errors, like The other class of errors are ones that are easier to ask forgiveness than permission for. For example, constant-evaluating stuff like |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (PyErr_Occurred()) { | ||
| PyErr_Clear(); | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be:
| if (PyErr_Occurred()) { | |
| PyErr_Clear(); | |
| } | |
| assert(PyErr_Occurred()); | |
| PyErr_Clear(); |
...or are there cases where an error hasn't occurred, but we end up here?
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.
I think the current code goes to error on some cases where we run out of memory too, but no memoryerror is set.
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.
I don't think so, all uses of goto error in these files seem like they have an error set.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@tomasr8 may I trouble you with a review please? |
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.
Given Brandt's explanation, this looks good to me :) I just left one question/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.
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.