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
8254586: Replace fthrow() calls with simpler method calls in classFileParser.cpp #618
Conversation
👋 Welcome back hseigel! A progress list of the required criteria for merging this PR into |
Webrevs
|
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.
Looks good Harold!
@hseigel This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 26 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
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.
Hi Harold,
Not sure why we couldn't use THROW_MSG in these cases? The helper functions are okay though.
But don't use CHECK macro here - just pass THREADS and then return. We know there is a pending exception.
Thanks,
David
this_klass->external_name(), | ||
super_ik->external_name()); | ||
return; | ||
classfile_icce_error("class %s cannot inherit from sealed class %s", super_ik, CHECK); |
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.
You don't want CHECK there - you know there is an exception pending. Just pass THREAD and return afterwards. This goes for all the new callsites.
@@ -78,6 +78,25 @@ void ClassFileParser::classfile_parse_error(const char* msg, | |||
msg, name, signature, _class_name->as_C_string()); | |||
} | |||
|
|||
void ClassFileParser::classfile_icce_error(const char* msg, |
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.
Is there a reason we can't just use THROW_MSG at the callsites rather than introducing these helper functions?
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.
I think it's intended to match existing usage.
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.
Looks good to me. I agree with David's comment to just pass THREAD and return; Saves an implicit if statement in these places.
@@ -78,6 +78,25 @@ void ClassFileParser::classfile_parse_error(const char* msg, | |||
msg, name, signature, _class_name->as_C_string()); | |||
} | |||
|
|||
void ClassFileParser::classfile_icce_error(const char* msg, |
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.
I think it's intended to match existing usage.
Thanks for looking at this change! Please review the updated change that replaces CHECK* arguments with THREAD, followed by 'return' statements. This change was made for calls to the new methods and existing calls to classfile_parse_error(). |
This looks like a good improvement. It might make the size of the generated code in cfp smaller. Thanks! |
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.
Looks good - thanks for the extended cleanup. This is why we have the THROW macros to handle the return. :)
/integrate |
@hseigel Since your change was applied there have been 26 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 95e68c6. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi,
Please review this small change to simplify exception throwing in classFileParser.cpp The change was tested with tiers one and two on Windows, Linux x64, and Mac OSX, and with tiers 3-5 on Linux x64.
Thanks, Harold
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/618/head:pull/618
$ git checkout pull/618