-
-
Notifications
You must be signed in to change notification settings - Fork 721
minor improvements to ExceptionalUnitGraph and ThrowableSet #1667
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
base: develop
Are you sure you want to change the base?
minor improvements to ExceptionalUnitGraph and ThrowableSet #1667
Conversation
*/ | ||
private Map<Unit, Collection<ExceptionDest>> addDestToMap(Map<Unit, Collection<ExceptionDest>> map, Unit u, Trap t, | ||
ThrowableSet caught) { | ||
protected Map<Unit, Collection<ExceptionDest>> addDestToMap(Map<Unit, Collection<ExceptionDest>> map, Unit u, |
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.
Make it protected to allow a subclass to use and/or override it.
Collection<ExceptionDest> result = unitToExceptionDests.get(u); | ||
if (result == null) { | ||
ExceptionDest e = new ExceptionDest(null, null) { | ||
private ThrowableSet throwables; |
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.
ExceptionDest already defines this field, it was just private so it was not accessible. So I removed the private from that field and remove this field so there would be no duplication.
* ignore completely <code>Unit</code>s which are outside the scope of all <code>Trap</code>s.) | ||
* </p> | ||
*/ | ||
protected Map<Unit, Collection<ExceptionDest>> buildExceptionDests(ThrowAnalysis throwAnalysis) { |
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.
Restructured this method a bit to avoid unnecessary work when body.getTraps() is empty and to avoid obtaining ThrowableSet.Manager.v().EMPTY repeatedly.
No description provided.