-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
basic support for try except #4902
Merged
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
440f8d7
Add bytecode support for simple try/except for the catch all case.
sklam 8c4d8b6
Fix stack adjustment for setup except/finally
sklam b39d31f
Make each bytecode statement branch and check for exception raised
sklam 28fb37f
Minimal support for raise and catch
sklam 92e25ed
Check whether we are in a try block at runtime
sklam 9bc4f53
Proper cleanup of try-block
sklam b15e371
Add tests
sklam c342569
Support nested try
sklam 419609f
More testing
sklam 0b9147d
Add test with loops
sklam 5eba76b
Add TryRaise and StaticTryRaise IR node to handle statements that
sklam 0ccad8d
STASH
sklam 7c26ec0
Stronger typing for block kinds
sklam 3594865
Working on exception catching
sklam 5f188e6
Support catching exactly Exception classes
sklam ca5548d
Fix withlifting
sklam 9b2b035
Fix loop break
sklam c8b5686
Fix test failure due to unsupported try-except
sklam f2e4a72
Add test for nested try-except-finally
sklam a118a7c
Remove old try-except test in test_flow_control.py
sklam bee41ca
Test try except with refcounted types
sklam a239196
Test try-except in generator and with-objmode
sklam 9e7eb24
Test try-except with parfors
sklam d7d8489
Add more skips
sklam a86e756
Cleaning up and docstrings
sklam 359d1b7
Skip test
sklam a5e355e
More cleanup
sklam ce77574
Remove local import
sklam 8a8fede
some more tests
stuartarchibald f92feaa
Detect unsupport MAKE_FUNCTION use
sklam 8ab1ab6
Make PHI propagate unique definitions
sklam 4b1c261
Fix up tests
sklam e8b7ac6
Fix problem with empty try-block
sklam ccc1827
Remove the unreachable return that is upsetting py2
sklam a815de1
Revert "Make PHI propagate unique definitions"
sklam 72182fd
Mark unsupport test to have closure inside try-except
sklam b0d529e
Skip test the needs scipy.
sklam 316f3b1
Test and fix problem with type refinement
sklam 79fb508
Forbidden storing of exception objects
sklam 2664fcb
Ban reraise in except
sklam 4f80bb5
Report the user variable
sklam fe4ef1f
Refactor similar code
sklam 6bf1a1c
Apply suggestions from code review
sklam 38d1a7a
Update numba/byteflow.py
sklam f127335
Test hack to fix old-style implementation's exception propagation
sklam 04f1c08
Remove dead code
sklam c1bb22f
Ban reraise in py38 properly
sklam 6af3ef1
Fix issue with splitting LOAD_CONST.
sklam 0a71334
Apply review suggestion
sklam a0b8d2b
Merge branch 'master' into enh/tryexcept
sklam 7f66bbe
Apply suggestions from code review
sklam File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this path reached? Is it tested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's me saying it should be unreachable. But I am not sure.